/work/obj-fuzz/dist/include/nsIHttpProtocolHandler.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * DO NOT EDIT. THIS FILE IS GENERATED FROM /src/mozilla-central/netwerk/protocol/http/nsIHttpProtocolHandler.idl |
3 | | */ |
4 | | |
5 | | #ifndef __gen_nsIHttpProtocolHandler_h__ |
6 | | #define __gen_nsIHttpProtocolHandler_h__ |
7 | | |
8 | | |
9 | | #ifndef __gen_nsIProxiedProtocolHandler_h__ |
10 | | #include "nsIProxiedProtocolHandler.h" |
11 | | #endif |
12 | | |
13 | | #include "js/GCAnnotations.h" |
14 | | |
15 | | /* For IDL files that don't want to include root IDL files. */ |
16 | | #ifndef NS_NO_VTABLE |
17 | | #define NS_NO_VTABLE |
18 | | #endif |
19 | | |
20 | | /* starting interface: nsIHttpProtocolHandler */ |
21 | | #define NS_IHTTPPROTOCOLHANDLER_IID_STR "c48126d9-2ddd-485b-a51a-378e917e75f8" |
22 | | |
23 | | #define NS_IHTTPPROTOCOLHANDLER_IID \ |
24 | | {0xc48126d9, 0x2ddd, 0x485b, \ |
25 | | { 0xa5, 0x1a, 0x37, 0x8e, 0x91, 0x7e, 0x75, 0xf8 }} |
26 | | |
27 | | class NS_NO_VTABLE nsIHttpProtocolHandler : public nsIProxiedProtocolHandler { |
28 | | public: |
29 | | |
30 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IHTTPPROTOCOLHANDLER_IID) |
31 | | |
32 | | /* [must_use] readonly attribute ACString userAgent; */ |
33 | | JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD GetUserAgent(nsACString& aUserAgent) = 0; |
34 | | |
35 | | /* [must_use] readonly attribute ACString appName; */ |
36 | | JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD GetAppName(nsACString& aAppName) = 0; |
37 | | |
38 | | /* [must_use] readonly attribute ACString appVersion; */ |
39 | | JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD GetAppVersion(nsACString& aAppVersion) = 0; |
40 | | |
41 | | /* [must_use] readonly attribute ACString platform; */ |
42 | | JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD GetPlatform(nsACString& aPlatform) = 0; |
43 | | |
44 | | /* [must_use] readonly attribute ACString oscpu; */ |
45 | | JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD GetOscpu(nsACString& aOscpu) = 0; |
46 | | |
47 | | /* [must_use] readonly attribute ACString misc; */ |
48 | | JS_HAZ_CAN_RUN_SCRIPT MOZ_MUST_USE NS_IMETHOD GetMisc(nsACString& aMisc) = 0; |
49 | | |
50 | | }; |
51 | | |
52 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIHttpProtocolHandler, NS_IHTTPPROTOCOLHANDLER_IID) |
53 | | |
54 | | /* Use this macro when declaring classes that implement this interface. */ |
55 | | #define NS_DECL_NSIHTTPPROTOCOLHANDLER \ |
56 | | MOZ_MUST_USE NS_IMETHOD GetUserAgent(nsACString& aUserAgent) override; \ |
57 | | MOZ_MUST_USE NS_IMETHOD GetAppName(nsACString& aAppName) override; \ |
58 | | MOZ_MUST_USE NS_IMETHOD GetAppVersion(nsACString& aAppVersion) override; \ |
59 | | MOZ_MUST_USE NS_IMETHOD GetPlatform(nsACString& aPlatform) override; \ |
60 | | MOZ_MUST_USE NS_IMETHOD GetOscpu(nsACString& aOscpu) override; \ |
61 | | MOZ_MUST_USE NS_IMETHOD GetMisc(nsACString& aMisc) override; |
62 | | |
63 | | /* Use this macro when declaring the members of this interface when the |
64 | | class doesn't implement the interface. This is useful for forwarding. */ |
65 | | #define NS_DECL_NON_VIRTUAL_NSIHTTPPROTOCOLHANDLER \ |
66 | | MOZ_MUST_USE nsresult GetUserAgent(nsACString& aUserAgent); \ |
67 | | MOZ_MUST_USE nsresult GetAppName(nsACString& aAppName); \ |
68 | | MOZ_MUST_USE nsresult GetAppVersion(nsACString& aAppVersion); \ |
69 | | MOZ_MUST_USE nsresult GetPlatform(nsACString& aPlatform); \ |
70 | | MOZ_MUST_USE nsresult GetOscpu(nsACString& aOscpu); \ |
71 | | MOZ_MUST_USE nsresult GetMisc(nsACString& aMisc); |
72 | | |
73 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
74 | | #define NS_FORWARD_NSIHTTPPROTOCOLHANDLER(_to) \ |
75 | 0 | MOZ_MUST_USE NS_IMETHOD GetUserAgent(nsACString& aUserAgent) override { return _to GetUserAgent(aUserAgent); } \ |
76 | 0 | MOZ_MUST_USE NS_IMETHOD GetAppName(nsACString& aAppName) override { return _to GetAppName(aAppName); } \ |
77 | 0 | MOZ_MUST_USE NS_IMETHOD GetAppVersion(nsACString& aAppVersion) override { return _to GetAppVersion(aAppVersion); } \ |
78 | 0 | MOZ_MUST_USE NS_IMETHOD GetPlatform(nsACString& aPlatform) override { return _to GetPlatform(aPlatform); } \ |
79 | 0 | MOZ_MUST_USE NS_IMETHOD GetOscpu(nsACString& aOscpu) override { return _to GetOscpu(aOscpu); } \ |
80 | 0 | MOZ_MUST_USE NS_IMETHOD GetMisc(nsACString& aMisc) override { return _to GetMisc(aMisc); } |
81 | | |
82 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
83 | | #define NS_FORWARD_SAFE_NSIHTTPPROTOCOLHANDLER(_to) \ |
84 | | MOZ_MUST_USE NS_IMETHOD GetUserAgent(nsACString& aUserAgent) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserAgent(aUserAgent); } \ |
85 | | MOZ_MUST_USE NS_IMETHOD GetAppName(nsACString& aAppName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppName(aAppName); } \ |
86 | | MOZ_MUST_USE NS_IMETHOD GetAppVersion(nsACString& aAppVersion) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAppVersion(aAppVersion); } \ |
87 | | MOZ_MUST_USE NS_IMETHOD GetPlatform(nsACString& aPlatform) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPlatform(aPlatform); } \ |
88 | | MOZ_MUST_USE NS_IMETHOD GetOscpu(nsACString& aOscpu) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOscpu(aOscpu); } \ |
89 | | MOZ_MUST_USE NS_IMETHOD GetMisc(nsACString& aMisc) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMisc(aMisc); } |
90 | | |
91 | | // ----------- Categories ----------- |
92 | | /** |
93 | | * At initialization time, the HTTP handler will initialize each service |
94 | | * registered under this category: |
95 | | */ |
96 | 1 | #define NS_HTTP_STARTUP_CATEGORY "http-startup-category" |
97 | | // ----------- Observer topics ----------- |
98 | | /** |
99 | | * nsIObserver notification corresponding to startup category. Services |
100 | | * registered under the startup category will receive this observer topic at |
101 | | * startup if they implement nsIObserver. The "subject" of the notification |
102 | | * is the nsIHttpProtocolHandler instance. |
103 | | */ |
104 | 1 | #define NS_HTTP_STARTUP_TOPIC "http-startup" |
105 | | /** |
106 | | * This observer topic is notified when an HTTP channel is opened. |
107 | | * It is similar to http-on-modify-request, except that |
108 | | * 1) The notification is guaranteed to occur before on-modify-request, during |
109 | | * the AsyncOpen call itself. |
110 | | * 2) It only occurs for the initial open of a channel, not for internal |
111 | | * asyncOpens that happen during redirects, etc. |
112 | | * 3) Some information (most notably nsIProxiedChannel.proxyInfo) may not be set |
113 | | * on the channel object yet. |
114 | | * |
115 | | * The "subject" of the notification is the nsIHttpChannel instance. |
116 | | * |
117 | | * Generally the 'http-on-modify-request' notification is preferred unless the |
118 | | * synchronous, during-asyncOpen behavior that this notification provides is |
119 | | * required. |
120 | | */ |
121 | 0 | #define NS_HTTP_ON_OPENING_REQUEST_TOPIC "http-on-opening-request" |
122 | | /** |
123 | | * Before an HTTP request is sent to the server, this observer topic is |
124 | | * notified. The observer of this topic can then choose to set any additional |
125 | | * headers for this request before the request is actually sent to the server. |
126 | | * The "subject" of the notification is the nsIHttpChannel instance. |
127 | | */ |
128 | 0 | #define NS_HTTP_ON_MODIFY_REQUEST_TOPIC "http-on-modify-request" |
129 | | /** |
130 | | * Before an HTTP connection to the server is created, this observer topic is |
131 | | * notified. This observer happens after HSTS upgrades, etc. are set, providing |
132 | | * access to the full set of request headers. The observer of this topic can |
133 | | * choose to set any additional headers for this request before the request is |
134 | | * actually sent to the server. The "subject" of the notification is the |
135 | | * nsIHttpChannel instance. |
136 | | */ |
137 | 0 | #define NS_HTTP_ON_BEFORE_CONNECT_TOPIC "http-on-before-connect" |
138 | | /** |
139 | | * After an HTTP server response is received, this observer topic is notified. |
140 | | * The observer of this topic can interrogate the response. The "subject" of |
141 | | * the notification is the nsIHttpChannel instance. |
142 | | */ |
143 | 3 | #define NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC "http-on-examine-response" |
144 | | /** |
145 | | * The observer of this topic is notified after the received HTTP response |
146 | | * is merged with data from the browser cache. This means that, among other |
147 | | * things, the Content-Type header will be set correctly. |
148 | | */ |
149 | 0 | #define NS_HTTP_ON_EXAMINE_MERGED_RESPONSE_TOPIC "http-on-examine-merged-response" |
150 | | /** |
151 | | * The observer of this topic is notified before data is read from the cache. |
152 | | * The notification is sent if and only if there is no network communication |
153 | | * at all. |
154 | | */ |
155 | 0 | #define NS_HTTP_ON_EXAMINE_CACHED_RESPONSE_TOPIC "http-on-examine-cached-response" |
156 | | /** |
157 | | * Before an HTTP request corresponding to a channel with the LOAD_DOCUMENT_URI |
158 | | * flag is sent to the server, this observer topic is notified. The observer of |
159 | | * this topic can then choose to modify the user agent for this request before |
160 | | * the request is actually sent to the server. Additionally, the modified user |
161 | | * agent will be propagated to sub-resource requests from the same load group. |
162 | | */ |
163 | 0 | #define NS_HTTP_ON_USERAGENT_REQUEST_TOPIC "http-on-useragent-request" |
164 | | /** |
165 | | * This topic is notified for every http channel right after it called |
166 | | * OnStopRequest on its listener, regardless whether it was finished |
167 | | * successfully, failed or has been canceled. |
168 | | */ |
169 | 0 | #define NS_HTTP_ON_STOP_REQUEST_TOPIC "http-on-stop-request" |
170 | | |
171 | | #endif /* __gen_nsIHttpProtocolHandler_h__ */ |