/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIMessenger.idl
 */

#ifndef __gen_nsIMessenger_h__
#define __gen_nsIMessenger_h__


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

#ifndef __gen_nsrootidl_h__
#include "nsrootidl.h"
#endif

#ifndef __gen_nsIRDFCompositeDataSource_h__
#include "nsIRDFCompositeDataSource.h"
#endif

#ifndef __gen_nsIMsgWindow_h__
#include "nsIMsgWindow.h"
#endif

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

#ifndef __gen_nsIMsgThread_h__
#include "nsIMsgThread.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 nsIMsgDBHdr; /* forward declaration */

class nsIDOMWindowInternal; /* forward declaration */

class nsITransactionManager; /* forward declaration */

class nsIMsgMessageService; /* forward declaration */


/* starting interface:    nsIMessenger */
#define NS_IMESSENGER_IID_STR "0f6d0a77-aed8-4658-bedd-8753a008f0d8"

#define NS_IMESSENGER_IID \
  {0x0f6d0a77, 0xaed8, 0x4658, \
    { 0xbe, 0xdd, 0x87, 0x53, 0xa0, 0x08, 0xf0, 0xd8 }}

class NS_NO_VTABLE nsIMessenger : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMESSENGER_IID)

  enum { eUnknown = 0 };

  enum { eDeleteMsg = 1 };

  enum { eMoveMsg = 2 };

  enum { eCopyMsg = 3 };

  /* void setDisplayCharset (in string aCharset); */
  NS_IMETHOD SetDisplayCharset(const char *aCharset) = 0;

  /* readonly attribute nsITransactionManager transactionManager; */
  NS_IMETHOD GetTransactionManager(nsITransactionManager * *aTransactionManager) = 0;

  /* void SetWindow (in nsIDOMWindowInternal ptr, in nsIMsgWindow msgWindow); */
  NS_IMETHOD SetWindow(nsIDOMWindowInternal *ptr, nsIMsgWindow *msgWindow) = 0;

  /* void DeleteFolders (in nsIRDFCompositeDataSource db, in nsIRDFResource parentFolder, in nsIRDFResource folder); */
  NS_IMETHOD DeleteFolders(nsIRDFCompositeDataSource *db, nsIRDFResource *parentFolder, nsIRDFResource *folder) = 0;

  /* void CopyMessages (in nsIRDFCompositeDataSource database, in nsIRDFResource srcResource, in nsIRDFResource dstResource, in nsISupportsArray messages, in boolean isMove); */
  NS_IMETHOD CopyMessages(nsIRDFCompositeDataSource *database, nsIRDFResource *srcResource, nsIRDFResource *dstResource, nsISupportsArray *messages, PRBool isMove) = 0;

  /* void CopyFolders (in nsIRDFCompositeDataSource database, in nsIRDFResource dstResource, in nsISupportsArray folders, in boolean isMoveFolder); */
  NS_IMETHOD CopyFolders(nsIRDFCompositeDataSource *database, nsIRDFResource *dstResource, nsISupportsArray *folders, PRBool isMoveFolder) = 0;

  /* void OpenURL (in string aURL); */
  NS_IMETHOD OpenURL(const char *aURL) = 0;

  /** load a custom message by url, e.g load a attachment as a email
      */
  /* void loadURL (in nsIDOMWindowInternal ptr, in string aURL); */
  NS_IMETHOD LoadURL(nsIDOMWindowInternal *ptr, const char *aURL) = 0;

  /* void launchExternalURL (in string aURL); */
  NS_IMETHOD LaunchExternalURL(const char *aURL) = 0;

  /* void RenameFolder (in nsIRDFCompositeDataSource db, in nsIRDFResource folder, in wstring name); */
  NS_IMETHOD RenameFolder(nsIRDFCompositeDataSource *db, nsIRDFResource *folder, const PRUnichar *name) = 0;

  /* void CompactFolder (in nsIRDFCompositeDataSource db, in nsIRDFResource folder, in boolean forAll); */
  NS_IMETHOD CompactFolder(nsIRDFCompositeDataSource *db, nsIRDFResource *folder, PRBool forAll) = 0;

  /* void EmptyTrash (in nsIRDFCompositeDataSource db, in nsIRDFResource folder); */
  NS_IMETHOD EmptyTrash(nsIRDFCompositeDataSource *db, nsIRDFResource *folder) = 0;

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

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

  /* unsigned long GetUndoTransactionType (); */
  NS_IMETHOD GetUndoTransactionType(PRUint32 *_retval) = 0;

  /* unsigned long GetRedoTransactionType (); */
  NS_IMETHOD GetRedoTransactionType(PRUint32 *_retval) = 0;

  /* void Undo (in nsIMsgWindow msgWindow); */
  NS_IMETHOD Undo(nsIMsgWindow *msgWindow) = 0;

  /* void Redo (in nsIMsgWindow msgWindow); */
  NS_IMETHOD Redo(nsIMsgWindow *msgWindow) = 0;

  /* void sendUnsentMessages (in nsIMsgIdentity aIdentity, in nsIMsgWindow aMsgWindow); */
  NS_IMETHOD SendUnsentMessages(nsIMsgIdentity *aIdentity, nsIMsgWindow *aMsgWindow) = 0;

  /* void SetDocumentCharset (in string characterSet); */
  NS_IMETHOD SetDocumentCharset(const char *characterSet) = 0;

  /* void saveAs (in string aURI, in boolean aAsFile, in nsIMsgIdentity aIdentity, in wstring aMsgFilename); */
  NS_IMETHOD SaveAs(const char *aURI, PRBool aAsFile, nsIMsgIdentity *aIdentity, const PRUnichar *aMsgFilename) = 0;

  /* void openAttachment (in string contentTpe, in string url, in string displayName, in string messageUri, in boolean isExternalAttachment); */
  NS_IMETHOD OpenAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool isExternalAttachment) = 0;

  /* void saveAttachment (in string contentTpe, in string url, in string displayName, in string messageUri, in boolean isExternalAttachment); */
  NS_IMETHOD SaveAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool isExternalAttachment) = 0;

  /* void saveAllAttachments (in unsigned long count, [array, size_is (count)] in string contentTypeArray, [array, size_is (count)] in string urlArray, [array, size_is (count)] in string displayNameArray, [array, size_is (count)] in string messageUriArray); */
  NS_IMETHOD SaveAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray) = 0;

  /* void detachAttachment (in string contentTpe, in string url, in string displayName, in string messageUri, in boolean saveFirst); */
  NS_IMETHOD DetachAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool saveFirst) = 0;

  /* void detachAllAttachments (in unsigned long count, [array, size_is (count)] in string contentTypeArray, [array, size_is (count)] in string urlArray, [array, size_is (count)] in string displayNameArray, [array, size_is (count)] in string messageUriArray, in boolean saveFirst); */
  NS_IMETHOD DetachAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray, PRBool saveFirst) = 0;

  /* nsILocalFile saveAttachmentToFolder (in string contentType, in string url, in string displayName, in string messageUri, in nsILocalFile aDestFolder); */
  NS_IMETHOD SaveAttachmentToFolder(const char *contentType, const char *url, const char *displayName, const char *messageUri, nsILocalFile *aDestFolder, nsILocalFile **_retval) = 0;

  /* attribute boolean sendingUnsentMsgs; */
  NS_IMETHOD GetSendingUnsentMsgs(PRBool *aSendingUnsentMsgs) = 0;
  NS_IMETHOD SetSendingUnsentMsgs(PRBool aSendingUnsentMsgs) = 0;

  /* readonly attribute string lastDisplayedMessageUri; */
  NS_IMETHOD GetLastDisplayedMessageUri(char * *aLastDisplayedMessageUri) = 0;

  /* nsIMsgMessageService messageServiceFromURI (in string aUri); */
  NS_IMETHOD MessageServiceFromURI(const char *aUri, nsIMsgMessageService **_retval) = 0;

  /* nsIMsgDBHdr msgHdrFromURI (in string aUri); */
  NS_IMETHOD MsgHdrFromURI(const char *aUri, nsIMsgDBHdr **_retval) = 0;

  /* string getMsgUriAtNavigatePos (in long aPos); */
  NS_IMETHOD GetMsgUriAtNavigatePos(PRInt32 aPos, char **_retval) = 0;

  /* string getFolderUriAtNavigatePos (in long aPos); */
  NS_IMETHOD GetFolderUriAtNavigatePos(PRInt32 aPos, char **_retval) = 0;

  /* attribute long navigatePos; */
  NS_IMETHOD GetNavigatePos(PRInt32 *aNavigatePos) = 0;
  NS_IMETHOD SetNavigatePos(PRInt32 aNavigatePos) = 0;

  /* void getNavigateHistory (out unsigned long aCurPos, out unsigned long aCount, [array, size_is (aCount)] out string aHistory); */
  NS_IMETHOD GetNavigateHistory(PRUint32 *aCurPos, PRUint32 *aCount, char ***aHistory) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMESSENGER \
  NS_IMETHOD SetDisplayCharset(const char *aCharset); \
  NS_IMETHOD GetTransactionManager(nsITransactionManager * *aTransactionManager); \
  NS_IMETHOD SetWindow(nsIDOMWindowInternal *ptr, nsIMsgWindow *msgWindow); \
  NS_IMETHOD DeleteFolders(nsIRDFCompositeDataSource *db, nsIRDFResource *parentFolder, nsIRDFResource *folder); \
  NS_IMETHOD CopyMessages(nsIRDFCompositeDataSource *database, nsIRDFResource *srcResource, nsIRDFResource *dstResource, nsISupportsArray *messages, PRBool isMove); \
  NS_IMETHOD CopyFolders(nsIRDFCompositeDataSource *database, nsIRDFResource *dstResource, nsISupportsArray *folders, PRBool isMoveFolder); \
  NS_IMETHOD OpenURL(const char *aURL); \
  NS_IMETHOD LoadURL(nsIDOMWindowInternal *ptr, const char *aURL); \
  NS_IMETHOD LaunchExternalURL(const char *aURL); \
  NS_IMETHOD RenameFolder(nsIRDFCompositeDataSource *db, nsIRDFResource *folder, const PRUnichar *name); \
  NS_IMETHOD CompactFolder(nsIRDFCompositeDataSource *db, nsIRDFResource *folder, PRBool forAll); \
  NS_IMETHOD EmptyTrash(nsIRDFCompositeDataSource *db, nsIRDFResource *folder); \
  NS_IMETHOD CanUndo(PRBool *_retval); \
  NS_IMETHOD CanRedo(PRBool *_retval); \
  NS_IMETHOD GetUndoTransactionType(PRUint32 *_retval); \
  NS_IMETHOD GetRedoTransactionType(PRUint32 *_retval); \
  NS_IMETHOD Undo(nsIMsgWindow *msgWindow); \
  NS_IMETHOD Redo(nsIMsgWindow *msgWindow); \
  NS_IMETHOD SendUnsentMessages(nsIMsgIdentity *aIdentity, nsIMsgWindow *aMsgWindow); \
  NS_IMETHOD SetDocumentCharset(const char *characterSet); \
  NS_IMETHOD SaveAs(const char *aURI, PRBool aAsFile, nsIMsgIdentity *aIdentity, const PRUnichar *aMsgFilename); \
  NS_IMETHOD OpenAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool isExternalAttachment); \
  NS_IMETHOD SaveAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool isExternalAttachment); \
  NS_IMETHOD SaveAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray); \
  NS_IMETHOD DetachAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool saveFirst); \
  NS_IMETHOD DetachAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray, PRBool saveFirst); \
  NS_IMETHOD SaveAttachmentToFolder(const char *contentType, const char *url, const char *displayName, const char *messageUri, nsILocalFile *aDestFolder, nsILocalFile **_retval); \
  NS_IMETHOD GetSendingUnsentMsgs(PRBool *aSendingUnsentMsgs); \
  NS_IMETHOD SetSendingUnsentMsgs(PRBool aSendingUnsentMsgs); \
  NS_IMETHOD GetLastDisplayedMessageUri(char * *aLastDisplayedMessageUri); \
  NS_IMETHOD MessageServiceFromURI(const char *aUri, nsIMsgMessageService **_retval); \
  NS_IMETHOD MsgHdrFromURI(const char *aUri, nsIMsgDBHdr **_retval); \
  NS_IMETHOD GetMsgUriAtNavigatePos(PRInt32 aPos, char **_retval); \
  NS_IMETHOD GetFolderUriAtNavigatePos(PRInt32 aPos, char **_retval); \
  NS_IMETHOD GetNavigatePos(PRInt32 *aNavigatePos); \
  NS_IMETHOD SetNavigatePos(PRInt32 aNavigatePos); \
  NS_IMETHOD GetNavigateHistory(PRUint32 *aCurPos, PRUint32 *aCount, char ***aHistory); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMESSENGER(_to) \
  NS_IMETHOD SetDisplayCharset(const char *aCharset) { return _to SetDisplayCharset(aCharset); } \
  NS_IMETHOD GetTransactionManager(nsITransactionManager * *aTransactionManager) { return _to GetTransactionManager(aTransactionManager); } \
  NS_IMETHOD SetWindow(nsIDOMWindowInternal *ptr, nsIMsgWindow *msgWindow) { return _to SetWindow(ptr, msgWindow); } \
  NS_IMETHOD DeleteFolders(nsIRDFCompositeDataSource *db, nsIRDFResource *parentFolder, nsIRDFResource *folder) { return _to DeleteFolders(db, parentFolder, folder); } \
  NS_IMETHOD CopyMessages(nsIRDFCompositeDataSource *database, nsIRDFResource *srcResource, nsIRDFResource *dstResource, nsISupportsArray *messages, PRBool isMove) { return _to CopyMessages(database, srcResource, dstResource, messages, isMove); } \
  NS_IMETHOD CopyFolders(nsIRDFCompositeDataSource *database, nsIRDFResource *dstResource, nsISupportsArray *folders, PRBool isMoveFolder) { return _to CopyFolders(database, dstResource, folders, isMoveFolder); } \
  NS_IMETHOD OpenURL(const char *aURL) { return _to OpenURL(aURL); } \
  NS_IMETHOD LoadURL(nsIDOMWindowInternal *ptr, const char *aURL) { return _to LoadURL(ptr, aURL); } \
  NS_IMETHOD LaunchExternalURL(const char *aURL) { return _to LaunchExternalURL(aURL); } \
  NS_IMETHOD RenameFolder(nsIRDFCompositeDataSource *db, nsIRDFResource *folder, const PRUnichar *name) { return _to RenameFolder(db, folder, name); } \
  NS_IMETHOD CompactFolder(nsIRDFCompositeDataSource *db, nsIRDFResource *folder, PRBool forAll) { return _to CompactFolder(db, folder, forAll); } \
  NS_IMETHOD EmptyTrash(nsIRDFCompositeDataSource *db, nsIRDFResource *folder) { return _to EmptyTrash(db, folder); } \
  NS_IMETHOD CanUndo(PRBool *_retval) { return _to CanUndo(_retval); } \
  NS_IMETHOD CanRedo(PRBool *_retval) { return _to CanRedo(_retval); } \
  NS_IMETHOD GetUndoTransactionType(PRUint32 *_retval) { return _to GetUndoTransactionType(_retval); } \
  NS_IMETHOD GetRedoTransactionType(PRUint32 *_retval) { return _to GetRedoTransactionType(_retval); } \
  NS_IMETHOD Undo(nsIMsgWindow *msgWindow) { return _to Undo(msgWindow); } \
  NS_IMETHOD Redo(nsIMsgWindow *msgWindow) { return _to Redo(msgWindow); } \
  NS_IMETHOD SendUnsentMessages(nsIMsgIdentity *aIdentity, nsIMsgWindow *aMsgWindow) { return _to SendUnsentMessages(aIdentity, aMsgWindow); } \
  NS_IMETHOD SetDocumentCharset(const char *characterSet) { return _to SetDocumentCharset(characterSet); } \
  NS_IMETHOD SaveAs(const char *aURI, PRBool aAsFile, nsIMsgIdentity *aIdentity, const PRUnichar *aMsgFilename) { return _to SaveAs(aURI, aAsFile, aIdentity, aMsgFilename); } \
  NS_IMETHOD OpenAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool isExternalAttachment) { return _to OpenAttachment(contentTpe, url, displayName, messageUri, isExternalAttachment); } \
  NS_IMETHOD SaveAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool isExternalAttachment) { return _to SaveAttachment(contentTpe, url, displayName, messageUri, isExternalAttachment); } \
  NS_IMETHOD SaveAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray) { return _to SaveAllAttachments(count, contentTypeArray, urlArray, displayNameArray, messageUriArray); } \
  NS_IMETHOD DetachAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool saveFirst) { return _to DetachAttachment(contentTpe, url, displayName, messageUri, saveFirst); } \
  NS_IMETHOD DetachAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray, PRBool saveFirst) { return _to DetachAllAttachments(count, contentTypeArray, urlArray, displayNameArray, messageUriArray, saveFirst); } \
  NS_IMETHOD SaveAttachmentToFolder(const char *contentType, const char *url, const char *displayName, const char *messageUri, nsILocalFile *aDestFolder, nsILocalFile **_retval) { return _to SaveAttachmentToFolder(contentType, url, displayName, messageUri, aDestFolder, _retval); } \
  NS_IMETHOD GetSendingUnsentMsgs(PRBool *aSendingUnsentMsgs) { return _to GetSendingUnsentMsgs(aSendingUnsentMsgs); } \
  NS_IMETHOD SetSendingUnsentMsgs(PRBool aSendingUnsentMsgs) { return _to SetSendingUnsentMsgs(aSendingUnsentMsgs); } \
  NS_IMETHOD GetLastDisplayedMessageUri(char * *aLastDisplayedMessageUri) { return _to GetLastDisplayedMessageUri(aLastDisplayedMessageUri); } \
  NS_IMETHOD MessageServiceFromURI(const char *aUri, nsIMsgMessageService **_retval) { return _to MessageServiceFromURI(aUri, _retval); } \
  NS_IMETHOD MsgHdrFromURI(const char *aUri, nsIMsgDBHdr **_retval) { return _to MsgHdrFromURI(aUri, _retval); } \
  NS_IMETHOD GetMsgUriAtNavigatePos(PRInt32 aPos, char **_retval) { return _to GetMsgUriAtNavigatePos(aPos, _retval); } \
  NS_IMETHOD GetFolderUriAtNavigatePos(PRInt32 aPos, char **_retval) { return _to GetFolderUriAtNavigatePos(aPos, _retval); } \
  NS_IMETHOD GetNavigatePos(PRInt32 *aNavigatePos) { return _to GetNavigatePos(aNavigatePos); } \
  NS_IMETHOD SetNavigatePos(PRInt32 aNavigatePos) { return _to SetNavigatePos(aNavigatePos); } \
  NS_IMETHOD GetNavigateHistory(PRUint32 *aCurPos, PRUint32 *aCount, char ***aHistory) { return _to GetNavigateHistory(aCurPos, aCount, aHistory); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMESSENGER(_to) \
  NS_IMETHOD SetDisplayCharset(const char *aCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisplayCharset(aCharset); } \
  NS_IMETHOD GetTransactionManager(nsITransactionManager * *aTransactionManager) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTransactionManager(aTransactionManager); } \
  NS_IMETHOD SetWindow(nsIDOMWindowInternal *ptr, nsIMsgWindow *msgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindow(ptr, msgWindow); } \
  NS_IMETHOD DeleteFolders(nsIRDFCompositeDataSource *db, nsIRDFResource *parentFolder, nsIRDFResource *folder) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteFolders(db, parentFolder, folder); } \
  NS_IMETHOD CopyMessages(nsIRDFCompositeDataSource *database, nsIRDFResource *srcResource, nsIRDFResource *dstResource, nsISupportsArray *messages, PRBool isMove) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyMessages(database, srcResource, dstResource, messages, isMove); } \
  NS_IMETHOD CopyFolders(nsIRDFCompositeDataSource *database, nsIRDFResource *dstResource, nsISupportsArray *folders, PRBool isMoveFolder) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyFolders(database, dstResource, folders, isMoveFolder); } \
  NS_IMETHOD OpenURL(const char *aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenURL(aURL); } \
  NS_IMETHOD LoadURL(nsIDOMWindowInternal *ptr, const char *aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadURL(ptr, aURL); } \
  NS_IMETHOD LaunchExternalURL(const char *aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->LaunchExternalURL(aURL); } \
  NS_IMETHOD RenameFolder(nsIRDFCompositeDataSource *db, nsIRDFResource *folder, const PRUnichar *name) { return !_to ? NS_ERROR_NULL_POINTER : _to->RenameFolder(db, folder, name); } \
  NS_IMETHOD CompactFolder(nsIRDFCompositeDataSource *db, nsIRDFResource *folder, PRBool forAll) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompactFolder(db, folder, forAll); } \
  NS_IMETHOD EmptyTrash(nsIRDFCompositeDataSource *db, nsIRDFResource *folder) { return !_to ? NS_ERROR_NULL_POINTER : _to->EmptyTrash(db, folder); } \
  NS_IMETHOD CanUndo(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanUndo(_retval); } \
  NS_IMETHOD CanRedo(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanRedo(_retval); } \
  NS_IMETHOD GetUndoTransactionType(PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUndoTransactionType(_retval); } \
  NS_IMETHOD GetRedoTransactionType(PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRedoTransactionType(_retval); } \
  NS_IMETHOD Undo(nsIMsgWindow *msgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->Undo(msgWindow); } \
  NS_IMETHOD Redo(nsIMsgWindow *msgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->Redo(msgWindow); } \
  NS_IMETHOD SendUnsentMessages(nsIMsgIdentity *aIdentity, nsIMsgWindow *aMsgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SendUnsentMessages(aIdentity, aMsgWindow); } \
  NS_IMETHOD SetDocumentCharset(const char *characterSet) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDocumentCharset(characterSet); } \
  NS_IMETHOD SaveAs(const char *aURI, PRBool aAsFile, nsIMsgIdentity *aIdentity, const PRUnichar *aMsgFilename) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveAs(aURI, aAsFile, aIdentity, aMsgFilename); } \
  NS_IMETHOD OpenAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool isExternalAttachment) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenAttachment(contentTpe, url, displayName, messageUri, isExternalAttachment); } \
  NS_IMETHOD SaveAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool isExternalAttachment) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveAttachment(contentTpe, url, displayName, messageUri, isExternalAttachment); } \
  NS_IMETHOD SaveAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveAllAttachments(count, contentTypeArray, urlArray, displayNameArray, messageUriArray); } \
  NS_IMETHOD DetachAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool saveFirst) { return !_to ? NS_ERROR_NULL_POINTER : _to->DetachAttachment(contentTpe, url, displayName, messageUri, saveFirst); } \
  NS_IMETHOD DetachAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray, PRBool saveFirst) { return !_to ? NS_ERROR_NULL_POINTER : _to->DetachAllAttachments(count, contentTypeArray, urlArray, displayNameArray, messageUriArray, saveFirst); } \
  NS_IMETHOD SaveAttachmentToFolder(const char *contentType, const char *url, const char *displayName, const char *messageUri, nsILocalFile *aDestFolder, nsILocalFile **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveAttachmentToFolder(contentType, url, displayName, messageUri, aDestFolder, _retval); } \
  NS_IMETHOD GetSendingUnsentMsgs(PRBool *aSendingUnsentMsgs) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSendingUnsentMsgs(aSendingUnsentMsgs); } \
  NS_IMETHOD SetSendingUnsentMsgs(PRBool aSendingUnsentMsgs) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSendingUnsentMsgs(aSendingUnsentMsgs); } \
  NS_IMETHOD GetLastDisplayedMessageUri(char * *aLastDisplayedMessageUri) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastDisplayedMessageUri(aLastDisplayedMessageUri); } \
  NS_IMETHOD MessageServiceFromURI(const char *aUri, nsIMsgMessageService **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->MessageServiceFromURI(aUri, _retval); } \
  NS_IMETHOD MsgHdrFromURI(const char *aUri, nsIMsgDBHdr **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->MsgHdrFromURI(aUri, _retval); } \
  NS_IMETHOD GetMsgUriAtNavigatePos(PRInt32 aPos, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgUriAtNavigatePos(aPos, _retval); } \
  NS_IMETHOD GetFolderUriAtNavigatePos(PRInt32 aPos, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFolderUriAtNavigatePos(aPos, _retval); } \
  NS_IMETHOD GetNavigatePos(PRInt32 *aNavigatePos) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNavigatePos(aNavigatePos); } \
  NS_IMETHOD SetNavigatePos(PRInt32 aNavigatePos) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNavigatePos(aNavigatePos); } \
  NS_IMETHOD GetNavigateHistory(PRUint32 *aCurPos, PRUint32 *aCount, char ***aHistory) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNavigateHistory(aCurPos, aCount, aHistory); } 

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

/* Header file */
class nsMessenger : public nsIMessenger
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMESSENGER

  nsMessenger();

private:
  ~nsMessenger();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMessenger, nsIMessenger)

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

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

/* void setDisplayCharset (in string aCharset); */
NS_IMETHODIMP nsMessenger::SetDisplayCharset(const char *aCharset)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsITransactionManager transactionManager; */
NS_IMETHODIMP nsMessenger::GetTransactionManager(nsITransactionManager * *aTransactionManager)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void SetWindow (in nsIDOMWindowInternal ptr, in nsIMsgWindow msgWindow); */
NS_IMETHODIMP nsMessenger::SetWindow(nsIDOMWindowInternal *ptr, nsIMsgWindow *msgWindow)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void DeleteFolders (in nsIRDFCompositeDataSource db, in nsIRDFResource parentFolder, in nsIRDFResource folder); */
NS_IMETHODIMP nsMessenger::DeleteFolders(nsIRDFCompositeDataSource *db, nsIRDFResource *parentFolder, nsIRDFResource *folder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void CopyMessages (in nsIRDFCompositeDataSource database, in nsIRDFResource srcResource, in nsIRDFResource dstResource, in nsISupportsArray messages, in boolean isMove); */
NS_IMETHODIMP nsMessenger::CopyMessages(nsIRDFCompositeDataSource *database, nsIRDFResource *srcResource, nsIRDFResource *dstResource, nsISupportsArray *messages, PRBool isMove)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void CopyFolders (in nsIRDFCompositeDataSource database, in nsIRDFResource dstResource, in nsISupportsArray folders, in boolean isMoveFolder); */
NS_IMETHODIMP nsMessenger::CopyFolders(nsIRDFCompositeDataSource *database, nsIRDFResource *dstResource, nsISupportsArray *folders, PRBool isMoveFolder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void OpenURL (in string aURL); */
NS_IMETHODIMP nsMessenger::OpenURL(const char *aURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void loadURL (in nsIDOMWindowInternal ptr, in string aURL); */
NS_IMETHODIMP nsMessenger::LoadURL(nsIDOMWindowInternal *ptr, const char *aURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void launchExternalURL (in string aURL); */
NS_IMETHODIMP nsMessenger::LaunchExternalURL(const char *aURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void RenameFolder (in nsIRDFCompositeDataSource db, in nsIRDFResource folder, in wstring name); */
NS_IMETHODIMP nsMessenger::RenameFolder(nsIRDFCompositeDataSource *db, nsIRDFResource *folder, const PRUnichar *name)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void CompactFolder (in nsIRDFCompositeDataSource db, in nsIRDFResource folder, in boolean forAll); */
NS_IMETHODIMP nsMessenger::CompactFolder(nsIRDFCompositeDataSource *db, nsIRDFResource *folder, PRBool forAll)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void EmptyTrash (in nsIRDFCompositeDataSource db, in nsIRDFResource folder); */
NS_IMETHODIMP nsMessenger::EmptyTrash(nsIRDFCompositeDataSource *db, nsIRDFResource *folder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean CanUndo (); */
NS_IMETHODIMP nsMessenger::CanUndo(PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean CanRedo (); */
NS_IMETHODIMP nsMessenger::CanRedo(PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* unsigned long GetUndoTransactionType (); */
NS_IMETHODIMP nsMessenger::GetUndoTransactionType(PRUint32 *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* unsigned long GetRedoTransactionType (); */
NS_IMETHODIMP nsMessenger::GetRedoTransactionType(PRUint32 *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Undo (in nsIMsgWindow msgWindow); */
NS_IMETHODIMP nsMessenger::Undo(nsIMsgWindow *msgWindow)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Redo (in nsIMsgWindow msgWindow); */
NS_IMETHODIMP nsMessenger::Redo(nsIMsgWindow *msgWindow)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void sendUnsentMessages (in nsIMsgIdentity aIdentity, in nsIMsgWindow aMsgWindow); */
NS_IMETHODIMP nsMessenger::SendUnsentMessages(nsIMsgIdentity *aIdentity, nsIMsgWindow *aMsgWindow)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void SetDocumentCharset (in string characterSet); */
NS_IMETHODIMP nsMessenger::SetDocumentCharset(const char *characterSet)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void saveAs (in string aURI, in boolean aAsFile, in nsIMsgIdentity aIdentity, in wstring aMsgFilename); */
NS_IMETHODIMP nsMessenger::SaveAs(const char *aURI, PRBool aAsFile, nsIMsgIdentity *aIdentity, const PRUnichar *aMsgFilename)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void openAttachment (in string contentTpe, in string url, in string displayName, in string messageUri, in boolean isExternalAttachment); */
NS_IMETHODIMP nsMessenger::OpenAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool isExternalAttachment)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void saveAttachment (in string contentTpe, in string url, in string displayName, in string messageUri, in boolean isExternalAttachment); */
NS_IMETHODIMP nsMessenger::SaveAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool isExternalAttachment)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void saveAllAttachments (in unsigned long count, [array, size_is (count)] in string contentTypeArray, [array, size_is (count)] in string urlArray, [array, size_is (count)] in string displayNameArray, [array, size_is (count)] in string messageUriArray); */
NS_IMETHODIMP nsMessenger::SaveAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void detachAttachment (in string contentTpe, in string url, in string displayName, in string messageUri, in boolean saveFirst); */
NS_IMETHODIMP nsMessenger::DetachAttachment(const char *contentTpe, const char *url, const char *displayName, const char *messageUri, PRBool saveFirst)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void detachAllAttachments (in unsigned long count, [array, size_is (count)] in string contentTypeArray, [array, size_is (count)] in string urlArray, [array, size_is (count)] in string displayNameArray, [array, size_is (count)] in string messageUriArray, in boolean saveFirst); */
NS_IMETHODIMP nsMessenger::DetachAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray, PRBool saveFirst)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsILocalFile saveAttachmentToFolder (in string contentType, in string url, in string displayName, in string messageUri, in nsILocalFile aDestFolder); */
NS_IMETHODIMP nsMessenger::SaveAttachmentToFolder(const char *contentType, const char *url, const char *displayName, const char *messageUri, nsILocalFile *aDestFolder, nsILocalFile **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean sendingUnsentMsgs; */
NS_IMETHODIMP nsMessenger::GetSendingUnsentMsgs(PRBool *aSendingUnsentMsgs)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMessenger::SetSendingUnsentMsgs(PRBool aSendingUnsentMsgs)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute string lastDisplayedMessageUri; */
NS_IMETHODIMP nsMessenger::GetLastDisplayedMessageUri(char * *aLastDisplayedMessageUri)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgMessageService messageServiceFromURI (in string aUri); */
NS_IMETHODIMP nsMessenger::MessageServiceFromURI(const char *aUri, nsIMsgMessageService **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgDBHdr msgHdrFromURI (in string aUri); */
NS_IMETHODIMP nsMessenger::MsgHdrFromURI(const char *aUri, nsIMsgDBHdr **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* string getMsgUriAtNavigatePos (in long aPos); */
NS_IMETHODIMP nsMessenger::GetMsgUriAtNavigatePos(PRInt32 aPos, char **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* string getFolderUriAtNavigatePos (in long aPos); */
NS_IMETHODIMP nsMessenger::GetFolderUriAtNavigatePos(PRInt32 aPos, char **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute long navigatePos; */
NS_IMETHODIMP nsMessenger::GetNavigatePos(PRInt32 *aNavigatePos)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMessenger::SetNavigatePos(PRInt32 aNavigatePos)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getNavigateHistory (out unsigned long aCurPos, out unsigned long aCount, [array, size_is (aCount)] out string aHistory); */
NS_IMETHODIMP nsMessenger::GetNavigateHistory(PRUint32 *aCurPos, PRUint32 *aCount, char ***aHistory)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMessenger_h__ */
