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

#ifndef __gen_nsIMsgSend_h__
#define __gen_nsIMsgSend_h__

#include "nsISupports.h"
#include "nsISupportsArray.h"
#include "nsrootidl.h"
#include "nsIFileSpec.h"
#include "nsIMsgIdentity.h"
#include "nsIMsgCompFields.h"
#include "nsIMsgSendListener.h"
#include "nsIEditorShell.h"

#include "nsIURL.h"
class nsIURI; /* forward declaration */

class nsIMessage; /* forward declaration */

class nsIMsgHdr; /* forward declaration */

class nsIDocShell; /* forward declaration */

typedef PRInt32 nsMsgDeliverMode;

//
// Callback declarations for message delivery
//
// For completion of send/message creation operations...
typedef nsresult (*nsMsgSendCompletionCallback) (nsresult aExitCode, void *tagData, nsFileSpec *returnFileSpec);
// For completion of sending unsent messages operations...
typedef nsresult (*nsMsgSendUnsentMessagesCallback) (nsresult aExitCode, PRUint32 totalSentCount,
                                                     PRUint32 totalSentSuccessfully, void *tagData);
// Attachment file/URL structures
struct nsMsgAttachmentData
{
  nsIURI  *url;			      // The URL to attach. This should be 0 to signify "end of list".
  char *desired_type;	    // The type to which this document should be
						              // converted.  Legal values are NULL, TEXT_PLAIN
						              // and APPLICATION_POSTSCRIPT (which are macros
                          // defined in net.h); other values are ignored.
  char *real_type;		    // The type of the URL if known, otherwise NULL. For example, if 
                          // you were attaching a temp file which was known to contain HTML data, 
                          // you would pass in TEXT_HTML as the real_type, to override whatever type 
                          // the name of the tmp file might otherwise indicate.
  char *real_encoding;	  // Goes along with real_type 
  char *real_name;		    // The original name of this document, which will eventually show up in the 
                          // Content-Disposition header. For example, if you had copied a document to a 
                          // tmp file, this would be the original, human-readable name of the document.
  char *description;	    // If you put a string here, it will show up as the Content-Description header.  
                          // This can be any explanatory text; it's not a file name.						 
  char *x_mac_type, *x_mac_creator; // Mac-specific data that should show up as optional parameters
						                        // to the content-type header.
  PRBool  notDownloaded;  // Flag for IMAP parts on demand status
};
//
// When we have downloaded a URL to a tmp file for attaching, this
// represents everything we learned about it (and did to it) in the
// process. 
//
typedef struct nsMsgAttachedFile
{
  nsIURI      *orig_url;		// Where it came from on the network (or even elsewhere on the local disk.)
  nsFileSpec  *file_spec;		// The tmp file in which the (possibly converted) data now resides.
  
  char        *type;			  // The type of the data in file_name (not necessarily the same as the type of orig_url.)
  char        *encoding;		// Likewise, the encoding of the tmp file. This will be set only if the original 
                            // document had an encoding already; we don't do base64 encoding and so forth until 
                            // it's time to assemble a full MIME message of all parts.
  char        *description;	  // For Content-Description header 
  char        *x_mac_type;    // mac-specific info 
  char        *x_mac_creator; // mac-specific info 
  char        *real_name;		  // The real name of the file. 
  // Some statistics about the data that was written to the file, so that when
	// it comes time to compose a MIME message, we can make an informed decision
	// about what Content-Transfer-Encoding would be best for this attachment.
  // (If it's encoded already, we ignore this information and ship it as-is.)
  PRUint32    size;
  PRUint32    unprintable_count;
  PRUint32    highbit_count;
  PRUint32    ctl_count;
  PRUint32    null_count;
  PRUint32    max_line_length;
  
} nsMsgAttachedFile;

/* starting interface:    nsIMsgSend */
#define NS_IMSGSEND_IID_STR "9e9bd970-c5d6-11d2-8297-000000000000"

#define NS_IMSGSEND_IID \
  {0x9e9bd970, 0xc5d6, 0x11d2, \
    { 0x82, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}

class NS_NO_VTABLE nsIMsgSend : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMSGSEND_IID)

  enum { nsMsgDeliverNow = 0 };

  enum { nsMsgQueueForLater = 1 };

  enum { nsMsgSave = 2 };

  enum { nsMsgSaveAs = 3 };

  enum { nsMsgSaveAsDraft = 4 };

  enum { nsMsgSaveAsTemplate = 5 };

  /* [noscript] void CreateAndSendMessage (in nsIEditorShell aEditor, in nsIMsgIdentity aUserIdentity, in nsIMsgCompFields fields, in PRBool digest_p, in PRBool dont_deliver_p, in nsMsgDeliverMode mode, in nsIMessage msgToReplace, in string attachment1_type, in string attachment1_body, in PRUint32 attachment1_body_length, [const] in nsMsgAttachmentData attachments, [const] in nsMsgAttachedFile preloaded_attachments, in voidPtr relatedPart, [array, size_is (listeners)] in nsIMsgSendListener aListenerArray, in unsigned long listeners); */
  NS_IMETHOD CreateAndSendMessage(nsIEditorShell *aEditor, nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, PRBool digest_p, PRBool dont_deliver_p, nsMsgDeliverMode mode, nsIMessage *msgToReplace, const char *attachment1_type, const char *attachment1_body, PRUint32 attachment1_body_length, const nsMsgAttachmentData * attachments, const nsMsgAttachedFile * preloaded_attachments, void * relatedPart, nsIMsgSendListener **aListenerArray, PRUint32 listeners) = 0;

  /* void SendMessageFile (in nsIMsgIdentity aUserIdentity, in nsIMsgCompFields fields, in nsIFileSpec sendIFileSpec, in PRBool deleteSendFileOnCompletion, in PRBool digest_p, in nsMsgDeliverMode mode, in nsIMessage msgToReplace, [array, size_is (listeners)] in nsIMsgSendListener aListenerArray, in unsigned long listeners); */
  NS_IMETHOD SendMessageFile(nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, nsIFileSpec *sendIFileSpec, PRBool deleteSendFileOnCompletion, PRBool digest_p, nsMsgDeliverMode mode, nsIMessage *msgToReplace, nsIMsgSendListener **aListenerArray, PRUint32 listeners) = 0;

  /* void SendWebPage (in nsIMsgIdentity aUserIdentity, in nsIMsgCompFields fields, in nsIURI url, in nsMsgDeliverMode mode, [array, size_is (listeners)] in nsIMsgSendListener aListenerArray, in unsigned long listeners); */
  NS_IMETHOD SendWebPage(nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, nsIURI *url, nsMsgDeliverMode mode, nsIMsgSendListener **aListenerArray, PRUint32 listeners) = 0;

  /* void AddListener (in nsIMsgSendListener aListener); */
  NS_IMETHOD AddListener(nsIMsgSendListener *aListener) = 0;

  /* void RemoveListener (in nsIMsgSendListener aListener); */
  NS_IMETHOD RemoveListener(nsIMsgSendListener *aListener) = 0;

  /* void SetGUINotificationState (in PRBool aEnableFlag); */
  NS_IMETHOD SetGUINotificationState(PRBool aEnableFlag) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGSEND \
  NS_IMETHOD CreateAndSendMessage(nsIEditorShell *aEditor, nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, PRBool digest_p, PRBool dont_deliver_p, nsMsgDeliverMode mode, nsIMessage *msgToReplace, const char *attachment1_type, const char *attachment1_body, PRUint32 attachment1_body_length, const nsMsgAttachmentData * attachments, const nsMsgAttachedFile * preloaded_attachments, void * relatedPart, nsIMsgSendListener **aListenerArray, PRUint32 listeners); \
  NS_IMETHOD SendMessageFile(nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, nsIFileSpec *sendIFileSpec, PRBool deleteSendFileOnCompletion, PRBool digest_p, nsMsgDeliverMode mode, nsIMessage *msgToReplace, nsIMsgSendListener **aListenerArray, PRUint32 listeners); \
  NS_IMETHOD SendWebPage(nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, nsIURI *url, nsMsgDeliverMode mode, nsIMsgSendListener **aListenerArray, PRUint32 listeners); \
  NS_IMETHOD AddListener(nsIMsgSendListener *aListener); \
  NS_IMETHOD RemoveListener(nsIMsgSendListener *aListener); \
  NS_IMETHOD SetGUINotificationState(PRBool aEnableFlag); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGSEND(_to) \
  NS_IMETHOD CreateAndSendMessage(nsIEditorShell *aEditor, nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, PRBool digest_p, PRBool dont_deliver_p, nsMsgDeliverMode mode, nsIMessage *msgToReplace, const char *attachment1_type, const char *attachment1_body, PRUint32 attachment1_body_length, const nsMsgAttachmentData * attachments, const nsMsgAttachedFile * preloaded_attachments, void * relatedPart, nsIMsgSendListener **aListenerArray, PRUint32 listeners) { return _to ## CreateAndSendMessage(aEditor, aUserIdentity, fields, digest_p, dont_deliver_p, mode, msgToReplace, attachment1_type, attachment1_body, attachment1_body_length, attachments, preloaded_attachments, relatedPart, aListenerArray, listeners); } \
  NS_IMETHOD SendMessageFile(nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, nsIFileSpec *sendIFileSpec, PRBool deleteSendFileOnCompletion, PRBool digest_p, nsMsgDeliverMode mode, nsIMessage *msgToReplace, nsIMsgSendListener **aListenerArray, PRUint32 listeners) { return _to ## SendMessageFile(aUserIdentity, fields, sendIFileSpec, deleteSendFileOnCompletion, digest_p, mode, msgToReplace, aListenerArray, listeners); } \
  NS_IMETHOD SendWebPage(nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, nsIURI *url, nsMsgDeliverMode mode, nsIMsgSendListener **aListenerArray, PRUint32 listeners) { return _to ## SendWebPage(aUserIdentity, fields, url, mode, aListenerArray, listeners); } \
  NS_IMETHOD AddListener(nsIMsgSendListener *aListener) { return _to ## AddListener(aListener); } \
  NS_IMETHOD RemoveListener(nsIMsgSendListener *aListener) { return _to ## RemoveListener(aListener); } \
  NS_IMETHOD SetGUINotificationState(PRBool aEnableFlag) { return _to ## SetGUINotificationState(aEnableFlag); } 

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

/* Header file */
class nsMsgSend : public nsIMsgSend
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGSEND

  nsMsgSend();
  virtual ~nsMsgSend();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgSend, nsIMsgSend)

nsMsgSend::nsMsgSend()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

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

/* [noscript] void CreateAndSendMessage (in nsIEditorShell aEditor, in nsIMsgIdentity aUserIdentity, in nsIMsgCompFields fields, in PRBool digest_p, in PRBool dont_deliver_p, in nsMsgDeliverMode mode, in nsIMessage msgToReplace, in string attachment1_type, in string attachment1_body, in PRUint32 attachment1_body_length, [const] in nsMsgAttachmentData attachments, [const] in nsMsgAttachedFile preloaded_attachments, in voidPtr relatedPart, [array, size_is (listeners)] in nsIMsgSendListener aListenerArray, in unsigned long listeners); */
NS_IMETHODIMP nsMsgSend::CreateAndSendMessage(nsIEditorShell *aEditor, nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, PRBool digest_p, PRBool dont_deliver_p, nsMsgDeliverMode mode, nsIMessage *msgToReplace, const char *attachment1_type, const char *attachment1_body, PRUint32 attachment1_body_length, const nsMsgAttachmentData * attachments, const nsMsgAttachedFile * preloaded_attachments, void * relatedPart, nsIMsgSendListener **aListenerArray, PRUint32 listeners)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void SendMessageFile (in nsIMsgIdentity aUserIdentity, in nsIMsgCompFields fields, in nsIFileSpec sendIFileSpec, in PRBool deleteSendFileOnCompletion, in PRBool digest_p, in nsMsgDeliverMode mode, in nsIMessage msgToReplace, [array, size_is (listeners)] in nsIMsgSendListener aListenerArray, in unsigned long listeners); */
NS_IMETHODIMP nsMsgSend::SendMessageFile(nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, nsIFileSpec *sendIFileSpec, PRBool deleteSendFileOnCompletion, PRBool digest_p, nsMsgDeliverMode mode, nsIMessage *msgToReplace, nsIMsgSendListener **aListenerArray, PRUint32 listeners)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void SendWebPage (in nsIMsgIdentity aUserIdentity, in nsIMsgCompFields fields, in nsIURI url, in nsMsgDeliverMode mode, [array, size_is (listeners)] in nsIMsgSendListener aListenerArray, in unsigned long listeners); */
NS_IMETHODIMP nsMsgSend::SendWebPage(nsIMsgIdentity *aUserIdentity, nsIMsgCompFields *fields, nsIURI *url, nsMsgDeliverMode mode, nsIMsgSendListener **aListenerArray, PRUint32 listeners)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void AddListener (in nsIMsgSendListener aListener); */
NS_IMETHODIMP nsMsgSend::AddListener(nsIMsgSendListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void RemoveListener (in nsIMsgSendListener aListener); */
NS_IMETHODIMP nsMsgSend::RemoveListener(nsIMsgSendListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void SetGUINotificationState (in PRBool aEnableFlag); */
NS_IMETHODIMP nsMsgSend::SetGUINotificationState(PRBool aEnableFlag)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgSend_h__ */
