/*
 * 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_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 */

class nsIFile; /* forward declaration */

class nsIUrlListener; /* forward declaration */


/* starting interface:    nsIMessenger */
#define NS_IMESSENGER_IID_STR "61f62ed0-dde4-11df-85ca-0800200c9a66"

#define NS_IMESSENGER_IID \
  {0x61f62ed0, 0xdde4, 0x11df, \
    { 0x85, 0xca, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIMessenger : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMESSENGER_IID)

  enum { eUnknown = 0 };

  enum { eDeleteMsg = 1 };

  enum { eMoveMsg = 2 };

  enum { eCopyMsg = 3 };

  enum { 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 nsIDOMWindowInternal ptr, in nsIMsgWindow msgWindow); */
  NS_SCRIPTABLE NS_IMETHOD SetWindow(nsIDOMWindowInternal *ptr, nsIMsgWindow *msgWindow) = 0;

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

  /** load a custom message by url, e.g load a attachment as a email
      */
  /* void loadURL (in nsIDOMWindowInternal ptr, in ACString aURL); */
  NS_SCRIPTABLE NS_IMETHOD LoadURL(nsIDOMWindowInternal *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(PRBool *_retval NS_OUTPARAM) = 0;

  /* boolean canRedo (); */
  NS_SCRIPTABLE NS_IMETHOD CanRedo(PRBool *_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;

  /**
     * Saves a given message to a file or template.
     *
     * @param aURI         The URI of the message to save
     * @param aAsFile      If true, save as file, otherwise save as a template
     * @param aIdentity    When saving as a template, this is used to determine
     *                     the location to save the template to.
     * @param aMsgFilename When saving as a file, the filename to save the
     *                     message as, or the default filename for the file
     *                     picker.
     * @param aBypassFilePicker
     *                     If not specified or false, this function will show
     *                     a file picker when saving as a file. If true, no
     *                     file picker will be shown.
     */
  /* 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, PRBool aAsFile, nsIMsgIdentity *aIdentity, const nsAString & aMsgFilename, PRBool aBypassFilePicker) = 0;

  /**
     * Save the given messages as files in a folder - the user will be prompted
     * for which folder to use.
     * @param count message count
     * @param filenameArray the filenames to use
     * @param messageUriArray uris of the messages to save
     */
  /* 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, PRBool 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, 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_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;

  /**
     * For a single message and attachments, save these attachments to a file, and
     *  remove from the message. No warning windows will appear, so this is
     *  suitable for use in test and filtering.
     *
     * @param aDestFolder       Folder to save files in
     * @param aCount            Number of attachments to save
     * @param aContentTypeArray Content types of the attachments
     * @param aUrlArray         Urls for the attachments
     * @param aDisplayNameArray Files names to save attachments to. Unique
     *                           names will be created if needed.
     * @param aMessageUriArray  Uri for the source message
     * @param aListener         Listener to inform of start and stop of detach
     */
  /* 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, PRBool saveFirst, PRBool 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, PRBool saveFirst, PRBool 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, PRBool 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(nsIDOMWindowInternal *ptr, nsIMsgWindow *msgWindow); \
  NS_SCRIPTABLE NS_IMETHOD OpenURL(const nsACString & aURL); \
  NS_SCRIPTABLE NS_IMETHOD LoadURL(nsIDOMWindowInternal *ptr, const nsACString & aURL); \
  NS_SCRIPTABLE NS_IMETHOD LaunchExternalURL(const nsACString & aURL); \
  NS_SCRIPTABLE NS_IMETHOD CanUndo(PRBool *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD CanRedo(PRBool *_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, PRBool aAsFile, nsIMsgIdentity *aIdentity, const nsAString & aMsgFilename, PRBool 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, PRBool isExternalAttachment); \
  NS_SCRIPTABLE NS_IMETHOD SaveAttachment(const nsACString & contentTpe, const nsACString & url, const nsACString & displayName, const nsACString & messageUri, PRBool 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, PRBool saveFirst, PRBool withoutWarning); \
  NS_SCRIPTABLE NS_IMETHOD DetachAllAttachments(PRUint32 count, const char **contentTypeArray, const char **urlArray, const char **displayNameArray, const char **messageUriArray, PRBool saveFirst, PRBool 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, PRBool 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(nsIDOMWindowInternal *ptr, nsIMsgWindow *msgWindow) { return _to SetWindow(ptr, msgWindow); } \
  NS_SCRIPTABLE NS_IMETHOD OpenURL(const nsACString & aURL) { return _to OpenURL(aURL); } \
  NS_SCRIPTABLE NS_IMETHOD LoadURL(nsIDOMWindowInternal *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(PRBool *_retval NS_OUTPARAM) { return _to CanUndo(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD CanRedo(PRBool *_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, PRBool aAsFile, nsIMsgIdentity *aIdentity, const nsAString & aMsgFilename, PRBool 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, PRBool 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, PRBool 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, PRBool saveFirst, PRBool 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, PRBool saveFirst, PRBool 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, PRBool 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(nsIDOMWindowInternal *ptr, nsIMsgWindow *msgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindow(ptr, msgWindow); } \
  NS_SCRIPTABLE NS_IMETHOD OpenURL(const nsACString & aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenURL(aURL); } \
  NS_SCRIPTABLE NS_IMETHOD LoadURL(nsIDOMWindowInternal *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(PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanUndo(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD CanRedo(PRBool *_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, PRBool aAsFile, nsIMsgIdentity *aIdentity, const nsAString & aMsgFilename, PRBool 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, PRBool 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, PRBool 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, PRBool saveFirst, PRBool 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, PRBool saveFirst, PRBool 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, PRBool 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 nsIDOMWindowInternal ptr, in nsIMsgWindow msgWindow); */
NS_IMETHODIMP nsMessenger::SetWindow(nsIDOMWindowInternal *ptr, nsIMsgWindow *msgWindow)
{
    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 nsIDOMWindowInternal ptr, in ACString aURL); */
NS_IMETHODIMP nsMessenger::LoadURL(nsIDOMWindowInternal *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(PRBool *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean canRedo (); */
NS_IMETHODIMP nsMessenger::CanRedo(PRBool *_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, PRBool aAsFile, nsIMsgIdentity *aIdentity, const nsAString & aMsgFilename, PRBool 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, PRBool 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, 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 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, PRBool saveFirst, PRBool 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, PRBool saveFirst, PRBool 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, PRBool aUseKB, nsAString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMessenger_h__ */
