Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/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 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class nsICancelable; /* forward declaration */
18 :
19 : class nsIPropertyBag2; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsIDNSServiceInfo */
23 : #define NS_IDNSSERVICEINFO_IID_STR "670ed0f9-2fa5-4544-bf1e-ea58ac179374"
24 :
25 : #define NS_IDNSSERVICEINFO_IID \
26 : {0x670ed0f9, 0x2fa5, 0x4544, \
27 : { 0xbf, 0x1e, 0xea, 0x58, 0xac, 0x17, 0x93, 0x74 }}
28 :
29 0 : class NS_NO_VTABLE nsIDNSServiceInfo : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDNSSERVICEINFO_IID)
33 :
34 : /* attribute AUTF8String host; */
35 : NS_IMETHOD GetHost(nsACString & aHost) = 0;
36 : NS_IMETHOD SetHost(const nsACString & aHost) = 0;
37 :
38 : /* attribute AUTF8String address; */
39 : NS_IMETHOD GetAddress(nsACString & aAddress) = 0;
40 : NS_IMETHOD SetAddress(const nsACString & aAddress) = 0;
41 :
42 : /* attribute unsigned short port; */
43 : NS_IMETHOD GetPort(uint16_t *aPort) = 0;
44 : NS_IMETHOD SetPort(uint16_t aPort) = 0;
45 :
46 : /* attribute AUTF8String serviceName; */
47 : NS_IMETHOD GetServiceName(nsACString & aServiceName) = 0;
48 : NS_IMETHOD SetServiceName(const nsACString & aServiceName) = 0;
49 :
50 : /* attribute AUTF8String serviceType; */
51 : NS_IMETHOD GetServiceType(nsACString & aServiceType) = 0;
52 : NS_IMETHOD SetServiceType(const nsACString & aServiceType) = 0;
53 :
54 : /* attribute AUTF8String domainName; */
55 : NS_IMETHOD GetDomainName(nsACString & aDomainName) = 0;
56 : NS_IMETHOD SetDomainName(const nsACString & aDomainName) = 0;
57 :
58 : /* attribute nsIPropertyBag2 attributes; */
59 : NS_IMETHOD GetAttributes(nsIPropertyBag2 * *aAttributes) = 0;
60 : NS_IMETHOD SetAttributes(nsIPropertyBag2 *aAttributes) = 0;
61 :
62 : };
63 :
64 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDNSServiceInfo, NS_IDNSSERVICEINFO_IID)
65 :
66 : /* Use this macro when declaring classes that implement this interface. */
67 : #define NS_DECL_NSIDNSSERVICEINFO \
68 : NS_IMETHOD GetHost(nsACString & aHost) override; \
69 : NS_IMETHOD SetHost(const nsACString & aHost) override; \
70 : NS_IMETHOD GetAddress(nsACString & aAddress) override; \
71 : NS_IMETHOD SetAddress(const nsACString & aAddress) override; \
72 : NS_IMETHOD GetPort(uint16_t *aPort) override; \
73 : NS_IMETHOD SetPort(uint16_t aPort) override; \
74 : NS_IMETHOD GetServiceName(nsACString & aServiceName) override; \
75 : NS_IMETHOD SetServiceName(const nsACString & aServiceName) override; \
76 : NS_IMETHOD GetServiceType(nsACString & aServiceType) override; \
77 : NS_IMETHOD SetServiceType(const nsACString & aServiceType) override; \
78 : NS_IMETHOD GetDomainName(nsACString & aDomainName) override; \
79 : NS_IMETHOD SetDomainName(const nsACString & aDomainName) override; \
80 : NS_IMETHOD GetAttributes(nsIPropertyBag2 * *aAttributes) override; \
81 : NS_IMETHOD SetAttributes(nsIPropertyBag2 *aAttributes) override;
82 :
83 : /* Use this macro when declaring the members of this interface when the
84 : class doesn't implement the interface. This is useful for forwarding. */
85 : #define NS_DECL_NON_VIRTUAL_NSIDNSSERVICEINFO \
86 : nsresult GetHost(nsACString & aHost); \
87 : nsresult SetHost(const nsACString & aHost); \
88 : nsresult GetAddress(nsACString & aAddress); \
89 : nsresult SetAddress(const nsACString & aAddress); \
90 : nsresult GetPort(uint16_t *aPort); \
91 : nsresult SetPort(uint16_t aPort); \
92 : nsresult GetServiceName(nsACString & aServiceName); \
93 : nsresult SetServiceName(const nsACString & aServiceName); \
94 : nsresult GetServiceType(nsACString & aServiceType); \
95 : nsresult SetServiceType(const nsACString & aServiceType); \
96 : nsresult GetDomainName(nsACString & aDomainName); \
97 : nsresult SetDomainName(const nsACString & aDomainName); \
98 : nsresult GetAttributes(nsIPropertyBag2 * *aAttributes); \
99 : nsresult SetAttributes(nsIPropertyBag2 *aAttributes);
100 :
101 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
102 : #define NS_FORWARD_NSIDNSSERVICEINFO(_to) \
103 : NS_IMETHOD GetHost(nsACString & aHost) override { return _to GetHost(aHost); } \
104 : NS_IMETHOD SetHost(const nsACString & aHost) override { return _to SetHost(aHost); } \
105 : NS_IMETHOD GetAddress(nsACString & aAddress) override { return _to GetAddress(aAddress); } \
106 : NS_IMETHOD SetAddress(const nsACString & aAddress) override { return _to SetAddress(aAddress); } \
107 : NS_IMETHOD GetPort(uint16_t *aPort) override { return _to GetPort(aPort); } \
108 : NS_IMETHOD SetPort(uint16_t aPort) override { return _to SetPort(aPort); } \
109 : NS_IMETHOD GetServiceName(nsACString & aServiceName) override { return _to GetServiceName(aServiceName); } \
110 : NS_IMETHOD SetServiceName(const nsACString & aServiceName) override { return _to SetServiceName(aServiceName); } \
111 : NS_IMETHOD GetServiceType(nsACString & aServiceType) override { return _to GetServiceType(aServiceType); } \
112 : NS_IMETHOD SetServiceType(const nsACString & aServiceType) override { return _to SetServiceType(aServiceType); } \
113 : NS_IMETHOD GetDomainName(nsACString & aDomainName) override { return _to GetDomainName(aDomainName); } \
114 : NS_IMETHOD SetDomainName(const nsACString & aDomainName) override { return _to SetDomainName(aDomainName); } \
115 : NS_IMETHOD GetAttributes(nsIPropertyBag2 * *aAttributes) override { return _to GetAttributes(aAttributes); } \
116 : NS_IMETHOD SetAttributes(nsIPropertyBag2 *aAttributes) override { return _to SetAttributes(aAttributes); }
117 :
118 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
119 : #define NS_FORWARD_SAFE_NSIDNSSERVICEINFO(_to) \
120 : NS_IMETHOD GetHost(nsACString & aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \
121 : NS_IMETHOD SetHost(const nsACString & aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHost(aHost); } \
122 : NS_IMETHOD GetAddress(nsACString & aAddress) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAddress(aAddress); } \
123 : NS_IMETHOD SetAddress(const nsACString & aAddress) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAddress(aAddress); } \
124 : NS_IMETHOD GetPort(uint16_t *aPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \
125 : NS_IMETHOD SetPort(uint16_t aPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPort(aPort); } \
126 : NS_IMETHOD GetServiceName(nsACString & aServiceName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServiceName(aServiceName); } \
127 : NS_IMETHOD SetServiceName(const nsACString & aServiceName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetServiceName(aServiceName); } \
128 : NS_IMETHOD GetServiceType(nsACString & aServiceType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServiceType(aServiceType); } \
129 : NS_IMETHOD SetServiceType(const nsACString & aServiceType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetServiceType(aServiceType); } \
130 : NS_IMETHOD GetDomainName(nsACString & aDomainName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDomainName(aDomainName); } \
131 : NS_IMETHOD SetDomainName(const nsACString & aDomainName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDomainName(aDomainName); } \
132 : NS_IMETHOD GetAttributes(nsIPropertyBag2 * *aAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributes(aAttributes); } \
133 : NS_IMETHOD SetAttributes(nsIPropertyBag2 *aAttributes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributes(aAttributes); }
134 :
135 : #if 0
136 : /* Use the code below as a template for the implementation class for this interface. */
137 :
138 : /* Header file */
139 : class nsDNSServiceInfo : public nsIDNSServiceInfo
140 : {
141 : public:
142 : NS_DECL_ISUPPORTS
143 : NS_DECL_NSIDNSSERVICEINFO
144 :
145 : nsDNSServiceInfo();
146 :
147 : private:
148 : ~nsDNSServiceInfo();
149 :
150 : protected:
151 : /* additional members */
152 : };
153 :
154 : /* Implementation file */
155 : NS_IMPL_ISUPPORTS(nsDNSServiceInfo, nsIDNSServiceInfo)
156 :
157 : nsDNSServiceInfo::nsDNSServiceInfo()
158 : {
159 : /* member initializers and constructor code */
160 : }
161 :
162 : nsDNSServiceInfo::~nsDNSServiceInfo()
163 : {
164 : /* destructor code */
165 : }
166 :
167 : /* attribute AUTF8String host; */
168 : NS_IMETHODIMP nsDNSServiceInfo::GetHost(nsACString & aHost)
169 : {
170 : return NS_ERROR_NOT_IMPLEMENTED;
171 : }
172 : NS_IMETHODIMP nsDNSServiceInfo::SetHost(const nsACString & aHost)
173 : {
174 : return NS_ERROR_NOT_IMPLEMENTED;
175 : }
176 :
177 : /* attribute AUTF8String address; */
178 : NS_IMETHODIMP nsDNSServiceInfo::GetAddress(nsACString & aAddress)
179 : {
180 : return NS_ERROR_NOT_IMPLEMENTED;
181 : }
182 : NS_IMETHODIMP nsDNSServiceInfo::SetAddress(const nsACString & aAddress)
183 : {
184 : return NS_ERROR_NOT_IMPLEMENTED;
185 : }
186 :
187 : /* attribute unsigned short port; */
188 : NS_IMETHODIMP nsDNSServiceInfo::GetPort(uint16_t *aPort)
189 : {
190 : return NS_ERROR_NOT_IMPLEMENTED;
191 : }
192 : NS_IMETHODIMP nsDNSServiceInfo::SetPort(uint16_t aPort)
193 : {
194 : return NS_ERROR_NOT_IMPLEMENTED;
195 : }
196 :
197 : /* attribute AUTF8String serviceName; */
198 : NS_IMETHODIMP nsDNSServiceInfo::GetServiceName(nsACString & aServiceName)
199 : {
200 : return NS_ERROR_NOT_IMPLEMENTED;
201 : }
202 : NS_IMETHODIMP nsDNSServiceInfo::SetServiceName(const nsACString & aServiceName)
203 : {
204 : return NS_ERROR_NOT_IMPLEMENTED;
205 : }
206 :
207 : /* attribute AUTF8String serviceType; */
208 : NS_IMETHODIMP nsDNSServiceInfo::GetServiceType(nsACString & aServiceType)
209 : {
210 : return NS_ERROR_NOT_IMPLEMENTED;
211 : }
212 : NS_IMETHODIMP nsDNSServiceInfo::SetServiceType(const nsACString & aServiceType)
213 : {
214 : return NS_ERROR_NOT_IMPLEMENTED;
215 : }
216 :
217 : /* attribute AUTF8String domainName; */
218 : NS_IMETHODIMP nsDNSServiceInfo::GetDomainName(nsACString & aDomainName)
219 : {
220 : return NS_ERROR_NOT_IMPLEMENTED;
221 : }
222 : NS_IMETHODIMP nsDNSServiceInfo::SetDomainName(const nsACString & aDomainName)
223 : {
224 : return NS_ERROR_NOT_IMPLEMENTED;
225 : }
226 :
227 : /* attribute nsIPropertyBag2 attributes; */
228 : NS_IMETHODIMP nsDNSServiceInfo::GetAttributes(nsIPropertyBag2 * *aAttributes)
229 : {
230 : return NS_ERROR_NOT_IMPLEMENTED;
231 : }
232 : NS_IMETHODIMP nsDNSServiceInfo::SetAttributes(nsIPropertyBag2 *aAttributes)
233 : {
234 : return NS_ERROR_NOT_IMPLEMENTED;
235 : }
236 :
237 : /* End of implementation class template. */
238 : #endif
239 :
240 :
241 : /* starting interface: nsIDNSServiceDiscoveryListener */
242 : #define NS_IDNSSERVICEDISCOVERYLISTENER_IID_STR "3025b7f2-97bb-435b-b43d-26731b3f5fc4"
243 :
244 : #define NS_IDNSSERVICEDISCOVERYLISTENER_IID \
245 : {0x3025b7f2, 0x97bb, 0x435b, \
246 : { 0xb4, 0x3d, 0x26, 0x73, 0x1b, 0x3f, 0x5f, 0xc4 }}
247 :
248 0 : class NS_NO_VTABLE nsIDNSServiceDiscoveryListener : public nsISupports {
249 : public:
250 :
251 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDNSSERVICEDISCOVERYLISTENER_IID)
252 :
253 : /* void onDiscoveryStarted (in AUTF8String aServiceType); */
254 : NS_IMETHOD OnDiscoveryStarted(const nsACString & aServiceType) = 0;
255 :
256 : /* void onDiscoveryStopped (in AUTF8String aServiceType); */
257 : NS_IMETHOD OnDiscoveryStopped(const nsACString & aServiceType) = 0;
258 :
259 : /* void onServiceFound (in nsIDNSServiceInfo aServiceInfo); */
260 : NS_IMETHOD OnServiceFound(nsIDNSServiceInfo *aServiceInfo) = 0;
261 :
262 : /* void onServiceLost (in nsIDNSServiceInfo aServiceInfo); */
263 : NS_IMETHOD OnServiceLost(nsIDNSServiceInfo *aServiceInfo) = 0;
264 :
265 : /* void onStartDiscoveryFailed (in AUTF8String aServiceType, in long aErrorCode); */
266 : NS_IMETHOD OnStartDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode) = 0;
267 :
268 : /* void onStopDiscoveryFailed (in AUTF8String aServiceType, in long aErrorCode); */
269 : NS_IMETHOD OnStopDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode) = 0;
270 :
271 : };
272 :
273 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDNSServiceDiscoveryListener, NS_IDNSSERVICEDISCOVERYLISTENER_IID)
274 :
275 : /* Use this macro when declaring classes that implement this interface. */
276 : #define NS_DECL_NSIDNSSERVICEDISCOVERYLISTENER \
277 : NS_IMETHOD OnDiscoveryStarted(const nsACString & aServiceType) override; \
278 : NS_IMETHOD OnDiscoveryStopped(const nsACString & aServiceType) override; \
279 : NS_IMETHOD OnServiceFound(nsIDNSServiceInfo *aServiceInfo) override; \
280 : NS_IMETHOD OnServiceLost(nsIDNSServiceInfo *aServiceInfo) override; \
281 : NS_IMETHOD OnStartDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode) override; \
282 : NS_IMETHOD OnStopDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode) override;
283 :
284 : /* Use this macro when declaring the members of this interface when the
285 : class doesn't implement the interface. This is useful for forwarding. */
286 : #define NS_DECL_NON_VIRTUAL_NSIDNSSERVICEDISCOVERYLISTENER \
287 : nsresult OnDiscoveryStarted(const nsACString & aServiceType); \
288 : nsresult OnDiscoveryStopped(const nsACString & aServiceType); \
289 : nsresult OnServiceFound(nsIDNSServiceInfo *aServiceInfo); \
290 : nsresult OnServiceLost(nsIDNSServiceInfo *aServiceInfo); \
291 : nsresult OnStartDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode); \
292 : nsresult OnStopDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode);
293 :
294 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
295 : #define NS_FORWARD_NSIDNSSERVICEDISCOVERYLISTENER(_to) \
296 : NS_IMETHOD OnDiscoveryStarted(const nsACString & aServiceType) override { return _to OnDiscoveryStarted(aServiceType); } \
297 : NS_IMETHOD OnDiscoveryStopped(const nsACString & aServiceType) override { return _to OnDiscoveryStopped(aServiceType); } \
298 : NS_IMETHOD OnServiceFound(nsIDNSServiceInfo *aServiceInfo) override { return _to OnServiceFound(aServiceInfo); } \
299 : NS_IMETHOD OnServiceLost(nsIDNSServiceInfo *aServiceInfo) override { return _to OnServiceLost(aServiceInfo); } \
300 : NS_IMETHOD OnStartDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode) override { return _to OnStartDiscoveryFailed(aServiceType, aErrorCode); } \
301 : NS_IMETHOD OnStopDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode) override { return _to OnStopDiscoveryFailed(aServiceType, aErrorCode); }
302 :
303 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
304 : #define NS_FORWARD_SAFE_NSIDNSSERVICEDISCOVERYLISTENER(_to) \
305 : NS_IMETHOD OnDiscoveryStarted(const nsACString & aServiceType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDiscoveryStarted(aServiceType); } \
306 : NS_IMETHOD OnDiscoveryStopped(const nsACString & aServiceType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDiscoveryStopped(aServiceType); } \
307 : NS_IMETHOD OnServiceFound(nsIDNSServiceInfo *aServiceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServiceFound(aServiceInfo); } \
308 : NS_IMETHOD OnServiceLost(nsIDNSServiceInfo *aServiceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServiceLost(aServiceInfo); } \
309 : NS_IMETHOD OnStartDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartDiscoveryFailed(aServiceType, aErrorCode); } \
310 : NS_IMETHOD OnStopDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopDiscoveryFailed(aServiceType, aErrorCode); }
311 :
312 : #if 0
313 : /* Use the code below as a template for the implementation class for this interface. */
314 :
315 : /* Header file */
316 : class nsDNSServiceDiscoveryListener : public nsIDNSServiceDiscoveryListener
317 : {
318 : public:
319 : NS_DECL_ISUPPORTS
320 : NS_DECL_NSIDNSSERVICEDISCOVERYLISTENER
321 :
322 : nsDNSServiceDiscoveryListener();
323 :
324 : private:
325 : ~nsDNSServiceDiscoveryListener();
326 :
327 : protected:
328 : /* additional members */
329 : };
330 :
331 : /* Implementation file */
332 : NS_IMPL_ISUPPORTS(nsDNSServiceDiscoveryListener, nsIDNSServiceDiscoveryListener)
333 :
334 : nsDNSServiceDiscoveryListener::nsDNSServiceDiscoveryListener()
335 : {
336 : /* member initializers and constructor code */
337 : }
338 :
339 : nsDNSServiceDiscoveryListener::~nsDNSServiceDiscoveryListener()
340 : {
341 : /* destructor code */
342 : }
343 :
344 : /* void onDiscoveryStarted (in AUTF8String aServiceType); */
345 : NS_IMETHODIMP nsDNSServiceDiscoveryListener::OnDiscoveryStarted(const nsACString & aServiceType)
346 : {
347 : return NS_ERROR_NOT_IMPLEMENTED;
348 : }
349 :
350 : /* void onDiscoveryStopped (in AUTF8String aServiceType); */
351 : NS_IMETHODIMP nsDNSServiceDiscoveryListener::OnDiscoveryStopped(const nsACString & aServiceType)
352 : {
353 : return NS_ERROR_NOT_IMPLEMENTED;
354 : }
355 :
356 : /* void onServiceFound (in nsIDNSServiceInfo aServiceInfo); */
357 : NS_IMETHODIMP nsDNSServiceDiscoveryListener::OnServiceFound(nsIDNSServiceInfo *aServiceInfo)
358 : {
359 : return NS_ERROR_NOT_IMPLEMENTED;
360 : }
361 :
362 : /* void onServiceLost (in nsIDNSServiceInfo aServiceInfo); */
363 : NS_IMETHODIMP nsDNSServiceDiscoveryListener::OnServiceLost(nsIDNSServiceInfo *aServiceInfo)
364 : {
365 : return NS_ERROR_NOT_IMPLEMENTED;
366 : }
367 :
368 : /* void onStartDiscoveryFailed (in AUTF8String aServiceType, in long aErrorCode); */
369 : NS_IMETHODIMP nsDNSServiceDiscoveryListener::OnStartDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode)
370 : {
371 : return NS_ERROR_NOT_IMPLEMENTED;
372 : }
373 :
374 : /* void onStopDiscoveryFailed (in AUTF8String aServiceType, in long aErrorCode); */
375 : NS_IMETHODIMP nsDNSServiceDiscoveryListener::OnStopDiscoveryFailed(const nsACString & aServiceType, int32_t aErrorCode)
376 : {
377 : return NS_ERROR_NOT_IMPLEMENTED;
378 : }
379 :
380 : /* End of implementation class template. */
381 : #endif
382 :
383 :
384 : /* starting interface: nsIDNSRegistrationListener */
385 : #define NS_IDNSREGISTRATIONLISTENER_IID_STR "e165e4be-abf4-4963-a66d-ed3ca116e5e4"
386 :
387 : #define NS_IDNSREGISTRATIONLISTENER_IID \
388 : {0xe165e4be, 0xabf4, 0x4963, \
389 : { 0xa6, 0x6d, 0xed, 0x3c, 0xa1, 0x16, 0xe5, 0xe4 }}
390 :
391 0 : class NS_NO_VTABLE nsIDNSRegistrationListener : public nsISupports {
392 : public:
393 :
394 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDNSREGISTRATIONLISTENER_IID)
395 :
396 : enum {
397 : ERROR_SERVICE_NOT_RUNNING = -65563
398 : };
399 :
400 : /* void onServiceRegistered (in nsIDNSServiceInfo aServiceInfo); */
401 : NS_IMETHOD OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo) = 0;
402 :
403 : /* void onServiceUnregistered (in nsIDNSServiceInfo aServiceInfo); */
404 : NS_IMETHOD OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo) = 0;
405 :
406 : /* void onRegistrationFailed (in nsIDNSServiceInfo aServiceInfo, in long aErrorCode); */
407 : NS_IMETHOD OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) = 0;
408 :
409 : /* void onUnregistrationFailed (in nsIDNSServiceInfo aServiceInfo, in long aErrorCode); */
410 : NS_IMETHOD OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) = 0;
411 :
412 : };
413 :
414 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDNSRegistrationListener, NS_IDNSREGISTRATIONLISTENER_IID)
415 :
416 : /* Use this macro when declaring classes that implement this interface. */
417 : #define NS_DECL_NSIDNSREGISTRATIONLISTENER \
418 : NS_IMETHOD OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo) override; \
419 : NS_IMETHOD OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo) override; \
420 : NS_IMETHOD OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override; \
421 : NS_IMETHOD OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override;
422 :
423 : /* Use this macro when declaring the members of this interface when the
424 : class doesn't implement the interface. This is useful for forwarding. */
425 : #define NS_DECL_NON_VIRTUAL_NSIDNSREGISTRATIONLISTENER \
426 : nsresult OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo); \
427 : nsresult OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo); \
428 : nsresult OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode); \
429 : nsresult OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode);
430 :
431 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
432 : #define NS_FORWARD_NSIDNSREGISTRATIONLISTENER(_to) \
433 : NS_IMETHOD OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo) override { return _to OnServiceRegistered(aServiceInfo); } \
434 : NS_IMETHOD OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo) override { return _to OnServiceUnregistered(aServiceInfo); } \
435 : NS_IMETHOD OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return _to OnRegistrationFailed(aServiceInfo, aErrorCode); } \
436 : NS_IMETHOD OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return _to OnUnregistrationFailed(aServiceInfo, aErrorCode); }
437 :
438 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
439 : #define NS_FORWARD_SAFE_NSIDNSREGISTRATIONLISTENER(_to) \
440 : NS_IMETHOD OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServiceRegistered(aServiceInfo); } \
441 : NS_IMETHOD OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServiceUnregistered(aServiceInfo); } \
442 : NS_IMETHOD OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRegistrationFailed(aServiceInfo, aErrorCode); } \
443 : NS_IMETHOD OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUnregistrationFailed(aServiceInfo, aErrorCode); }
444 :
445 : #if 0
446 : /* Use the code below as a template for the implementation class for this interface. */
447 :
448 : /* Header file */
449 : class nsDNSRegistrationListener : public nsIDNSRegistrationListener
450 : {
451 : public:
452 : NS_DECL_ISUPPORTS
453 : NS_DECL_NSIDNSREGISTRATIONLISTENER
454 :
455 : nsDNSRegistrationListener();
456 :
457 : private:
458 : ~nsDNSRegistrationListener();
459 :
460 : protected:
461 : /* additional members */
462 : };
463 :
464 : /* Implementation file */
465 : NS_IMPL_ISUPPORTS(nsDNSRegistrationListener, nsIDNSRegistrationListener)
466 :
467 : nsDNSRegistrationListener::nsDNSRegistrationListener()
468 : {
469 : /* member initializers and constructor code */
470 : }
471 :
472 : nsDNSRegistrationListener::~nsDNSRegistrationListener()
473 : {
474 : /* destructor code */
475 : }
476 :
477 : /* void onServiceRegistered (in nsIDNSServiceInfo aServiceInfo); */
478 : NS_IMETHODIMP nsDNSRegistrationListener::OnServiceRegistered(nsIDNSServiceInfo *aServiceInfo)
479 : {
480 : return NS_ERROR_NOT_IMPLEMENTED;
481 : }
482 :
483 : /* void onServiceUnregistered (in nsIDNSServiceInfo aServiceInfo); */
484 : NS_IMETHODIMP nsDNSRegistrationListener::OnServiceUnregistered(nsIDNSServiceInfo *aServiceInfo)
485 : {
486 : return NS_ERROR_NOT_IMPLEMENTED;
487 : }
488 :
489 : /* void onRegistrationFailed (in nsIDNSServiceInfo aServiceInfo, in long aErrorCode); */
490 : NS_IMETHODIMP nsDNSRegistrationListener::OnRegistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode)
491 : {
492 : return NS_ERROR_NOT_IMPLEMENTED;
493 : }
494 :
495 : /* void onUnregistrationFailed (in nsIDNSServiceInfo aServiceInfo, in long aErrorCode); */
496 : NS_IMETHODIMP nsDNSRegistrationListener::OnUnregistrationFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode)
497 : {
498 : return NS_ERROR_NOT_IMPLEMENTED;
499 : }
500 :
501 : /* End of implementation class template. */
502 : #endif
503 :
504 :
505 : /* starting interface: nsIDNSServiceResolveListener */
506 : #define NS_IDNSSERVICERESOLVELISTENER_IID_STR "24ee6408-648e-421d-accf-c6e5adeccf97"
507 :
508 : #define NS_IDNSSERVICERESOLVELISTENER_IID \
509 : {0x24ee6408, 0x648e, 0x421d, \
510 : { 0xac, 0xcf, 0xc6, 0xe5, 0xad, 0xec, 0xcf, 0x97 }}
511 :
512 0 : class NS_NO_VTABLE nsIDNSServiceResolveListener : public nsISupports {
513 : public:
514 :
515 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDNSSERVICERESOLVELISTENER_IID)
516 :
517 : /* void onServiceResolved (in nsIDNSServiceInfo aServiceInfo); */
518 : NS_IMETHOD OnServiceResolved(nsIDNSServiceInfo *aServiceInfo) = 0;
519 :
520 : /* void onResolveFailed (in nsIDNSServiceInfo aServiceInfo, in long aErrorCode); */
521 : NS_IMETHOD OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) = 0;
522 :
523 : };
524 :
525 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDNSServiceResolveListener, NS_IDNSSERVICERESOLVELISTENER_IID)
526 :
527 : /* Use this macro when declaring classes that implement this interface. */
528 : #define NS_DECL_NSIDNSSERVICERESOLVELISTENER \
529 : NS_IMETHOD OnServiceResolved(nsIDNSServiceInfo *aServiceInfo) override; \
530 : NS_IMETHOD OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override;
531 :
532 : /* Use this macro when declaring the members of this interface when the
533 : class doesn't implement the interface. This is useful for forwarding. */
534 : #define NS_DECL_NON_VIRTUAL_NSIDNSSERVICERESOLVELISTENER \
535 : nsresult OnServiceResolved(nsIDNSServiceInfo *aServiceInfo); \
536 : nsresult OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode);
537 :
538 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
539 : #define NS_FORWARD_NSIDNSSERVICERESOLVELISTENER(_to) \
540 : NS_IMETHOD OnServiceResolved(nsIDNSServiceInfo *aServiceInfo) override { return _to OnServiceResolved(aServiceInfo); } \
541 : NS_IMETHOD OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return _to OnResolveFailed(aServiceInfo, aErrorCode); }
542 :
543 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
544 : #define NS_FORWARD_SAFE_NSIDNSSERVICERESOLVELISTENER(_to) \
545 : NS_IMETHOD OnServiceResolved(nsIDNSServiceInfo *aServiceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServiceResolved(aServiceInfo); } \
546 : NS_IMETHOD OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnResolveFailed(aServiceInfo, aErrorCode); }
547 :
548 : #if 0
549 : /* Use the code below as a template for the implementation class for this interface. */
550 :
551 : /* Header file */
552 : class nsDNSServiceResolveListener : public nsIDNSServiceResolveListener
553 : {
554 : public:
555 : NS_DECL_ISUPPORTS
556 : NS_DECL_NSIDNSSERVICERESOLVELISTENER
557 :
558 : nsDNSServiceResolveListener();
559 :
560 : private:
561 : ~nsDNSServiceResolveListener();
562 :
563 : protected:
564 : /* additional members */
565 : };
566 :
567 : /* Implementation file */
568 : NS_IMPL_ISUPPORTS(nsDNSServiceResolveListener, nsIDNSServiceResolveListener)
569 :
570 : nsDNSServiceResolveListener::nsDNSServiceResolveListener()
571 : {
572 : /* member initializers and constructor code */
573 : }
574 :
575 : nsDNSServiceResolveListener::~nsDNSServiceResolveListener()
576 : {
577 : /* destructor code */
578 : }
579 :
580 : /* void onServiceResolved (in nsIDNSServiceInfo aServiceInfo); */
581 : NS_IMETHODIMP nsDNSServiceResolveListener::OnServiceResolved(nsIDNSServiceInfo *aServiceInfo)
582 : {
583 : return NS_ERROR_NOT_IMPLEMENTED;
584 : }
585 :
586 : /* void onResolveFailed (in nsIDNSServiceInfo aServiceInfo, in long aErrorCode); */
587 : NS_IMETHODIMP nsDNSServiceResolveListener::OnResolveFailed(nsIDNSServiceInfo *aServiceInfo, int32_t aErrorCode)
588 : {
589 : return NS_ERROR_NOT_IMPLEMENTED;
590 : }
591 :
592 : /* End of implementation class template. */
593 : #endif
594 :
595 :
596 : /* starting interface: nsIDNSServiceDiscovery */
597 : #define NS_IDNSSERVICEDISCOVERY_IID_STR "6487899b-beb1-455a-ba65-e4fd465066d7"
598 :
599 : #define NS_IDNSSERVICEDISCOVERY_IID \
600 : {0x6487899b, 0xbeb1, 0x455a, \
601 : { 0xba, 0x65, 0xe4, 0xfd, 0x46, 0x50, 0x66, 0xd7 }}
602 :
603 : class NS_NO_VTABLE nsIDNSServiceDiscovery : public nsISupports {
604 : public:
605 :
606 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDNSSERVICEDISCOVERY_IID)
607 :
608 : /* nsICancelable startDiscovery (in AUTF8String aServiceType, in nsIDNSServiceDiscoveryListener aListener); */
609 : NS_IMETHOD StartDiscovery(const nsACString & aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable * *_retval) = 0;
610 :
611 : /* nsICancelable registerService (in nsIDNSServiceInfo aServiceInfo, in nsIDNSRegistrationListener aListener); */
612 : NS_IMETHOD RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable * *_retval) = 0;
613 :
614 : /* void resolveService (in nsIDNSServiceInfo aServiceInfo, in nsIDNSServiceResolveListener aListener); */
615 : NS_IMETHOD ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener) = 0;
616 :
617 : };
618 :
619 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDNSServiceDiscovery, NS_IDNSSERVICEDISCOVERY_IID)
620 :
621 : /* Use this macro when declaring classes that implement this interface. */
622 : #define NS_DECL_NSIDNSSERVICEDISCOVERY \
623 : NS_IMETHOD StartDiscovery(const nsACString & aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable * *_retval) override; \
624 : NS_IMETHOD RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable * *_retval) override; \
625 : NS_IMETHOD ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener) override;
626 :
627 : /* Use this macro when declaring the members of this interface when the
628 : class doesn't implement the interface. This is useful for forwarding. */
629 : #define NS_DECL_NON_VIRTUAL_NSIDNSSERVICEDISCOVERY \
630 : nsresult StartDiscovery(const nsACString & aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable * *_retval); \
631 : nsresult RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable * *_retval); \
632 : nsresult ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener);
633 :
634 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
635 : #define NS_FORWARD_NSIDNSSERVICEDISCOVERY(_to) \
636 : NS_IMETHOD StartDiscovery(const nsACString & aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable * *_retval) override { return _to StartDiscovery(aServiceType, aListener, _retval); } \
637 : NS_IMETHOD RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable * *_retval) override { return _to RegisterService(aServiceInfo, aListener, _retval); } \
638 : NS_IMETHOD ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener) override { return _to ResolveService(aServiceInfo, aListener); }
639 :
640 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
641 : #define NS_FORWARD_SAFE_NSIDNSSERVICEDISCOVERY(_to) \
642 : NS_IMETHOD StartDiscovery(const nsACString & aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StartDiscovery(aServiceType, aListener, _retval); } \
643 : NS_IMETHOD RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterService(aServiceInfo, aListener, _retval); } \
644 : NS_IMETHOD ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResolveService(aServiceInfo, aListener); }
645 :
646 : #if 0
647 : /* Use the code below as a template for the implementation class for this interface. */
648 :
649 : /* Header file */
650 : class nsDNSServiceDiscovery : public nsIDNSServiceDiscovery
651 : {
652 : public:
653 : NS_DECL_ISUPPORTS
654 : NS_DECL_NSIDNSSERVICEDISCOVERY
655 :
656 : nsDNSServiceDiscovery();
657 :
658 : private:
659 : ~nsDNSServiceDiscovery();
660 :
661 : protected:
662 : /* additional members */
663 : };
664 :
665 : /* Implementation file */
666 : NS_IMPL_ISUPPORTS(nsDNSServiceDiscovery, nsIDNSServiceDiscovery)
667 :
668 : nsDNSServiceDiscovery::nsDNSServiceDiscovery()
669 : {
670 : /* member initializers and constructor code */
671 : }
672 :
673 : nsDNSServiceDiscovery::~nsDNSServiceDiscovery()
674 : {
675 : /* destructor code */
676 : }
677 :
678 : /* nsICancelable startDiscovery (in AUTF8String aServiceType, in nsIDNSServiceDiscoveryListener aListener); */
679 : NS_IMETHODIMP nsDNSServiceDiscovery::StartDiscovery(const nsACString & aServiceType, nsIDNSServiceDiscoveryListener *aListener, nsICancelable * *_retval)
680 : {
681 : return NS_ERROR_NOT_IMPLEMENTED;
682 : }
683 :
684 : /* nsICancelable registerService (in nsIDNSServiceInfo aServiceInfo, in nsIDNSRegistrationListener aListener); */
685 : NS_IMETHODIMP nsDNSServiceDiscovery::RegisterService(nsIDNSServiceInfo *aServiceInfo, nsIDNSRegistrationListener *aListener, nsICancelable * *_retval)
686 : {
687 : return NS_ERROR_NOT_IMPLEMENTED;
688 : }
689 :
690 : /* void resolveService (in nsIDNSServiceInfo aServiceInfo, in nsIDNSServiceResolveListener aListener); */
691 : NS_IMETHODIMP nsDNSServiceDiscovery::ResolveService(nsIDNSServiceInfo *aServiceInfo, nsIDNSServiceResolveListener *aListener)
692 : {
693 : return NS_ERROR_NOT_IMPLEMENTED;
694 : }
695 :
696 : /* End of implementation class template. */
697 : #endif
698 :
699 : #define DNSSERVICEDISCOVERY_CONTRACT_ID \
700 : "@mozilla.org/toolkit/components/mdnsresponder/dns-sd;1"
701 : #define DNSSERVICEINFO_CONTRACT_ID \
702 : "@mozilla.org/toolkit/components/mdnsresponder/dns-info;1"
703 :
704 : #endif /* __gen_nsIDNSServiceDiscovery_h__ */
|