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
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/releases/comm-beta/mailnews/base/public/nsIMsgAccountManager.idl
 */

#ifndef __gen_nsIMsgAccountManager_h__
#define __gen_nsIMsgAccountManager_h__


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

#ifndef __gen_nsIMsgAccount_h__
#include "nsIMsgAccount.h"
#endif

#ifndef __gen_nsIMsgIdentity_h__
#include "nsIMsgIdentity.h"
#endif

#ifndef __gen_nsIMsgIncomingServer_h__
#include "nsIMsgIncomingServer.h"
#endif

#ifndef __gen_nsIIncomingServerListener_h__
#include "nsIIncomingServerListener.h"
#endif

#ifndef __gen_nsIMsgFolder_h__
#include "nsIMsgFolder.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 nsIMsgFolderCache; /* forward declaration */

class nsIFolderListener; /* forward declaration */


/* starting interface:    nsIMsgAccountManager */
#define NS_IMSGACCOUNTMANAGER_IID_STR "d5ab0eea-49c5-42f2-b2e6-8ad306606d8b"

#define NS_IMSGACCOUNTMANAGER_IID \
  {0xd5ab0eea, 0x49c5, 0x42f2, \
    { 0xb2, 0xe6, 0x8a, 0xd3, 0x06, 0x60, 0x6d, 0x8b }}

class NS_NO_VTABLE nsIMsgAccountManager : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGACCOUNTMANAGER_IID)

  /* nsIMsgAccount createAccount (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CreateAccount(nsIMsgAccount **_retval) = 0;

  /* nsIMsgAccount getAccount (in ACString key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAccount(const nsACString& key, nsIMsgAccount **_retval) = 0;

  /* void removeAccount (in nsIMsgAccount aAccount, [optional] in boolean aRemoveFiles); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveAccount(nsIMsgAccount *aAccount, bool aRemoveFiles) = 0;

  /* nsIMsgIdentity createIdentity (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CreateIdentity(nsIMsgIdentity **_retval) = 0;

  /* nsIMsgIncomingServer createIncomingServer (in ACString username, in ACString hostname, in ACString type); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CreateIncomingServer(const nsACString& username, const nsACString& hostname, const nsACString& type, nsIMsgIncomingServer **_retval) = 0;

  /* void removeIncomingServer (in nsIMsgIncomingServer aServer, in boolean aRemoveFiles); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveIncomingServer(nsIMsgIncomingServer *aServer, bool aRemoveFiles) = 0;

  /* nsIMsgIdentity getIdentity (in ACString key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIdentity(const nsACString& key, nsIMsgIdentity **_retval) = 0;

  /* nsIMsgIncomingServer getIncomingServer (in ACString key); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIncomingServer(const nsACString& key, nsIMsgIncomingServer **_retval) = 0;

  /* attribute nsIMsgAccount defaultAccount; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetDefaultAccount(nsIMsgAccount **aDefaultAccount) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetDefaultAccount(nsIMsgAccount *aDefaultAccount) = 0;

  /* readonly attribute nsIArray accounts; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAccounts(nsIArray **aAccounts) = 0;

  /* readonly attribute nsIArray allIdentities; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAllIdentities(nsIArray **aAllIdentities) = 0;

  /* readonly attribute nsIArray allServers; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAllServers(nsIArray **aAllServers) = 0;

  /* readonly attribute nsIMsgFolderCache folderCache; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetFolderCache(nsIMsgFolderCache **aFolderCache) = 0;

  /* readonly attribute boolean shutdownInProgress; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetShutdownInProgress(bool *aShutdownInProgress) = 0;

  /* attribute boolean userNeedsToAuthenticate; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUserNeedsToAuthenticate(bool *aUserNeedsToAuthenticate) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetUserNeedsToAuthenticate(bool aUserNeedsToAuthenticate) = 0;

  /* nsIMsgIncomingServer FindServer (in ACString userName, in ACString hostname, in ACString type); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FindServer(const nsACString& userName, const nsACString& hostname, const nsACString& type, nsIMsgIncomingServer **_retval) = 0;

  /* nsIMsgIncomingServer findServerByURI (in nsIURI aURI, in boolean aRealFlag); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FindServerByURI(nsIURI *aURI, bool aRealFlag, nsIMsgIncomingServer **_retval) = 0;

  /* nsIMsgIncomingServer findRealServer (in ACString userName, in ACString hostname, in ACString type, in long port); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FindRealServer(const nsACString& userName, const nsACString& hostname, const nsACString& type, int32_t port, nsIMsgIncomingServer **_retval) = 0;

  /* long FindServerIndex (in nsIMsgIncomingServer server); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FindServerIndex(nsIMsgIncomingServer *server, int32_t *_retval) = 0;

  /* nsIMsgAccount FindAccountForServer (in nsIMsgIncomingServer server); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FindAccountForServer(nsIMsgIncomingServer *server, nsIMsgAccount **_retval) = 0;

  /* nsIArray getIdentitiesForServer (in nsIMsgIncomingServer server); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetIdentitiesForServer(nsIMsgIncomingServer *server, nsIArray **_retval) = 0;

  /* nsIMsgIdentity getFirstIdentityForServer (in nsIMsgIncomingServer server); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetFirstIdentityForServer(nsIMsgIncomingServer *server, nsIMsgIdentity **_retval) = 0;

  /* nsIArray getServersForIdentity (in nsIMsgIdentity identity); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetServersForIdentity(nsIMsgIdentity *identity, nsIArray **_retval) = 0;

  /* attribute nsIMsgIncomingServer localFoldersServer; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetLocalFoldersServer(nsIMsgIncomingServer **aLocalFoldersServer) = 0;
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetLocalFoldersServer(nsIMsgIncomingServer *aLocalFoldersServer) = 0;

  /* void createLocalMailAccount (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CreateLocalMailAccount(void) = 0;

  /* void LoadAccounts (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD LoadAccounts(void) = 0;

  /* void setSpecialFolders (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetSpecialFolders(void) = 0;

  /* void loadVirtualFolders (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD LoadVirtualFolders(void) = 0;

  /* void UnloadAccounts (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UnloadAccounts(void) = 0;

  /* void WriteToFolderCache (in nsIMsgFolderCache folderCache); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD WriteToFolderCache(nsIMsgFolderCache *folderCache) = 0;

  /* void saveVirtualFolders (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SaveVirtualFolders(void) = 0;

  /* void closeCachedConnections (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CloseCachedConnections(void) = 0;

  /* void shutdownServers (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ShutdownServers(void) = 0;

  /* void CleanupOnExit (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD CleanupOnExit(void) = 0;

  /* void SetFolderDoingEmptyTrash (in nsIMsgFolder folder); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetFolderDoingEmptyTrash(nsIMsgFolder *folder) = 0;

  /* boolean GetEmptyTrashInProgress (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetEmptyTrashInProgress(bool *_retval) = 0;

  /* void SetFolderDoingCleanupInbox (in nsIMsgFolder folder); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetFolderDoingCleanupInbox(nsIMsgFolder *folder) = 0;

  /* boolean GetCleanupInboxInProgress (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetCleanupInboxInProgress(bool *_retval) = 0;

  /* void addRootFolderListener (in nsIFolderListener listener); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddRootFolderListener(nsIFolderListener *listener) = 0;

  /* void removeRootFolderListener (in nsIFolderListener listener); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveRootFolderListener(nsIFolderListener *listener) = 0;

  /* void addIncomingServerListener (in nsIIncomingServerListener serverListener); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AddIncomingServerListener(nsIIncomingServerListener *serverListener) = 0;

  /* void removeIncomingServerListener (in nsIIncomingServerListener serverListener); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveIncomingServerListener(nsIIncomingServerListener *serverListener) = 0;

  /* void notifyServerLoaded (in nsIMsgIncomingServer server); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD NotifyServerLoaded(nsIMsgIncomingServer *server) = 0;

  /* void notifyServerUnloaded (in nsIMsgIncomingServer server); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD NotifyServerUnloaded(nsIMsgIncomingServer *server) = 0;

  /* void notifyServerChanged (in nsIMsgIncomingServer server); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD NotifyServerChanged(nsIMsgIncomingServer *server) = 0;

  /* void saveAccountInfo (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SaveAccountInfo(void) = 0;

  /* ACString getChromePackageName (in ACString aExtensionName); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetChromePackageName(const nsACString& aExtensionName, nsACString& _retval) = 0;

  /* readonly attribute nsIArray allFolders; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetAllFolders(nsIArray **aAllFolders) = 0;

  /* ACString folderUriForPath (in nsIFile aLocalPath); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD FolderUriForPath(nsIFile *aLocalPath, nsACString& _retval) = 0;

  /* long getSortOrder (in nsIMsgIncomingServer server); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetSortOrder(nsIMsgIncomingServer *server, int32_t *_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgAccountManager, NS_IMSGACCOUNTMANAGER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGACCOUNTMANAGER \
  NS_IMETHOD CreateAccount(nsIMsgAccount **_retval) override; \
  NS_IMETHOD GetAccount(const nsACString& key, nsIMsgAccount **_retval) override; \
  NS_IMETHOD RemoveAccount(nsIMsgAccount *aAccount, bool aRemoveFiles) override; \
  NS_IMETHOD CreateIdentity(nsIMsgIdentity **_retval) override; \
  NS_IMETHOD CreateIncomingServer(const nsACString& username, const nsACString& hostname, const nsACString& type, nsIMsgIncomingServer **_retval) override; \
  NS_IMETHOD RemoveIncomingServer(nsIMsgIncomingServer *aServer, bool aRemoveFiles) override; \
  NS_IMETHOD GetIdentity(const nsACString& key, nsIMsgIdentity **_retval) override; \
  NS_IMETHOD GetIncomingServer(const nsACString& key, nsIMsgIncomingServer **_retval) override; \
  NS_IMETHOD GetDefaultAccount(nsIMsgAccount **aDefaultAccount) override; \
  NS_IMETHOD SetDefaultAccount(nsIMsgAccount *aDefaultAccount) override; \
  NS_IMETHOD GetAccounts(nsIArray **aAccounts) override; \
  NS_IMETHOD GetAllIdentities(nsIArray **aAllIdentities) override; \
  NS_IMETHOD GetAllServers(nsIArray **aAllServers) override; \
  NS_IMETHOD GetFolderCache(nsIMsgFolderCache **aFolderCache) override; \
  NS_IMETHOD GetShutdownInProgress(bool *aShutdownInProgress) override; \
  NS_IMETHOD GetUserNeedsToAuthenticate(bool *aUserNeedsToAuthenticate) override; \
  NS_IMETHOD SetUserNeedsToAuthenticate(bool aUserNeedsToAuthenticate) override; \
  NS_IMETHOD FindServer(const nsACString& userName, const nsACString& hostname, const nsACString& type, nsIMsgIncomingServer **_retval) override; \
  NS_IMETHOD FindServerByURI(nsIURI *aURI, bool aRealFlag, nsIMsgIncomingServer **_retval) override; \
  NS_IMETHOD FindRealServer(const nsACString& userName, const nsACString& hostname, const nsACString& type, int32_t port, nsIMsgIncomingServer **_retval) override; \
  NS_IMETHOD FindServerIndex(nsIMsgIncomingServer *server, int32_t *_retval) override; \
  NS_IMETHOD FindAccountForServer(nsIMsgIncomingServer *server, nsIMsgAccount **_retval) override; \
  NS_IMETHOD GetIdentitiesForServer(nsIMsgIncomingServer *server, nsIArray **_retval) override; \
  NS_IMETHOD GetFirstIdentityForServer(nsIMsgIncomingServer *server, nsIMsgIdentity **_retval) override; \
  NS_IMETHOD GetServersForIdentity(nsIMsgIdentity *identity, nsIArray **_retval) override; \
  NS_IMETHOD GetLocalFoldersServer(nsIMsgIncomingServer **aLocalFoldersServer) override; \
  NS_IMETHOD SetLocalFoldersServer(nsIMsgIncomingServer *aLocalFoldersServer) override; \
  NS_IMETHOD CreateLocalMailAccount(void) override; \
  NS_IMETHOD LoadAccounts(void) override; \
  NS_IMETHOD SetSpecialFolders(void) override; \
  NS_IMETHOD LoadVirtualFolders(void) override; \
  NS_IMETHOD UnloadAccounts(void) override; \
  NS_IMETHOD WriteToFolderCache(nsIMsgFolderCache *folderCache) override; \
  NS_IMETHOD SaveVirtualFolders(void) override; \
  NS_IMETHOD CloseCachedConnections(void) override; \
  NS_IMETHOD ShutdownServers(void) override; \
  NS_IMETHOD CleanupOnExit(void) override; \
  NS_IMETHOD SetFolderDoingEmptyTrash(nsIMsgFolder *folder) override; \
  NS_IMETHOD GetEmptyTrashInProgress(bool *_retval) override; \
  NS_IMETHOD SetFolderDoingCleanupInbox(nsIMsgFolder *folder) override; \
  NS_IMETHOD GetCleanupInboxInProgress(bool *_retval) override; \
  NS_IMETHOD AddRootFolderListener(nsIFolderListener *listener) override; \
  NS_IMETHOD RemoveRootFolderListener(nsIFolderListener *listener) override; \
  NS_IMETHOD AddIncomingServerListener(nsIIncomingServerListener *serverListener) override; \
  NS_IMETHOD RemoveIncomingServerListener(nsIIncomingServerListener *serverListener) override; \
  NS_IMETHOD NotifyServerLoaded(nsIMsgIncomingServer *server) override; \
  NS_IMETHOD NotifyServerUnloaded(nsIMsgIncomingServer *server) override; \
  NS_IMETHOD NotifyServerChanged(nsIMsgIncomingServer *server) override; \
  NS_IMETHOD SaveAccountInfo(void) override; \
  NS_IMETHOD GetChromePackageName(const nsACString& aExtensionName, nsACString& _retval) override; \
  NS_IMETHOD GetAllFolders(nsIArray **aAllFolders) override; \
  NS_IMETHOD FolderUriForPath(nsIFile *aLocalPath, nsACString& _retval) override; \
  NS_IMETHOD GetSortOrder(nsIMsgIncomingServer *server, int32_t *_retval) 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_NSIMSGACCOUNTMANAGER \
  nsresult CreateAccount(nsIMsgAccount **_retval); \
  nsresult GetAccount(const nsACString& key, nsIMsgAccount **_retval); \
  nsresult RemoveAccount(nsIMsgAccount *aAccount, bool aRemoveFiles); \
  nsresult CreateIdentity(nsIMsgIdentity **_retval); \
  nsresult CreateIncomingServer(const nsACString& username, const nsACString& hostname, const nsACString& type, nsIMsgIncomingServer **_retval); \
  nsresult RemoveIncomingServer(nsIMsgIncomingServer *aServer, bool aRemoveFiles); \
  nsresult GetIdentity(const nsACString& key, nsIMsgIdentity **_retval); \
  nsresult GetIncomingServer(const nsACString& key, nsIMsgIncomingServer **_retval); \
  nsresult GetDefaultAccount(nsIMsgAccount **aDefaultAccount); \
  nsresult SetDefaultAccount(nsIMsgAccount *aDefaultAccount); \
  nsresult GetAccounts(nsIArray **aAccounts); \
  nsresult GetAllIdentities(nsIArray **aAllIdentities); \
  nsresult GetAllServers(nsIArray **aAllServers); \
  nsresult GetFolderCache(nsIMsgFolderCache **aFolderCache); \
  nsresult GetShutdownInProgress(bool *aShutdownInProgress); \
  nsresult GetUserNeedsToAuthenticate(bool *aUserNeedsToAuthenticate); \
  nsresult SetUserNeedsToAuthenticate(bool aUserNeedsToAuthenticate); \
  nsresult FindServer(const nsACString& userName, const nsACString& hostname, const nsACString& type, nsIMsgIncomingServer **_retval); \
  nsresult FindServerByURI(nsIURI *aURI, bool aRealFlag, nsIMsgIncomingServer **_retval); \
  nsresult FindRealServer(const nsACString& userName, const nsACString& hostname, const nsACString& type, int32_t port, nsIMsgIncomingServer **_retval); \
  nsresult FindServerIndex(nsIMsgIncomingServer *server, int32_t *_retval); \
  nsresult FindAccountForServer(nsIMsgIncomingServer *server, nsIMsgAccount **_retval); \
  nsresult GetIdentitiesForServer(nsIMsgIncomingServer *server, nsIArray **_retval); \
  nsresult GetFirstIdentityForServer(nsIMsgIncomingServer *server, nsIMsgIdentity **_retval); \
  nsresult GetServersForIdentity(nsIMsgIdentity *identity, nsIArray **_retval); \
  nsresult GetLocalFoldersServer(nsIMsgIncomingServer **aLocalFoldersServer); \
  nsresult SetLocalFoldersServer(nsIMsgIncomingServer *aLocalFoldersServer); \
  nsresult CreateLocalMailAccount(void); \
  nsresult LoadAccounts(void); \
  nsresult SetSpecialFolders(void); \
  nsresult LoadVirtualFolders(void); \
  nsresult UnloadAccounts(void); \
  nsresult WriteToFolderCache(nsIMsgFolderCache *folderCache); \
  nsresult SaveVirtualFolders(void); \
  nsresult CloseCachedConnections(void); \
  nsresult ShutdownServers(void); \
  nsresult CleanupOnExit(void); \
  nsresult SetFolderDoingEmptyTrash(nsIMsgFolder *folder); \
  nsresult GetEmptyTrashInProgress(bool *_retval); \
  nsresult SetFolderDoingCleanupInbox(nsIMsgFolder *folder); \
  nsresult GetCleanupInboxInProgress(bool *_retval); \
  nsresult AddRootFolderListener(nsIFolderListener *listener); \
  nsresult RemoveRootFolderListener(nsIFolderListener *listener); \
  nsresult AddIncomingServerListener(nsIIncomingServerListener *serverListener); \
  nsresult RemoveIncomingServerListener(nsIIncomingServerListener *serverListener); \
  nsresult NotifyServerLoaded(nsIMsgIncomingServer *server); \
  nsresult NotifyServerUnloaded(nsIMsgIncomingServer *server); \
  nsresult NotifyServerChanged(nsIMsgIncomingServer *server); \
  nsresult SaveAccountInfo(void); \
  nsresult GetChromePackageName(const nsACString& aExtensionName, nsACString& _retval); \
  nsresult GetAllFolders(nsIArray **aAllFolders); \
  nsresult FolderUriForPath(nsIFile *aLocalPath, nsACString& _retval); \
  nsresult GetSortOrder(nsIMsgIncomingServer *server, int32_t *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGACCOUNTMANAGER(_to) \
  NS_IMETHOD CreateAccount(nsIMsgAccount **_retval) override { return _to CreateAccount(_retval); } \
  NS_IMETHOD GetAccount(const nsACString& key, nsIMsgAccount **_retval) override { return _to GetAccount(key, _retval); } \
  NS_IMETHOD RemoveAccount(nsIMsgAccount *aAccount, bool aRemoveFiles) override { return _to RemoveAccount(aAccount, aRemoveFiles); } \
  NS_IMETHOD CreateIdentity(nsIMsgIdentity **_retval) override { return _to CreateIdentity(_retval); } \
  NS_IMETHOD CreateIncomingServer(const nsACString& username, const nsACString& hostname, const nsACString& type, nsIMsgIncomingServer **_retval) override { return _to CreateIncomingServer(username, hostname, type, _retval); } \
  NS_IMETHOD RemoveIncomingServer(nsIMsgIncomingServer *aServer, bool aRemoveFiles) override { return _to RemoveIncomingServer(aServer, aRemoveFiles); } \
  NS_IMETHOD GetIdentity(const nsACString& key, nsIMsgIdentity **_retval) override { return _to GetIdentity(key, _retval); } \
  NS_IMETHOD GetIncomingServer(const nsACString& key, nsIMsgIncomingServer **_retval) override { return _to GetIncomingServer(key, _retval); } \
  NS_IMETHOD GetDefaultAccount(nsIMsgAccount **aDefaultAccount) override { return _to GetDefaultAccount(aDefaultAccount); } \
  NS_IMETHOD SetDefaultAccount(nsIMsgAccount *aDefaultAccount) override { return _to SetDefaultAccount(aDefaultAccount); } \
  NS_IMETHOD GetAccounts(nsIArray **aAccounts) override { return _to GetAccounts(aAccounts); } \
  NS_IMETHOD GetAllIdentities(nsIArray **aAllIdentities) override { return _to GetAllIdentities(aAllIdentities); } \
  NS_IMETHOD GetAllServers(nsIArray **aAllServers) override { return _to GetAllServers(aAllServers); } \
  NS_IMETHOD GetFolderCache(nsIMsgFolderCache **aFolderCache) override { return _to GetFolderCache(aFolderCache); } \
  NS_IMETHOD GetShutdownInProgress(bool *aShutdownInProgress) override { return _to GetShutdownInProgress(aShutdownInProgress); } \
  NS_IMETHOD GetUserNeedsToAuthenticate(bool *aUserNeedsToAuthenticate) override { return _to GetUserNeedsToAuthenticate(aUserNeedsToAuthenticate); } \
  NS_IMETHOD SetUserNeedsToAuthenticate(bool aUserNeedsToAuthenticate) override { return _to SetUserNeedsToAuthenticate(aUserNeedsToAuthenticate); } \
  NS_IMETHOD FindServer(const nsACString& userName, const nsACString& hostname, const nsACString& type, nsIMsgIncomingServer **_retval) override { return _to FindServer(userName, hostname, type, _retval); } \
  NS_IMETHOD FindServerByURI(nsIURI *aURI, bool aRealFlag, nsIMsgIncomingServer **_retval) override { return _to FindServerByURI(aURI, aRealFlag, _retval); } \
  NS_IMETHOD FindRealServer(const nsACString& userName, const nsACString& hostname, const nsACString& type, int32_t port, nsIMsgIncomingServer **_retval) override { return _to FindRealServer(userName, hostname, type, port, _retval); } \
  NS_IMETHOD FindServerIndex(nsIMsgIncomingServer *server, int32_t *_retval) override { return _to FindServerIndex(server, _retval); } \
  NS_IMETHOD FindAccountForServer(nsIMsgIncomingServer *server, nsIMsgAccount **_retval) override { return _to FindAccountForServer(server, _retval); } \
  NS_IMETHOD GetIdentitiesForServer(nsIMsgIncomingServer *server, nsIArray **_retval) override { return _to GetIdentitiesForServer(server, _retval); } \
  NS_IMETHOD GetFirstIdentityForServer(nsIMsgIncomingServer *server, nsIMsgIdentity **_retval) override { return _to GetFirstIdentityForServer(server, _retval); } \
  NS_IMETHOD GetServersForIdentity(nsIMsgIdentity *identity, nsIArray **_retval) override { return _to GetServersForIdentity(identity, _retval); } \
  NS_IMETHOD GetLocalFoldersServer(nsIMsgIncomingServer **aLocalFoldersServer) override { return _to GetLocalFoldersServer(aLocalFoldersServer); } \
  NS_IMETHOD SetLocalFoldersServer(nsIMsgIncomingServer *aLocalFoldersServer) override { return _to SetLocalFoldersServer(aLocalFoldersServer); } \
  NS_IMETHOD CreateLocalMailAccount(void) override { return _to CreateLocalMailAccount(); } \
  NS_IMETHOD LoadAccounts(void) override { return _to LoadAccounts(); } \
  NS_IMETHOD SetSpecialFolders(void) override { return _to SetSpecialFolders(); } \
  NS_IMETHOD LoadVirtualFolders(void) override { return _to LoadVirtualFolders(); } \
  NS_IMETHOD UnloadAccounts(void) override { return _to UnloadAccounts(); } \
  NS_IMETHOD WriteToFolderCache(nsIMsgFolderCache *folderCache) override { return _to WriteToFolderCache(folderCache); } \
  NS_IMETHOD SaveVirtualFolders(void) override { return _to SaveVirtualFolders(); } \
  NS_IMETHOD CloseCachedConnections(void) override { return _to CloseCachedConnections(); } \
  NS_IMETHOD ShutdownServers(void) override { return _to ShutdownServers(); } \
  NS_IMETHOD CleanupOnExit(void) override { return _to CleanupOnExit(); } \
  NS_IMETHOD SetFolderDoingEmptyTrash(nsIMsgFolder *folder) override { return _to SetFolderDoingEmptyTrash(folder); } \
  NS_IMETHOD GetEmptyTrashInProgress(bool *_retval) override { return _to GetEmptyTrashInProgress(_retval); } \
  NS_IMETHOD SetFolderDoingCleanupInbox(nsIMsgFolder *folder) override { return _to SetFolderDoingCleanupInbox(folder); } \
  NS_IMETHOD GetCleanupInboxInProgress(bool *_retval) override { return _to GetCleanupInboxInProgress(_retval); } \
  NS_IMETHOD AddRootFolderListener(nsIFolderListener *listener) override { return _to AddRootFolderListener(listener); } \
  NS_IMETHOD RemoveRootFolderListener(nsIFolderListener *listener) override { return _to RemoveRootFolderListener(listener); } \
  NS_IMETHOD AddIncomingServerListener(nsIIncomingServerListener *serverListener) override { return _to AddIncomingServerListener(serverListener); } \
  NS_IMETHOD RemoveIncomingServerListener(nsIIncomingServerListener *serverListener) override { return _to RemoveIncomingServerListener(serverListener); } \
  NS_IMETHOD NotifyServerLoaded(nsIMsgIncomingServer *server) override { return _to NotifyServerLoaded(server); } \
  NS_IMETHOD NotifyServerUnloaded(nsIMsgIncomingServer *server) override { return _to NotifyServerUnloaded(server); } \
  NS_IMETHOD NotifyServerChanged(nsIMsgIncomingServer *server) override { return _to NotifyServerChanged(server); } \
  NS_IMETHOD SaveAccountInfo(void) override { return _to SaveAccountInfo(); } \
  NS_IMETHOD GetChromePackageName(const nsACString& aExtensionName, nsACString& _retval) override { return _to GetChromePackageName(aExtensionName, _retval); } \
  NS_IMETHOD GetAllFolders(nsIArray **aAllFolders) override { return _to GetAllFolders(aAllFolders); } \
  NS_IMETHOD FolderUriForPath(nsIFile *aLocalPath, nsACString& _retval) override { return _to FolderUriForPath(aLocalPath, _retval); } \
  NS_IMETHOD GetSortOrder(nsIMsgIncomingServer *server, int32_t *_retval) override { return _to GetSortOrder(server, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGACCOUNTMANAGER(_to) \
  NS_IMETHOD CreateAccount(nsIMsgAccount **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAccount(_retval); } \
  NS_IMETHOD GetAccount(const nsACString& key, nsIMsgAccount **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccount(key, _retval); } \
  NS_IMETHOD RemoveAccount(nsIMsgAccount *aAccount, bool aRemoveFiles) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAccount(aAccount, aRemoveFiles); } \
  NS_IMETHOD CreateIdentity(nsIMsgIdentity **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateIdentity(_retval); } \
  NS_IMETHOD CreateIncomingServer(const nsACString& username, const nsACString& hostname, const nsACString& type, nsIMsgIncomingServer **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateIncomingServer(username, hostname, type, _retval); } \
  NS_IMETHOD RemoveIncomingServer(nsIMsgIncomingServer *aServer, bool aRemoveFiles) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveIncomingServer(aServer, aRemoveFiles); } \
  NS_IMETHOD GetIdentity(const nsACString& key, nsIMsgIdentity **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdentity(key, _retval); } \
  NS_IMETHOD GetIncomingServer(const nsACString& key, nsIMsgIncomingServer **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIncomingServer(key, _retval); } \
  NS_IMETHOD GetDefaultAccount(nsIMsgAccount **aDefaultAccount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultAccount(aDefaultAccount); } \
  NS_IMETHOD SetDefaultAccount(nsIMsgAccount *aDefaultAccount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultAccount(aDefaultAccount); } \
  NS_IMETHOD GetAccounts(nsIArray **aAccounts) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccounts(aAccounts); } \
  NS_IMETHOD GetAllIdentities(nsIArray **aAllIdentities) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllIdentities(aAllIdentities); } \
  NS_IMETHOD GetAllServers(nsIArray **aAllServers) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllServers(aAllServers); } \
  NS_IMETHOD GetFolderCache(nsIMsgFolderCache **aFolderCache) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFolderCache(aFolderCache); } \
  NS_IMETHOD GetShutdownInProgress(bool *aShutdownInProgress) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShutdownInProgress(aShutdownInProgress); } \
  NS_IMETHOD GetUserNeedsToAuthenticate(bool *aUserNeedsToAuthenticate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserNeedsToAuthenticate(aUserNeedsToAuthenticate); } \
  NS_IMETHOD SetUserNeedsToAuthenticate(bool aUserNeedsToAuthenticate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUserNeedsToAuthenticate(aUserNeedsToAuthenticate); } \
  NS_IMETHOD FindServer(const nsACString& userName, const nsACString& hostname, const nsACString& type, nsIMsgIncomingServer **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FindServer(userName, hostname, type, _retval); } \
  NS_IMETHOD FindServerByURI(nsIURI *aURI, bool aRealFlag, nsIMsgIncomingServer **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FindServerByURI(aURI, aRealFlag, _retval); } \
  NS_IMETHOD FindRealServer(const nsACString& userName, const nsACString& hostname, const nsACString& type, int32_t port, nsIMsgIncomingServer **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FindRealServer(userName, hostname, type, port, _retval); } \
  NS_IMETHOD FindServerIndex(nsIMsgIncomingServer *server, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FindServerIndex(server, _retval); } \
  NS_IMETHOD FindAccountForServer(nsIMsgIncomingServer *server, nsIMsgAccount **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FindAccountForServer(server, _retval); } \
  NS_IMETHOD GetIdentitiesForServer(nsIMsgIncomingServer *server, nsIArray **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdentitiesForServer(server, _retval); } \
  NS_IMETHOD GetFirstIdentityForServer(nsIMsgIncomingServer *server, nsIMsgIdentity **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFirstIdentityForServer(server, _retval); } \
  NS_IMETHOD GetServersForIdentity(nsIMsgIdentity *identity, nsIArray **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServersForIdentity(identity, _retval); } \
  NS_IMETHOD GetLocalFoldersServer(nsIMsgIncomingServer **aLocalFoldersServer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalFoldersServer(aLocalFoldersServer); } \
  NS_IMETHOD SetLocalFoldersServer(nsIMsgIncomingServer *aLocalFoldersServer) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLocalFoldersServer(aLocalFoldersServer); } \
  NS_IMETHOD CreateLocalMailAccount(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateLocalMailAccount(); } \
  NS_IMETHOD LoadAccounts(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadAccounts(); } \
  NS_IMETHOD SetSpecialFolders(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSpecialFolders(); } \
  NS_IMETHOD LoadVirtualFolders(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadVirtualFolders(); } \
  NS_IMETHOD UnloadAccounts(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnloadAccounts(); } \
  NS_IMETHOD WriteToFolderCache(nsIMsgFolderCache *folderCache) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteToFolderCache(folderCache); } \
  NS_IMETHOD SaveVirtualFolders(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveVirtualFolders(); } \
  NS_IMETHOD CloseCachedConnections(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseCachedConnections(); } \
  NS_IMETHOD ShutdownServers(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShutdownServers(); } \
  NS_IMETHOD CleanupOnExit(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CleanupOnExit(); } \
  NS_IMETHOD SetFolderDoingEmptyTrash(nsIMsgFolder *folder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFolderDoingEmptyTrash(folder); } \
  NS_IMETHOD GetEmptyTrashInProgress(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEmptyTrashInProgress(_retval); } \
  NS_IMETHOD SetFolderDoingCleanupInbox(nsIMsgFolder *folder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFolderDoingCleanupInbox(folder); } \
  NS_IMETHOD GetCleanupInboxInProgress(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCleanupInboxInProgress(_retval); } \
  NS_IMETHOD AddRootFolderListener(nsIFolderListener *listener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRootFolderListener(listener); } \
  NS_IMETHOD RemoveRootFolderListener(nsIFolderListener *listener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveRootFolderListener(listener); } \
  NS_IMETHOD AddIncomingServerListener(nsIIncomingServerListener *serverListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddIncomingServerListener(serverListener); } \
  NS_IMETHOD RemoveIncomingServerListener(nsIIncomingServerListener *serverListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveIncomingServerListener(serverListener); } \
  NS_IMETHOD NotifyServerLoaded(nsIMsgIncomingServer *server) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyServerLoaded(server); } \
  NS_IMETHOD NotifyServerUnloaded(nsIMsgIncomingServer *server) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyServerUnloaded(server); } \
  NS_IMETHOD NotifyServerChanged(nsIMsgIncomingServer *server) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyServerChanged(server); } \
  NS_IMETHOD SaveAccountInfo(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveAccountInfo(); } \
  NS_IMETHOD GetChromePackageName(const nsACString& aExtensionName, nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromePackageName(aExtensionName, _retval); } \
  NS_IMETHOD GetAllFolders(nsIArray **aAllFolders) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllFolders(aAllFolders); } \
  NS_IMETHOD FolderUriForPath(nsIFile *aLocalPath, nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FolderUriForPath(aLocalPath, _retval); } \
  NS_IMETHOD GetSortOrder(nsIMsgIncomingServer *server, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSortOrder(server, _retval); } 

#define MAILNEWS_ACCOUNTMANAGER_EXTENSIONS "mailnews-accountmanager-extensions"

/* starting interface:    nsIMsgAccountManagerExtension */
#define NS_IMSGACCOUNTMANAGEREXTENSION_IID_STR "70032de0-cd59-41ba-839d-fc1b65367ee7"

#define NS_IMSGACCOUNTMANAGEREXTENSION_IID \
  {0x70032de0, 0xcd59, 0x41ba, \
    { 0x83, 0x9d, 0xfc, 0x1b, 0x65, 0x36, 0x7e, 0xe7 }}

class NS_NO_VTABLE nsIMsgAccountManagerExtension : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGACCOUNTMANAGEREXTENSION_IID)

  /* readonly attribute ACString name; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetName(nsACString& aName) = 0;

  /* boolean showPanel (in nsIMsgIncomingServer server); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ShowPanel(nsIMsgIncomingServer *server, bool *_retval) = 0;

  /* readonly attribute ACString chromePackageName; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetChromePackageName(nsACString& aChromePackageName) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgAccountManagerExtension, NS_IMSGACCOUNTMANAGEREXTENSION_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGACCOUNTMANAGEREXTENSION \
  NS_IMETHOD GetName(nsACString& aName) override; \
  NS_IMETHOD ShowPanel(nsIMsgIncomingServer *server, bool *_retval) override; \
  NS_IMETHOD GetChromePackageName(nsACString& aChromePackageName) 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_NSIMSGACCOUNTMANAGEREXTENSION \
  nsresult GetName(nsACString& aName); \
  nsresult ShowPanel(nsIMsgIncomingServer *server, bool *_retval); \
  nsresult GetChromePackageName(nsACString& aChromePackageName); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGACCOUNTMANAGEREXTENSION(_to) \
  NS_IMETHOD GetName(nsACString& aName) override { return _to GetName(aName); } \
  NS_IMETHOD ShowPanel(nsIMsgIncomingServer *server, bool *_retval) override { return _to ShowPanel(server, _retval); } \
  NS_IMETHOD GetChromePackageName(nsACString& aChromePackageName) override { return _to GetChromePackageName(aChromePackageName); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGACCOUNTMANAGEREXTENSION(_to) \
  NS_IMETHOD GetName(nsACString& aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  NS_IMETHOD ShowPanel(nsIMsgIncomingServer *server, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowPanel(server, _retval); } \
  NS_IMETHOD GetChromePackageName(nsACString& aChromePackageName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromePackageName(aChromePackageName); } 


#endif /* __gen_nsIMsgAccountManager_h__ */