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

#ifndef __gen_nsIMsgCopyService_h__
#define __gen_nsIMsgCopyService_h__


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

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

#ifndef __gen_nsIMsgFolder_h__
#include "nsIMsgFolder.h"
#endif

#ifndef __gen_nsIMsgCopyServiceListener_h__
#include "nsIMsgCopyServiceListener.h"
#endif

#ifndef __gen_nsISupportsArray_h__
#include "nsISupportsArray.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 */

#include "nsITransactionManager.h"
class nsITransactionManager; /* forward declaration */

class nsIMsgWindow; /* forward declaration */

class nsIFileSpec; /* forward declaration */


/* starting interface:    nsIMsgCopyService */
#define NS_IMSGCOPYSERVICE_IID_STR "bce41600-28df-11d3-abf7-00805f8ac968"

#define NS_IMSGCOPYSERVICE_IID \
  {0xbce41600, 0x28df, 0x11d3, \
    { 0xab, 0xf7, 0x00, 0x80, 0x5f, 0x8a, 0xc9, 0x68 }}

class NS_NO_VTABLE nsIMsgCopyService : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMSGCOPYSERVICE_IID)

  /**
     *
     */
  /* void CopyMessages (in nsIMsgFolder srcFolder, in nsISupportsArray messages, in nsIMsgFolder dstFolder, in boolean isMove, in nsIMsgCopyServiceListener listener, in nsIMsgWindow msgWindow, in boolean allowUndo); */
  NS_IMETHOD CopyMessages(nsIMsgFolder *srcFolder, nsISupportsArray *messages, nsIMsgFolder *dstFolder, PRBool isMove, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow, PRBool allowUndo) = 0;

  /**
     *
     */
  /* void CopyFolders (in nsISupportsArray folders, in nsIMsgFolder dstFolder, in boolean isMove, in nsIMsgCopyServiceListener listener, in nsIMsgWindow msgWindow); */
  NS_IMETHOD CopyFolders(nsISupportsArray *folders, nsIMsgFolder *dstFolder, PRBool isMove, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow) = 0;

  /* void CopyFileMessage (in nsIFileSpec fileSpec, in nsIMsgFolder dstFolder, in nsIMsgDBHdr msgToReplace, in boolean isDraftOrTemplate, in nsIMsgCopyServiceListener listener, in nsIMsgWindow msgWindow); */
  NS_IMETHOD CopyFileMessage(nsIFileSpec *fileSpec, nsIMsgFolder *dstFolder, nsIMsgDBHdr *msgToReplace, PRBool isDraftOrTemplate, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow) = 0;

  /**
     * Notify the message copy service that the destination folder has finished
     * it's messages copying operation so that the copy service can continue
     * copying the rest of the messages if there are more to copy with.
     * aSupport and dstFolder uniquely identify a copy service request.
     *
     * aSupport -- the originator of CopyMessages or CopyFileMessage; it can
     *             be either a nsIMsgFolder or a nsIFileSpec
     * dstFolder -- the destination folder which performs the copy operation
     * result -- the result of the copy operation
     */
  /* void NotifyCompletion (in nsISupports aSupport, in nsIMsgFolder dstFolder, in nsresult result); */
  NS_IMETHOD NotifyCompletion(nsISupports *aSupport, nsIMsgFolder *dstFolder, nsresult result) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGCOPYSERVICE \
  NS_IMETHOD CopyMessages(nsIMsgFolder *srcFolder, nsISupportsArray *messages, nsIMsgFolder *dstFolder, PRBool isMove, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow, PRBool allowUndo); \
  NS_IMETHOD CopyFolders(nsISupportsArray *folders, nsIMsgFolder *dstFolder, PRBool isMove, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow); \
  NS_IMETHOD CopyFileMessage(nsIFileSpec *fileSpec, nsIMsgFolder *dstFolder, nsIMsgDBHdr *msgToReplace, PRBool isDraftOrTemplate, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow); \
  NS_IMETHOD NotifyCompletion(nsISupports *aSupport, nsIMsgFolder *dstFolder, nsresult result); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGCOPYSERVICE(_to) \
  NS_IMETHOD CopyMessages(nsIMsgFolder *srcFolder, nsISupportsArray *messages, nsIMsgFolder *dstFolder, PRBool isMove, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow, PRBool allowUndo) { return _to CopyMessages(srcFolder, messages, dstFolder, isMove, listener, msgWindow, allowUndo); } \
  NS_IMETHOD CopyFolders(nsISupportsArray *folders, nsIMsgFolder *dstFolder, PRBool isMove, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow) { return _to CopyFolders(folders, dstFolder, isMove, listener, msgWindow); } \
  NS_IMETHOD CopyFileMessage(nsIFileSpec *fileSpec, nsIMsgFolder *dstFolder, nsIMsgDBHdr *msgToReplace, PRBool isDraftOrTemplate, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow) { return _to CopyFileMessage(fileSpec, dstFolder, msgToReplace, isDraftOrTemplate, listener, msgWindow); } \
  NS_IMETHOD NotifyCompletion(nsISupports *aSupport, nsIMsgFolder *dstFolder, nsresult result) { return _to NotifyCompletion(aSupport, dstFolder, result); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGCOPYSERVICE(_to) \
  NS_IMETHOD CopyMessages(nsIMsgFolder *srcFolder, nsISupportsArray *messages, nsIMsgFolder *dstFolder, PRBool isMove, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow, PRBool allowUndo) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyMessages(srcFolder, messages, dstFolder, isMove, listener, msgWindow, allowUndo); } \
  NS_IMETHOD CopyFolders(nsISupportsArray *folders, nsIMsgFolder *dstFolder, PRBool isMove, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyFolders(folders, dstFolder, isMove, listener, msgWindow); } \
  NS_IMETHOD CopyFileMessage(nsIFileSpec *fileSpec, nsIMsgFolder *dstFolder, nsIMsgDBHdr *msgToReplace, PRBool isDraftOrTemplate, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyFileMessage(fileSpec, dstFolder, msgToReplace, isDraftOrTemplate, listener, msgWindow); } \
  NS_IMETHOD NotifyCompletion(nsISupports *aSupport, nsIMsgFolder *dstFolder, nsresult result) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyCompletion(aSupport, dstFolder, result); } 

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

/* Header file */
class nsMsgCopyService : public nsIMsgCopyService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGCOPYSERVICE

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgCopyService, nsIMsgCopyService)

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

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

/* void CopyMessages (in nsIMsgFolder srcFolder, in nsISupportsArray messages, in nsIMsgFolder dstFolder, in boolean isMove, in nsIMsgCopyServiceListener listener, in nsIMsgWindow msgWindow, in boolean allowUndo); */
NS_IMETHODIMP nsMsgCopyService::CopyMessages(nsIMsgFolder *srcFolder, nsISupportsArray *messages, nsIMsgFolder *dstFolder, PRBool isMove, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow, PRBool allowUndo)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void CopyFolders (in nsISupportsArray folders, in nsIMsgFolder dstFolder, in boolean isMove, in nsIMsgCopyServiceListener listener, in nsIMsgWindow msgWindow); */
NS_IMETHODIMP nsMsgCopyService::CopyFolders(nsISupportsArray *folders, nsIMsgFolder *dstFolder, PRBool isMove, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void CopyFileMessage (in nsIFileSpec fileSpec, in nsIMsgFolder dstFolder, in nsIMsgDBHdr msgToReplace, in boolean isDraftOrTemplate, in nsIMsgCopyServiceListener listener, in nsIMsgWindow msgWindow); */
NS_IMETHODIMP nsMsgCopyService::CopyFileMessage(nsIFileSpec *fileSpec, nsIMsgFolder *dstFolder, nsIMsgDBHdr *msgToReplace, PRBool isDraftOrTemplate, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void NotifyCompletion (in nsISupports aSupport, in nsIMsgFolder dstFolder, in nsresult result); */
NS_IMETHODIMP nsMsgCopyService::NotifyCompletion(nsISupports *aSupport, nsIMsgFolder *dstFolder, nsresult result)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgCopyService_h__ */
