/work/obj-fuzz/dist/include/nsIDNSServiceDiscovery.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * DO NOT EDIT. THIS FILE IS GENERATED FROM /src/mozilla-central/netwerk/dns/mdns/nsIDNSServiceDiscovery.idl |
3 | | */ |
4 | | |
5 | | #ifndef __gen_nsIDNSServiceDiscovery_h__ |
6 | | #define __gen_nsIDNSServiceDiscovery_h__ |
7 | | |
8 | | |
9 | | #ifndef __gen_nsISupports_h__ |
10 | | #include "nsISupports.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 | | class nsICancelable; /* forward declaration */ |
20 | | |
21 | | class nsIPropertyBag2; /* forward declaration */ |
22 | | |
23 | | |
24 | | /* starting interface: nsIDNSServiceInfo */ |
25 | | #define NS_IDNSSERVICEINFO_IID_STR "670ed0f9-2fa5-4544-bf1e-ea58ac179374" |
26 | | |
27 | | #define NS_IDNSSERVICEINFO_IID \ |
28 | | {0x670ed0f9, 0x2fa5, 0x4544, \ |
29 | | { 0xbf, 0x1e, 0xea, 0x58, 0xac, 0x17, 0x93, 0x74 }} |
30 | | |
31 | | class NS_NO_VTABLE nsIDNSServiceInfo : public nsISupports { |
32 | | public: |
33 | | |
34 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDNSSERVICEINFO_IID) |
35 | | |
36 | | /* attribute AUTF8String host; */ |
37 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHost(nsACString& aHost) = 0; |
38 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetHost(const nsACString& aHost) = 0; |
39 | | |
40 | | /* attribute AUTF8String address; */ |
41 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAddress(nsACString& aAddress) = 0; |
42 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetAddress(const nsACString& aAddress) = 0; |
43 | | |
44 | | /* attribute unsigned short port; */ |
45 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPort(uint16_t *aPort) = 0; |
46 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetPort(uint16_t aPort) = 0; |
47 | | |
48 | | /* attribute AUTF8String serviceName; */ |
49 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetServiceName(nsACString& aServiceName) = 0; |
50 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetServiceName(const nsACString& aServiceName) = 0; |
51 | | |
52 | | /* attribute AUTF8String serviceType; */ |
53 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetServiceType(nsACString& aServiceType) = 0; |
54 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetServiceType(const nsACString& aServiceType) = 0; |
55 | | |
56 | | /* attribute AUTF8String domainName; */ |
57 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDomainName(nsACString& aDomainName) = 0; |
58 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDomainName(const nsACString& aDomainName) = 0; |
59 | | |
60 | | /* attribute nsIPropertyBag2 attributes; */ |
61 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAttributes(nsIPropertyBag2 **aAttributes) = 0; |
62 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetAttributes(nsIPropertyBag2 *aAttributes) = 0; |
63 | | |
64 | | }; |
65 | | |
66 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIDNSServiceInfo, NS_IDNSSERVICEINFO_IID) |
67 | | |
68 | | /* Use this macro when declaring classes that implement this interface. */ |
69 | | #define NS_DECL_NSIDNSSERVICEINFO \ |
70 | | NS_IMETHOD GetHost(nsACString& aHost) override; \ |
71 | | NS_IMETHOD SetHost(const nsACString& aHost) override; \ |
72 | | NS_IMETHOD GetAddress(nsACString& aAddress) override; \ |
73 | | NS_IMETHOD SetAddress(const nsACString& aAddress) override; \ |
74 | | NS_IMETHOD GetPort(uint16_t *aPort) override; \ |
75 | | NS_IMETHOD SetPort(uint16_t aPort) override; \ |
76 | | NS_IMETHOD GetServiceName(nsACString& aServiceName) override; \ |
77 | | NS_IMETHOD SetServiceName(const nsACString& aServiceName) override; \ |
78 | | NS_IMETHOD GetServiceType(nsACString& aServiceType) override; \ |
79 | | NS_IMETHOD SetServiceType(const nsACString& aServiceType) override; \ |
80 | | NS_IMETHOD GetDomainName(nsACString& aDomainName) override; \ |
81 | | NS_IMETHOD SetDomainName(const nsACString& aDomainName) override; \ |
82 | | NS_IMETHOD GetAttributes(nsIPropertyBag2 **aAttributes) override; \ |
83 | | NS_IMETHOD SetAttributes(nsIPropertyBag2 *aAttributes) override; |
84 | | |
85 | | /* Use this macro when declaring the members of this interface when the |
86 | | class doesn't implement the interface. This is useful for forwarding. */ |
87 | | #define NS_DECL_NON_VIRTUAL_NSIDNSSERVICEINFO \ |
88 | | nsresult GetHost(nsACString& aHost); \ |
89 | | nsresult SetHost(const nsACString& aHost); \ |
90 | | nsresult GetAddress(nsACString& aAddress); \ |
91 | | nsresult SetAddress(const nsACString& aAddress); \ |
92 | | nsresult GetPort(uint16_t *aPort); \ |
93 | | nsresult SetPort(uint16_t aPort); \ |
94 | | nsresult GetServiceName(nsACString& aServiceName); \ |
95 | | nsresult SetServiceName(const nsACString& aServiceName); \ |
96 | | nsresult GetServiceType(nsACString& aServiceType); \ |
97 | | nsresult SetServiceType(const nsACString& aServiceType); \ |
98 | | nsresult GetDomainName(nsACString& aDomainName); \ |
99 | | nsresult SetDomainName(const nsACString& aDomainName); \ |
100 | | nsresult GetAttributes(nsIPropertyBag2 **aAttributes); \ |
101 | | nsresult SetAttributes(nsIPropertyBag2 *aAttributes); |
102 | | |
103 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
104 | | #define NS_FORWARD_NSIDNSSERVICEINFO(_to) \ |
105 | | NS_IMETHOD GetHost(nsACString& aHost) override { return _to GetHost(aHost); } \ |
106 | | NS_IMETHOD SetHost(const nsACString& aHost) override { return _to SetHost(aHost); } \ |
107 | | NS_IMETHOD GetAddress(nsACString& aAddress) override { return _to GetAddress(aAddress); } \ |
108 | | NS_IMETHOD SetAddress(const nsACString& aAddress) override { return _to SetAddress(aAddress); } \ |
109 | | NS_IMETHOD GetPort(uint16_t *aPort) override { return _to GetPort(aPort); } \ |
110 | | NS_IMETHOD SetPort(uint16_t aPort) override { return _to SetPort(aPort); } \ |
111 | | NS_IMETHOD GetServiceName(nsACString& aServiceName) override { return _to GetServiceName(aServiceName); } \ |
112 | | NS_IMETHOD SetServiceName(const nsACString& aServiceName) override { return _to SetServiceName(aServiceName); } \ |
113 | | NS_IMETHOD GetServiceType(nsACString& aServiceType) override { return _to GetServiceType(aServiceType); } \ |
114 | | NS_IMETHOD SetServiceType(const nsACString& aServiceType) override { return _to SetServiceType(aServiceType); } \ |
115 | | NS_IMETHOD GetDomainName(nsACString& aDomainName) override { return _to GetDomainName(aDomainName); } \ |
116 | | NS_IMETHOD SetDomainName(const nsACString& aDomainName) override { return _to SetDomainName(aDomainName); } \ |
117 | | NS_IMETHOD GetAttributes(nsIPropertyBag2 **aAttributes) override { return _to GetAttributes(aAttributes); } \ |
118 | | NS_IMETHOD SetAttributes(nsIPropertyBag2 *aAttributes) override { return _to SetAttributes(aAttributes); } |
119 | | |
120 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
121 | | #define NS_FORWARD_SAFE_NSIDNSSERVICEINFO(_to) \ |
122 | | NS_IMETHOD GetHost(nsACString& aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \ |
123 | | NS_IMETHOD SetHost(const nsACString& aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHost(aHost); } \ |
124 | | NS_IMETHOD GetAddress(nsACString& aAddress) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAddress(aAddress); } \ |
125 | | NS_IMETHOD SetAddress(const nsACString& aAddress) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAddress(aAddress); } \ |
126 | | NS_IMETHOD GetPort(uint16_t *aPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \ |
127 | | NS_IMETHOD SetPort(uint16_t aPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPort(aPort); } \ |
128 | | NS_IMETHOD GetServiceName(nsACString& aServiceName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServiceName(aServiceName); } \ |
129 | | NS_IMETHOD SetServiceName(const nsACString& aServiceName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetServiceName(aServiceName); } \ |
130 | | NS_IMETHOD GetServiceType(nsACString& aServiceType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServiceType(aServiceType); } \ |
131 | | NS_IMETHOD SetServiceType(const nsACString& aServiceType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetServiceType(aServiceType); } \ |
132 | | NS_IMETHOD GetDomainName(nsACString& aDomainName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDomainName(aDomainName); } \ |
133 | | NS_IMETHOD SetDomainName(const nsACString& aDomainName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDomainName(aDomainName); } \ |
134 | | NS_IMETHOD GetAttributes(nsIPropertyBag2 **aAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributes(aAttributes); } \ |
135 | | NS_IMETHOD SetAttributes(nsIPropertyBag2 *aAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributes(aAttributes); } |
136 | | |
137 | | |
138 | | /* starting interface: nsIDNSServiceDiscoveryListener */ |
139 | | #define NS_IDNSSERVICEDISCOVERYLISTENER_IID_STR "3025b7f2-97bb-435b-b43d-26731b3f5fc4" |
140 | | |
141 | | #define NS_IDNSSERVICEDISCOVERYLISTENER_IID \ |
142 | | {0x3025b7f2, 0x97bb, 0x435b, \ |
143 | | { 0xb4, 0x3d, 0x26, 0x73, 0x1b, 0x3f, 0x5f, 0xc4 }} |
144 | | |
145 | | class NS_NO_VTABLE nsIDNSServiceDiscoveryListener : public nsISupports { |
146 | | public: |
147 | | |
148 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDNSSERVICEDISCOVERYLISTENER_IID) |
149 | | |
150 | | /* void onDiscoveryStarted (in AUTF8String aServiceType); */ |
151 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnDiscoveryStarted(const nsACString& aServiceType) = 0; |
152 | | |
153 | | /* void onDiscoveryStopped (in AUTF8String aServiceType); */ |
154 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnDiscoveryStopped(const nsACString& aServiceType) = 0; |
155 | | |
156 | | /* void onServiceFound (in nsIDNSServiceInfo aServiceInfo); */ |
157 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnServiceFound(nsIDNSServiceInfo *aServiceInfo) = 0; |
158 | | |
159 | | /* void onServiceLost (in nsIDNSServiceInfo aServiceInfo); */ |
160 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnServiceLost(nsIDNSServiceInfo *aServiceInfo) = 0; |
161 | | |
162 | | /* void onStartDiscoveryFailed (in AUTF8String aServiceType, in long aErrorCode); */ |
163 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnStartDiscoveryFailed(const nsACString& aServiceType, int32_t aErrorCode) = 0; |
164 | | |
165 | | /* void onStopDiscoveryFailed (in AUTF8String aServiceType, in long aErrorCode); */ |
166 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnStopDiscoveryFailed(const nsACString& aServiceType, int32_t aErrorCode) = 0; |
167 | | |
168 | | }; |
169 | | |
170 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIDNSServiceDiscoveryListener, NS_IDNSSERVICEDISCOVERYLISTENER_IID) |
171 | | |
172 | | /* Use this macro when declaring classes that implement this interface. */ |
173 | | #define NS_DECL_NSIDNSSERVICEDISCOVERYLISTENER \ |
174 | | NS_IMETHOD OnDiscoveryStarted(const nsACString& aServiceType) override; \ |
175 | | NS_IMETHOD OnDiscoveryStopped(const nsACString& aServiceType) override; \ |
176 | | NS_IMETHOD OnServiceFound(nsIDNSServiceInfo *aServiceInfo) override; \ |
177 | | NS_IMETHOD OnServiceLost(nsIDNSServiceInfo *aServiceInfo) override; \ |
178 | | NS_IMETHOD OnStartDiscoveryFailed(const nsACString& aServiceType, int32_t aErrorCode) override; \ |
179 | | NS_IMETHOD OnStopDiscoveryFailed(const nsACString& aServiceType, int32_t aErrorCode) override; |
180 | | |
181 | | /* Use this macro when declaring the members of this interface when the |
182 | | class doesn't implement the interface. This is useful for forwarding. */ |
183 | | #define NS_DECL_NON_VIRTUAL_NSIDNSSERVICEDISCOVERYLISTENER \ |
184 | | nsresult OnDiscoveryStarted(const nsACString& aServiceType); \ |
185 | | nsresult OnDiscoveryStopped(const nsACString& aServiceType); \ |
186 | | nsresult OnServiceFound(nsIDNSServiceInfo *aServiceInfo); \ |
187 | | nsresult OnServiceLost(nsIDNSServiceInfo *aServiceInfo); \ |
188 | | nsresult OnStartDiscoveryFailed(const nsACString& aServiceType, int32_t aErrorCode); \ |
189 | | nsresult OnStopDiscoveryFailed(const nsACString& aServiceType, int32_t aErrorCode); |
190 | | |
191 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
192 | | #define NS_FORWARD_NSIDNSSERVICEDISCOVERYLISTENER(_to) \ |
193 | | NS_IMETHOD OnDiscoveryStarted(const nsACString& aServiceType) override { return _to OnDiscoveryStarted(aServiceType); } \ |
194 | | NS_IMETHOD OnDiscoveryStopped(const nsACString& aServiceType) override { return _to OnDiscoveryStopped(aServiceType); } \ |
195 | | NS_IMETHOD OnServiceFound(nsIDNSServiceInfo *aServiceInfo) override { return _to OnServiceFound(aServiceInfo); } \ |
196 | | NS_IMETHOD OnServiceLost(nsIDNSServiceInfo *aServiceInfo) override { return _to OnServiceLost(aServiceInfo); } \ |
197 | | NS_IMETHOD OnStartDiscoveryFailed(const nsACString& aServiceType, int32_t aErrorCode) override { return _to OnStartDiscoveryFailed(aServiceType, aErrorCode); } \ |
198 | | NS_IMETHOD OnStopDiscoveryFailed(const nsACString& aServiceType, int32_t aErrorCode) override { return _to OnStopDiscoveryFailed(aServiceType, aErrorCode); } |
199 | | |
200 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
201 | | #define NS_FORWARD_SAFE_NSIDNSSERVICEDISCOVERYLISTENER(_to) \ |
202 | 0 | NS_IMETHOD OnDiscoveryStarted(const nsACString& aServiceType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDiscoveryStarted(aServiceType); } \ |
203 | 0 | NS_IMETHOD OnDiscoveryStopped(const nsACString& aServiceType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDiscoveryStopped(aServiceType); } \ |
204 | 0 | NS_IMETHOD OnServiceFound(nsIDNSServiceInfo *aServiceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServiceFound(aServiceInfo); } \ |
205 | 0 | NS_IMETHOD OnServiceLost(nsIDNSServiceInfo *aServiceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServiceLost(aServiceInfo); } \ |
206 | 0 | NS_IMETHOD OnStartDiscoveryFailed(const nsACString& aServiceType, int32_t aErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartDiscoveryFailed(aServiceType, aErrorCode); } \ |
207 | 0 | NS_IMETHOD OnStopDiscoveryFailed(const nsACString& aServiceType, int32_t aErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopDiscoveryFailed(aServiceType, aErrorCode); } |
208 | | |
209 | | |
210 | | /* starting interface: nsIDNSRegistrationListener */ |
211 | | #define NS_IDNSREGISTRATIONLISTENER_IID_STR "e165e4be-abf4-4963-a66d-ed3ca116e5e4" |
212 | | |
213 | | #define NS_IDNSREGISTRATIONLISTENER_IID \ |
214 | | {0xe165e4be, 0xabf4, 0x4963, \ |
215 | | { 0xa6, 0x6d, 0xed, 0x3c, 0xa1, 0x16, 0xe5, 0xe4 }} |
216 | | |
217 | | class NS_NO_VTABLE nsIDNSRegistrationListener : public nsISupports { |
218 | | public: |
219 | | |
220 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDNSREGISTRATIONLISTENER_IID) |
221 | | |
222 | | enum { |
223 | | ERROR_SERVICE_NOT_RUNNING = -65563 |
224 | | }; |
225 | | |
226 | | /* void onServiceRegistered (in nsIDNSServiceInfo aServiceInfo); */ |
227 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo) = 0; |
228 | | |
229 | | /* void onServiceUnregistered (in nsIDNSServiceInfo aServiceInfo); */ |
230 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo) = 0; |
231 | | |
232 | | /* void onRegistrationFailed (in nsIDNSServiceInfo aServiceInfo, in long aErrorCode); */ |
233 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) = 0; |
234 | | |
235 | | /* void onUnregistrationFailed (in nsIDNSServiceInfo aServiceInfo, in long aErrorCode); */ |
236 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) = 0; |
237 | | |
238 | | }; |
239 | | |
240 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIDNSRegistrationListener, NS_IDNSREGISTRATIONLISTENER_IID) |
241 | | |
242 | | /* Use this macro when declaring classes that implement this interface. */ |
243 | | #define NS_DECL_NSIDNSREGISTRATIONLISTENER \ |
244 | | NS_IMETHOD OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo) override; \ |
245 | | NS_IMETHOD OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo) override; \ |
246 | | NS_IMETHOD OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override; \ |
247 | | NS_IMETHOD OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override; |
248 | | |
249 | | /* Use this macro when declaring the members of this interface when the |
250 | | class doesn't implement the interface. This is useful for forwarding. */ |
251 | | #define NS_DECL_NON_VIRTUAL_NSIDNSREGISTRATIONLISTENER \ |
252 | | nsresult OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo); \ |
253 | | nsresult OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo); \ |
254 | | nsresult OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode); \ |
255 | | nsresult OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode); |
256 | | |
257 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
258 | | #define NS_FORWARD_NSIDNSREGISTRATIONLISTENER(_to) \ |
259 | | NS_IMETHOD OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo) override { return _to OnServiceRegistered(aServiceInfo); } \ |
260 | | NS_IMETHOD OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo) override { return _to OnServiceUnregistered(aServiceInfo); } \ |
261 | | NS_IMETHOD OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return _to OnRegistrationFailed(aServiceInfo, aErrorCode); } \ |
262 | | NS_IMETHOD OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return _to OnUnregistrationFailed(aServiceInfo, aErrorCode); } |
263 | | |
264 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
265 | | #define NS_FORWARD_SAFE_NSIDNSREGISTRATIONLISTENER(_to) \ |
266 | 0 | NS_IMETHOD OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServiceRegistered(aServiceInfo); } \ |
267 | 0 | NS_IMETHOD OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServiceUnregistered(aServiceInfo); } \ |
268 | 0 | NS_IMETHOD OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRegistrationFailed(aServiceInfo, aErrorCode); } \ |
269 | 0 | NS_IMETHOD OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUnregistrationFailed(aServiceInfo, aErrorCode); } |
270 | | |
271 | | |
272 | | /* starting interface: nsIDNSServiceResolveListener */ |
273 | | #define NS_IDNSSERVICERESOLVELISTENER_IID_STR "24ee6408-648e-421d-accf-c6e5adeccf97" |
274 | | |
275 | | #define NS_IDNSSERVICERESOLVELISTENER_IID \ |
276 | | {0x24ee6408, 0x648e, 0x421d, \ |
277 | | { 0xac, 0xcf, 0xc6, 0xe5, 0xad, 0xec, 0xcf, 0x97 }} |
278 | | |
279 | | class NS_NO_VTABLE nsIDNSServiceResolveListener : public nsISupports { |
280 | | public: |
281 | | |
282 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDNSSERVICERESOLVELISTENER_IID) |
283 | | |
284 | | /* void onServiceResolved (in nsIDNSServiceInfo aServiceInfo); */ |
285 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnServiceResolved(nsIDNSServiceInfo *aServiceInfo) = 0; |
286 | | |
287 | | /* void onResolveFailed (in nsIDNSServiceInfo aServiceInfo, in long aErrorCode); */ |
288 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) = 0; |
289 | | |
290 | | }; |
291 | | |
292 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIDNSServiceResolveListener, NS_IDNSSERVICERESOLVELISTENER_IID) |
293 | | |
294 | | /* Use this macro when declaring classes that implement this interface. */ |
295 | | #define NS_DECL_NSIDNSSERVICERESOLVELISTENER \ |
296 | | NS_IMETHOD OnServiceResolved(nsIDNSServiceInfo *aServiceInfo) override; \ |
297 | | NS_IMETHOD OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override; |
298 | | |
299 | | /* Use this macro when declaring the members of this interface when the |
300 | | class doesn't implement the interface. This is useful for forwarding. */ |
301 | | #define NS_DECL_NON_VIRTUAL_NSIDNSSERVICERESOLVELISTENER \ |
302 | | nsresult OnServiceResolved(nsIDNSServiceInfo *aServiceInfo); \ |
303 | | nsresult OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode); |
304 | | |
305 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
306 | | #define NS_FORWARD_NSIDNSSERVICERESOLVELISTENER(_to) \ |
307 | | NS_IMETHOD OnServiceResolved(nsIDNSServiceInfo *aServiceInfo) override { return _to OnServiceResolved(aServiceInfo); } \ |
308 | | NS_IMETHOD OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return _to OnResolveFailed(aServiceInfo, aErrorCode); } |
309 | | |
310 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
311 | | #define NS_FORWARD_SAFE_NSIDNSSERVICERESOLVELISTENER(_to) \ |
312 | 0 | NS_IMETHOD OnServiceResolved(nsIDNSServiceInfo *aServiceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServiceResolved(aServiceInfo); } \ |
313 | 0 | NS_IMETHOD OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnResolveFailed(aServiceInfo, aErrorCode); } |
314 | | |
315 | | |
316 | | /* starting interface: nsIDNSServiceDiscovery */ |
317 | | #define NS_IDNSSERVICEDISCOVERY_IID_STR "6487899b-beb1-455a-ba65-e4fd465066d7" |
318 | | |
319 | | #define NS_IDNSSERVICEDISCOVERY_IID \ |
320 | | {0x6487899b, 0xbeb1, 0x455a, \ |
321 | | { 0xba, 0x65, 0xe4, 0xfd, 0x46, 0x50, 0x66, 0xd7 }} |
322 | | |
323 | | class NS_NO_VTABLE nsIDNSServiceDiscovery : public nsISupports { |
324 | | public: |
325 | | |
326 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDNSSERVICEDISCOVERY_IID) |
327 | | |
328 | | /* nsICancelable startDiscovery (in AUTF8String aServiceType, in nsIDNSServiceDiscoveryListener aListener); */ |
329 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD StartDiscovery(const nsACString& aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable **_retval) = 0; |
330 | | |
331 | | /* nsICancelable registerService (in nsIDNSServiceInfo aServiceInfo, in nsIDNSRegistrationListener aListener); */ |
332 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable **_retval) = 0; |
333 | | |
334 | | /* void resolveService (in nsIDNSServiceInfo aServiceInfo, in nsIDNSServiceResolveListener aListener); */ |
335 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener) = 0; |
336 | | |
337 | | }; |
338 | | |
339 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIDNSServiceDiscovery, NS_IDNSSERVICEDISCOVERY_IID) |
340 | | |
341 | | /* Use this macro when declaring classes that implement this interface. */ |
342 | | #define NS_DECL_NSIDNSSERVICEDISCOVERY \ |
343 | | NS_IMETHOD StartDiscovery(const nsACString& aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable **_retval) override; \ |
344 | | NS_IMETHOD RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable **_retval) override; \ |
345 | | NS_IMETHOD ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener) override; |
346 | | |
347 | | /* Use this macro when declaring the members of this interface when the |
348 | | class doesn't implement the interface. This is useful for forwarding. */ |
349 | | #define NS_DECL_NON_VIRTUAL_NSIDNSSERVICEDISCOVERY \ |
350 | | nsresult StartDiscovery(const nsACString& aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable **_retval); \ |
351 | | nsresult RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable **_retval); \ |
352 | | nsresult ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener); |
353 | | |
354 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
355 | | #define NS_FORWARD_NSIDNSSERVICEDISCOVERY(_to) \ |
356 | | NS_IMETHOD StartDiscovery(const nsACString& aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable **_retval) override { return _to StartDiscovery(aServiceType, aListener, _retval); } \ |
357 | | NS_IMETHOD RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable **_retval) override { return _to RegisterService(aServiceInfo, aListener, _retval); } \ |
358 | | NS_IMETHOD ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener) override { return _to ResolveService(aServiceInfo, aListener); } |
359 | | |
360 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
361 | | #define NS_FORWARD_SAFE_NSIDNSSERVICEDISCOVERY(_to) \ |
362 | | NS_IMETHOD StartDiscovery(const nsACString& aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StartDiscovery(aServiceType, aListener, _retval); } \ |
363 | | NS_IMETHOD RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterService(aServiceInfo, aListener, _retval); } \ |
364 | | NS_IMETHOD ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResolveService(aServiceInfo, aListener); } |
365 | | |
366 | | #define DNSSERVICEDISCOVERY_CONTRACT_ID \ |
367 | 0 | "@mozilla.org/toolkit/components/mdnsresponder/dns-sd;1" |
368 | | #define DNSSERVICEINFO_CONTRACT_ID \ |
369 | 0 | "@mozilla.org/toolkit/components/mdnsresponder/dns-info;1" |
370 | | |
371 | | #endif /* __gen_nsIDNSServiceDiscovery_h__ */ |