/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /root/tmp/build-seamonkey/comm-release/mailnews/imap/public/nsIAutoSyncManager.idl
 */

#ifndef __gen_nsIAutoSyncManager_h__
#define __gen_nsIAutoSyncManager_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 nsIAutoSyncMsgStrategy; /* forward declaration */

class nsIAutoSyncFolderStrategy; /* forward declaration */

class nsIMsgDBHdr; /* forward declaration */

class nsIAutoSyncState; /* forward declaration */

class nsIAutoSyncMgrListener; /* forward declaration */

class nsIMsgFolder; /* forward declaration */

class nsIMsgAccount; /* forward declaration */


/* starting interface:    nsIAutoSyncMgrListener */
#define NS_IAUTOSYNCMGRLISTENER_IID_STR "41ec36a7-1a53-4ca3-b698-dca6452a8761"

#define NS_IAUTOSYNCMGRLISTENER_IID \
  {0x41ec36a7, 0x1a53, 0x4ca3, \
    { 0xb6, 0x98, 0xdc, 0xa6, 0x45, 0x2a, 0x87, 0x61 }}

class NS_NO_VTABLE nsIAutoSyncMgrListener : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IAUTOSYNCMGRLISTENER_IID)

  enum {
    PriorityQueue = 1,
    UpdateQueue = 2,
    DiscoveryQueue = 3
  };

  /* void onFolderAddedIntoQ (in long aQType, in nsIMsgFolder aFolder); */
  NS_IMETHOD OnFolderAddedIntoQ(int32_t aQType, nsIMsgFolder *aFolder) = 0;

  /* void onFolderRemovedFromQ (in long aQType, in nsIMsgFolder aFolder); */
  NS_IMETHOD OnFolderRemovedFromQ(int32_t aQType, nsIMsgFolder *aFolder) = 0;

  /* void onDownloadStarted (in nsIMsgFolder aFolder, in unsigned long aNumberOfMessages, in unsigned long aTotalPending); */
  NS_IMETHOD OnDownloadStarted(nsIMsgFolder *aFolder, uint32_t aNumberOfMessages, uint32_t aTotalPending) = 0;

  /* void onDownloadCompleted (in nsIMsgFolder aFolder); */
  NS_IMETHOD OnDownloadCompleted(nsIMsgFolder *aFolder) = 0;

  /* void onDownloadError (in nsIMsgFolder aFolder); */
  NS_IMETHOD OnDownloadError(nsIMsgFolder *aFolder) = 0;

  /* void onStateChanged (in boolean aRunning); */
  NS_IMETHOD OnStateChanged(bool aRunning) = 0;

  /* void onDiscoveryQProcessed (in nsIMsgFolder aFolder, in unsigned long aNumberOfHdrsProcessed, in unsigned long aLeftToProcess); */
  NS_IMETHOD OnDiscoveryQProcessed(nsIMsgFolder *aFolder, uint32_t aNumberOfHdrsProcessed, uint32_t aLeftToProcess) = 0;

  /* void onAutoSyncInitiated (in nsIMsgFolder aFolder); */
  NS_IMETHOD OnAutoSyncInitiated(nsIMsgFolder *aFolder) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIAutoSyncMgrListener, NS_IAUTOSYNCMGRLISTENER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIAUTOSYNCMGRLISTENER \
  NS_IMETHOD OnFolderAddedIntoQ(int32_t aQType, nsIMsgFolder *aFolder); \
  NS_IMETHOD OnFolderRemovedFromQ(int32_t aQType, nsIMsgFolder *aFolder); \
  NS_IMETHOD OnDownloadStarted(nsIMsgFolder *aFolder, uint32_t aNumberOfMessages, uint32_t aTotalPending); \
  NS_IMETHOD OnDownloadCompleted(nsIMsgFolder *aFolder); \
  NS_IMETHOD OnDownloadError(nsIMsgFolder *aFolder); \
  NS_IMETHOD OnStateChanged(bool aRunning); \
  NS_IMETHOD OnDiscoveryQProcessed(nsIMsgFolder *aFolder, uint32_t aNumberOfHdrsProcessed, uint32_t aLeftToProcess); \
  NS_IMETHOD OnAutoSyncInitiated(nsIMsgFolder *aFolder); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIAUTOSYNCMGRLISTENER(_to) \
  NS_IMETHOD OnFolderAddedIntoQ(int32_t aQType, nsIMsgFolder *aFolder) { return _to OnFolderAddedIntoQ(aQType, aFolder); } \
  NS_IMETHOD OnFolderRemovedFromQ(int32_t aQType, nsIMsgFolder *aFolder) { return _to OnFolderRemovedFromQ(aQType, aFolder); } \
  NS_IMETHOD OnDownloadStarted(nsIMsgFolder *aFolder, uint32_t aNumberOfMessages, uint32_t aTotalPending) { return _to OnDownloadStarted(aFolder, aNumberOfMessages, aTotalPending); } \
  NS_IMETHOD OnDownloadCompleted(nsIMsgFolder *aFolder) { return _to OnDownloadCompleted(aFolder); } \
  NS_IMETHOD OnDownloadError(nsIMsgFolder *aFolder) { return _to OnDownloadError(aFolder); } \
  NS_IMETHOD OnStateChanged(bool aRunning) { return _to OnStateChanged(aRunning); } \
  NS_IMETHOD OnDiscoveryQProcessed(nsIMsgFolder *aFolder, uint32_t aNumberOfHdrsProcessed, uint32_t aLeftToProcess) { return _to OnDiscoveryQProcessed(aFolder, aNumberOfHdrsProcessed, aLeftToProcess); } \
  NS_IMETHOD OnAutoSyncInitiated(nsIMsgFolder *aFolder) { return _to OnAutoSyncInitiated(aFolder); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIAUTOSYNCMGRLISTENER(_to) \
  NS_IMETHOD OnFolderAddedIntoQ(int32_t aQType, nsIMsgFolder *aFolder) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnFolderAddedIntoQ(aQType, aFolder); } \
  NS_IMETHOD OnFolderRemovedFromQ(int32_t aQType, nsIMsgFolder *aFolder) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnFolderRemovedFromQ(aQType, aFolder); } \
  NS_IMETHOD OnDownloadStarted(nsIMsgFolder *aFolder, uint32_t aNumberOfMessages, uint32_t aTotalPending) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDownloadStarted(aFolder, aNumberOfMessages, aTotalPending); } \
  NS_IMETHOD OnDownloadCompleted(nsIMsgFolder *aFolder) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDownloadCompleted(aFolder); } \
  NS_IMETHOD OnDownloadError(nsIMsgFolder *aFolder) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDownloadError(aFolder); } \
  NS_IMETHOD OnStateChanged(bool aRunning) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStateChanged(aRunning); } \
  NS_IMETHOD OnDiscoveryQProcessed(nsIMsgFolder *aFolder, uint32_t aNumberOfHdrsProcessed, uint32_t aLeftToProcess) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDiscoveryQProcessed(aFolder, aNumberOfHdrsProcessed, aLeftToProcess); } \
  NS_IMETHOD OnAutoSyncInitiated(nsIMsgFolder *aFolder) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnAutoSyncInitiated(aFolder); } 

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

/* Header file */
class nsAutoSyncMgrListener : public nsIAutoSyncMgrListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIAUTOSYNCMGRLISTENER

  nsAutoSyncMgrListener();

private:
  ~nsAutoSyncMgrListener();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsAutoSyncMgrListener, nsIAutoSyncMgrListener)

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

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

/* void onFolderAddedIntoQ (in long aQType, in nsIMsgFolder aFolder); */
NS_IMETHODIMP nsAutoSyncMgrListener::OnFolderAddedIntoQ(int32_t aQType, nsIMsgFolder *aFolder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onFolderRemovedFromQ (in long aQType, in nsIMsgFolder aFolder); */
NS_IMETHODIMP nsAutoSyncMgrListener::OnFolderRemovedFromQ(int32_t aQType, nsIMsgFolder *aFolder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onDownloadStarted (in nsIMsgFolder aFolder, in unsigned long aNumberOfMessages, in unsigned long aTotalPending); */
NS_IMETHODIMP nsAutoSyncMgrListener::OnDownloadStarted(nsIMsgFolder *aFolder, uint32_t aNumberOfMessages, uint32_t aTotalPending)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onDownloadCompleted (in nsIMsgFolder aFolder); */
NS_IMETHODIMP nsAutoSyncMgrListener::OnDownloadCompleted(nsIMsgFolder *aFolder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onDownloadError (in nsIMsgFolder aFolder); */
NS_IMETHODIMP nsAutoSyncMgrListener::OnDownloadError(nsIMsgFolder *aFolder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onStateChanged (in boolean aRunning); */
NS_IMETHODIMP nsAutoSyncMgrListener::OnStateChanged(bool aRunning)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onDiscoveryQProcessed (in nsIMsgFolder aFolder, in unsigned long aNumberOfHdrsProcessed, in unsigned long aLeftToProcess); */
NS_IMETHODIMP nsAutoSyncMgrListener::OnDiscoveryQProcessed(nsIMsgFolder *aFolder, uint32_t aNumberOfHdrsProcessed, uint32_t aLeftToProcess)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onAutoSyncInitiated (in nsIMsgFolder aFolder); */
NS_IMETHODIMP nsAutoSyncMgrListener::OnAutoSyncInitiated(nsIMsgFolder *aFolder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIAutoSyncManager */
#define NS_IAUTOSYNCMANAGER_IID_STR "7fe0b48e-f5d8-4747-beb7-888c9cced3a5"

#define NS_IAUTOSYNCMANAGER_IID \
  {0x7fe0b48e, 0xf5d8, 0x4747, \
    { 0xbe, 0xb7, 0x88, 0x8c, 0x9c, 0xce, 0xd3, 0xa5 }}

class NS_NO_VTABLE nsIAutoSyncManager : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IAUTOSYNCMANAGER_IID)

  enum {
    dmParallel = 0,
    dmChained = 1
  };

  /* attribute unsigned long groupSize; */
  NS_IMETHOD GetGroupSize(uint32_t *aGroupSize) = 0;
  NS_IMETHOD SetGroupSize(uint32_t aGroupSize) = 0;

  /* attribute nsIAutoSyncMsgStrategy msgStrategy; */
  NS_IMETHOD GetMsgStrategy(nsIAutoSyncMsgStrategy * *aMsgStrategy) = 0;
  NS_IMETHOD SetMsgStrategy(nsIAutoSyncMsgStrategy *aMsgStrategy) = 0;

  /* attribute nsIAutoSyncFolderStrategy folderStrategy; */
  NS_IMETHOD GetFolderStrategy(nsIAutoSyncFolderStrategy * *aFolderStrategy) = 0;
  NS_IMETHOD SetFolderStrategy(nsIAutoSyncFolderStrategy *aFolderStrategy) = 0;

  /* void addListener (in nsIAutoSyncMgrListener aListener); */
  NS_IMETHOD AddListener(nsIAutoSyncMgrListener *aListener) = 0;

  /* void removeListener (in nsIAutoSyncMgrListener aListener); */
  NS_IMETHOD RemoveListener(nsIAutoSyncMgrListener *aListener) = 0;

  /* boolean doesMsgFitDownloadCriteria (in nsIMsgDBHdr aMsgHdr); */
  NS_IMETHOD DoesMsgFitDownloadCriteria(nsIMsgDBHdr *aMsgHdr, bool *_retval) = 0;

  /* void onDownloadQChanged (in nsIAutoSyncState aAutoSyncStateObj); */
  NS_IMETHOD OnDownloadQChanged(nsIAutoSyncState *aAutoSyncStateObj) = 0;

  /* void onDownloadStarted (in nsIAutoSyncState aAutoSyncStateObj, in nsresult aStartCode); */
  NS_IMETHOD OnDownloadStarted(nsIAutoSyncState *aAutoSyncStateObj, nsresult aStartCode) = 0;

  /* void onDownloadCompleted (in nsIAutoSyncState aAutoSyncStateObj, in nsresult aExitCode); */
  NS_IMETHOD OnDownloadCompleted(nsIAutoSyncState *aAutoSyncStateObj, nsresult aExitCode) = 0;

  /* readonly attribute unsigned long discoveryQLength; */
  NS_IMETHOD GetDiscoveryQLength(uint32_t *aDiscoveryQLength) = 0;

  /* readonly attribute unsigned long updateQLength; */
  NS_IMETHOD GetUpdateQLength(uint32_t *aUpdateQLength) = 0;

  /* readonly attribute unsigned long downloadQLength; */
  NS_IMETHOD GetDownloadQLength(uint32_t *aDownloadQLength) = 0;

  /* attribute long downloadModel; */
  NS_IMETHOD GetDownloadModel(int32_t *aDownloadModel) = 0;
  NS_IMETHOD SetDownloadModel(int32_t aDownloadModel) = 0;

  /* void onFolderHasPendingMsgs (in nsIAutoSyncState aAutoSyncState); */
  NS_IMETHOD OnFolderHasPendingMsgs(nsIAutoSyncState *aAutoSyncState) = 0;

  /* void pause (); */
  NS_IMETHOD Pause(void) = 0;

  /* void resume (); */
  NS_IMETHOD Resume(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIAutoSyncManager, NS_IAUTOSYNCMANAGER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIAUTOSYNCMANAGER \
  NS_IMETHOD GetGroupSize(uint32_t *aGroupSize); \
  NS_IMETHOD SetGroupSize(uint32_t aGroupSize); \
  NS_IMETHOD GetMsgStrategy(nsIAutoSyncMsgStrategy * *aMsgStrategy); \
  NS_IMETHOD SetMsgStrategy(nsIAutoSyncMsgStrategy *aMsgStrategy); \
  NS_IMETHOD GetFolderStrategy(nsIAutoSyncFolderStrategy * *aFolderStrategy); \
  NS_IMETHOD SetFolderStrategy(nsIAutoSyncFolderStrategy *aFolderStrategy); \
  NS_IMETHOD AddListener(nsIAutoSyncMgrListener *aListener); \
  NS_IMETHOD RemoveListener(nsIAutoSyncMgrListener *aListener); \
  NS_IMETHOD DoesMsgFitDownloadCriteria(nsIMsgDBHdr *aMsgHdr, bool *_retval); \
  NS_IMETHOD OnDownloadQChanged(nsIAutoSyncState *aAutoSyncStateObj); \
  NS_IMETHOD OnDownloadStarted(nsIAutoSyncState *aAutoSyncStateObj, nsresult aStartCode); \
  NS_IMETHOD OnDownloadCompleted(nsIAutoSyncState *aAutoSyncStateObj, nsresult aExitCode); \
  NS_IMETHOD GetDiscoveryQLength(uint32_t *aDiscoveryQLength); \
  NS_IMETHOD GetUpdateQLength(uint32_t *aUpdateQLength); \
  NS_IMETHOD GetDownloadQLength(uint32_t *aDownloadQLength); \
  NS_IMETHOD GetDownloadModel(int32_t *aDownloadModel); \
  NS_IMETHOD SetDownloadModel(int32_t aDownloadModel); \
  NS_IMETHOD OnFolderHasPendingMsgs(nsIAutoSyncState *aAutoSyncState); \
  NS_IMETHOD Pause(void); \
  NS_IMETHOD Resume(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIAUTOSYNCMANAGER(_to) \
  NS_IMETHOD GetGroupSize(uint32_t *aGroupSize) { return _to GetGroupSize(aGroupSize); } \
  NS_IMETHOD SetGroupSize(uint32_t aGroupSize) { return _to SetGroupSize(aGroupSize); } \
  NS_IMETHOD GetMsgStrategy(nsIAutoSyncMsgStrategy * *aMsgStrategy) { return _to GetMsgStrategy(aMsgStrategy); } \
  NS_IMETHOD SetMsgStrategy(nsIAutoSyncMsgStrategy *aMsgStrategy) { return _to SetMsgStrategy(aMsgStrategy); } \
  NS_IMETHOD GetFolderStrategy(nsIAutoSyncFolderStrategy * *aFolderStrategy) { return _to GetFolderStrategy(aFolderStrategy); } \
  NS_IMETHOD SetFolderStrategy(nsIAutoSyncFolderStrategy *aFolderStrategy) { return _to SetFolderStrategy(aFolderStrategy); } \
  NS_IMETHOD AddListener(nsIAutoSyncMgrListener *aListener) { return _to AddListener(aListener); } \
  NS_IMETHOD RemoveListener(nsIAutoSyncMgrListener *aListener) { return _to RemoveListener(aListener); } \
  NS_IMETHOD DoesMsgFitDownloadCriteria(nsIMsgDBHdr *aMsgHdr, bool *_retval) { return _to DoesMsgFitDownloadCriteria(aMsgHdr, _retval); } \
  NS_IMETHOD OnDownloadQChanged(nsIAutoSyncState *aAutoSyncStateObj) { return _to OnDownloadQChanged(aAutoSyncStateObj); } \
  NS_IMETHOD OnDownloadStarted(nsIAutoSyncState *aAutoSyncStateObj, nsresult aStartCode) { return _to OnDownloadStarted(aAutoSyncStateObj, aStartCode); } \
  NS_IMETHOD OnDownloadCompleted(nsIAutoSyncState *aAutoSyncStateObj, nsresult aExitCode) { return _to OnDownloadCompleted(aAutoSyncStateObj, aExitCode); } \
  NS_IMETHOD GetDiscoveryQLength(uint32_t *aDiscoveryQLength) { return _to GetDiscoveryQLength(aDiscoveryQLength); } \
  NS_IMETHOD GetUpdateQLength(uint32_t *aUpdateQLength) { return _to GetUpdateQLength(aUpdateQLength); } \
  NS_IMETHOD GetDownloadQLength(uint32_t *aDownloadQLength) { return _to GetDownloadQLength(aDownloadQLength); } \
  NS_IMETHOD GetDownloadModel(int32_t *aDownloadModel) { return _to GetDownloadModel(aDownloadModel); } \
  NS_IMETHOD SetDownloadModel(int32_t aDownloadModel) { return _to SetDownloadModel(aDownloadModel); } \
  NS_IMETHOD OnFolderHasPendingMsgs(nsIAutoSyncState *aAutoSyncState) { return _to OnFolderHasPendingMsgs(aAutoSyncState); } \
  NS_IMETHOD Pause(void) { return _to Pause(); } \
  NS_IMETHOD Resume(void) { return _to Resume(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIAUTOSYNCMANAGER(_to) \
  NS_IMETHOD GetGroupSize(uint32_t *aGroupSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGroupSize(aGroupSize); } \
  NS_IMETHOD SetGroupSize(uint32_t aGroupSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetGroupSize(aGroupSize); } \
  NS_IMETHOD GetMsgStrategy(nsIAutoSyncMsgStrategy * *aMsgStrategy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgStrategy(aMsgStrategy); } \
  NS_IMETHOD SetMsgStrategy(nsIAutoSyncMsgStrategy *aMsgStrategy) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMsgStrategy(aMsgStrategy); } \
  NS_IMETHOD GetFolderStrategy(nsIAutoSyncFolderStrategy * *aFolderStrategy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFolderStrategy(aFolderStrategy); } \
  NS_IMETHOD SetFolderStrategy(nsIAutoSyncFolderStrategy *aFolderStrategy) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFolderStrategy(aFolderStrategy); } \
  NS_IMETHOD AddListener(nsIAutoSyncMgrListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddListener(aListener); } \
  NS_IMETHOD RemoveListener(nsIAutoSyncMgrListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveListener(aListener); } \
  NS_IMETHOD DoesMsgFitDownloadCriteria(nsIMsgDBHdr *aMsgHdr, bool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoesMsgFitDownloadCriteria(aMsgHdr, _retval); } \
  NS_IMETHOD OnDownloadQChanged(nsIAutoSyncState *aAutoSyncStateObj) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDownloadQChanged(aAutoSyncStateObj); } \
  NS_IMETHOD OnDownloadStarted(nsIAutoSyncState *aAutoSyncStateObj, nsresult aStartCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDownloadStarted(aAutoSyncStateObj, aStartCode); } \
  NS_IMETHOD OnDownloadCompleted(nsIAutoSyncState *aAutoSyncStateObj, nsresult aExitCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDownloadCompleted(aAutoSyncStateObj, aExitCode); } \
  NS_IMETHOD GetDiscoveryQLength(uint32_t *aDiscoveryQLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDiscoveryQLength(aDiscoveryQLength); } \
  NS_IMETHOD GetUpdateQLength(uint32_t *aUpdateQLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUpdateQLength(aUpdateQLength); } \
  NS_IMETHOD GetDownloadQLength(uint32_t *aDownloadQLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDownloadQLength(aDownloadQLength); } \
  NS_IMETHOD GetDownloadModel(int32_t *aDownloadModel) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDownloadModel(aDownloadModel); } \
  NS_IMETHOD SetDownloadModel(int32_t aDownloadModel) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDownloadModel(aDownloadModel); } \
  NS_IMETHOD OnFolderHasPendingMsgs(nsIAutoSyncState *aAutoSyncState) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnFolderHasPendingMsgs(aAutoSyncState); } \
  NS_IMETHOD Pause(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Pause(); } \
  NS_IMETHOD Resume(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Resume(); } 

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

/* Header file */
class nsAutoSyncManager : public nsIAutoSyncManager
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIAUTOSYNCMANAGER

  nsAutoSyncManager();

private:
  ~nsAutoSyncManager();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsAutoSyncManager, nsIAutoSyncManager)

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

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

/* attribute unsigned long groupSize; */
NS_IMETHODIMP nsAutoSyncManager::GetGroupSize(uint32_t *aGroupSize)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsAutoSyncManager::SetGroupSize(uint32_t aGroupSize)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIAutoSyncMsgStrategy msgStrategy; */
NS_IMETHODIMP nsAutoSyncManager::GetMsgStrategy(nsIAutoSyncMsgStrategy * *aMsgStrategy)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsAutoSyncManager::SetMsgStrategy(nsIAutoSyncMsgStrategy *aMsgStrategy)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIAutoSyncFolderStrategy folderStrategy; */
NS_IMETHODIMP nsAutoSyncManager::GetFolderStrategy(nsIAutoSyncFolderStrategy * *aFolderStrategy)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsAutoSyncManager::SetFolderStrategy(nsIAutoSyncFolderStrategy *aFolderStrategy)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addListener (in nsIAutoSyncMgrListener aListener); */
NS_IMETHODIMP nsAutoSyncManager::AddListener(nsIAutoSyncMgrListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeListener (in nsIAutoSyncMgrListener aListener); */
NS_IMETHODIMP nsAutoSyncManager::RemoveListener(nsIAutoSyncMgrListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean doesMsgFitDownloadCriteria (in nsIMsgDBHdr aMsgHdr); */
NS_IMETHODIMP nsAutoSyncManager::DoesMsgFitDownloadCriteria(nsIMsgDBHdr *aMsgHdr, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onDownloadQChanged (in nsIAutoSyncState aAutoSyncStateObj); */
NS_IMETHODIMP nsAutoSyncManager::OnDownloadQChanged(nsIAutoSyncState *aAutoSyncStateObj)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onDownloadStarted (in nsIAutoSyncState aAutoSyncStateObj, in nsresult aStartCode); */
NS_IMETHODIMP nsAutoSyncManager::OnDownloadStarted(nsIAutoSyncState *aAutoSyncStateObj, nsresult aStartCode)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onDownloadCompleted (in nsIAutoSyncState aAutoSyncStateObj, in nsresult aExitCode); */
NS_IMETHODIMP nsAutoSyncManager::OnDownloadCompleted(nsIAutoSyncState *aAutoSyncStateObj, nsresult aExitCode)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long discoveryQLength; */
NS_IMETHODIMP nsAutoSyncManager::GetDiscoveryQLength(uint32_t *aDiscoveryQLength)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long updateQLength; */
NS_IMETHODIMP nsAutoSyncManager::GetUpdateQLength(uint32_t *aUpdateQLength)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long downloadQLength; */
NS_IMETHODIMP nsAutoSyncManager::GetDownloadQLength(uint32_t *aDownloadQLength)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute long downloadModel; */
NS_IMETHODIMP nsAutoSyncManager::GetDownloadModel(int32_t *aDownloadModel)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsAutoSyncManager::SetDownloadModel(int32_t aDownloadModel)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onFolderHasPendingMsgs (in nsIAutoSyncState aAutoSyncState); */
NS_IMETHODIMP nsAutoSyncManager::OnFolderHasPendingMsgs(nsIAutoSyncState *aAutoSyncState)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void pause (); */
NS_IMETHODIMP nsAutoSyncManager::Pause()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void resume (); */
NS_IMETHODIMP nsAutoSyncManager::Resume()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define NS_AUTOSYNCMANAGER_CID  \
{ /* C358C568-47B2-42b2-8146-3C0F8D1FAD6E */  \
  0xc358c568, 0x47b2, 0x42b2,                 \
  { 0x81, 0x46, 0x3c, 0xf, 0x8d, 0x1f, 0xad, 0x6e }}
#define NS_AUTOSYNCMANAGER_CLASSNAME \
  "Auto-Sync Manager"
#define NS_AUTOSYNCMANAGER_CONTRACTID \
  "@mozilla.org/imap/autosyncmgr;1"

#endif /* __gen_nsIAutoSyncManager_h__ */
