DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
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
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/releases/comm-beta/chat/components/public/imIContactsService.idl
 */

#ifndef __gen_imIContactsService_h__
#define __gen_imIContactsService_h__


#ifndef __gen_imIStatusInfo_h__
#include "imIStatusInfo.h"
#endif

#ifndef __gen_imITagsService_h__
#include "imITagsService.h"
#endif

#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#ifndef __gen_nsIObserver_h__
#include "nsIObserver.h"
#endif

#ifndef __gen_nsISimpleEnumerator_h__
#include "nsISimpleEnumerator.h"
#endif

#include "js/GCAnnotations.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class imIContact; /* forward declaration */

class imIBuddy; /* forward declaration */

class prplIAccountBuddy; /* forward declaration */

class imIAccount; /* forward declaration */

class prplIProtocol; /* forward declaration */


/* starting interface:    imIContactsService */
#define IMICONTACTSSERVICE_IID_STR "45ce33d9-d335-4cce-b904-44821987e048"

#define IMICONTACTSSERVICE_IID \
  {0x45ce33d9, 0xd335, 0x4cce, \
    { 0xb9, 0x04, 0x44, 0x82, 0x19, 0x87, 0xe0, 0x48 }}

class NS_NO_VTABLE imIContactsService : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(IMICONTACTSSERVICE_IID)

  /* void initContacts (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD InitContacts(void) = 0;

  /* void unInitContacts (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UnInitContacts(void) = 0;

  /* imIContact getContactById (in long aId); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetContactById(int32_t aId, imIContact **_retval) = 0;

  /* void getContacts ([optional] out unsigned long contactCount, [array, size_is (contactCount), retval] out imIContact contacts); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetContacts(uint32_t *contactCount, imIContact ***contacts) = 0;

  /* imIBuddy getBuddyById (in long aId); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetBuddyById(int32_t aId, imIBuddy **_retval) = 0;

  /* imIBuddy getBuddyByNameAndProtocol (in AUTF8String aNormalizedName, in prplIProtocol aPrpl); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetBuddyByNameAndProtocol(const nsACString& aNormalizedName, prplIProtocol *aPrpl, imIBuddy **_retval) = 0;

  /* prplIAccountBuddy getAccountBuddyByNameAndAccount (in AUTF8String aNormalizedName, in imIAccount aAccount); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAccountBuddyByNameAndAccount(const nsACString& aNormalizedName, imIAccount *aAccount, prplIAccountBuddy **_retval) = 0;

  /* void accountBuddyAdded (in prplIAccountBuddy aAccountBuddy); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AccountBuddyAdded(prplIAccountBuddy *aAccountBuddy) = 0;

  /* void accountBuddyRemoved (in prplIAccountBuddy aAccountBuddy); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AccountBuddyRemoved(prplIAccountBuddy *aAccountBuddy) = 0;

  /* void accountBuddyMoved (in prplIAccountBuddy aAccountBuddy, in imITag aOldTag, in imITag aNewTag); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AccountBuddyMoved(prplIAccountBuddy *aAccountBuddy, imITag *aOldTag, imITag *aNewTag) = 0;

  /* void storeAccount (in unsigned long aId, in AUTF8String aUserName, in AUTF8String aPrplId); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD StoreAccount(uint32_t aId, const nsACString& aUserName, const nsACString& aPrplId) = 0;

  /* boolean accountIdExists (in unsigned long aId); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AccountIdExists(uint32_t aId, bool *_retval) = 0;

  /* void forgetAccount (in unsigned long aId); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ForgetAccount(uint32_t aId) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(imIContactsService, IMICONTACTSSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_IMICONTACTSSERVICE \
  NS_IMETHOD InitContacts(void) override; \
  NS_IMETHOD UnInitContacts(void) override; \
  NS_IMETHOD GetContactById(int32_t aId, imIContact **_retval) override; \
  NS_IMETHOD GetContacts(uint32_t *contactCount, imIContact ***contacts) override; \
  NS_IMETHOD GetBuddyById(int32_t aId, imIBuddy **_retval) override; \
  NS_IMETHOD GetBuddyByNameAndProtocol(const nsACString& aNormalizedName, prplIProtocol *aPrpl, imIBuddy **_retval) override; \
  NS_IMETHOD GetAccountBuddyByNameAndAccount(const nsACString& aNormalizedName, imIAccount *aAccount, prplIAccountBuddy **_retval) override; \
  NS_IMETHOD AccountBuddyAdded(prplIAccountBuddy *aAccountBuddy) override; \
  NS_IMETHOD AccountBuddyRemoved(prplIAccountBuddy *aAccountBuddy) override; \
  NS_IMETHOD AccountBuddyMoved(prplIAccountBuddy *aAccountBuddy, imITag *aOldTag, imITag *aNewTag) override; \
  NS_IMETHOD StoreAccount(uint32_t aId, const nsACString& aUserName, const nsACString& aPrplId) override; \
  NS_IMETHOD AccountIdExists(uint32_t aId, bool *_retval) override; \
  NS_IMETHOD ForgetAccount(uint32_t aId) 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_IMICONTACTSSERVICE \
  nsresult InitContacts(void); \
  nsresult UnInitContacts(void); \
  nsresult GetContactById(int32_t aId, imIContact **_retval); \
  nsresult GetContacts(uint32_t *contactCount, imIContact ***contacts); \
  nsresult GetBuddyById(int32_t aId, imIBuddy **_retval); \
  nsresult GetBuddyByNameAndProtocol(const nsACString& aNormalizedName, prplIProtocol *aPrpl, imIBuddy **_retval); \
  nsresult GetAccountBuddyByNameAndAccount(const nsACString& aNormalizedName, imIAccount *aAccount, prplIAccountBuddy **_retval); \
  nsresult AccountBuddyAdded(prplIAccountBuddy *aAccountBuddy); \
  nsresult AccountBuddyRemoved(prplIAccountBuddy *aAccountBuddy); \
  nsresult AccountBuddyMoved(prplIAccountBuddy *aAccountBuddy, imITag *aOldTag, imITag *aNewTag); \
  nsresult StoreAccount(uint32_t aId, const nsACString& aUserName, const nsACString& aPrplId); \
  nsresult AccountIdExists(uint32_t aId, bool *_retval); \
  nsresult ForgetAccount(uint32_t aId); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_IMICONTACTSSERVICE(_to) \
  NS_IMETHOD InitContacts(void) override { return _to InitContacts(); } \
  NS_IMETHOD UnInitContacts(void) override { return _to UnInitContacts(); } \
  NS_IMETHOD GetContactById(int32_t aId, imIContact **_retval) override { return _to GetContactById(aId, _retval); } \
  NS_IMETHOD GetContacts(uint32_t *contactCount, imIContact ***contacts) override { return _to GetContacts(contactCount, contacts); } \
  NS_IMETHOD GetBuddyById(int32_t aId, imIBuddy **_retval) override { return _to GetBuddyById(aId, _retval); } \
  NS_IMETHOD GetBuddyByNameAndProtocol(const nsACString& aNormalizedName, prplIProtocol *aPrpl, imIBuddy **_retval) override { return _to GetBuddyByNameAndProtocol(aNormalizedName, aPrpl, _retval); } \
  NS_IMETHOD GetAccountBuddyByNameAndAccount(const nsACString& aNormalizedName, imIAccount *aAccount, prplIAccountBuddy **_retval) override { return _to GetAccountBuddyByNameAndAccount(aNormalizedName, aAccount, _retval); } \
  NS_IMETHOD AccountBuddyAdded(prplIAccountBuddy *aAccountBuddy) override { return _to AccountBuddyAdded(aAccountBuddy); } \
  NS_IMETHOD AccountBuddyRemoved(prplIAccountBuddy *aAccountBuddy) override { return _to AccountBuddyRemoved(aAccountBuddy); } \
  NS_IMETHOD AccountBuddyMoved(prplIAccountBuddy *aAccountBuddy, imITag *aOldTag, imITag *aNewTag) override { return _to AccountBuddyMoved(aAccountBuddy, aOldTag, aNewTag); } \
  NS_IMETHOD StoreAccount(uint32_t aId, const nsACString& aUserName, const nsACString& aPrplId) override { return _to StoreAccount(aId, aUserName, aPrplId); } \
  NS_IMETHOD AccountIdExists(uint32_t aId, bool *_retval) override { return _to AccountIdExists(aId, _retval); } \
  NS_IMETHOD ForgetAccount(uint32_t aId) override { return _to ForgetAccount(aId); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_IMICONTACTSSERVICE(_to) \
  NS_IMETHOD InitContacts(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitContacts(); } \
  NS_IMETHOD UnInitContacts(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnInitContacts(); } \
  NS_IMETHOD GetContactById(int32_t aId, imIContact **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContactById(aId, _retval); } \
  NS_IMETHOD GetContacts(uint32_t *contactCount, imIContact ***contacts) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContacts(contactCount, contacts); } \
  NS_IMETHOD GetBuddyById(int32_t aId, imIBuddy **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBuddyById(aId, _retval); } \
  NS_IMETHOD GetBuddyByNameAndProtocol(const nsACString& aNormalizedName, prplIProtocol *aPrpl, imIBuddy **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBuddyByNameAndProtocol(aNormalizedName, aPrpl, _retval); } \
  NS_IMETHOD GetAccountBuddyByNameAndAccount(const nsACString& aNormalizedName, imIAccount *aAccount, prplIAccountBuddy **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccountBuddyByNameAndAccount(aNormalizedName, aAccount, _retval); } \
  NS_IMETHOD AccountBuddyAdded(prplIAccountBuddy *aAccountBuddy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AccountBuddyAdded(aAccountBuddy); } \
  NS_IMETHOD AccountBuddyRemoved(prplIAccountBuddy *aAccountBuddy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AccountBuddyRemoved(aAccountBuddy); } \
  NS_IMETHOD AccountBuddyMoved(prplIAccountBuddy *aAccountBuddy, imITag *aOldTag, imITag *aNewTag) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AccountBuddyMoved(aAccountBuddy, aOldTag, aNewTag); } \
  NS_IMETHOD StoreAccount(uint32_t aId, const nsACString& aUserName, const nsACString& aPrplId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StoreAccount(aId, aUserName, aPrplId); } \
  NS_IMETHOD AccountIdExists(uint32_t aId, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AccountIdExists(aId, _retval); } \
  NS_IMETHOD ForgetAccount(uint32_t aId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ForgetAccount(aId); } 


/* starting interface:    imIContact */
#define IMICONTACT_IID_STR "f585b0df-f6ad-40d5-9de4-c58b14af13e4"

#define IMICONTACT_IID \
  {0xf585b0df, 0xf6ad, 0x40d5, \
    { 0x9d, 0xe4, 0xc5, 0x8b, 0x14, 0xaf, 0x13, 0xe4 }}

class NS_NO_VTABLE imIContact : public imIStatusInfo {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(IMICONTACT_IID)

  /* readonly attribute long id; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetId(int32_t *aId) = 0;

  /* attribute AUTF8String alias; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAlias(nsACString& aAlias) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetAlias(const nsACString& aAlias) = 0;

  /* void getTags ([optional] out unsigned long tagCount, [array, size_is (tagCount), retval] out imITag tags); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTags(uint32_t *tagCount, imITag ***tags) = 0;

  /* void addTag (in imITag aTag); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddTag(imITag *aTag) = 0;

  /* void removeTag (in imITag aTag); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveTag(imITag *aTag) = 0;

  /* readonly attribute imIBuddy preferredBuddy; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPreferredBuddy(imIBuddy **aPreferredBuddy) = 0;

  /* void getBuddies ([optional] out unsigned long buddyCount, [array, size_is (buddyCount), retval] out imIBuddy buddies); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetBuddies(uint32_t *buddyCount, imIBuddy ***buddies) = 0;

  /* void mergeContact (in imIContact aContact); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MergeContact(imIContact *aContact) = 0;

  /* void moveBuddyBefore (in imIBuddy aBuddy, [optional] in imIBuddy aBeforeBuddy); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD MoveBuddyBefore(imIBuddy *aBuddy, imIBuddy *aBeforeBuddy) = 0;

  /* void adoptBuddy (in imIBuddy aBuddy); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AdoptBuddy(imIBuddy *aBuddy) = 0;

  /* imIContact detachBuddy (in imIBuddy aBuddy); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD DetachBuddy(imIBuddy *aBuddy, imIContact **_retval) = 0;

  /* void remove (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Remove(void) = 0;

  /* void addObserver (in nsIObserver aObserver); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddObserver(nsIObserver *aObserver) = 0;

  /* void removeObserver (in nsIObserver aObserver); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveObserver(nsIObserver *aObserver) = 0;

  /* void notifyObservers (in nsISupports aObj, in string aEvent, [optional] in wstring aData); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD NotifyObservers(nsISupports *aObj, const char * aEvent, const char16_t * aData) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(imIContact, IMICONTACT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_IMICONTACT \
  NS_IMETHOD GetId(int32_t *aId) override; \
  NS_IMETHOD GetAlias(nsACString& aAlias) override; \
  NS_IMETHOD SetAlias(const nsACString& aAlias) override; \
  NS_IMETHOD GetTags(uint32_t *tagCount, imITag ***tags) override; \
  NS_IMETHOD AddTag(imITag *aTag) override; \
  NS_IMETHOD RemoveTag(imITag *aTag) override; \
  NS_IMETHOD GetPreferredBuddy(imIBuddy **aPreferredBuddy) override; \
  NS_IMETHOD GetBuddies(uint32_t *buddyCount, imIBuddy ***buddies) override; \
  NS_IMETHOD MergeContact(imIContact *aContact) override; \
  NS_IMETHOD MoveBuddyBefore(imIBuddy *aBuddy, imIBuddy *aBeforeBuddy) override; \
  NS_IMETHOD AdoptBuddy(imIBuddy *aBuddy) override; \
  NS_IMETHOD DetachBuddy(imIBuddy *aBuddy, imIContact **_retval) override; \
  NS_IMETHOD Remove(void) override; \
  NS_IMETHOD AddObserver(nsIObserver *aObserver) override; \
  NS_IMETHOD RemoveObserver(nsIObserver *aObserver) override; \
  NS_IMETHOD NotifyObservers(nsISupports *aObj, const char * aEvent, const char16_t * aData) 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_IMICONTACT \
  nsresult GetId(int32_t *aId); \
  nsresult GetAlias(nsACString& aAlias); \
  nsresult SetAlias(const nsACString& aAlias); \
  nsresult GetTags(uint32_t *tagCount, imITag ***tags); \
  nsresult AddTag(imITag *aTag); \
  nsresult RemoveTag(imITag *aTag); \
  nsresult GetPreferredBuddy(imIBuddy **aPreferredBuddy); \
  nsresult GetBuddies(uint32_t *buddyCount, imIBuddy ***buddies); \
  nsresult MergeContact(imIContact *aContact); \
  nsresult MoveBuddyBefore(imIBuddy *aBuddy, imIBuddy *aBeforeBuddy); \
  nsresult AdoptBuddy(imIBuddy *aBuddy); \
  nsresult DetachBuddy(imIBuddy *aBuddy, imIContact **_retval); \
  nsresult Remove(void); \
  nsresult AddObserver(nsIObserver *aObserver); \
  nsresult RemoveObserver(nsIObserver *aObserver); \
  nsresult NotifyObservers(nsISupports *aObj, const char * aEvent, const char16_t * aData); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_IMICONTACT(_to) \
  NS_IMETHOD GetId(int32_t *aId) override { return _to GetId(aId); } \
  NS_IMETHOD GetAlias(nsACString& aAlias) override { return _to GetAlias(aAlias); } \
  NS_IMETHOD SetAlias(const nsACString& aAlias) override { return _to SetAlias(aAlias); } \
  NS_IMETHOD GetTags(uint32_t *tagCount, imITag ***tags) override { return _to GetTags(tagCount, tags); } \
  NS_IMETHOD AddTag(imITag *aTag) override { return _to AddTag(aTag); } \
  NS_IMETHOD RemoveTag(imITag *aTag) override { return _to RemoveTag(aTag); } \
  NS_IMETHOD GetPreferredBuddy(imIBuddy **aPreferredBuddy) override { return _to GetPreferredBuddy(aPreferredBuddy); } \
  NS_IMETHOD GetBuddies(uint32_t *buddyCount, imIBuddy ***buddies) override { return _to GetBuddies(buddyCount, buddies); } \
  NS_IMETHOD MergeContact(imIContact *aContact) override { return _to MergeContact(aContact); } \
  NS_IMETHOD MoveBuddyBefore(imIBuddy *aBuddy, imIBuddy *aBeforeBuddy) override { return _to MoveBuddyBefore(aBuddy, aBeforeBuddy); } \
  NS_IMETHOD AdoptBuddy(imIBuddy *aBuddy) override { return _to AdoptBuddy(aBuddy); } \
  NS_IMETHOD DetachBuddy(imIBuddy *aBuddy, imIContact **_retval) override { return _to DetachBuddy(aBuddy, _retval); } \
  NS_IMETHOD Remove(void) override { return _to Remove(); } \
  NS_IMETHOD AddObserver(nsIObserver *aObserver) override { return _to AddObserver(aObserver); } \
  NS_IMETHOD RemoveObserver(nsIObserver *aObserver) override { return _to RemoveObserver(aObserver); } \
  NS_IMETHOD NotifyObservers(nsISupports *aObj, const char * aEvent, const char16_t * aData) override { return _to NotifyObservers(aObj, aEvent, aData); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_IMICONTACT(_to) \
  NS_IMETHOD GetId(int32_t *aId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetId(aId); } \
  NS_IMETHOD GetAlias(nsACString& aAlias) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlias(aAlias); } \
  NS_IMETHOD SetAlias(const nsACString& aAlias) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlias(aAlias); } \
  NS_IMETHOD GetTags(uint32_t *tagCount, imITag ***tags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTags(tagCount, tags); } \
  NS_IMETHOD AddTag(imITag *aTag) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddTag(aTag); } \
  NS_IMETHOD RemoveTag(imITag *aTag) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveTag(aTag); } \
  NS_IMETHOD GetPreferredBuddy(imIBuddy **aPreferredBuddy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreferredBuddy(aPreferredBuddy); } \
  NS_IMETHOD GetBuddies(uint32_t *buddyCount, imIBuddy ***buddies) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBuddies(buddyCount, buddies); } \
  NS_IMETHOD MergeContact(imIContact *aContact) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MergeContact(aContact); } \
  NS_IMETHOD MoveBuddyBefore(imIBuddy *aBuddy, imIBuddy *aBeforeBuddy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MoveBuddyBefore(aBuddy, aBeforeBuddy); } \
  NS_IMETHOD AdoptBuddy(imIBuddy *aBuddy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AdoptBuddy(aBuddy); } \
  NS_IMETHOD DetachBuddy(imIBuddy *aBuddy, imIContact **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DetachBuddy(aBuddy, _retval); } \
  NS_IMETHOD Remove(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(); } \
  NS_IMETHOD AddObserver(nsIObserver *aObserver) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(aObserver); } \
  NS_IMETHOD RemoveObserver(nsIObserver *aObserver) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aObserver); } \
  NS_IMETHOD NotifyObservers(nsISupports *aObj, const char * aEvent, const char16_t * aData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyObservers(aObj, aEvent, aData); } 


/* starting interface:    imIBuddy */
#define IMIBUDDY_IID_STR "c56520ba-d923-4b95-8416-ca6733c4a38e"

#define IMIBUDDY_IID \
  {0xc56520ba, 0xd923, 0x4b95, \
    { 0x84, 0x16, 0xca, 0x67, 0x33, 0xc4, 0xa3, 0x8e }}

class NS_NO_VTABLE imIBuddy : public imIStatusInfo {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(IMIBUDDY_IID)

  /* readonly attribute long id; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetId(int32_t *aId) = 0;

  /* readonly attribute prplIProtocol protocol; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetProtocol(prplIProtocol **aProtocol) = 0;

  /* readonly attribute AUTF8String userName; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUserName(nsACString& aUserName) = 0;

  /* readonly attribute AUTF8String normalizedName; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName) = 0;

  /* readonly attribute imIContact contact; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetContact(imIContact **aContact) = 0;

  /* readonly attribute prplIAccountBuddy preferredAccountBuddy; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPreferredAccountBuddy(prplIAccountBuddy **aPreferredAccountBuddy) = 0;

  /* void getAccountBuddies ([optional] out unsigned long accountBuddyCount, [array, size_is (accountBuddyCount), retval] out prplIAccountBuddy accountBuddies); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAccountBuddies(uint32_t *accountBuddyCount, prplIAccountBuddy ***accountBuddies) = 0;

  /* void remove (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Remove(void) = 0;

  /* void addObserver (in nsIObserver aObserver); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddObserver(nsIObserver *aObserver) = 0;

  /* void removeObserver (in nsIObserver aObserver); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveObserver(nsIObserver *aObserver) = 0;

  /* void notifyObservers (in nsISupports aObj, in string aEvent, [optional] in wstring aData); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD NotifyObservers(nsISupports *aObj, const char * aEvent, const char16_t * aData) = 0;

  /* void observe (in nsISupports aObj, in string aEvent, [optional] in wstring aData); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Observe(nsISupports *aObj, const char * aEvent, const char16_t * aData) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(imIBuddy, IMIBUDDY_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_IMIBUDDY \
  NS_IMETHOD GetId(int32_t *aId) override; \
  NS_IMETHOD GetProtocol(prplIProtocol **aProtocol) override; \
  NS_IMETHOD GetUserName(nsACString& aUserName) override; \
  NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName) override; \
  NS_IMETHOD GetContact(imIContact **aContact) override; \
  NS_IMETHOD GetPreferredAccountBuddy(prplIAccountBuddy **aPreferredAccountBuddy) override; \
  NS_IMETHOD GetAccountBuddies(uint32_t *accountBuddyCount, prplIAccountBuddy ***accountBuddies) override; \
  NS_IMETHOD Remove(void) override; \
  NS_IMETHOD AddObserver(nsIObserver *aObserver) override; \
  NS_IMETHOD RemoveObserver(nsIObserver *aObserver) override; \
  NS_IMETHOD NotifyObservers(nsISupports *aObj, const char * aEvent, const char16_t * aData) override; \
  NS_IMETHOD Observe(nsISupports *aObj, const char * aEvent, const char16_t * aData) 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_IMIBUDDY \
  nsresult GetId(int32_t *aId); \
  nsresult GetProtocol(prplIProtocol **aProtocol); \
  nsresult GetUserName(nsACString& aUserName); \
  nsresult GetNormalizedName(nsACString& aNormalizedName); \
  nsresult GetContact(imIContact **aContact); \
  nsresult GetPreferredAccountBuddy(prplIAccountBuddy **aPreferredAccountBuddy); \
  nsresult GetAccountBuddies(uint32_t *accountBuddyCount, prplIAccountBuddy ***accountBuddies); \
  nsresult Remove(void); \
  nsresult AddObserver(nsIObserver *aObserver); \
  nsresult RemoveObserver(nsIObserver *aObserver); \
  nsresult NotifyObservers(nsISupports *aObj, const char * aEvent, const char16_t * aData); \
  nsresult Observe(nsISupports *aObj, const char * aEvent, const char16_t * aData); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_IMIBUDDY(_to) \
  NS_IMETHOD GetId(int32_t *aId) override { return _to GetId(aId); } \
  NS_IMETHOD GetProtocol(prplIProtocol **aProtocol) override { return _to GetProtocol(aProtocol); } \
  NS_IMETHOD GetUserName(nsACString& aUserName) override { return _to GetUserName(aUserName); } \
  NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName) override { return _to GetNormalizedName(aNormalizedName); } \
  NS_IMETHOD GetContact(imIContact **aContact) override { return _to GetContact(aContact); } \
  NS_IMETHOD GetPreferredAccountBuddy(prplIAccountBuddy **aPreferredAccountBuddy) override { return _to GetPreferredAccountBuddy(aPreferredAccountBuddy); } \
  NS_IMETHOD GetAccountBuddies(uint32_t *accountBuddyCount, prplIAccountBuddy ***accountBuddies) override { return _to GetAccountBuddies(accountBuddyCount, accountBuddies); } \
  NS_IMETHOD Remove(void) override { return _to Remove(); } \
  NS_IMETHOD AddObserver(nsIObserver *aObserver) override { return _to AddObserver(aObserver); } \
  NS_IMETHOD RemoveObserver(nsIObserver *aObserver) override { return _to RemoveObserver(aObserver); } \
  NS_IMETHOD NotifyObservers(nsISupports *aObj, const char * aEvent, const char16_t * aData) override { return _to NotifyObservers(aObj, aEvent, aData); } \
  NS_IMETHOD Observe(nsISupports *aObj, const char * aEvent, const char16_t * aData) override { return _to Observe(aObj, aEvent, aData); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_IMIBUDDY(_to) \
  NS_IMETHOD GetId(int32_t *aId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetId(aId); } \
  NS_IMETHOD GetProtocol(prplIProtocol **aProtocol) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProtocol(aProtocol); } \
  NS_IMETHOD GetUserName(nsACString& aUserName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserName(aUserName); } \
  NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNormalizedName(aNormalizedName); } \
  NS_IMETHOD GetContact(imIContact **aContact) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContact(aContact); } \
  NS_IMETHOD GetPreferredAccountBuddy(prplIAccountBuddy **aPreferredAccountBuddy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreferredAccountBuddy(aPreferredAccountBuddy); } \
  NS_IMETHOD GetAccountBuddies(uint32_t *accountBuddyCount, prplIAccountBuddy ***accountBuddies) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccountBuddies(accountBuddyCount, accountBuddies); } \
  NS_IMETHOD Remove(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(); } \
  NS_IMETHOD AddObserver(nsIObserver *aObserver) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(aObserver); } \
  NS_IMETHOD RemoveObserver(nsIObserver *aObserver) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aObserver); } \
  NS_IMETHOD NotifyObservers(nsISupports *aObj, const char * aEvent, const char16_t * aData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyObservers(aObj, aEvent, aData); } \
  NS_IMETHOD Observe(nsISupports *aObj, const char * aEvent, const char16_t * aData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Observe(aObj, aEvent, aData); } 


/* starting interface:    prplIAccountBuddy */
#define PRPLIACCOUNTBUDDY_IID_STR "0c5021ac-7acd-4118-bf4f-c0dd9cb3ddef"

#define PRPLIACCOUNTBUDDY_IID \
  {0x0c5021ac, 0x7acd, 0x4118, \
    { 0xbf, 0x4f, 0xc0, 0xdd, 0x9c, 0xb3, 0xdd, 0xef }}

class NS_NO_VTABLE prplIAccountBuddy : public imIStatusInfo {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(PRPLIACCOUNTBUDDY_IID)

  /* attribute imIBuddy buddy; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetBuddy(imIBuddy **aBuddy) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetBuddy(imIBuddy *aBuddy) = 0;

  /* readonly attribute imIAccount account; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAccount(imIAccount **aAccount) = 0;

  /* attribute imITag tag; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTag(imITag **aTag) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetTag(imITag *aTag) = 0;

  /* readonly attribute AUTF8String userName; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUserName(nsACString& aUserName) = 0;

  /* readonly attribute AUTF8String normalizedName; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName) = 0;

  /* attribute AUTF8String serverAlias; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetServerAlias(nsACString& aServerAlias) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetServerAlias(const nsACString& aServerAlias) = 0;

  /* void remove (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Remove(void) = 0;

  /* void unInit (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UnInit(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(prplIAccountBuddy, PRPLIACCOUNTBUDDY_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_PRPLIACCOUNTBUDDY \
  NS_IMETHOD GetBuddy(imIBuddy **aBuddy) override; \
  NS_IMETHOD SetBuddy(imIBuddy *aBuddy) override; \
  NS_IMETHOD GetAccount(imIAccount **aAccount) override; \
  NS_IMETHOD GetTag(imITag **aTag) override; \
  NS_IMETHOD SetTag(imITag *aTag) override; \
  NS_IMETHOD GetUserName(nsACString& aUserName) override; \
  NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName) override; \
  NS_IMETHOD GetServerAlias(nsACString& aServerAlias) override; \
  NS_IMETHOD SetServerAlias(const nsACString& aServerAlias) override; \
  NS_IMETHOD Remove(void) override; \
  NS_IMETHOD UnInit(void) 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_PRPLIACCOUNTBUDDY \
  nsresult GetBuddy(imIBuddy **aBuddy); \
  nsresult SetBuddy(imIBuddy *aBuddy); \
  nsresult GetAccount(imIAccount **aAccount); \
  nsresult GetTag(imITag **aTag); \
  nsresult SetTag(imITag *aTag); \
  nsresult GetUserName(nsACString& aUserName); \
  nsresult GetNormalizedName(nsACString& aNormalizedName); \
  nsresult GetServerAlias(nsACString& aServerAlias); \
  nsresult SetServerAlias(const nsACString& aServerAlias); \
  nsresult Remove(void); \
  nsresult UnInit(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_PRPLIACCOUNTBUDDY(_to) \
  NS_IMETHOD GetBuddy(imIBuddy **aBuddy) override { return _to GetBuddy(aBuddy); } \
  NS_IMETHOD SetBuddy(imIBuddy *aBuddy) override { return _to SetBuddy(aBuddy); } \
  NS_IMETHOD GetAccount(imIAccount **aAccount) override { return _to GetAccount(aAccount); } \
  NS_IMETHOD GetTag(imITag **aTag) override { return _to GetTag(aTag); } \
  NS_IMETHOD SetTag(imITag *aTag) override { return _to SetTag(aTag); } \
  NS_IMETHOD GetUserName(nsACString& aUserName) override { return _to GetUserName(aUserName); } \
  NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName) override { return _to GetNormalizedName(aNormalizedName); } \
  NS_IMETHOD GetServerAlias(nsACString& aServerAlias) override { return _to GetServerAlias(aServerAlias); } \
  NS_IMETHOD SetServerAlias(const nsACString& aServerAlias) override { return _to SetServerAlias(aServerAlias); } \
  NS_IMETHOD Remove(void) override { return _to Remove(); } \
  NS_IMETHOD UnInit(void) override { return _to UnInit(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_PRPLIACCOUNTBUDDY(_to) \
  NS_IMETHOD GetBuddy(imIBuddy **aBuddy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBuddy(aBuddy); } \
  NS_IMETHOD SetBuddy(imIBuddy *aBuddy) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBuddy(aBuddy); } \
  NS_IMETHOD GetAccount(imIAccount **aAccount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccount(aAccount); } \
  NS_IMETHOD GetTag(imITag **aTag) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTag(aTag); } \
  NS_IMETHOD SetTag(imITag *aTag) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTag(aTag); } \
  NS_IMETHOD GetUserName(nsACString& aUserName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserName(aUserName); } \
  NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNormalizedName(aNormalizedName); } \
  NS_IMETHOD GetServerAlias(nsACString& aServerAlias) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServerAlias(aServerAlias); } \
  NS_IMETHOD SetServerAlias(const nsACString& aServerAlias) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetServerAlias(aServerAlias); } \
  NS_IMETHOD Remove(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(); } \
  NS_IMETHOD UnInit(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnInit(); } 


#endif /* __gen_imIContactsService_h__ */