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

#ifndef __gen_nsIMsgSendListener_h__
#define __gen_nsIMsgSendListener_h__


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

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIFileSpec; /* forward declaration */


/* starting interface:    nsIMsgSendListener */
#define NS_IMSGSENDLISTENER_IID_STR "ed3d3227-2803-11d3-82b7-444553540002"

#define NS_IMSGSENDLISTENER_IID \
  {0xed3d3227, 0x2803, 0x11d3, \
    { 0x82, 0xb7, 0x44, 0x45, 0x53, 0x54, 0x00, 0x02 }}

class NS_NO_VTABLE nsIMsgSendListener : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMSGSENDLISTENER_IID)

  /**
     * Notify the observer that the message has started to be delivered. This method is
     * called only once, at the beginning of a message send operation.
     *
     * @return The return value is currently ignored.  In the future it may be
     * used to cancel the URL load..
     */
  /* void onStartSending (in string aMsgID, in PRUint32 aMsgSize); */
  NS_IMETHOD OnStartSending(const char *aMsgID, PRUint32 aMsgSize) = 0;

  /**
     * Notify the observer that progress as occurred for the message send
     */
  /* void onProgress (in string aMsgID, in PRUint32 aProgress, in PRUint32 aProgressMax); */
  NS_IMETHOD OnProgress(const char *aMsgID, PRUint32 aProgress, PRUint32 aProgressMax) = 0;

  /**
     * Notify the observer with a status message for the message send
     */
  /* void onStatus (in string aMsgID, in wstring aMsg); */
  NS_IMETHOD OnStatus(const char *aMsgID, const PRUnichar *aMsg) = 0;

  /**
     * Notify the observer that the message has been sent.  This method is 
     * called once when the networking library has finished processing the 
     * message.
     * 
     * This method is called regardless of whether the the operation was successful.
     * aMsgID   The message id for the mail message
     * status   Status code for the message send.
     * msg      A text string describing the error.
     * returnFileSpec The returned file spec for save to file operations.
     */
  /* void onStopSending (in string aMsgID, in nsresult aStatus, in wstring aMsg, in nsIFileSpec returnFileSpec); */
  NS_IMETHOD OnStopSending(const char *aMsgID, nsresult aStatus, const PRUnichar *aMsg, nsIFileSpec *returnFileSpec) = 0;

  /**
     * Notify the observer with the folder uri before the draft is copied.
     */
  /* void onGetDraftFolderURI (in string aFolderURI); */
  NS_IMETHOD OnGetDraftFolderURI(const char *aFolderURI) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGSENDLISTENER \
  NS_IMETHOD OnStartSending(const char *aMsgID, PRUint32 aMsgSize); \
  NS_IMETHOD OnProgress(const char *aMsgID, PRUint32 aProgress, PRUint32 aProgressMax); \
  NS_IMETHOD OnStatus(const char *aMsgID, const PRUnichar *aMsg); \
  NS_IMETHOD OnStopSending(const char *aMsgID, nsresult aStatus, const PRUnichar *aMsg, nsIFileSpec *returnFileSpec); \
  NS_IMETHOD OnGetDraftFolderURI(const char *aFolderURI); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGSENDLISTENER(_to) \
  NS_IMETHOD OnStartSending(const char *aMsgID, PRUint32 aMsgSize) { return _to OnStartSending(aMsgID, aMsgSize); } \
  NS_IMETHOD OnProgress(const char *aMsgID, PRUint32 aProgress, PRUint32 aProgressMax) { return _to OnProgress(aMsgID, aProgress, aProgressMax); } \
  NS_IMETHOD OnStatus(const char *aMsgID, const PRUnichar *aMsg) { return _to OnStatus(aMsgID, aMsg); } \
  NS_IMETHOD OnStopSending(const char *aMsgID, nsresult aStatus, const PRUnichar *aMsg, nsIFileSpec *returnFileSpec) { return _to OnStopSending(aMsgID, aStatus, aMsg, returnFileSpec); } \
  NS_IMETHOD OnGetDraftFolderURI(const char *aFolderURI) { return _to OnGetDraftFolderURI(aFolderURI); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGSENDLISTENER(_to) \
  NS_IMETHOD OnStartSending(const char *aMsgID, PRUint32 aMsgSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartSending(aMsgID, aMsgSize); } \
  NS_IMETHOD OnProgress(const char *aMsgID, PRUint32 aProgress, PRUint32 aProgressMax) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnProgress(aMsgID, aProgress, aProgressMax); } \
  NS_IMETHOD OnStatus(const char *aMsgID, const PRUnichar *aMsg) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStatus(aMsgID, aMsg); } \
  NS_IMETHOD OnStopSending(const char *aMsgID, nsresult aStatus, const PRUnichar *aMsg, nsIFileSpec *returnFileSpec) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopSending(aMsgID, aStatus, aMsg, returnFileSpec); } \
  NS_IMETHOD OnGetDraftFolderURI(const char *aFolderURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnGetDraftFolderURI(aFolderURI); } 

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

/* Header file */
class nsMsgSendListener : public nsIMsgSendListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGSENDLISTENER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgSendListener, nsIMsgSendListener)

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

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

/* void onStartSending (in string aMsgID, in PRUint32 aMsgSize); */
NS_IMETHODIMP nsMsgSendListener::OnStartSending(const char *aMsgID, PRUint32 aMsgSize)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onProgress (in string aMsgID, in PRUint32 aProgress, in PRUint32 aProgressMax); */
NS_IMETHODIMP nsMsgSendListener::OnProgress(const char *aMsgID, PRUint32 aProgress, PRUint32 aProgressMax)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onStatus (in string aMsgID, in wstring aMsg); */
NS_IMETHODIMP nsMsgSendListener::OnStatus(const char *aMsgID, const PRUnichar *aMsg)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onStopSending (in string aMsgID, in nsresult aStatus, in wstring aMsg, in nsIFileSpec returnFileSpec); */
NS_IMETHODIMP nsMsgSendListener::OnStopSending(const char *aMsgID, nsresult aStatus, const PRUnichar *aMsg, nsIFileSpec *returnFileSpec)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onGetDraftFolderURI (in string aFolderURI); */
NS_IMETHODIMP nsMsgSendListener::OnGetDraftFolderURI(const char *aFolderURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgSendListener_h__ */
