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

#ifndef __gen_nsIImapProtocol_h__
#define __gen_nsIImapProtocol_h__


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

#ifndef __gen_nsIStreamListener_h__
#include "nsIStreamListener.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIUrlListener; /* forward declaration */

class nsIURI; /* forward declaration */

class nsIImapUrl; /* forward declaration */

class nsIEventQueue; /* forward declaration */

class nsIImapProtocol; /* forward declaration */

class nsISupportsArray; /* forward declaration */

class nsIMsgFolder; /* forward declaration */

class nsIImapHostSessionList; /* forward declaration */

class nsIMsgWindow; /* forward declaration */


/* starting interface:    nsIImapProtocol */
#define NS_IIMAPPROTOCOL_IID_STR "132231ca-c796-11d3-b9f5-00108335942a"

#define NS_IIMAPPROTOCOL_IID \
  {0x132231ca, 0xc796, 0x11d3, \
    { 0xb9, 0xf5, 0x00, 0x10, 0x83, 0x35, 0x94, 0x2a }}

class NS_NO_VTABLE nsIImapProtocol : public nsIStreamListener {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IIMAPPROTOCOL_IID)

  /* void LoadUrl (in nsIURI aUrl, in nsISupports aConsumer); */
  NS_IMETHOD LoadUrl(nsIURI *aUrl, nsISupports *aConsumer) = 0;

  /* void IsBusy (out boolean aIsConnectionBusy, out boolean isInboxConnection); */
  NS_IMETHOD IsBusy(PRBool *aIsConnectionBusy, PRBool *isInboxConnection) = 0;

  /* void CanHandleUrl (in nsIImapUrl aImapUrl, out boolean aCanRunUrl, out boolean hasToWait); */
  NS_IMETHOD CanHandleUrl(nsIImapUrl *aImapUrl, PRBool *aCanRunUrl, PRBool *hasToWait) = 0;

  /* void Initialize (in nsIImapHostSessionList aHostSessionList, in nsIEventQueue aSinkEventQueue); */
  NS_IMETHOD Initialize(nsIImapHostSessionList *aHostSessionList, nsIEventQueue *aSinkEventQueue) = 0;

  /* void GetThreadEventQueue (out nsIEventQueue aEventQueue); */
  NS_IMETHOD GetThreadEventQueue(nsIEventQueue **aEventQueue) = 0;

  /* void NotifyFEEventCompletion (); */
  NS_IMETHOD NotifyFEEventCompletion(void) = 0;

  /* void NotifyHdrsToDownload (out unsigned long keys, in unsigned long keyCount); */
  NS_IMETHOD NotifyHdrsToDownload(PRUint32 *keys, PRUint32 keyCount) = 0;

  /* void NotifyBodysToDownload (out unsigned long keys, in unsigned long count); */
  NS_IMETHOD NotifyBodysToDownload(PRUint32 *keys, PRUint32 count) = 0;

  /* void GetFlagsForUID (in unsigned long uid, out boolean foundIt, out unsigned short flags, out string customFlags); */
  NS_IMETHOD GetFlagsForUID(PRUint32 uid, PRBool *foundIt, PRUint16 *flags, char **customFlags) = 0;

  /* void GetSupportedUserFlags (out unsigned short flags); */
  NS_IMETHOD GetSupportedUserFlags(PRUint16 *flags) = 0;

  /* void GetRunningImapURL (out nsIImapUrl aImapUrl); */
  NS_IMETHOD GetRunningImapURL(nsIImapUrl **aImapUrl) = 0;

  /* void GetRunningUrl (out nsIURI aUrl); */
  NS_IMETHOD GetRunningUrl(nsIURI **aUrl) = 0;

  /* void TellThreadToDie (in boolean isSafeToDie); */
  NS_IMETHOD TellThreadToDie(PRBool isSafeToDie) = 0;

  /* void GetLastActiveTimeStamp (out PRTime aTimeStamp); */
  NS_IMETHOD GetLastActiveTimeStamp(PRTime *aTimeStamp) = 0;

  /* void pseudoInterruptMsgLoad (in nsIMsgFolder imapFolder, in nsIMsgWindow aMsgWindow, out boolean interrupted); */
  NS_IMETHOD PseudoInterruptMsgLoad(nsIMsgFolder *imapFolder, nsIMsgWindow *aMsgWindow, PRBool *interrupted) = 0;

  /* void GetSelectedMailboxName (out string folderName); */
  NS_IMETHOD GetSelectedMailboxName(char **folderName) = 0;

  /* void ResetToAuthenticatedState (); */
  NS_IMETHOD ResetToAuthenticatedState(void) = 0;

  /* void OverrideConnectionInfo (in wstring pHost, in unsigned short pPort, in string pCookieData); */
  NS_IMETHOD OverrideConnectionInfo(const PRUnichar *pHost, PRUint16 pPort, const char *pCookieData) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIIMAPPROTOCOL \
  NS_IMETHOD LoadUrl(nsIURI *aUrl, nsISupports *aConsumer); \
  NS_IMETHOD IsBusy(PRBool *aIsConnectionBusy, PRBool *isInboxConnection); \
  NS_IMETHOD CanHandleUrl(nsIImapUrl *aImapUrl, PRBool *aCanRunUrl, PRBool *hasToWait); \
  NS_IMETHOD Initialize(nsIImapHostSessionList *aHostSessionList, nsIEventQueue *aSinkEventQueue); \
  NS_IMETHOD GetThreadEventQueue(nsIEventQueue **aEventQueue); \
  NS_IMETHOD NotifyFEEventCompletion(void); \
  NS_IMETHOD NotifyHdrsToDownload(PRUint32 *keys, PRUint32 keyCount); \
  NS_IMETHOD NotifyBodysToDownload(PRUint32 *keys, PRUint32 count); \
  NS_IMETHOD GetFlagsForUID(PRUint32 uid, PRBool *foundIt, PRUint16 *flags, char **customFlags); \
  NS_IMETHOD GetSupportedUserFlags(PRUint16 *flags); \
  NS_IMETHOD GetRunningImapURL(nsIImapUrl **aImapUrl); \
  NS_IMETHOD GetRunningUrl(nsIURI **aUrl); \
  NS_IMETHOD TellThreadToDie(PRBool isSafeToDie); \
  NS_IMETHOD GetLastActiveTimeStamp(PRTime *aTimeStamp); \
  NS_IMETHOD PseudoInterruptMsgLoad(nsIMsgFolder *imapFolder, nsIMsgWindow *aMsgWindow, PRBool *interrupted); \
  NS_IMETHOD GetSelectedMailboxName(char **folderName); \
  NS_IMETHOD ResetToAuthenticatedState(void); \
  NS_IMETHOD OverrideConnectionInfo(const PRUnichar *pHost, PRUint16 pPort, const char *pCookieData); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIIMAPPROTOCOL(_to) \
  NS_IMETHOD LoadUrl(nsIURI *aUrl, nsISupports *aConsumer) { return _to LoadUrl(aUrl, aConsumer); } \
  NS_IMETHOD IsBusy(PRBool *aIsConnectionBusy, PRBool *isInboxConnection) { return _to IsBusy(aIsConnectionBusy, isInboxConnection); } \
  NS_IMETHOD CanHandleUrl(nsIImapUrl *aImapUrl, PRBool *aCanRunUrl, PRBool *hasToWait) { return _to CanHandleUrl(aImapUrl, aCanRunUrl, hasToWait); } \
  NS_IMETHOD Initialize(nsIImapHostSessionList *aHostSessionList, nsIEventQueue *aSinkEventQueue) { return _to Initialize(aHostSessionList, aSinkEventQueue); } \
  NS_IMETHOD GetThreadEventQueue(nsIEventQueue **aEventQueue) { return _to GetThreadEventQueue(aEventQueue); } \
  NS_IMETHOD NotifyFEEventCompletion(void) { return _to NotifyFEEventCompletion(); } \
  NS_IMETHOD NotifyHdrsToDownload(PRUint32 *keys, PRUint32 keyCount) { return _to NotifyHdrsToDownload(keys, keyCount); } \
  NS_IMETHOD NotifyBodysToDownload(PRUint32 *keys, PRUint32 count) { return _to NotifyBodysToDownload(keys, count); } \
  NS_IMETHOD GetFlagsForUID(PRUint32 uid, PRBool *foundIt, PRUint16 *flags, char **customFlags) { return _to GetFlagsForUID(uid, foundIt, flags, customFlags); } \
  NS_IMETHOD GetSupportedUserFlags(PRUint16 *flags) { return _to GetSupportedUserFlags(flags); } \
  NS_IMETHOD GetRunningImapURL(nsIImapUrl **aImapUrl) { return _to GetRunningImapURL(aImapUrl); } \
  NS_IMETHOD GetRunningUrl(nsIURI **aUrl) { return _to GetRunningUrl(aUrl); } \
  NS_IMETHOD TellThreadToDie(PRBool isSafeToDie) { return _to TellThreadToDie(isSafeToDie); } \
  NS_IMETHOD GetLastActiveTimeStamp(PRTime *aTimeStamp) { return _to GetLastActiveTimeStamp(aTimeStamp); } \
  NS_IMETHOD PseudoInterruptMsgLoad(nsIMsgFolder *imapFolder, nsIMsgWindow *aMsgWindow, PRBool *interrupted) { return _to PseudoInterruptMsgLoad(imapFolder, aMsgWindow, interrupted); } \
  NS_IMETHOD GetSelectedMailboxName(char **folderName) { return _to GetSelectedMailboxName(folderName); } \
  NS_IMETHOD ResetToAuthenticatedState(void) { return _to ResetToAuthenticatedState(); } \
  NS_IMETHOD OverrideConnectionInfo(const PRUnichar *pHost, PRUint16 pPort, const char *pCookieData) { return _to OverrideConnectionInfo(pHost, pPort, pCookieData); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIIMAPPROTOCOL(_to) \
  NS_IMETHOD LoadUrl(nsIURI *aUrl, nsISupports *aConsumer) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadUrl(aUrl, aConsumer); } \
  NS_IMETHOD IsBusy(PRBool *aIsConnectionBusy, PRBool *isInboxConnection) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsBusy(aIsConnectionBusy, isInboxConnection); } \
  NS_IMETHOD CanHandleUrl(nsIImapUrl *aImapUrl, PRBool *aCanRunUrl, PRBool *hasToWait) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanHandleUrl(aImapUrl, aCanRunUrl, hasToWait); } \
  NS_IMETHOD Initialize(nsIImapHostSessionList *aHostSessionList, nsIEventQueue *aSinkEventQueue) { return !_to ? NS_ERROR_NULL_POINTER : _to->Initialize(aHostSessionList, aSinkEventQueue); } \
  NS_IMETHOD GetThreadEventQueue(nsIEventQueue **aEventQueue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetThreadEventQueue(aEventQueue); } \
  NS_IMETHOD NotifyFEEventCompletion(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyFEEventCompletion(); } \
  NS_IMETHOD NotifyHdrsToDownload(PRUint32 *keys, PRUint32 keyCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyHdrsToDownload(keys, keyCount); } \
  NS_IMETHOD NotifyBodysToDownload(PRUint32 *keys, PRUint32 count) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyBodysToDownload(keys, count); } \
  NS_IMETHOD GetFlagsForUID(PRUint32 uid, PRBool *foundIt, PRUint16 *flags, char **customFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlagsForUID(uid, foundIt, flags, customFlags); } \
  NS_IMETHOD GetSupportedUserFlags(PRUint16 *flags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSupportedUserFlags(flags); } \
  NS_IMETHOD GetRunningImapURL(nsIImapUrl **aImapUrl) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRunningImapURL(aImapUrl); } \
  NS_IMETHOD GetRunningUrl(nsIURI **aUrl) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRunningUrl(aUrl); } \
  NS_IMETHOD TellThreadToDie(PRBool isSafeToDie) { return !_to ? NS_ERROR_NULL_POINTER : _to->TellThreadToDie(isSafeToDie); } \
  NS_IMETHOD GetLastActiveTimeStamp(PRTime *aTimeStamp) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastActiveTimeStamp(aTimeStamp); } \
  NS_IMETHOD PseudoInterruptMsgLoad(nsIMsgFolder *imapFolder, nsIMsgWindow *aMsgWindow, PRBool *interrupted) { return !_to ? NS_ERROR_NULL_POINTER : _to->PseudoInterruptMsgLoad(imapFolder, aMsgWindow, interrupted); } \
  NS_IMETHOD GetSelectedMailboxName(char **folderName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelectedMailboxName(folderName); } \
  NS_IMETHOD ResetToAuthenticatedState(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetToAuthenticatedState(); } \
  NS_IMETHOD OverrideConnectionInfo(const PRUnichar *pHost, PRUint16 pPort, const char *pCookieData) { return !_to ? NS_ERROR_NULL_POINTER : _to->OverrideConnectionInfo(pHost, pPort, pCookieData); } 

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

/* Header file */
class nsImapProtocol : public nsIImapProtocol
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIIMAPPROTOCOL

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsImapProtocol, nsIImapProtocol)

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

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

/* void LoadUrl (in nsIURI aUrl, in nsISupports aConsumer); */
NS_IMETHODIMP nsImapProtocol::LoadUrl(nsIURI *aUrl, nsISupports *aConsumer)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void IsBusy (out boolean aIsConnectionBusy, out boolean isInboxConnection); */
NS_IMETHODIMP nsImapProtocol::IsBusy(PRBool *aIsConnectionBusy, PRBool *isInboxConnection)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void CanHandleUrl (in nsIImapUrl aImapUrl, out boolean aCanRunUrl, out boolean hasToWait); */
NS_IMETHODIMP nsImapProtocol::CanHandleUrl(nsIImapUrl *aImapUrl, PRBool *aCanRunUrl, PRBool *hasToWait)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Initialize (in nsIImapHostSessionList aHostSessionList, in nsIEventQueue aSinkEventQueue); */
NS_IMETHODIMP nsImapProtocol::Initialize(nsIImapHostSessionList *aHostSessionList, nsIEventQueue *aSinkEventQueue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void GetThreadEventQueue (out nsIEventQueue aEventQueue); */
NS_IMETHODIMP nsImapProtocol::GetThreadEventQueue(nsIEventQueue **aEventQueue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void NotifyFEEventCompletion (); */
NS_IMETHODIMP nsImapProtocol::NotifyFEEventCompletion()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void NotifyHdrsToDownload (out unsigned long keys, in unsigned long keyCount); */
NS_IMETHODIMP nsImapProtocol::NotifyHdrsToDownload(PRUint32 *keys, PRUint32 keyCount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void NotifyBodysToDownload (out unsigned long keys, in unsigned long count); */
NS_IMETHODIMP nsImapProtocol::NotifyBodysToDownload(PRUint32 *keys, PRUint32 count)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void GetFlagsForUID (in unsigned long uid, out boolean foundIt, out unsigned short flags, out string customFlags); */
NS_IMETHODIMP nsImapProtocol::GetFlagsForUID(PRUint32 uid, PRBool *foundIt, PRUint16 *flags, char **customFlags)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void GetSupportedUserFlags (out unsigned short flags); */
NS_IMETHODIMP nsImapProtocol::GetSupportedUserFlags(PRUint16 *flags)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void GetRunningImapURL (out nsIImapUrl aImapUrl); */
NS_IMETHODIMP nsImapProtocol::GetRunningImapURL(nsIImapUrl **aImapUrl)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void GetRunningUrl (out nsIURI aUrl); */
NS_IMETHODIMP nsImapProtocol::GetRunningUrl(nsIURI **aUrl)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void TellThreadToDie (in boolean isSafeToDie); */
NS_IMETHODIMP nsImapProtocol::TellThreadToDie(PRBool isSafeToDie)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void GetLastActiveTimeStamp (out PRTime aTimeStamp); */
NS_IMETHODIMP nsImapProtocol::GetLastActiveTimeStamp(PRTime *aTimeStamp)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void pseudoInterruptMsgLoad (in nsIMsgFolder imapFolder, in nsIMsgWindow aMsgWindow, out boolean interrupted); */
NS_IMETHODIMP nsImapProtocol::PseudoInterruptMsgLoad(nsIMsgFolder *imapFolder, nsIMsgWindow *aMsgWindow, PRBool *interrupted)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void GetSelectedMailboxName (out string folderName); */
NS_IMETHODIMP nsImapProtocol::GetSelectedMailboxName(char **folderName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void ResetToAuthenticatedState (); */
NS_IMETHODIMP nsImapProtocol::ResetToAuthenticatedState()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void OverrideConnectionInfo (in wstring pHost, in unsigned short pPort, in string pCookieData); */
NS_IMETHODIMP nsImapProtocol::OverrideConnectionInfo(const PRUnichar *pHost, PRUint16 pPort, const char *pCookieData)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIImapProtocol_h__ */
