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

#ifndef __gen_nsIMsgSendLaterListener_h__
#define __gen_nsIMsgSendLaterListener_h__


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

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

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    nsIMsgSendLaterListener */
#define NS_IMSGSENDLATERLISTENER_IID_STR "607da5a8-289d-11d3-82b7-444553540002"

#define NS_IMSGSENDLATERLISTENER_IID \
  {0x607da5a8, 0x289d, 0x11d3, \
    { 0x82, 0xb7, 0x44, 0x45, 0x53, 0x54, 0x00, 0x02 }}

class NS_NO_VTABLE nsIMsgSendLaterListener : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMSGSENDLATERLISTENER_IID)

  /**
     * Notify the observer that the operation of sending all unset messages has
     * started
     */
  /* void OnStartSending (in PRUint32 aTotalMessageCount); */
  NS_IMETHOD OnStartSending(PRUint32 aTotalMessageCount) = 0;

  /**
     * Notify the observer that progress as occurred for send operation
     */
  /* void OnProgress (in PRUint32 aCurrentMessage, in PRUint32 aTotalMessage); */
  NS_IMETHOD OnProgress(PRUint32 aCurrentMessage, PRUint32 aTotalMessage) = 0;

  /**
     * Notify the observer with a status message for the send later operation
     */
  /* void OnStatus (in wstring aMsg); */
  NS_IMETHOD OnStatus(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 nsresult aStatus, in wstring aMsg, in PRUint32 aTotalTried, in PRUint32 aSuccessful); */
  NS_IMETHOD OnStopSending(nsresult aStatus, const PRUnichar *aMsg, PRUint32 aTotalTried, PRUint32 aSuccessful) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGSENDLATERLISTENER \
  NS_IMETHOD OnStartSending(PRUint32 aTotalMessageCount); \
  NS_IMETHOD OnProgress(PRUint32 aCurrentMessage, PRUint32 aTotalMessage); \
  NS_IMETHOD OnStatus(const PRUnichar *aMsg); \
  NS_IMETHOD OnStopSending(nsresult aStatus, const PRUnichar *aMsg, PRUint32 aTotalTried, PRUint32 aSuccessful); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGSENDLATERLISTENER(_to) \
  NS_IMETHOD OnStartSending(PRUint32 aTotalMessageCount) { return _to OnStartSending(aTotalMessageCount); } \
  NS_IMETHOD OnProgress(PRUint32 aCurrentMessage, PRUint32 aTotalMessage) { return _to OnProgress(aCurrentMessage, aTotalMessage); } \
  NS_IMETHOD OnStatus(const PRUnichar *aMsg) { return _to OnStatus(aMsg); } \
  NS_IMETHOD OnStopSending(nsresult aStatus, const PRUnichar *aMsg, PRUint32 aTotalTried, PRUint32 aSuccessful) { return _to OnStopSending(aStatus, aMsg, aTotalTried, aSuccessful); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGSENDLATERLISTENER(_to) \
  NS_IMETHOD OnStartSending(PRUint32 aTotalMessageCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartSending(aTotalMessageCount); } \
  NS_IMETHOD OnProgress(PRUint32 aCurrentMessage, PRUint32 aTotalMessage) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnProgress(aCurrentMessage, aTotalMessage); } \
  NS_IMETHOD OnStatus(const PRUnichar *aMsg) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStatus(aMsg); } \
  NS_IMETHOD OnStopSending(nsresult aStatus, const PRUnichar *aMsg, PRUint32 aTotalTried, PRUint32 aSuccessful) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopSending(aStatus, aMsg, aTotalTried, aSuccessful); } 

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

/* Header file */
class nsMsgSendLaterListener : public nsIMsgSendLaterListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGSENDLATERLISTENER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgSendLaterListener, nsIMsgSendLaterListener)

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

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

/* void OnStartSending (in PRUint32 aTotalMessageCount); */
NS_IMETHODIMP nsMsgSendLaterListener::OnStartSending(PRUint32 aTotalMessageCount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void OnProgress (in PRUint32 aCurrentMessage, in PRUint32 aTotalMessage); */
NS_IMETHODIMP nsMsgSendLaterListener::OnProgress(PRUint32 aCurrentMessage, PRUint32 aTotalMessage)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void OnStatus (in wstring aMsg); */
NS_IMETHODIMP nsMsgSendLaterListener::OnStatus(const PRUnichar *aMsg)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void OnStopSending (in nsresult aStatus, in wstring aMsg, in PRUint32 aTotalTried, in PRUint32 aSuccessful); */
NS_IMETHODIMP nsMsgSendLaterListener::OnStopSending(nsresult aStatus, const PRUnichar *aMsg, PRUint32 aTotalTried, PRUint32 aSuccessful)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgSendLaterListener_h__ */
