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

#ifndef __gen_nsIMsgCopyServiceListener_h__
#define __gen_nsIMsgCopyServiceListener_h__


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

#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
#include "nsString.h"

/* starting interface:    nsIMsgCopyServiceListener */
#define NS_IMSGCOPYSERVICELISTENER_IID_STR "1caa10b6-29a6-11d3-afb2-001083002da8"

#define NS_IMSGCOPYSERVICELISTENER_IID \
  {0x1caa10b6, 0x29a6, 0x11d3, \
    { 0xaf, 0xb2, 0x00, 0x10, 0x83, 0x00, 0x2d, 0xa8 }}

class NS_NO_VTABLE nsIMsgCopyServiceListener : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMSGCOPYSERVICELISTENER_IID)

  /**
     * Notify the observer that the message has started to be copied. This
     * method is called only once, at the beginning of a message
     * copyoperation. 
     */
  /* void OnStartCopy (); */
  NS_IMETHOD OnStartCopy(void) = 0;

  /**
     * Notify the observer that progress as occurred for the message copy
     * aProgress -
     * aProgressMax -
     */
  /* void OnProgress (in PRUint32 aProgress, in PRUint32 aProgressMax); */
  NS_IMETHOD OnProgress(PRUint32 aProgress, PRUint32 aProgressMax) = 0;

  /**
     * Setting newly created message key. This method is taylored specifically
     * for nsIMsgCopyService::CopyFileMessage() when saveing Drafts/Templates.
     * We need to have a way to inform the client what's the key of the newly
     * created message.
     * aKey -
     */
  /* void SetMessageKey (in PRUint32 aKey); */
  NS_IMETHOD SetMessageKey(PRUint32 aKey) = 0;

  /**
     * Getting the file message message ID. This method is taylored
     * specifically for nsIMsgCopyService::CopyFileMessage() when saving
     * Drafts/Templates. In order to work with imap server which doesn't
     * support uidplus we have to use search comman to retrieve the key of
     * newly created message. Message ID generated by the compose gurantee its
     * uniqueness.
     * aMessageId -
     */
  /* [noscript] void GetMessageId (in nsCString aMessageId); */
  NS_IMETHOD GetMessageId(nsCString * aMessageId) = 0;

  /**
     * Notify the observer that the message copied operation has completed.  
     * This method is called regardless of whether the the operation was
     * successful.
     * aStatus - indicate whether the operation was succeeded
     */
  /* void OnStopCopy (in nsresult aStatus); */
  NS_IMETHOD OnStopCopy(nsresult aStatus) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGCOPYSERVICELISTENER \
  NS_IMETHOD OnStartCopy(void); \
  NS_IMETHOD OnProgress(PRUint32 aProgress, PRUint32 aProgressMax); \
  NS_IMETHOD SetMessageKey(PRUint32 aKey); \
  NS_IMETHOD GetMessageId(nsCString * aMessageId); \
  NS_IMETHOD OnStopCopy(nsresult aStatus); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGCOPYSERVICELISTENER(_to) \
  NS_IMETHOD OnStartCopy(void) { return _to OnStartCopy(); } \
  NS_IMETHOD OnProgress(PRUint32 aProgress, PRUint32 aProgressMax) { return _to OnProgress(aProgress, aProgressMax); } \
  NS_IMETHOD SetMessageKey(PRUint32 aKey) { return _to SetMessageKey(aKey); } \
  NS_IMETHOD GetMessageId(nsCString * aMessageId) { return _to GetMessageId(aMessageId); } \
  NS_IMETHOD OnStopCopy(nsresult aStatus) { return _to OnStopCopy(aStatus); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGCOPYSERVICELISTENER(_to) \
  NS_IMETHOD OnStartCopy(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartCopy(); } \
  NS_IMETHOD OnProgress(PRUint32 aProgress, PRUint32 aProgressMax) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnProgress(aProgress, aProgressMax); } \
  NS_IMETHOD SetMessageKey(PRUint32 aKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMessageKey(aKey); } \
  NS_IMETHOD GetMessageId(nsCString * aMessageId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMessageId(aMessageId); } \
  NS_IMETHOD OnStopCopy(nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopCopy(aStatus); } 

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

/* Header file */
class nsMsgCopyServiceListener : public nsIMsgCopyServiceListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGCOPYSERVICELISTENER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgCopyServiceListener, nsIMsgCopyServiceListener)

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

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

/* void OnStartCopy (); */
NS_IMETHODIMP nsMsgCopyServiceListener::OnStartCopy()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void OnProgress (in PRUint32 aProgress, in PRUint32 aProgressMax); */
NS_IMETHODIMP nsMsgCopyServiceListener::OnProgress(PRUint32 aProgress, PRUint32 aProgressMax)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void SetMessageKey (in PRUint32 aKey); */
NS_IMETHODIMP nsMsgCopyServiceListener::SetMessageKey(PRUint32 aKey)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void GetMessageId (in nsCString aMessageId); */
NS_IMETHODIMP nsMsgCopyServiceListener::GetMessageId(nsCString * aMessageId)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void OnStopCopy (in nsresult aStatus); */
NS_IMETHODIMP nsMsgCopyServiceListener::OnStopCopy(nsresult aStatus)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgCopyServiceListener_h__ */
