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