/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /tmp/comm-release/mailnews/base/public/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_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 nsIDOMWindow; /* forward declaration */

class nsITransactionManager; /* forward declaration */

class nsIMsgMessageService; /* forward declaration */

class nsIFile; /* forward declaration */

class nsIUrlListener; /* forward declaration */


/* starting interface:    nsIMessenger */
#define NS_IMESSENGER_IID_STR "4e36968b-b476-4f3e-b170-c19fe3d48d0b"

#define NS_IMESSENGER_IID \
  {0x4e36968b, 0xb476, 0x4f3e, \
    { 0xb1, 0x70, 0xc1, 0x9f, 0xe3, 0xd4, 0x8d, 0x0b }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIMessenger : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMESSENGER_IID)

  enum {
    eUnknown = 0,
    eDeleteMsg = 1,
    eMoveMsg = 2,
    eCopyMsg = 3,
    eMarkAllMsg = 4
  };

  /* void setDisplayCharset (in ACString aCharset); */
  NS_SCRIPTABLE NS_IMETHOD SetDisplayCharset(const nsACString & aCharset) = 0;

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

  /* void setWindow (in nsIDOMWindow ptr, in nsIMsgWindow msgWindow); */
  NS_SCRIPTABLE NS_IMETHOD SetWindow(nsIDOMWindow *ptr, nsIMsgWindow *msgWindow) = 0;

  /* void addMsgUrlToNavigateHistory (in ACString aURL); */
  NS_SCRIPTABLE NS_IMETHOD AddMsgUrlToNavigateHistory(const nsACString & aURL) = 0;

  /* void openURL (in ACString aURL); */
  NS_SCRIPTABLE NS_IMETHOD OpenURL(const nsACString & aURL) = 0;

  /* void loadURL (in nsIDOMWindow ptr, in ACString aURL); */
  NS_SCRIPTABLE NS_IMETHOD LoadURL(nsIDOMWindow *ptr, const nsACString & aURL) = 0;

  /* void launchExternalURL (in ACString aURL); */
  NS_SCRIPTABLE NS_IMETHOD LaunchExternalURL(const nsACString & aURL) = 0;

  /* boolean canUndo (); */
  NS_SCRIPTABLE NS_IMETHOD CanUndo(bool *_retval NS_OUTPARAM) = 0;

  /* boolean canRedo (); */
  NS_SCRIPTABLE NS_IMETHOD CanRedo(bool *_retval NS_OUTPARAM) = 0;

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

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

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

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

  /* void setDocumentCharset (in ACString characterSet); */
  NS_SCRIPTABLE NS_IMETHOD SetDocumentCharset(const nsACString & characterSet) = 0;

  /* void saveAs (in ACString aURI, in boolean aAsFile, in nsIMsgIdentity aIdentity, in AString aMsgFilename, [optional] in boolean aBypassFilePicker); */
  NS_SCRIPTABLE NS_IMETHOD SaveAs(const nsACString & aURI, bool aAsFile, nsIMsgIdentity *aIdentity, const nsAString & aMsgFilename, bool aBypassFilePicker) = 0;

  /* void saveMessages (in unsigned long count, [array, size_is (count)] in wstring filenameArray, [array, size_is (count)] in string messageUriArray); */
  NS_SCRIPTABLE NS_IMETHOD SaveMessages(PRUint32 count, const PRUnichar * *filenameArray, const char * *messageUriArray) = 0;

  /* void openAttachment (in ACString contentTpe, in ACString url, in ACString displayName, in ACString messageUri, in boolean isExternalAttachment); */
  NS_SCRIPTABLE NS_IMETHOD OpenAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, bool isExternalAttachment) = 0;

  /* void saveAttachment (in ACString contentTpe, in ACString url, in ACString displayName, in ACString messageUri, in boolean isExternalAttachment); */
  NS_SCRIPTABLE NS_IMETHOD SaveAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, bool 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_SCRIPTABLE NS_IMETHOD SaveAllAttachments(PRUint32 count, const char * *contentTypeArray, const char * *urlArray, const char * *displayNameArray, const char * *messageUriArray) = 0;

  /* void saveAttachmentToFile (in nsIFile aFile, in ACString aUrl, in ACString aMessageUri, in ACString aContentType, in nsIUrlListener aListener); */
  NS_SCRIPTABLE NS_IMETHOD SaveAttachmentToFile(nsIFile *aFile, const nsACString & aUrl, const nsACString & aMessageUri, const nsACString & aContentType, nsIUrlListener *aListener) = 0;

  /* void detachAttachmentsWOPrompts (in nsIFile aDestFolder, in unsigned long aCount, [array, size_is (aCount)] in string aContentTypeArray, [array, size_is (aCount)] in string aUrlArray, [array, size_is (aCount)] in string aDisplayNameArray, [array, size_is (aCount)] in string aMessageUriArray, in nsIUrlListener aListener); */
  NS_SCRIPTABLE NS_IMETHOD DetachAttachmentsWOPrompts(nsIFile *aDestFolder, PRUint32 aCount, const char * *aContentTypeArray, const char * *aUrlArray, const char * *aDisplayNameArray, const char * *aMessageUriArray, nsIUrlListener *aListener) = 0;

  /* void detachAttachment (in string contentTpe, in string url, in string displayName, in string messageUri, in boolean saveFirst, [optional] in boolean withoutWarning); */
  NS_SCRIPTABLE NS_IMETHOD DetachAttachment(const char * contentTpe, const char * url, const char * displayName, const char * messageUri, bool saveFirst, bool withoutWarning) = 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, [optional] in boolean withoutWarning); */
  NS_SCRIPTABLE NS_IMETHOD DetachAllAttachments(PRUint32 count, const char * *contentTypeArray, const char * *urlArray, const char * *displayNameArray, const char * *messageUriArray, bool saveFirst, bool withoutWarning) = 0;

  /* nsILocalFile saveAttachmentToFolder (in ACString contentType, in ACString url, in ACString displayName, in ACString messageUri, in nsILocalFile aDestFolder); */
  NS_SCRIPTABLE NS_IMETHOD SaveAttachmentToFolder(const nsACString & contentType, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, nsILocalFile *aDestFolder, nsILocalFile * *_retval NS_OUTPARAM) = 0;

  /* readonly attribute ACString lastDisplayedMessageUri; */
  NS_SCRIPTABLE NS_IMETHOD GetLastDisplayedMessageUri(nsACString & aLastDisplayedMessageUri) = 0;

  /* nsIMsgMessageService messageServiceFromURI (in ACString aUri); */
  NS_SCRIPTABLE NS_IMETHOD MessageServiceFromURI(const nsACString & aUri, nsIMsgMessageService * *_retval NS_OUTPARAM) = 0;

  /* nsIMsgDBHdr msgHdrFromURI (in ACString aUri); */
  NS_SCRIPTABLE NS_IMETHOD MsgHdrFromURI(const nsACString & aUri, nsIMsgDBHdr * *_retval NS_OUTPARAM) = 0;

  /* ACString getMsgUriAtNavigatePos (in long aPos); */
  NS_SCRIPTABLE NS_IMETHOD GetMsgUriAtNavigatePos(PRInt32 aPos, nsACString & _retval NS_OUTPARAM) = 0;

  /* ACString getFolderUriAtNavigatePos (in long aPos); */
  NS_SCRIPTABLE NS_IMETHOD GetFolderUriAtNavigatePos(PRInt32 aPos, nsACString & _retval NS_OUTPARAM) = 0;

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

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

  /* AString formatFileSize (in unsigned long long aPos, [optional] in boolean aUseKB); */
  NS_SCRIPTABLE NS_IMETHOD FormatFileSize(PRUint64 aPos, bool aUseKB, nsAString & _retval NS_OUTPARAM) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMessenger, NS_IMESSENGER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMESSENGER \
  NS_SCRIPTABLE NS_IMETHOD SetDisplayCharset(const nsACString & aCharset); \
  NS_SCRIPTABLE NS_IMETHOD GetTransactionManager(nsITransactionManager * *aTransactionManager); \
  NS_SCRIPTABLE NS_IMETHOD SetWindow(nsIDOMWindow *ptr, nsIMsgWindow *msgWindow); \
  NS_SCRIPTABLE NS_IMETHOD AddMsgUrlToNavigateHistory(const nsACString & aURL); \
  NS_SCRIPTABLE NS_IMETHOD OpenURL(const nsACString & aURL); \
  NS_SCRIPTABLE NS_IMETHOD LoadURL(nsIDOMWindow *ptr, const nsACString & aURL); \
  NS_SCRIPTABLE NS_IMETHOD LaunchExternalURL(const nsACString & aURL); \
  NS_SCRIPTABLE NS_IMETHOD CanUndo(bool *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD CanRedo(bool *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD GetUndoTransactionType(PRUint32 *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD GetRedoTransactionType(PRUint32 *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD Undo(nsIMsgWindow *msgWindow); \
  NS_SCRIPTABLE NS_IMETHOD Redo(nsIMsgWindow *msgWindow); \
  NS_SCRIPTABLE NS_IMETHOD SetDocumentCharset(const nsACString & characterSet); \
  NS_SCRIPTABLE NS_IMETHOD SaveAs(const nsACString & aURI, bool aAsFile, nsIMsgIdentity *aIdentity, const nsAString & aMsgFilename, bool aBypassFilePicker); \
  NS_SCRIPTABLE NS_IMETHOD SaveMessages(PRUint32 count, const PRUnichar * *filenameArray, const char * *messageUriArray); \
  NS_SCRIPTABLE NS_IMETHOD OpenAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, bool isExternalAttachment); \
  NS_SCRIPTABLE NS_IMETHOD SaveAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, bool isExternalAttachment); \
  NS_SCRIPTABLE NS_IMETHOD SaveAllAttachments(PRUint32 count, const char * *contentTypeArray, const char * *urlArray, const char * *displayNameArray, const char * *messageUriArray); \
  NS_SCRIPTABLE NS_IMETHOD SaveAttachmentToFile(nsIFile *aFile, const nsACString & aUrl, const nsACString & aMessageUri, const nsACString & aContentType, nsIUrlListener *aListener); \
  NS_SCRIPTABLE NS_IMETHOD DetachAttachmentsWOPrompts(nsIFile *aDestFolder, PRUint32 aCount, const char * *aContentTypeArray, const char * *aUrlArray, const char * *aDisplayNameArray, const char * *aMessageUriArray, nsIUrlListener *aListener); \
  NS_SCRIPTABLE NS_IMETHOD DetachAttachment(const char * contentTpe, const char * url, const char * displayName, const char * messageUri, bool saveFirst, bool withoutWarning); \
  NS_SCRIPTABLE NS_IMETHOD DetachAllAttachments(PRUint32 count, const char * *contentTypeArray, const char * *urlArray, const char * *displayNameArray, const char * *messageUriArray, bool saveFirst, bool withoutWarning); \
  NS_SCRIPTABLE NS_IMETHOD SaveAttachmentToFolder(const nsACString & contentType, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, nsILocalFile *aDestFolder, nsILocalFile * *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD GetLastDisplayedMessageUri(nsACString & aLastDisplayedMessageUri); \
  NS_SCRIPTABLE NS_IMETHOD MessageServiceFromURI(const nsACString & aUri, nsIMsgMessageService * *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD MsgHdrFromURI(const nsACString & aUri, nsIMsgDBHdr * *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD GetMsgUriAtNavigatePos(PRInt32 aPos, nsACString & _retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD GetFolderUriAtNavigatePos(PRInt32 aPos, nsACString & _retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD GetNavigatePos(PRInt32 *aNavigatePos); \
  NS_SCRIPTABLE NS_IMETHOD SetNavigatePos(PRInt32 aNavigatePos); \
  NS_SCRIPTABLE NS_IMETHOD GetNavigateHistory(PRUint32 *aCurPos NS_OUTPARAM, PRUint32 *aCount NS_OUTPARAM, char * **aHistory NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD FormatFileSize(PRUint64 aPos, bool aUseKB, nsAString & _retval NS_OUTPARAM); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMESSENGER(_to) \
  NS_SCRIPTABLE NS_IMETHOD SetDisplayCharset(const nsACString & aCharset) { return _to SetDisplayCharset(aCharset); } \
  NS_SCRIPTABLE NS_IMETHOD GetTransactionManager(nsITransactionManager * *aTransactionManager) { return _to GetTransactionManager(aTransactionManager); } \
  NS_SCRIPTABLE NS_IMETHOD SetWindow(nsIDOMWindow *ptr, nsIMsgWindow *msgWindow) { return _to SetWindow(ptr, msgWindow); } \
  NS_SCRIPTABLE NS_IMETHOD AddMsgUrlToNavigateHistory(const nsACString & aURL) { return _to AddMsgUrlToNavigateHistory(aURL); } \
  NS_SCRIPTABLE NS_IMETHOD OpenURL(const nsACString & aURL) { return _to OpenURL(aURL); } \
  NS_SCRIPTABLE NS_IMETHOD LoadURL(nsIDOMWindow *ptr, const nsACString & aURL) { return _to LoadURL(ptr, aURL); } \
  NS_SCRIPTABLE NS_IMETHOD LaunchExternalURL(const nsACString & aURL) { return _to LaunchExternalURL(aURL); } \
  NS_SCRIPTABLE NS_IMETHOD CanUndo(bool *_retval NS_OUTPARAM) { return _to CanUndo(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD CanRedo(bool *_retval NS_OUTPARAM) { return _to CanRedo(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetUndoTransactionType(PRUint32 *_retval NS_OUTPARAM) { return _to GetUndoTransactionType(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetRedoTransactionType(PRUint32 *_retval NS_OUTPARAM) { return _to GetRedoTransactionType(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD Undo(nsIMsgWindow *msgWindow) { return _to Undo(msgWindow); } \
  NS_SCRIPTABLE NS_IMETHOD Redo(nsIMsgWindow *msgWindow) { return _to Redo(msgWindow); } \
  NS_SCRIPTABLE NS_IMETHOD SetDocumentCharset(const nsACString & characterSet) { return _to SetDocumentCharset(characterSet); } \
  NS_SCRIPTABLE NS_IMETHOD SaveAs(const nsACString & aURI, bool aAsFile, nsIMsgIdentity *aIdentity, const nsAString & aMsgFilename, bool aBypassFilePicker) { return _to SaveAs(aURI, aAsFile, aIdentity, aMsgFilename, aBypassFilePicker); } \
  NS_SCRIPTABLE NS_IMETHOD SaveMessages(PRUint32 count, const PRUnichar * *filenameArray, const char * *messageUriArray) { return _to SaveMessages(count, filenameArray, messageUriArray); } \
  NS_SCRIPTABLE NS_IMETHOD OpenAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, bool isExternalAttachment) { return _to OpenAttachment(contentTpe, url, displayName, messageUri, isExternalAttachment); } \
  NS_SCRIPTABLE NS_IMETHOD SaveAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, bool isExternalAttachment) { return _to SaveAttachment(contentTpe, url, displayName, messageUri, isExternalAttachment); } \
  NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD SaveAttachmentToFile(nsIFile *aFile, const nsACString & aUrl, const nsACString & aMessageUri, const nsACString & aContentType, nsIUrlListener *aListener) { return _to SaveAttachmentToFile(aFile, aUrl, aMessageUri, aContentType, aListener); } \
  NS_SCRIPTABLE NS_IMETHOD DetachAttachmentsWOPrompts(nsIFile *aDestFolder, PRUint32 aCount, const char * *aContentTypeArray, const char * *aUrlArray, const char * *aDisplayNameArray, const char * *aMessageUriArray, nsIUrlListener *aListener) { return _to DetachAttachmentsWOPrompts(aDestFolder, aCount, aContentTypeArray, aUrlArray, aDisplayNameArray, aMessageUriArray, aListener); } \
  NS_SCRIPTABLE NS_IMETHOD DetachAttachment(const char * contentTpe, const char * url, const char * displayName, const char * messageUri, bool saveFirst, bool withoutWarning) { return _to DetachAttachment(contentTpe, url, displayName, messageUri, saveFirst, withoutWarning); } \
  NS_SCRIPTABLE NS_IMETHOD DetachAllAttachments(PRUint32 count, const char * *contentTypeArray, const char * *urlArray, const char * *displayNameArray, const char * *messageUriArray, bool saveFirst, bool withoutWarning) { return _to DetachAllAttachments(count, contentTypeArray, urlArray, displayNameArray, messageUriArray, saveFirst, withoutWarning); } \
  NS_SCRIPTABLE NS_IMETHOD SaveAttachmentToFolder(const nsACString & contentType, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, nsILocalFile *aDestFolder, nsILocalFile * *_retval NS_OUTPARAM) { return _to SaveAttachmentToFolder(contentType, url, displayName, messageUri, aDestFolder, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetLastDisplayedMessageUri(nsACString & aLastDisplayedMessageUri) { return _to GetLastDisplayedMessageUri(aLastDisplayedMessageUri); } \
  NS_SCRIPTABLE NS_IMETHOD MessageServiceFromURI(const nsACString & aUri, nsIMsgMessageService * *_retval NS_OUTPARAM) { return _to MessageServiceFromURI(aUri, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MsgHdrFromURI(const nsACString & aUri, nsIMsgDBHdr * *_retval NS_OUTPARAM) { return _to MsgHdrFromURI(aUri, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetMsgUriAtNavigatePos(PRInt32 aPos, nsACString & _retval NS_OUTPARAM) { return _to GetMsgUriAtNavigatePos(aPos, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetFolderUriAtNavigatePos(PRInt32 aPos, nsACString & _retval NS_OUTPARAM) { return _to GetFolderUriAtNavigatePos(aPos, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetNavigatePos(PRInt32 *aNavigatePos) { return _to GetNavigatePos(aNavigatePos); } \
  NS_SCRIPTABLE NS_IMETHOD SetNavigatePos(PRInt32 aNavigatePos) { return _to SetNavigatePos(aNavigatePos); } \
  NS_SCRIPTABLE NS_IMETHOD GetNavigateHistory(PRUint32 *aCurPos NS_OUTPARAM, PRUint32 *aCount NS_OUTPARAM, char * **aHistory NS_OUTPARAM) { return _to GetNavigateHistory(aCurPos, aCount, aHistory); } \
  NS_SCRIPTABLE NS_IMETHOD FormatFileSize(PRUint64 aPos, bool aUseKB, nsAString & _retval NS_OUTPARAM) { return _to FormatFileSize(aPos, aUseKB, _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_NSIMESSENGER(_to) \
  NS_SCRIPTABLE NS_IMETHOD SetDisplayCharset(const nsACString & aCharset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisplayCharset(aCharset); } \
  NS_SCRIPTABLE NS_IMETHOD GetTransactionManager(nsITransactionManager * *aTransactionManager) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTransactionManager(aTransactionManager); } \
  NS_SCRIPTABLE NS_IMETHOD SetWindow(nsIDOMWindow *ptr, nsIMsgWindow *msgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindow(ptr, msgWindow); } \
  NS_SCRIPTABLE NS_IMETHOD AddMsgUrlToNavigateHistory(const nsACString & aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddMsgUrlToNavigateHistory(aURL); } \
  NS_SCRIPTABLE NS_IMETHOD OpenURL(const nsACString & aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenURL(aURL); } \
  NS_SCRIPTABLE NS_IMETHOD LoadURL(nsIDOMWindow *ptr, const nsACString & aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadURL(ptr, aURL); } \
  NS_SCRIPTABLE NS_IMETHOD LaunchExternalURL(const nsACString & aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->LaunchExternalURL(aURL); } \
  NS_SCRIPTABLE NS_IMETHOD CanUndo(bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanUndo(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD CanRedo(bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanRedo(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetUndoTransactionType(PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUndoTransactionType(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetRedoTransactionType(PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRedoTransactionType(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD Undo(nsIMsgWindow *msgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->Undo(msgWindow); } \
  NS_SCRIPTABLE NS_IMETHOD Redo(nsIMsgWindow *msgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->Redo(msgWindow); } \
  NS_SCRIPTABLE NS_IMETHOD SetDocumentCharset(const nsACString & characterSet) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDocumentCharset(characterSet); } \
  NS_SCRIPTABLE NS_IMETHOD SaveAs(const nsACString & aURI, bool aAsFile, nsIMsgIdentity *aIdentity, const nsAString & aMsgFilename, bool aBypassFilePicker) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveAs(aURI, aAsFile, aIdentity, aMsgFilename, aBypassFilePicker); } \
  NS_SCRIPTABLE NS_IMETHOD SaveMessages(PRUint32 count, const PRUnichar * *filenameArray, const char * *messageUriArray) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveMessages(count, filenameArray, messageUriArray); } \
  NS_SCRIPTABLE NS_IMETHOD OpenAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, bool isExternalAttachment) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenAttachment(contentTpe, url, displayName, messageUri, isExternalAttachment); } \
  NS_SCRIPTABLE NS_IMETHOD SaveAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, bool isExternalAttachment) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveAttachment(contentTpe, url, displayName, messageUri, isExternalAttachment); } \
  NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD SaveAttachmentToFile(nsIFile *aFile, const nsACString & aUrl, const nsACString & aMessageUri, const nsACString & aContentType, nsIUrlListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveAttachmentToFile(aFile, aUrl, aMessageUri, aContentType, aListener); } \
  NS_SCRIPTABLE NS_IMETHOD DetachAttachmentsWOPrompts(nsIFile *aDestFolder, PRUint32 aCount, const char * *aContentTypeArray, const char * *aUrlArray, const char * *aDisplayNameArray, const char * *aMessageUriArray, nsIUrlListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->DetachAttachmentsWOPrompts(aDestFolder, aCount, aContentTypeArray, aUrlArray, aDisplayNameArray, aMessageUriArray, aListener); } \
  NS_SCRIPTABLE NS_IMETHOD DetachAttachment(const char * contentTpe, const char * url, const char * displayName, const char * messageUri, bool saveFirst, bool withoutWarning) { return !_to ? NS_ERROR_NULL_POINTER : _to->DetachAttachment(contentTpe, url, displayName, messageUri, saveFirst, withoutWarning); } \
  NS_SCRIPTABLE NS_IMETHOD DetachAllAttachments(PRUint32 count, const char * *contentTypeArray, const char * *urlArray, const char * *displayNameArray, const char * *messageUriArray, bool saveFirst, bool withoutWarning) { return !_to ? NS_ERROR_NULL_POINTER : _to->DetachAllAttachments(count, contentTypeArray, urlArray, displayNameArray, messageUriArray, saveFirst, withoutWarning); } \
  NS_SCRIPTABLE NS_IMETHOD SaveAttachmentToFolder(const nsACString & contentType, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, nsILocalFile *aDestFolder, nsILocalFile * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaveAttachmentToFolder(contentType, url, displayName, messageUri, aDestFolder, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetLastDisplayedMessageUri(nsACString & aLastDisplayedMessageUri) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastDisplayedMessageUri(aLastDisplayedMessageUri); } \
  NS_SCRIPTABLE NS_IMETHOD MessageServiceFromURI(const nsACString & aUri, nsIMsgMessageService * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->MessageServiceFromURI(aUri, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD MsgHdrFromURI(const nsACString & aUri, nsIMsgDBHdr * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->MsgHdrFromURI(aUri, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetMsgUriAtNavigatePos(PRInt32 aPos, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgUriAtNavigatePos(aPos, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetFolderUriAtNavigatePos(PRInt32 aPos, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFolderUriAtNavigatePos(aPos, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetNavigatePos(PRInt32 *aNavigatePos) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNavigatePos(aNavigatePos); } \
  NS_SCRIPTABLE NS_IMETHOD SetNavigatePos(PRInt32 aNavigatePos) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNavigatePos(aNavigatePos); } \
  NS_SCRIPTABLE NS_IMETHOD GetNavigateHistory(PRUint32 *aCurPos NS_OUTPARAM, PRUint32 *aCount NS_OUTPARAM, char * **aHistory NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNavigateHistory(aCurPos, aCount, aHistory); } \
  NS_SCRIPTABLE NS_IMETHOD FormatFileSize(PRUint64 aPos, bool aUseKB, nsAString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->FormatFileSize(aPos, aUseKB, _retval); } 

#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 ACString aCharset); */
NS_IMETHODIMP nsMessenger::SetDisplayCharset(const nsACString & aCharset)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

/* void addMsgUrlToNavigateHistory (in ACString aURL); */
NS_IMETHODIMP nsMessenger::AddMsgUrlToNavigateHistory(const nsACString & aURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void openURL (in ACString aURL); */
NS_IMETHODIMP nsMessenger::OpenURL(const nsACString & aURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void loadURL (in nsIDOMWindow ptr, in ACString aURL); */
NS_IMETHODIMP nsMessenger::LoadURL(nsIDOMWindow *ptr, const nsACString & aURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void launchExternalURL (in ACString aURL); */
NS_IMETHODIMP nsMessenger::LaunchExternalURL(const nsACString & aURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean canUndo (); */
NS_IMETHODIMP nsMessenger::CanUndo(bool *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean canRedo (); */
NS_IMETHODIMP nsMessenger::CanRedo(bool *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

/* unsigned long getRedoTransactionType (); */
NS_IMETHODIMP nsMessenger::GetRedoTransactionType(PRUint32 *_retval NS_OUTPARAM)
{
    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 setDocumentCharset (in ACString characterSet); */
NS_IMETHODIMP nsMessenger::SetDocumentCharset(const nsACString & characterSet)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void saveAs (in ACString aURI, in boolean aAsFile, in nsIMsgIdentity aIdentity, in AString aMsgFilename, [optional] in boolean aBypassFilePicker); */
NS_IMETHODIMP nsMessenger::SaveAs(const nsACString & aURI, bool aAsFile, nsIMsgIdentity *aIdentity, const nsAString & aMsgFilename, bool aBypassFilePicker)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void saveMessages (in unsigned long count, [array, size_is (count)] in wstring filenameArray, [array, size_is (count)] in string messageUriArray); */
NS_IMETHODIMP nsMessenger::SaveMessages(PRUint32 count, const PRUnichar * *filenameArray, const char * *messageUriArray)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void openAttachment (in ACString contentTpe, in ACString url, in ACString displayName, in ACString messageUri, in boolean isExternalAttachment); */
NS_IMETHODIMP nsMessenger::OpenAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, bool isExternalAttachment)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void saveAttachment (in ACString contentTpe, in ACString url, in ACString displayName, in ACString messageUri, in boolean isExternalAttachment); */
NS_IMETHODIMP nsMessenger::SaveAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, bool 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 saveAttachmentToFile (in nsIFile aFile, in ACString aUrl, in ACString aMessageUri, in ACString aContentType, in nsIUrlListener aListener); */
NS_IMETHODIMP nsMessenger::SaveAttachmentToFile(nsIFile *aFile, const nsACString & aUrl, const nsACString & aMessageUri, const nsACString & aContentType, nsIUrlListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void detachAttachmentsWOPrompts (in nsIFile aDestFolder, in unsigned long aCount, [array, size_is (aCount)] in string aContentTypeArray, [array, size_is (aCount)] in string aUrlArray, [array, size_is (aCount)] in string aDisplayNameArray, [array, size_is (aCount)] in string aMessageUriArray, in nsIUrlListener aListener); */
NS_IMETHODIMP nsMessenger::DetachAttachmentsWOPrompts(nsIFile *aDestFolder, PRUint32 aCount, const char * *aContentTypeArray, const char * *aUrlArray, const char * *aDisplayNameArray, const char * *aMessageUriArray, nsIUrlListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void detachAttachment (in string contentTpe, in string url, in string displayName, in string messageUri, in boolean saveFirst, [optional] in boolean withoutWarning); */
NS_IMETHODIMP nsMessenger::DetachAttachment(const char * contentTpe, const char * url, const char * displayName, const char * messageUri, bool saveFirst, bool withoutWarning)
{
    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, [optional] in boolean withoutWarning); */
NS_IMETHODIMP nsMessenger::DetachAllAttachments(PRUint32 count, const char * *contentTypeArray, const char * *urlArray, const char * *displayNameArray, const char * *messageUriArray, bool saveFirst, bool withoutWarning)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

/* readonly attribute ACString lastDisplayedMessageUri; */
NS_IMETHODIMP nsMessenger::GetLastDisplayedMessageUri(nsACString & aLastDisplayedMessageUri)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgMessageService messageServiceFromURI (in ACString aUri); */
NS_IMETHODIMP nsMessenger::MessageServiceFromURI(const nsACString & aUri, nsIMsgMessageService * *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgDBHdr msgHdrFromURI (in ACString aUri); */
NS_IMETHODIMP nsMessenger::MsgHdrFromURI(const nsACString & aUri, nsIMsgDBHdr * *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* ACString getMsgUriAtNavigatePos (in long aPos); */
NS_IMETHODIMP nsMessenger::GetMsgUriAtNavigatePos(PRInt32 aPos, nsACString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* ACString getFolderUriAtNavigatePos (in long aPos); */
NS_IMETHODIMP nsMessenger::GetFolderUriAtNavigatePos(PRInt32 aPos, nsACString & _retval NS_OUTPARAM)
{
    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 NS_OUTPARAM, PRUint32 *aCount NS_OUTPARAM, char * **aHistory NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString formatFileSize (in unsigned long long aPos, [optional] in boolean aUseKB); */
NS_IMETHODIMP nsMessenger::FormatFileSize(PRUint64 aPos, bool aUseKB, nsAString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMessenger_h__ */
