/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM c:/OOo_Build/OOD680_m5/moz/wntmsci10.pro/misc/build/mozilla/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_nsISupportsArray_h__
#include "nsISupportsArray.h"
#endif

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

#ifndef __gen_nsIMsgFolder_h__
#include "nsIMsgFolder.h"
#endif

/* 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 "6ed2cc00-e623-11d2-b7fc-00805f05ffa5"

#define NS_IMSGACCOUNTMANAGER_IID \
  {0x6ed2cc00, 0xe623, 0x11d2, \
    { 0xb7, 0xfc, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5 }}

class NS_NO_VTABLE nsIMsgAccountManager : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMSGACCOUNTMANAGER_IID)

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

  /* nsIMsgAccount getAccount (in string key); */
  NS_IMETHOD GetAccount(const char *key, nsIMsgAccount **_retval) = 0;

  /* void removeAccount (in nsIMsgAccount account); */
  NS_IMETHOD RemoveAccount(nsIMsgAccount *account) = 0;

  /* void removeIdentity (in nsIMsgIdentity identity); */
  NS_IMETHOD RemoveIdentity(nsIMsgIdentity *identity) = 0;

  /* void duplicateAccount (in nsIMsgAccount account); */
  NS_IMETHOD DuplicateAccount(nsIMsgAccount *account) = 0;

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

  /* nsIMsgIncomingServer createIncomingServer (in string username, in string hostname, in string type); */
  NS_IMETHOD CreateIncomingServer(const char *username, const char *hostname, const char *type, nsIMsgIncomingServer **_retval) = 0;

  /* nsIMsgIdentity getIdentity (in string key); */
  NS_IMETHOD GetIdentity(const char *key, nsIMsgIdentity **_retval) = 0;

  /* nsIMsgIncomingServer getIncomingServer (in string key); */
  NS_IMETHOD GetIncomingServer(const char *key, nsIMsgIncomingServer **_retval) = 0;

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

  /**
   * ordered list of all accounts, by the order they are in the prefs
   * array of nsIMsgAccount
   */
  /* readonly attribute nsISupportsArray accounts; */
  NS_IMETHOD GetAccounts(nsISupportsArray * *aAccounts) = 0;

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

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

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

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

  /**
   * for preventing unauthenticated users from seeing header information 
   */
  /* attribute boolean userNeedsToAuthenticate; */
  NS_IMETHOD GetUserNeedsToAuthenticate(PRBool *aUserNeedsToAuthenticate) = 0;
  NS_IMETHOD SetUserNeedsToAuthenticate(PRBool aUserNeedsToAuthenticate) = 0;

  /* nsIMsgIncomingServer FindServer (in string userName, in string hostname, in string type); */
  NS_IMETHOD FindServer(const char *userName, const char *hostname, const char *type, nsIMsgIncomingServer **_retval) = 0;

  /* nsIMsgIncomingServer findRealServer (in string userName, in string hostname, in string type); */
  NS_IMETHOD FindRealServer(const char *userName, const char *hostname, const char *type, nsIMsgIncomingServer **_retval) = 0;

  /**
   * find the index of this server in the (ordered) list of accounts
   */
  /* long FindServerIndex (in nsIMsgIncomingServer server); */
  NS_IMETHOD FindServerIndex(nsIMsgIncomingServer *server, PRInt32 *_retval) = 0;

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

  /* nsISupportsArray GetIdentitiesForServer (in nsIMsgIncomingServer server); */
  NS_IMETHOD GetIdentitiesForServer(nsIMsgIncomingServer *server, nsISupportsArray **_retval) = 0;

  /**
   * given a server, return the first identity in accounts that have this server
   */
  /* nsIMsgIdentity getFirstIdentityForServer (in nsIMsgIncomingServer server); */
  NS_IMETHOD GetFirstIdentityForServer(nsIMsgIncomingServer *server, nsIMsgIdentity **_retval) = 0;

  /* nsISupportsArray GetServersForIdentity (in nsIMsgIdentity identity); */
  NS_IMETHOD GetServersForIdentity(nsIMsgIdentity *identity, nsISupportsArray **_retval) = 0;

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

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

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

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

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

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

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

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

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

  /* boolean GetEmptyTrashInProgress (); */
  NS_IMETHOD GetEmptyTrashInProgress(PRBool *_retval) = 0;

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

  /* boolean GetCleanupInboxInProgress (); */
  NS_IMETHOD GetCleanupInboxInProgress(PRBool *_retval) = 0;

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

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

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

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

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

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

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

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

  /* string getChromePackageName (in string aExtensionName); */
  NS_IMETHOD GetChromePackageName(const char *aExtensionName, char **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGACCOUNTMANAGER \
  NS_IMETHOD CreateAccount(nsIMsgAccount **_retval); \
  NS_IMETHOD GetAccount(const char *key, nsIMsgAccount **_retval); \
  NS_IMETHOD RemoveAccount(nsIMsgAccount *account); \
  NS_IMETHOD RemoveIdentity(nsIMsgIdentity *identity); \
  NS_IMETHOD DuplicateAccount(nsIMsgAccount *account); \
  NS_IMETHOD CreateIdentity(nsIMsgIdentity **_retval); \
  NS_IMETHOD CreateIncomingServer(const char *username, const char *hostname, const char *type, nsIMsgIncomingServer **_retval); \
  NS_IMETHOD GetIdentity(const char *key, nsIMsgIdentity **_retval); \
  NS_IMETHOD GetIncomingServer(const char *key, nsIMsgIncomingServer **_retval); \
  NS_IMETHOD GetDefaultAccount(nsIMsgAccount * *aDefaultAccount); \
  NS_IMETHOD SetDefaultAccount(nsIMsgAccount * aDefaultAccount); \
  NS_IMETHOD GetAccounts(nsISupportsArray * *aAccounts); \
  NS_IMETHOD GetAllIdentities(nsISupportsArray * *aAllIdentities); \
  NS_IMETHOD GetAllServers(nsISupportsArray * *aAllServers); \
  NS_IMETHOD GetFolderCache(nsIMsgFolderCache * *aFolderCache); \
  NS_IMETHOD GetShutdownInProgress(PRBool *aShutdownInProgress); \
  NS_IMETHOD GetUserNeedsToAuthenticate(PRBool *aUserNeedsToAuthenticate); \
  NS_IMETHOD SetUserNeedsToAuthenticate(PRBool aUserNeedsToAuthenticate); \
  NS_IMETHOD FindServer(const char *userName, const char *hostname, const char *type, nsIMsgIncomingServer **_retval); \
  NS_IMETHOD FindRealServer(const char *userName, const char *hostname, const char *type, nsIMsgIncomingServer **_retval); \
  NS_IMETHOD FindServerIndex(nsIMsgIncomingServer *server, PRInt32 *_retval); \
  NS_IMETHOD FindAccountForServer(nsIMsgIncomingServer *server, nsIMsgAccount **_retval); \
  NS_IMETHOD GetIdentitiesForServer(nsIMsgIncomingServer *server, nsISupportsArray **_retval); \
  NS_IMETHOD GetFirstIdentityForServer(nsIMsgIncomingServer *server, nsIMsgIdentity **_retval); \
  NS_IMETHOD GetServersForIdentity(nsIMsgIdentity *identity, nsISupportsArray **_retval); \
  NS_IMETHOD GetLocalFoldersServer(nsIMsgIncomingServer * *aLocalFoldersServer); \
  NS_IMETHOD SetLocalFoldersServer(nsIMsgIncomingServer * aLocalFoldersServer); \
  NS_IMETHOD LoadAccounts(void); \
  NS_IMETHOD SetSpecialFolders(void); \
  NS_IMETHOD UnloadAccounts(void); \
  NS_IMETHOD WriteToFolderCache(nsIMsgFolderCache *folderCache); \
  NS_IMETHOD CloseCachedConnections(void); \
  NS_IMETHOD ShutdownServers(void); \
  NS_IMETHOD CleanupOnExit(void); \
  NS_IMETHOD SetFolderDoingEmptyTrash(nsIMsgFolder *folder); \
  NS_IMETHOD GetEmptyTrashInProgress(PRBool *_retval); \
  NS_IMETHOD SetFolderDoingCleanupInbox(nsIMsgFolder *folder); \
  NS_IMETHOD GetCleanupInboxInProgress(PRBool *_retval); \
  NS_IMETHOD AddRootFolderListener(nsIFolderListener *listener); \
  NS_IMETHOD RemoveRootFolderListener(nsIFolderListener *listener); \
  NS_IMETHOD AddIncomingServerListener(nsIIncomingServerListener *serverListener); \
  NS_IMETHOD RemoveIncomingServerListener(nsIIncomingServerListener *serverListener); \
  NS_IMETHOD NotifyServerLoaded(nsIMsgIncomingServer *server); \
  NS_IMETHOD NotifyServerUnloaded(nsIMsgIncomingServer *server); \
  NS_IMETHOD NotifyServerChanged(nsIMsgIncomingServer *server); \
  NS_IMETHOD SaveAccountInfo(void); \
  NS_IMETHOD GetChromePackageName(const char *aExtensionName, char **_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) { return _to CreateAccount(_retval); } \
  NS_IMETHOD GetAccount(const char *key, nsIMsgAccount **_retval) { return _to GetAccount(key, _retval); } \
  NS_IMETHOD RemoveAccount(nsIMsgAccount *account) { return _to RemoveAccount(account); } \
  NS_IMETHOD RemoveIdentity(nsIMsgIdentity *identity) { return _to RemoveIdentity(identity); } \
  NS_IMETHOD DuplicateAccount(nsIMsgAccount *account) { return _to DuplicateAccount(account); } \
  NS_IMETHOD CreateIdentity(nsIMsgIdentity **_retval) { return _to CreateIdentity(_retval); } \
  NS_IMETHOD CreateIncomingServer(const char *username, const char *hostname, const char *type, nsIMsgIncomingServer **_retval) { return _to CreateIncomingServer(username, hostname, type, _retval); } \
  NS_IMETHOD GetIdentity(const char *key, nsIMsgIdentity **_retval) { return _to GetIdentity(key, _retval); } \
  NS_IMETHOD GetIncomingServer(const char *key, nsIMsgIncomingServer **_retval) { return _to GetIncomingServer(key, _retval); } \
  NS_IMETHOD GetDefaultAccount(nsIMsgAccount * *aDefaultAccount) { return _to GetDefaultAccount(aDefaultAccount); } \
  NS_IMETHOD SetDefaultAccount(nsIMsgAccount * aDefaultAccount) { return _to SetDefaultAccount(aDefaultAccount); } \
  NS_IMETHOD GetAccounts(nsISupportsArray * *aAccounts) { return _to GetAccounts(aAccounts); } \
  NS_IMETHOD GetAllIdentities(nsISupportsArray * *aAllIdentities) { return _to GetAllIdentities(aAllIdentities); } \
  NS_IMETHOD GetAllServers(nsISupportsArray * *aAllServers) { return _to GetAllServers(aAllServers); } \
  NS_IMETHOD GetFolderCache(nsIMsgFolderCache * *aFolderCache) { return _to GetFolderCache(aFolderCache); } \
  NS_IMETHOD GetShutdownInProgress(PRBool *aShutdownInProgress) { return _to GetShutdownInProgress(aShutdownInProgress); } \
  NS_IMETHOD GetUserNeedsToAuthenticate(PRBool *aUserNeedsToAuthenticate) { return _to GetUserNeedsToAuthenticate(aUserNeedsToAuthenticate); } \
  NS_IMETHOD SetUserNeedsToAuthenticate(PRBool aUserNeedsToAuthenticate) { return _to SetUserNeedsToAuthenticate(aUserNeedsToAuthenticate); } \
  NS_IMETHOD FindServer(const char *userName, const char *hostname, const char *type, nsIMsgIncomingServer **_retval) { return _to FindServer(userName, hostname, type, _retval); } \
  NS_IMETHOD FindRealServer(const char *userName, const char *hostname, const char *type, nsIMsgIncomingServer **_retval) { return _to FindRealServer(userName, hostname, type, _retval); } \
  NS_IMETHOD FindServerIndex(nsIMsgIncomingServer *server, PRInt32 *_retval) { return _to FindServerIndex(server, _retval); } \
  NS_IMETHOD FindAccountForServer(nsIMsgIncomingServer *server, nsIMsgAccount **_retval) { return _to FindAccountForServer(server, _retval); } \
  NS_IMETHOD GetIdentitiesForServer(nsIMsgIncomingServer *server, nsISupportsArray **_retval) { return _to GetIdentitiesForServer(server, _retval); } \
  NS_IMETHOD GetFirstIdentityForServer(nsIMsgIncomingServer *server, nsIMsgIdentity **_retval) { return _to GetFirstIdentityForServer(server, _retval); } \
  NS_IMETHOD GetServersForIdentity(nsIMsgIdentity *identity, nsISupportsArray **_retval) { return _to GetServersForIdentity(identity, _retval); } \
  NS_IMETHOD GetLocalFoldersServer(nsIMsgIncomingServer * *aLocalFoldersServer) { return _to GetLocalFoldersServer(aLocalFoldersServer); } \
  NS_IMETHOD SetLocalFoldersServer(nsIMsgIncomingServer * aLocalFoldersServer) { return _to SetLocalFoldersServer(aLocalFoldersServer); } \
  NS_IMETHOD LoadAccounts(void) { return _to LoadAccounts(); } \
  NS_IMETHOD SetSpecialFolders(void) { return _to SetSpecialFolders(); } \
  NS_IMETHOD UnloadAccounts(void) { return _to UnloadAccounts(); } \
  NS_IMETHOD WriteToFolderCache(nsIMsgFolderCache *folderCache) { return _to WriteToFolderCache(folderCache); } \
  NS_IMETHOD CloseCachedConnections(void) { return _to CloseCachedConnections(); } \
  NS_IMETHOD ShutdownServers(void) { return _to ShutdownServers(); } \
  NS_IMETHOD CleanupOnExit(void) { return _to CleanupOnExit(); } \
  NS_IMETHOD SetFolderDoingEmptyTrash(nsIMsgFolder *folder) { return _to SetFolderDoingEmptyTrash(folder); } \
  NS_IMETHOD GetEmptyTrashInProgress(PRBool *_retval) { return _to GetEmptyTrashInProgress(_retval); } \
  NS_IMETHOD SetFolderDoingCleanupInbox(nsIMsgFolder *folder) { return _to SetFolderDoingCleanupInbox(folder); } \
  NS_IMETHOD GetCleanupInboxInProgress(PRBool *_retval) { return _to GetCleanupInboxInProgress(_retval); } \
  NS_IMETHOD AddRootFolderListener(nsIFolderListener *listener) { return _to AddRootFolderListener(listener); } \
  NS_IMETHOD RemoveRootFolderListener(nsIFolderListener *listener) { return _to RemoveRootFolderListener(listener); } \
  NS_IMETHOD AddIncomingServerListener(nsIIncomingServerListener *serverListener) { return _to AddIncomingServerListener(serverListener); } \
  NS_IMETHOD RemoveIncomingServerListener(nsIIncomingServerListener *serverListener) { return _to RemoveIncomingServerListener(serverListener); } \
  NS_IMETHOD NotifyServerLoaded(nsIMsgIncomingServer *server) { return _to NotifyServerLoaded(server); } \
  NS_IMETHOD NotifyServerUnloaded(nsIMsgIncomingServer *server) { return _to NotifyServerUnloaded(server); } \
  NS_IMETHOD NotifyServerChanged(nsIMsgIncomingServer *server) { return _to NotifyServerChanged(server); } \
  NS_IMETHOD SaveAccountInfo(void) { return _to SaveAccountInfo(); } \
  NS_IMETHOD GetChromePackageName(const char *aExtensionName, char **_retval) { return _to GetChromePackageName(aExtensionName, _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) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAccount(_retval); } \
  NS_IMETHOD GetAccount(const char *key, nsIMsgAccount **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccount(key, _retval); } \
  NS_IMETHOD RemoveAccount(nsIMsgAccount *account) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAccount(account); } \
  NS_IMETHOD RemoveIdentity(nsIMsgIdentity *identity) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveIdentity(identity); } \
  NS_IMETHOD DuplicateAccount(nsIMsgAccount *account) { return !_to ? NS_ERROR_NULL_POINTER : _to->DuplicateAccount(account); } \
  NS_IMETHOD CreateIdentity(nsIMsgIdentity **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateIdentity(_retval); } \
  NS_IMETHOD CreateIncomingServer(const char *username, const char *hostname, const char *type, nsIMsgIncomingServer **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateIncomingServer(username, hostname, type, _retval); } \
  NS_IMETHOD GetIdentity(const char *key, nsIMsgIdentity **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdentity(key, _retval); } \
  NS_IMETHOD GetIncomingServer(const char *key, nsIMsgIncomingServer **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIncomingServer(key, _retval); } \
  NS_IMETHOD GetDefaultAccount(nsIMsgAccount * *aDefaultAccount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultAccount(aDefaultAccount); } \
  NS_IMETHOD SetDefaultAccount(nsIMsgAccount * aDefaultAccount) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultAccount(aDefaultAccount); } \
  NS_IMETHOD GetAccounts(nsISupportsArray * *aAccounts) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccounts(aAccounts); } \
  NS_IMETHOD GetAllIdentities(nsISupportsArray * *aAllIdentities) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllIdentities(aAllIdentities); } \
  NS_IMETHOD GetAllServers(nsISupportsArray * *aAllServers) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAllServers(aAllServers); } \
  NS_IMETHOD GetFolderCache(nsIMsgFolderCache * *aFolderCache) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFolderCache(aFolderCache); } \
  NS_IMETHOD GetShutdownInProgress(PRBool *aShutdownInProgress) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShutdownInProgress(aShutdownInProgress); } \
  NS_IMETHOD GetUserNeedsToAuthenticate(PRBool *aUserNeedsToAuthenticate) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserNeedsToAuthenticate(aUserNeedsToAuthenticate); } \
  NS_IMETHOD SetUserNeedsToAuthenticate(PRBool aUserNeedsToAuthenticate) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUserNeedsToAuthenticate(aUserNeedsToAuthenticate); } \
  NS_IMETHOD FindServer(const char *userName, const char *hostname, const char *type, nsIMsgIncomingServer **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindServer(userName, hostname, type, _retval); } \
  NS_IMETHOD FindRealServer(const char *userName, const char *hostname, const char *type, nsIMsgIncomingServer **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindRealServer(userName, hostname, type, _retval); } \
  NS_IMETHOD FindServerIndex(nsIMsgIncomingServer *server, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindServerIndex(server, _retval); } \
  NS_IMETHOD FindAccountForServer(nsIMsgIncomingServer *server, nsIMsgAccount **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindAccountForServer(server, _retval); } \
  NS_IMETHOD GetIdentitiesForServer(nsIMsgIncomingServer *server, nsISupportsArray **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdentitiesForServer(server, _retval); } \
  NS_IMETHOD GetFirstIdentityForServer(nsIMsgIncomingServer *server, nsIMsgIdentity **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFirstIdentityForServer(server, _retval); } \
  NS_IMETHOD GetServersForIdentity(nsIMsgIdentity *identity, nsISupportsArray **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServersForIdentity(identity, _retval); } \
  NS_IMETHOD GetLocalFoldersServer(nsIMsgIncomingServer * *aLocalFoldersServer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLocalFoldersServer(aLocalFoldersServer); } \
  NS_IMETHOD SetLocalFoldersServer(nsIMsgIncomingServer * aLocalFoldersServer) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLocalFoldersServer(aLocalFoldersServer); } \
  NS_IMETHOD LoadAccounts(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadAccounts(); } \
  NS_IMETHOD SetSpecialFolders(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSpecialFolders(); } \
  NS_IMETHOD UnloadAccounts(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnloadAccounts(); } \
  NS_IMETHOD WriteToFolderCache(nsIMsgFolderCache *folderCache) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteToFolderCache(folderCache); } \
  NS_IMETHOD CloseCachedConnections(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CloseCachedConnections(); } \
  NS_IMETHOD ShutdownServers(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShutdownServers(); } \
  NS_IMETHOD CleanupOnExit(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CleanupOnExit(); } \
  NS_IMETHOD SetFolderDoingEmptyTrash(nsIMsgFolder *folder) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFolderDoingEmptyTrash(folder); } \
  NS_IMETHOD GetEmptyTrashInProgress(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEmptyTrashInProgress(_retval); } \
  NS_IMETHOD SetFolderDoingCleanupInbox(nsIMsgFolder *folder) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFolderDoingCleanupInbox(folder); } \
  NS_IMETHOD GetCleanupInboxInProgress(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCleanupInboxInProgress(_retval); } \
  NS_IMETHOD AddRootFolderListener(nsIFolderListener *listener) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRootFolderListener(listener); } \
  NS_IMETHOD RemoveRootFolderListener(nsIFolderListener *listener) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveRootFolderListener(listener); } \
  NS_IMETHOD AddIncomingServerListener(nsIIncomingServerListener *serverListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddIncomingServerListener(serverListener); } \
  NS_IMETHOD RemoveIncomingServerListener(nsIIncomingServerListener *serverListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveIncomingServerListener(serverListener); } \
  NS_IMETHOD NotifyServerLoaded(nsIMsgIncomingServer *server) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyServerLoaded(server); } \
  NS_IMETHOD NotifyServerUnloaded(nsIMsgIncomingServer *server) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyServerUnloaded(server); } \
  NS_IMETHOD NotifyServerChanged(nsIMsgIncomingServer *server) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyServerChanged(server); } \
  NS_IMETHOD SaveAccountInfo(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveAccountInfo(); } \
  NS_IMETHOD GetChromePackageName(const char *aExtensionName, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromePackageName(aExtensionName, _retval); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsMsgAccountManager : public nsIMsgAccountManager
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGACCOUNTMANAGER

  nsMsgAccountManager();

private:
  ~nsMsgAccountManager();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgAccountManager, nsIMsgAccountManager)

nsMsgAccountManager::nsMsgAccountManager()
{
  /* member initializers and constructor code */
}

nsMsgAccountManager::~nsMsgAccountManager()
{
  /* destructor code */
}

/* nsIMsgAccount createAccount (); */
NS_IMETHODIMP nsMsgAccountManager::CreateAccount(nsIMsgAccount **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgAccount getAccount (in string key); */
NS_IMETHODIMP nsMsgAccountManager::GetAccount(const char *key, nsIMsgAccount **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeAccount (in nsIMsgAccount account); */
NS_IMETHODIMP nsMsgAccountManager::RemoveAccount(nsIMsgAccount *account)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeIdentity (in nsIMsgIdentity identity); */
NS_IMETHODIMP nsMsgAccountManager::RemoveIdentity(nsIMsgIdentity *identity)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void duplicateAccount (in nsIMsgAccount account); */
NS_IMETHODIMP nsMsgAccountManager::DuplicateAccount(nsIMsgAccount *account)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgIdentity createIdentity (); */
NS_IMETHODIMP nsMsgAccountManager::CreateIdentity(nsIMsgIdentity **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgIncomingServer createIncomingServer (in string username, in string hostname, in string type); */
NS_IMETHODIMP nsMsgAccountManager::CreateIncomingServer(const char *username, const char *hostname, const char *type, nsIMsgIncomingServer **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgIdentity getIdentity (in string key); */
NS_IMETHODIMP nsMsgAccountManager::GetIdentity(const char *key, nsIMsgIdentity **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgIncomingServer getIncomingServer (in string key); */
NS_IMETHODIMP nsMsgAccountManager::GetIncomingServer(const char *key, nsIMsgIncomingServer **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIMsgAccount defaultAccount; */
NS_IMETHODIMP nsMsgAccountManager::GetDefaultAccount(nsIMsgAccount * *aDefaultAccount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgAccountManager::SetDefaultAccount(nsIMsgAccount * aDefaultAccount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsISupportsArray accounts; */
NS_IMETHODIMP nsMsgAccountManager::GetAccounts(nsISupportsArray * *aAccounts)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsISupportsArray allIdentities; */
NS_IMETHODIMP nsMsgAccountManager::GetAllIdentities(nsISupportsArray * *aAllIdentities)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsISupportsArray allServers; */
NS_IMETHODIMP nsMsgAccountManager::GetAllServers(nsISupportsArray * *aAllServers)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIMsgFolderCache folderCache; */
NS_IMETHODIMP nsMsgAccountManager::GetFolderCache(nsIMsgFolderCache * *aFolderCache)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean shutdownInProgress; */
NS_IMETHODIMP nsMsgAccountManager::GetShutdownInProgress(PRBool *aShutdownInProgress)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean userNeedsToAuthenticate; */
NS_IMETHODIMP nsMsgAccountManager::GetUserNeedsToAuthenticate(PRBool *aUserNeedsToAuthenticate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgAccountManager::SetUserNeedsToAuthenticate(PRBool aUserNeedsToAuthenticate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgIncomingServer FindServer (in string userName, in string hostname, in string type); */
NS_IMETHODIMP nsMsgAccountManager::FindServer(const char *userName, const char *hostname, const char *type, nsIMsgIncomingServer **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgIncomingServer findRealServer (in string userName, in string hostname, in string type); */
NS_IMETHODIMP nsMsgAccountManager::FindRealServer(const char *userName, const char *hostname, const char *type, nsIMsgIncomingServer **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* long FindServerIndex (in nsIMsgIncomingServer server); */
NS_IMETHODIMP nsMsgAccountManager::FindServerIndex(nsIMsgIncomingServer *server, PRInt32 *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgAccount FindAccountForServer (in nsIMsgIncomingServer server); */
NS_IMETHODIMP nsMsgAccountManager::FindAccountForServer(nsIMsgIncomingServer *server, nsIMsgAccount **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISupportsArray GetIdentitiesForServer (in nsIMsgIncomingServer server); */
NS_IMETHODIMP nsMsgAccountManager::GetIdentitiesForServer(nsIMsgIncomingServer *server, nsISupportsArray **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgIdentity getFirstIdentityForServer (in nsIMsgIncomingServer server); */
NS_IMETHODIMP nsMsgAccountManager::GetFirstIdentityForServer(nsIMsgIncomingServer *server, nsIMsgIdentity **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISupportsArray GetServersForIdentity (in nsIMsgIdentity identity); */
NS_IMETHODIMP nsMsgAccountManager::GetServersForIdentity(nsIMsgIdentity *identity, nsISupportsArray **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIMsgIncomingServer localFoldersServer; */
NS_IMETHODIMP nsMsgAccountManager::GetLocalFoldersServer(nsIMsgIncomingServer * *aLocalFoldersServer)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgAccountManager::SetLocalFoldersServer(nsIMsgIncomingServer * aLocalFoldersServer)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void LoadAccounts (); */
NS_IMETHODIMP nsMsgAccountManager::LoadAccounts()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setSpecialFolders (); */
NS_IMETHODIMP nsMsgAccountManager::SetSpecialFolders()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void UnloadAccounts (); */
NS_IMETHODIMP nsMsgAccountManager::UnloadAccounts()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void WriteToFolderCache (in nsIMsgFolderCache folderCache); */
NS_IMETHODIMP nsMsgAccountManager::WriteToFolderCache(nsIMsgFolderCache *folderCache)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void closeCachedConnections (); */
NS_IMETHODIMP nsMsgAccountManager::CloseCachedConnections()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void shutdownServers (); */
NS_IMETHODIMP nsMsgAccountManager::ShutdownServers()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void CleanupOnExit (); */
NS_IMETHODIMP nsMsgAccountManager::CleanupOnExit()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void SetFolderDoingEmptyTrash (in nsIMsgFolder folder); */
NS_IMETHODIMP nsMsgAccountManager::SetFolderDoingEmptyTrash(nsIMsgFolder *folder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean GetEmptyTrashInProgress (); */
NS_IMETHODIMP nsMsgAccountManager::GetEmptyTrashInProgress(PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void SetFolderDoingCleanupInbox (in nsIMsgFolder folder); */
NS_IMETHODIMP nsMsgAccountManager::SetFolderDoingCleanupInbox(nsIMsgFolder *folder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean GetCleanupInboxInProgress (); */
NS_IMETHODIMP nsMsgAccountManager::GetCleanupInboxInProgress(PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addRootFolderListener (in nsIFolderListener listener); */
NS_IMETHODIMP nsMsgAccountManager::AddRootFolderListener(nsIFolderListener *listener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeRootFolderListener (in nsIFolderListener listener); */
NS_IMETHODIMP nsMsgAccountManager::RemoveRootFolderListener(nsIFolderListener *listener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addIncomingServerListener (in nsIIncomingServerListener serverListener); */
NS_IMETHODIMP nsMsgAccountManager::AddIncomingServerListener(nsIIncomingServerListener *serverListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeIncomingServerListener (in nsIIncomingServerListener serverListener); */
NS_IMETHODIMP nsMsgAccountManager::RemoveIncomingServerListener(nsIIncomingServerListener *serverListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyServerLoaded (in nsIMsgIncomingServer server); */
NS_IMETHODIMP nsMsgAccountManager::NotifyServerLoaded(nsIMsgIncomingServer *server)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyServerUnloaded (in nsIMsgIncomingServer server); */
NS_IMETHODIMP nsMsgAccountManager::NotifyServerUnloaded(nsIMsgIncomingServer *server)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void notifyServerChanged (in nsIMsgIncomingServer server); */
NS_IMETHODIMP nsMsgAccountManager::NotifyServerChanged(nsIMsgIncomingServer *server)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void saveAccountInfo (); */
NS_IMETHODIMP nsMsgAccountManager::SaveAccountInfo()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* string getChromePackageName (in string aExtensionName); */
NS_IMETHODIMP nsMsgAccountManager::GetChromePackageName(const char *aExtensionName, char **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#define MAILNEWS_ACCOUNTMANAGER_EXTENSIONS "mailnews-accountmanager-extensions"

/* starting interface:    nsIMsgAccountManagerExtension */
#define NS_IMSGACCOUNTMANAGEREXTENSION_IID_STR "9ce9fc76-1dd1-11b2-8da2-bf6b98b4c537"

#define NS_IMSGACCOUNTMANAGEREXTENSION_IID \
  {0x9ce9fc76, 0x1dd1, 0x11b2, \
    { 0x8d, 0xa2, 0xbf, 0x6b, 0x98, 0xb4, 0xc5, 0x37 }}

class NS_NO_VTABLE nsIMsgAccountManagerExtension : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMSGACCOUNTMANAGEREXTENSION_IID)

  /* readonly attribute string name; */
  NS_IMETHOD GetName(char * *aName) = 0;

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

  /* readonly attribute string chromePackageName; */
  NS_IMETHOD GetChromePackageName(char * *aChromePackageName) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGACCOUNTMANAGEREXTENSION \
  NS_IMETHOD GetName(char * *aName); \
  NS_IMETHOD ShowPanel(nsIMsgIncomingServer *server, PRBool *_retval); \
  NS_IMETHOD GetChromePackageName(char * *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(char * *aName) { return _to GetName(aName); } \
  NS_IMETHOD ShowPanel(nsIMsgIncomingServer *server, PRBool *_retval) { return _to ShowPanel(server, _retval); } \
  NS_IMETHOD GetChromePackageName(char * *aChromePackageName) { 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(char * *aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  NS_IMETHOD ShowPanel(nsIMsgIncomingServer *server, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowPanel(server, _retval); } \
  NS_IMETHOD GetChromePackageName(char * *aChromePackageName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromePackageName(aChromePackageName); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsMsgAccountManagerExtension : public nsIMsgAccountManagerExtension
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGACCOUNTMANAGEREXTENSION

  nsMsgAccountManagerExtension();

private:
  ~nsMsgAccountManagerExtension();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgAccountManagerExtension, nsIMsgAccountManagerExtension)

nsMsgAccountManagerExtension::nsMsgAccountManagerExtension()
{
  /* member initializers and constructor code */
}

nsMsgAccountManagerExtension::~nsMsgAccountManagerExtension()
{
  /* destructor code */
}

/* readonly attribute string name; */
NS_IMETHODIMP nsMsgAccountManagerExtension::GetName(char * *aName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean showPanel (in nsIMsgIncomingServer server); */
NS_IMETHODIMP nsMsgAccountManagerExtension::ShowPanel(nsIMsgIncomingServer *server, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute string chromePackageName; */
NS_IMETHODIMP nsMsgAccountManagerExtension::GetChromePackageName(char * *aChromePackageName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsIMsgAccountManager_h__ */
