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

/* 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 nsIMsgIdentity; /* forward declaration */


/* starting interface:    nsIMsgSendLaterListener */
#define NS_IMSGSENDLATERLISTENER_IID_STR "a7bc603b-d0da-4959-a82f-4b99c138b9f4"

#define NS_IMSGSENDLATERLISTENER_IID \
  {0xa7bc603b, 0xd0da, 0x4959, \
    { 0xa8, 0x2f, 0x4b, 0x99, 0xc1, 0x38, 0xb9, 0xf4 }}

/**
 * Implement this interface and add to nsIMsgSendLater to receive notifications
 * of send later actions.
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsIMsgSendLaterListener : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGSENDLATERLISTENER_IID)

  /**
   * Notify the observer that the operation of sending messages later has
   * started.
   *
   * @param aTotalMessageCount  Number of messages to be sent. This will not
   *                            change over the time we are doing this sequence.
   */
  /* void onStartSending (in unsigned long aTotalMessageCount); */
  NS_SCRIPTABLE NS_IMETHOD OnStartSending(PRUint32 aTotalMessageCount) = 0;

  /**
   * Notify the observer that the next message send/copy is starting and
   * provide details about the message.
   *
   * @param aCurrentMessage      The current message number that is being sent.
   * @param aTotalMessageCount   The total number of messages that we are
   *                             trying to send.
   * @param aMessageHeader       The header information for the message that is
   *                             being sent.
   * @param aMessageIdentity     The identity being used to send the message.
   */
  /* void onMessageStartSending (in unsigned long aCurrentMessage, in unsigned long aTotalMessageCount, in nsIMsgDBHdr aMessageHeader, in nsIMsgIdentity aIdentity); */
  NS_SCRIPTABLE NS_IMETHOD OnMessageStartSending(PRUint32 aCurrentMessage, PRUint32 aTotalMessageCount, nsIMsgDBHdr *aMessageHeader, nsIMsgIdentity *aIdentity) = 0;

  /**
   * Notify the observer of the current progress of sending a message. The one
   * function covers sending the message over the network and copying to the
   * appropriate sent folder.
   *
   * @param aCurrentMessage      The current message number that is being sent.
   * @param aTotalMessageCount   The total number of messages that we are
   *                             trying to send.
   * @param aMessageSendPercent  The percentage of the message sent (0 to 100)
   * @param aMessageCopyPercent  The percentage of the copy completed (0 to
   *                             100). If there is no copy for this message,
   *                             this may be set to 100 at the same time as
   *                             aMessageSendPercent.
   */
  /* void onMessageSendProgress (in unsigned long aCurrentMessage, in unsigned long aTotalMessageCount, in unsigned long aMessageSendPercent, in unsigned long aMessageCopyPercent); */
  NS_SCRIPTABLE NS_IMETHOD OnMessageSendProgress(PRUint32 aCurrentMessage, PRUint32 aTotalMessageCount, PRUint32 aMessageSendPercent, PRUint32 aMessageCopyPercent) = 0;

  /**
   * Notify the observer of an error in the send message later function.
   *
   * @param aCurrentMessage      The current message number that is being sent.
   * @param aMessageHeader       The header information for the message that is
   *                             being sent.
   * @param aStatus              The error status code.
   * @param aMsg                 A text string describing the error.
   */
  /* void onMessageSendError (in unsigned long aCurrentMessage, in nsIMsgDBHdr aMessageHeader, in nsresult aStatus, in wstring aMsg); */
  NS_SCRIPTABLE NS_IMETHOD OnMessageSendError(PRUint32 aCurrentMessage, nsIMsgDBHdr *aMessageHeader, nsresult aStatus, const PRUnichar *aMsg) = 0;

  /**
   * Notify the observer that the send unsent messages operation has finished.
   * This is called regardless of the success/failure of the operation.
   *
   * @param aStatus     Status code for the message send.
   * @param aMsg        A text string describing the error.
   * @param aTotalTried Total number of messages that were attempted to be sent.
   * @param aSuccessful How many messages were successfully sent.
   */
  /* void onStopSending (in nsresult aStatus, in wstring aMsg, in unsigned long aTotalTried, in unsigned long aSuccessful); */
  NS_SCRIPTABLE NS_IMETHOD OnStopSending(nsresult aStatus, const PRUnichar *aMsg, PRUint32 aTotalTried, PRUint32 aSuccessful) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgSendLaterListener, NS_IMSGSENDLATERLISTENER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGSENDLATERLISTENER \
  NS_SCRIPTABLE NS_IMETHOD OnStartSending(PRUint32 aTotalMessageCount); \
  NS_SCRIPTABLE NS_IMETHOD OnMessageStartSending(PRUint32 aCurrentMessage, PRUint32 aTotalMessageCount, nsIMsgDBHdr *aMessageHeader, nsIMsgIdentity *aIdentity); \
  NS_SCRIPTABLE NS_IMETHOD OnMessageSendProgress(PRUint32 aCurrentMessage, PRUint32 aTotalMessageCount, PRUint32 aMessageSendPercent, PRUint32 aMessageCopyPercent); \
  NS_SCRIPTABLE NS_IMETHOD OnMessageSendError(PRUint32 aCurrentMessage, nsIMsgDBHdr *aMessageHeader, nsresult aStatus, const PRUnichar *aMsg); \
  NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD OnStartSending(PRUint32 aTotalMessageCount) { return _to OnStartSending(aTotalMessageCount); } \
  NS_SCRIPTABLE NS_IMETHOD OnMessageStartSending(PRUint32 aCurrentMessage, PRUint32 aTotalMessageCount, nsIMsgDBHdr *aMessageHeader, nsIMsgIdentity *aIdentity) { return _to OnMessageStartSending(aCurrentMessage, aTotalMessageCount, aMessageHeader, aIdentity); } \
  NS_SCRIPTABLE NS_IMETHOD OnMessageSendProgress(PRUint32 aCurrentMessage, PRUint32 aTotalMessageCount, PRUint32 aMessageSendPercent, PRUint32 aMessageCopyPercent) { return _to OnMessageSendProgress(aCurrentMessage, aTotalMessageCount, aMessageSendPercent, aMessageCopyPercent); } \
  NS_SCRIPTABLE NS_IMETHOD OnMessageSendError(PRUint32 aCurrentMessage, nsIMsgDBHdr *aMessageHeader, nsresult aStatus, const PRUnichar *aMsg) { return _to OnMessageSendError(aCurrentMessage, aMessageHeader, aStatus, aMsg); } \
  NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD OnStartSending(PRUint32 aTotalMessageCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartSending(aTotalMessageCount); } \
  NS_SCRIPTABLE NS_IMETHOD OnMessageStartSending(PRUint32 aCurrentMessage, PRUint32 aTotalMessageCount, nsIMsgDBHdr *aMessageHeader, nsIMsgIdentity *aIdentity) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMessageStartSending(aCurrentMessage, aTotalMessageCount, aMessageHeader, aIdentity); } \
  NS_SCRIPTABLE NS_IMETHOD OnMessageSendProgress(PRUint32 aCurrentMessage, PRUint32 aTotalMessageCount, PRUint32 aMessageSendPercent, PRUint32 aMessageCopyPercent) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMessageSendProgress(aCurrentMessage, aTotalMessageCount, aMessageSendPercent, aMessageCopyPercent); } \
  NS_SCRIPTABLE NS_IMETHOD OnMessageSendError(PRUint32 aCurrentMessage, nsIMsgDBHdr *aMessageHeader, nsresult aStatus, const PRUnichar *aMsg) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMessageSendError(aCurrentMessage, aMessageHeader, aStatus, aMsg); } \
  NS_SCRIPTABLE 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();

private:
  ~nsMsgSendLaterListener();

protected:
  /* additional members */
};

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

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

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

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

/* void onMessageStartSending (in unsigned long aCurrentMessage, in unsigned long aTotalMessageCount, in nsIMsgDBHdr aMessageHeader, in nsIMsgIdentity aIdentity); */
NS_IMETHODIMP nsMsgSendLaterListener::OnMessageStartSending(PRUint32 aCurrentMessage, PRUint32 aTotalMessageCount, nsIMsgDBHdr *aMessageHeader, nsIMsgIdentity *aIdentity)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onMessageSendProgress (in unsigned long aCurrentMessage, in unsigned long aTotalMessageCount, in unsigned long aMessageSendPercent, in unsigned long aMessageCopyPercent); */
NS_IMETHODIMP nsMsgSendLaterListener::OnMessageSendProgress(PRUint32 aCurrentMessage, PRUint32 aTotalMessageCount, PRUint32 aMessageSendPercent, PRUint32 aMessageCopyPercent)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onMessageSendError (in unsigned long aCurrentMessage, in nsIMsgDBHdr aMessageHeader, in nsresult aStatus, in wstring aMsg); */
NS_IMETHODIMP nsMsgSendLaterListener::OnMessageSendError(PRUint32 aCurrentMessage, nsIMsgDBHdr *aMessageHeader, nsresult aStatus, const PRUnichar *aMsg)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onStopSending (in nsresult aStatus, in wstring aMsg, in unsigned long aTotalTried, in unsigned long 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__ */
