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

#ifndef __gen_nsIMsgDatabase_h__
#define __gen_nsIMsgDatabase_h__

#include "nsISupports.h"
#include "MailNewsTypes2.h"
#include "nsIFileSpec.h"
#include "nsIDBChangeAnnouncer.h"

#include "nsMsgKeyArray.h"
class nsIDBChangeListener; /* forward declaration */

class nsIMsgDBHdr; /* forward declaration */

class nsISimpleEnumerator; /* forward declaration */

class nsIMsgThread; /* forward declaration */

class nsIDBFolderInfo; /* forward declaration */

typedef PRInt32 nsMsgDBCommit;


/* starting interface:    nsMsgDBCommitType */
#define NS_MSGDBCOMMITTYPE_IID_STR "aa4d45d0-3956-11d3-8d76-00805f8a6617"

#define NS_MSGDBCOMMITTYPE_IID \
  {0xaa4d45d0, 0x3956, 0x11d3, \
    { 0x8d, 0x76, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0x17 }}

class NS_NO_VTABLE nsMsgDBCommitType {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_MSGDBCOMMITTYPE_IID)

  enum { kSmallCommit = 0 };

  enum { kLargeCommit = 1 };

  enum { kSessionCommit = 2 };

  enum { kCompressCommit = 3 };

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSMSGDBCOMMITTYPE \

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSMSGDBCOMMITTYPE(_to) \

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

/* Header file */
class _MYCLASS_ : public nsMsgDBCommitType
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSMSGDBCOMMITTYPE

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, nsMsgDBCommitType)

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

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

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


/* starting interface:    nsIMsgDatabase */
#define NS_IMSGDATABASE_IID_STR "9188bc83-f92e-11d2-81ef-0060083a0bcf"

#define NS_IMSGDATABASE_IID \
  {0x9188bc83, 0xf92e, 0x11d2, \
    { 0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf }}

class NS_NO_VTABLE nsIMsgDatabase : public nsIDBChangeAnnouncer {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMSGDATABASE_IID)

  /* nsIMsgDatabase Open (in nsIFileSpec folderName, in boolean create, in boolean upgrading); */
  NS_IMETHOD Open(nsIFileSpec *folderName, PRBool create, PRBool upgrading, nsIMsgDatabase **_retval) = 0;

  /* void Close (in boolean forceCommit); */
  NS_IMETHOD Close(PRBool forceCommit) = 0;

  /* void Commit (in nsMsgDBCommit commitType); */
  NS_IMETHOD Commit(nsMsgDBCommit commitType) = 0;

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

  /* readonly attribute nsIDBFolderInfo DBFolderInfo; */
  NS_IMETHOD GetDBFolderInfo(nsIDBFolderInfo * *aDBFolderInfo) = 0;

  /* nsIMsgDBHdr GetMsgHdrForKey (in nsMsgKey key); */
  NS_IMETHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr **_retval) = 0;

  /* boolean ContainsKey (in nsMsgKey key); */
  NS_IMETHOD ContainsKey(nsMsgKey key, PRBool *_retval) = 0;

  /* nsIMsgDBHdr CreateNewHdr (in nsMsgKey key); */
  NS_IMETHOD CreateNewHdr(nsMsgKey key, nsIMsgDBHdr **_retval) = 0;

  /* void AddNewHdrToDB (in nsIMsgDBHdr newHdr, in boolean notify); */
  NS_IMETHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, PRBool notify) = 0;

  /* nsIMsgDBHdr CopyHdrFromExistingHdr (in nsMsgKey key, in nsIMsgDBHdr existingHdr); */
  NS_IMETHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, nsIMsgDBHdr **_retval) = 0;

  /* [noscript] void ListAllKeys (in nsMsgKeyArrayRef outputKeys); */
  NS_IMETHOD ListAllKeys(nsMsgKeyArray & outputKeys) = 0;

  /* nsISimpleEnumerator EnumerateMessages (); */
  NS_IMETHOD EnumerateMessages(nsISimpleEnumerator **_retval) = 0;

  /* nsISimpleEnumerator EnumerateThreads (); */
  NS_IMETHOD EnumerateThreads(nsISimpleEnumerator **_retval) = 0;

  /* nsIMsgThread GetThreadContainingMsgHdr (in nsIMsgDBHdr msgHdr); */
  NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **_retval) = 0;

  /* void MarkHdrRead (in nsIMsgDBHdr msgHdr, in boolean bRead, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, PRBool bRead, nsIDBChangeListener *instigator) = 0;

  /* void MarkHdrReplied (in nsIMsgDBHdr msgHdr, in boolean bReplied, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, PRBool bReplied, nsIDBChangeListener *instigator) = 0;

  /* void MarkHdrMarked (in nsIMsgDBHdr msgHdr, in boolean mark, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, PRBool mark, nsIDBChangeListener *instigator) = 0;

  /* void MarkMDNNeeded (in nsMsgKey key, in boolean bNeeded, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkMDNNeeded(nsMsgKey key, PRBool bNeeded, nsIDBChangeListener *instigator) = 0;

  /* boolean IsMDNNeeded (in nsMsgKey key); */
  NS_IMETHOD IsMDNNeeded(nsMsgKey key, PRBool *_retval) = 0;

  /* void MarkMDNSent (in nsMsgKey key, in boolean bNeeded, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkMDNSent(nsMsgKey key, PRBool bNeeded, nsIDBChangeListener *instigator) = 0;

  /* boolean IsMDNSent (in nsMsgKey key); */
  NS_IMETHOD IsMDNSent(nsMsgKey key, PRBool *_retval) = 0;

  /* void MarkRead (in nsMsgKey key, in boolean bRead, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkRead(nsMsgKey key, PRBool bRead, nsIDBChangeListener *instigator) = 0;

  /* void MarkReplied (in nsMsgKey key, in boolean bReplied, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkReplied(nsMsgKey key, PRBool bReplied, nsIDBChangeListener *instigator) = 0;

  /* void MarkForwarded (in nsMsgKey key, in boolean bForwarded, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkForwarded(nsMsgKey key, PRBool bForwarded, nsIDBChangeListener *instigator) = 0;

  /* void MarkHasAttachments (in nsMsgKey key, in boolean bHasAttachments, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkHasAttachments(nsMsgKey key, PRBool bHasAttachments, nsIDBChangeListener *instigator) = 0;

  /* [noscript] void MarkThreadRead (in nsIMsgThread thread, in nsIDBChangeListener instigator, in nsMsgKeyArrayPtr thoseMarked); */
  NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, nsMsgKeyArray * thoseMarked) = 0;

  /* void MarkThreadIgnored (in nsIMsgThread thread, in nsMsgKey threadKey, in boolean bIgnored, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, PRBool bIgnored, nsIDBChangeListener *instigator) = 0;

  /* void MarkThreadWatched (in nsIMsgThread thread, in nsMsgKey threadKey, in boolean bWatched, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, PRBool bWatched, nsIDBChangeListener *instigator) = 0;

  /* boolean IsRead (in nsMsgKey key); */
  NS_IMETHOD IsRead(nsMsgKey key, PRBool *_retval) = 0;

  /* boolean IsIgnored (in nsMsgKey key); */
  NS_IMETHOD IsIgnored(nsMsgKey key, PRBool *_retval) = 0;

  /* boolean IsMarked (in nsMsgKey key); */
  NS_IMETHOD IsMarked(nsMsgKey key, PRBool *_retval) = 0;

  /* boolean HasAttachments (in nsMsgKey key); */
  NS_IMETHOD HasAttachments(nsMsgKey key, PRBool *_retval) = 0;

  /* [noscript] void MarkAllRead (in nsMsgKeyArrayPtr thoseMarked); */
  NS_IMETHOD MarkAllRead(nsMsgKeyArray * thoseMarked) = 0;

  /* [noscript] void MarkReadByDate (in PRTime startDate, in PRTime endDate, in nsMsgKeyArrayPtr markedIds); */
  NS_IMETHOD MarkReadByDate(PRTime startDate, PRTime endDate, nsMsgKeyArray * markedIds) = 0;

  /* [noscript] void DeleteMessages (in nsMsgKeyArrayPtr nsMsgKeys, in nsIDBChangeListener instigator); */
  NS_IMETHOD DeleteMessages(nsMsgKeyArray * nsMsgKeys, nsIDBChangeListener *instigator) = 0;

  /* void DeleteMessage (in nsMsgKey key, in nsIDBChangeListener instigator, in boolean commit); */
  NS_IMETHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, PRBool commit) = 0;

  /* void DeleteHeader (in nsIMsgDBHdr msgHdr, in nsIDBChangeListener instigator, in boolean commit, in boolean notify); */
  NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, PRBool commit, PRBool notify) = 0;

  /* void UndoDelete (in nsIMsgDBHdr msgHdr); */
  NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr) = 0;

  /* void MarkLater (in nsMsgKey key, in PRTime until); */
  NS_IMETHOD MarkLater(nsMsgKey key, PRTime until) = 0;

  /* void MarkMarked (in nsMsgKey key, in boolean mark, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkMarked(nsMsgKey key, PRBool mark, nsIDBChangeListener *instigator) = 0;

  /* void MarkOffline (in nsMsgKey key, in boolean offline, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkOffline(nsMsgKey key, PRBool offline, nsIDBChangeListener *instigator) = 0;

  /* [noscript] void AllMsgKeysImapDeleted (in nsMsgKeyArrayPtr keys, out boolean allDeleted); */
  NS_IMETHOD AllMsgKeysImapDeleted(nsMsgKeyArray * keys, PRBool *allDeleted) = 0;

  /* void MarkImapDeleted (in nsMsgKey key, in boolean deleted, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkImapDeleted(nsMsgKey key, PRBool deleted, nsIDBChangeListener *instigator) = 0;

  /* readonly attribute nsMsgKey FirstNew; */
  NS_IMETHOD GetFirstNew(nsMsgKey *aFirstNew) = 0;

  /* boolean HasNew (); */
  NS_IMETHOD HasNew(PRBool *_retval) = 0;

  /* void ClearNewList (in boolean notify); */
  NS_IMETHOD ClearNewList(PRBool notify) = 0;

  /* void AddToNewList (in nsMsgKey key); */
  NS_IMETHOD AddToNewList(nsMsgKey key) = 0;

  /* void SetSummaryValid (in boolean valid); */
  NS_IMETHOD SetSummaryValid(PRBool valid) = 0;

  /* [noscript] void ListAllOfflineOpIds (in nsMsgKeyArrayPtr offlineOpIds); */
  NS_IMETHOD ListAllOfflineOpIds(nsMsgKeyArray * offlineOpIds) = 0;

  /* [noscript] void ListAllOfflineDeletes (in nsMsgKeyArrayPtr offlineDeletes); */
  NS_IMETHOD ListAllOfflineDeletes(nsMsgKeyArray * offlineDeletes) = 0;

  /* readonly attribute nsMsgKey LowWaterArticleNum; */
  NS_IMETHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum) = 0;

  /* readonly attribute nsMsgKey HighWaterArticleNum; */
  NS_IMETHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGDATABASE \
  NS_IMETHOD Open(nsIFileSpec *folderName, PRBool create, PRBool upgrading, nsIMsgDatabase **_retval); \
  NS_IMETHOD Close(PRBool forceCommit); \
  NS_IMETHOD Commit(nsMsgDBCommit commitType); \
  NS_IMETHOD ForceClosed(void); \
  NS_IMETHOD GetDBFolderInfo(nsIDBFolderInfo * *aDBFolderInfo); \
  NS_IMETHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr **_retval); \
  NS_IMETHOD ContainsKey(nsMsgKey key, PRBool *_retval); \
  NS_IMETHOD CreateNewHdr(nsMsgKey key, nsIMsgDBHdr **_retval); \
  NS_IMETHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, PRBool notify); \
  NS_IMETHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, nsIMsgDBHdr **_retval); \
  NS_IMETHOD ListAllKeys(nsMsgKeyArray & outputKeys); \
  NS_IMETHOD EnumerateMessages(nsISimpleEnumerator **_retval); \
  NS_IMETHOD EnumerateThreads(nsISimpleEnumerator **_retval); \
  NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **_retval); \
  NS_IMETHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, PRBool bRead, nsIDBChangeListener *instigator); \
  NS_IMETHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, PRBool bReplied, nsIDBChangeListener *instigator); \
  NS_IMETHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, PRBool mark, nsIDBChangeListener *instigator); \
  NS_IMETHOD MarkMDNNeeded(nsMsgKey key, PRBool bNeeded, nsIDBChangeListener *instigator); \
  NS_IMETHOD IsMDNNeeded(nsMsgKey key, PRBool *_retval); \
  NS_IMETHOD MarkMDNSent(nsMsgKey key, PRBool bNeeded, nsIDBChangeListener *instigator); \
  NS_IMETHOD IsMDNSent(nsMsgKey key, PRBool *_retval); \
  NS_IMETHOD MarkRead(nsMsgKey key, PRBool bRead, nsIDBChangeListener *instigator); \
  NS_IMETHOD MarkReplied(nsMsgKey key, PRBool bReplied, nsIDBChangeListener *instigator); \
  NS_IMETHOD MarkForwarded(nsMsgKey key, PRBool bForwarded, nsIDBChangeListener *instigator); \
  NS_IMETHOD MarkHasAttachments(nsMsgKey key, PRBool bHasAttachments, nsIDBChangeListener *instigator); \
  NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, nsMsgKeyArray * thoseMarked); \
  NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, PRBool bIgnored, nsIDBChangeListener *instigator); \
  NS_IMETHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, PRBool bWatched, nsIDBChangeListener *instigator); \
  NS_IMETHOD IsRead(nsMsgKey key, PRBool *_retval); \
  NS_IMETHOD IsIgnored(nsMsgKey key, PRBool *_retval); \
  NS_IMETHOD IsMarked(nsMsgKey key, PRBool *_retval); \
  NS_IMETHOD HasAttachments(nsMsgKey key, PRBool *_retval); \
  NS_IMETHOD MarkAllRead(nsMsgKeyArray * thoseMarked); \
  NS_IMETHOD MarkReadByDate(PRTime startDate, PRTime endDate, nsMsgKeyArray * markedIds); \
  NS_IMETHOD DeleteMessages(nsMsgKeyArray * nsMsgKeys, nsIDBChangeListener *instigator); \
  NS_IMETHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, PRBool commit); \
  NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, PRBool commit, PRBool notify); \
  NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr); \
  NS_IMETHOD MarkLater(nsMsgKey key, PRTime until); \
  NS_IMETHOD MarkMarked(nsMsgKey key, PRBool mark, nsIDBChangeListener *instigator); \
  NS_IMETHOD MarkOffline(nsMsgKey key, PRBool offline, nsIDBChangeListener *instigator); \
  NS_IMETHOD AllMsgKeysImapDeleted(nsMsgKeyArray * keys, PRBool *allDeleted); \
  NS_IMETHOD MarkImapDeleted(nsMsgKey key, PRBool deleted, nsIDBChangeListener *instigator); \
  NS_IMETHOD GetFirstNew(nsMsgKey *aFirstNew); \
  NS_IMETHOD HasNew(PRBool *_retval); \
  NS_IMETHOD ClearNewList(PRBool notify); \
  NS_IMETHOD AddToNewList(nsMsgKey key); \
  NS_IMETHOD SetSummaryValid(PRBool valid); \
  NS_IMETHOD ListAllOfflineOpIds(nsMsgKeyArray * offlineOpIds); \
  NS_IMETHOD ListAllOfflineDeletes(nsMsgKeyArray * offlineDeletes); \
  NS_IMETHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum); \
  NS_IMETHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGDATABASE(_to) \
  NS_IMETHOD Open(nsIFileSpec *folderName, PRBool create, PRBool upgrading, nsIMsgDatabase **_retval) { return _to ## Open(folderName, create, upgrading, _retval); } \
  NS_IMETHOD Close(PRBool forceCommit) { return _to ## Close(forceCommit); } \
  NS_IMETHOD Commit(nsMsgDBCommit commitType) { return _to ## Commit(commitType); } \
  NS_IMETHOD ForceClosed(void) { return _to ## ForceClosed(); } \
  NS_IMETHOD GetDBFolderInfo(nsIDBFolderInfo * *aDBFolderInfo) { return _to ## GetDBFolderInfo(aDBFolderInfo); } \
  NS_IMETHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr **_retval) { return _to ## GetMsgHdrForKey(key, _retval); } \
  NS_IMETHOD ContainsKey(nsMsgKey key, PRBool *_retval) { return _to ## ContainsKey(key, _retval); } \
  NS_IMETHOD CreateNewHdr(nsMsgKey key, nsIMsgDBHdr **_retval) { return _to ## CreateNewHdr(key, _retval); } \
  NS_IMETHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, PRBool notify) { return _to ## AddNewHdrToDB(newHdr, notify); } \
  NS_IMETHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, nsIMsgDBHdr **_retval) { return _to ## CopyHdrFromExistingHdr(key, existingHdr, _retval); } \
  NS_IMETHOD ListAllKeys(nsMsgKeyArray & outputKeys) { return _to ## ListAllKeys(outputKeys); } \
  NS_IMETHOD EnumerateMessages(nsISimpleEnumerator **_retval) { return _to ## EnumerateMessages(_retval); } \
  NS_IMETHOD EnumerateThreads(nsISimpleEnumerator **_retval) { return _to ## EnumerateThreads(_retval); } \
  NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **_retval) { return _to ## GetThreadContainingMsgHdr(msgHdr, _retval); } \
  NS_IMETHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, PRBool bRead, nsIDBChangeListener *instigator) { return _to ## MarkHdrRead(msgHdr, bRead, instigator); } \
  NS_IMETHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, PRBool bReplied, nsIDBChangeListener *instigator) { return _to ## MarkHdrReplied(msgHdr, bReplied, instigator); } \
  NS_IMETHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, PRBool mark, nsIDBChangeListener *instigator) { return _to ## MarkHdrMarked(msgHdr, mark, instigator); } \
  NS_IMETHOD MarkMDNNeeded(nsMsgKey key, PRBool bNeeded, nsIDBChangeListener *instigator) { return _to ## MarkMDNNeeded(key, bNeeded, instigator); } \
  NS_IMETHOD IsMDNNeeded(nsMsgKey key, PRBool *_retval) { return _to ## IsMDNNeeded(key, _retval); } \
  NS_IMETHOD MarkMDNSent(nsMsgKey key, PRBool bNeeded, nsIDBChangeListener *instigator) { return _to ## MarkMDNSent(key, bNeeded, instigator); } \
  NS_IMETHOD IsMDNSent(nsMsgKey key, PRBool *_retval) { return _to ## IsMDNSent(key, _retval); } \
  NS_IMETHOD MarkRead(nsMsgKey key, PRBool bRead, nsIDBChangeListener *instigator) { return _to ## MarkRead(key, bRead, instigator); } \
  NS_IMETHOD MarkReplied(nsMsgKey key, PRBool bReplied, nsIDBChangeListener *instigator) { return _to ## MarkReplied(key, bReplied, instigator); } \
  NS_IMETHOD MarkForwarded(nsMsgKey key, PRBool bForwarded, nsIDBChangeListener *instigator) { return _to ## MarkForwarded(key, bForwarded, instigator); } \
  NS_IMETHOD MarkHasAttachments(nsMsgKey key, PRBool bHasAttachments, nsIDBChangeListener *instigator) { return _to ## MarkHasAttachments(key, bHasAttachments, instigator); } \
  NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, nsMsgKeyArray * thoseMarked) { return _to ## MarkThreadRead(thread, instigator, thoseMarked); } \
  NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, PRBool bIgnored, nsIDBChangeListener *instigator) { return _to ## MarkThreadIgnored(thread, threadKey, bIgnored, instigator); } \
  NS_IMETHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, PRBool bWatched, nsIDBChangeListener *instigator) { return _to ## MarkThreadWatched(thread, threadKey, bWatched, instigator); } \
  NS_IMETHOD IsRead(nsMsgKey key, PRBool *_retval) { return _to ## IsRead(key, _retval); } \
  NS_IMETHOD IsIgnored(nsMsgKey key, PRBool *_retval) { return _to ## IsIgnored(key, _retval); } \
  NS_IMETHOD IsMarked(nsMsgKey key, PRBool *_retval) { return _to ## IsMarked(key, _retval); } \
  NS_IMETHOD HasAttachments(nsMsgKey key, PRBool *_retval) { return _to ## HasAttachments(key, _retval); } \
  NS_IMETHOD MarkAllRead(nsMsgKeyArray * thoseMarked) { return _to ## MarkAllRead(thoseMarked); } \
  NS_IMETHOD MarkReadByDate(PRTime startDate, PRTime endDate, nsMsgKeyArray * markedIds) { return _to ## MarkReadByDate(startDate, endDate, markedIds); } \
  NS_IMETHOD DeleteMessages(nsMsgKeyArray * nsMsgKeys, nsIDBChangeListener *instigator) { return _to ## DeleteMessages(nsMsgKeys, instigator); } \
  NS_IMETHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, PRBool commit) { return _to ## DeleteMessage(key, instigator, commit); } \
  NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, PRBool commit, PRBool notify) { return _to ## DeleteHeader(msgHdr, instigator, commit, notify); } \
  NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr) { return _to ## UndoDelete(msgHdr); } \
  NS_IMETHOD MarkLater(nsMsgKey key, PRTime until) { return _to ## MarkLater(key, until); } \
  NS_IMETHOD MarkMarked(nsMsgKey key, PRBool mark, nsIDBChangeListener *instigator) { return _to ## MarkMarked(key, mark, instigator); } \
  NS_IMETHOD MarkOffline(nsMsgKey key, PRBool offline, nsIDBChangeListener *instigator) { return _to ## MarkOffline(key, offline, instigator); } \
  NS_IMETHOD AllMsgKeysImapDeleted(nsMsgKeyArray * keys, PRBool *allDeleted) { return _to ## AllMsgKeysImapDeleted(keys, allDeleted); } \
  NS_IMETHOD MarkImapDeleted(nsMsgKey key, PRBool deleted, nsIDBChangeListener *instigator) { return _to ## MarkImapDeleted(key, deleted, instigator); } \
  NS_IMETHOD GetFirstNew(nsMsgKey *aFirstNew) { return _to ## GetFirstNew(aFirstNew); } \
  NS_IMETHOD HasNew(PRBool *_retval) { return _to ## HasNew(_retval); } \
  NS_IMETHOD ClearNewList(PRBool notify) { return _to ## ClearNewList(notify); } \
  NS_IMETHOD AddToNewList(nsMsgKey key) { return _to ## AddToNewList(key); } \
  NS_IMETHOD SetSummaryValid(PRBool valid) { return _to ## SetSummaryValid(valid); } \
  NS_IMETHOD ListAllOfflineOpIds(nsMsgKeyArray * offlineOpIds) { return _to ## ListAllOfflineOpIds(offlineOpIds); } \
  NS_IMETHOD ListAllOfflineDeletes(nsMsgKeyArray * offlineDeletes) { return _to ## ListAllOfflineDeletes(offlineDeletes); } \
  NS_IMETHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum) { return _to ## GetLowWaterArticleNum(aLowWaterArticleNum); } \
  NS_IMETHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum) { return _to ## GetHighWaterArticleNum(aHighWaterArticleNum); } 

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

/* Header file */
class nsMsgDatabase : public nsIMsgDatabase
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGDATABASE

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMsgDatabase, nsIMsgDatabase)

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

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

/* nsIMsgDatabase Open (in nsIFileSpec folderName, in boolean create, in boolean upgrading); */
NS_IMETHODIMP nsMsgDatabase::Open(nsIFileSpec *folderName, PRBool create, PRBool upgrading, nsIMsgDatabase **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Close (in boolean forceCommit); */
NS_IMETHODIMP nsMsgDatabase::Close(PRBool forceCommit)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Commit (in nsMsgDBCommit commitType); */
NS_IMETHODIMP nsMsgDatabase::Commit(nsMsgDBCommit commitType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void ForceClosed (); */
NS_IMETHODIMP nsMsgDatabase::ForceClosed()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIDBFolderInfo DBFolderInfo; */
NS_IMETHODIMP nsMsgDatabase::GetDBFolderInfo(nsIDBFolderInfo * *aDBFolderInfo)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgDBHdr GetMsgHdrForKey (in nsMsgKey key); */
NS_IMETHODIMP nsMsgDatabase::GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean ContainsKey (in nsMsgKey key); */
NS_IMETHODIMP nsMsgDatabase::ContainsKey(nsMsgKey key, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgDBHdr CreateNewHdr (in nsMsgKey key); */
NS_IMETHODIMP nsMsgDatabase::CreateNewHdr(nsMsgKey key, nsIMsgDBHdr **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void AddNewHdrToDB (in nsIMsgDBHdr newHdr, in boolean notify); */
NS_IMETHODIMP nsMsgDatabase::AddNewHdrToDB(nsIMsgDBHdr *newHdr, PRBool notify)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgDBHdr CopyHdrFromExistingHdr (in nsMsgKey key, in nsIMsgDBHdr existingHdr); */
NS_IMETHODIMP nsMsgDatabase::CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, nsIMsgDBHdr **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void ListAllKeys (in nsMsgKeyArrayRef outputKeys); */
NS_IMETHODIMP nsMsgDatabase::ListAllKeys(nsMsgKeyArray & outputKeys)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISimpleEnumerator EnumerateMessages (); */
NS_IMETHODIMP nsMsgDatabase::EnumerateMessages(nsISimpleEnumerator **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISimpleEnumerator EnumerateThreads (); */
NS_IMETHODIMP nsMsgDatabase::EnumerateThreads(nsISimpleEnumerator **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgThread GetThreadContainingMsgHdr (in nsIMsgDBHdr msgHdr); */
NS_IMETHODIMP nsMsgDatabase::GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkHdrRead (in nsIMsgDBHdr msgHdr, in boolean bRead, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkHdrRead(nsIMsgDBHdr *msgHdr, PRBool bRead, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkHdrReplied (in nsIMsgDBHdr msgHdr, in boolean bReplied, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkHdrReplied(nsIMsgDBHdr *msgHdr, PRBool bReplied, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkHdrMarked (in nsIMsgDBHdr msgHdr, in boolean mark, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkHdrMarked(nsIMsgDBHdr *msgHdr, PRBool mark, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkMDNNeeded (in nsMsgKey key, in boolean bNeeded, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkMDNNeeded(nsMsgKey key, PRBool bNeeded, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean IsMDNNeeded (in nsMsgKey key); */
NS_IMETHODIMP nsMsgDatabase::IsMDNNeeded(nsMsgKey key, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkMDNSent (in nsMsgKey key, in boolean bNeeded, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkMDNSent(nsMsgKey key, PRBool bNeeded, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean IsMDNSent (in nsMsgKey key); */
NS_IMETHODIMP nsMsgDatabase::IsMDNSent(nsMsgKey key, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkRead (in nsMsgKey key, in boolean bRead, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkRead(nsMsgKey key, PRBool bRead, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkReplied (in nsMsgKey key, in boolean bReplied, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkReplied(nsMsgKey key, PRBool bReplied, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkForwarded (in nsMsgKey key, in boolean bForwarded, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkForwarded(nsMsgKey key, PRBool bForwarded, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkHasAttachments (in nsMsgKey key, in boolean bHasAttachments, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkHasAttachments(nsMsgKey key, PRBool bHasAttachments, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void MarkThreadRead (in nsIMsgThread thread, in nsIDBChangeListener instigator, in nsMsgKeyArrayPtr thoseMarked); */
NS_IMETHODIMP nsMsgDatabase::MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, nsMsgKeyArray * thoseMarked)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkThreadIgnored (in nsIMsgThread thread, in nsMsgKey threadKey, in boolean bIgnored, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, PRBool bIgnored, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkThreadWatched (in nsIMsgThread thread, in nsMsgKey threadKey, in boolean bWatched, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, PRBool bWatched, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean IsRead (in nsMsgKey key); */
NS_IMETHODIMP nsMsgDatabase::IsRead(nsMsgKey key, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean IsIgnored (in nsMsgKey key); */
NS_IMETHODIMP nsMsgDatabase::IsIgnored(nsMsgKey key, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean IsMarked (in nsMsgKey key); */
NS_IMETHODIMP nsMsgDatabase::IsMarked(nsMsgKey key, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean HasAttachments (in nsMsgKey key); */
NS_IMETHODIMP nsMsgDatabase::HasAttachments(nsMsgKey key, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void MarkAllRead (in nsMsgKeyArrayPtr thoseMarked); */
NS_IMETHODIMP nsMsgDatabase::MarkAllRead(nsMsgKeyArray * thoseMarked)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void MarkReadByDate (in PRTime startDate, in PRTime endDate, in nsMsgKeyArrayPtr markedIds); */
NS_IMETHODIMP nsMsgDatabase::MarkReadByDate(PRTime startDate, PRTime endDate, nsMsgKeyArray * markedIds)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void DeleteMessages (in nsMsgKeyArrayPtr nsMsgKeys, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::DeleteMessages(nsMsgKeyArray * nsMsgKeys, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void DeleteMessage (in nsMsgKey key, in nsIDBChangeListener instigator, in boolean commit); */
NS_IMETHODIMP nsMsgDatabase::DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, PRBool commit)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void DeleteHeader (in nsIMsgDBHdr msgHdr, in nsIDBChangeListener instigator, in boolean commit, in boolean notify); */
NS_IMETHODIMP nsMsgDatabase::DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, PRBool commit, PRBool notify)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void UndoDelete (in nsIMsgDBHdr msgHdr); */
NS_IMETHODIMP nsMsgDatabase::UndoDelete(nsIMsgDBHdr *msgHdr)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkLater (in nsMsgKey key, in PRTime until); */
NS_IMETHODIMP nsMsgDatabase::MarkLater(nsMsgKey key, PRTime until)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkMarked (in nsMsgKey key, in boolean mark, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkMarked(nsMsgKey key, PRBool mark, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkOffline (in nsMsgKey key, in boolean offline, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkOffline(nsMsgKey key, PRBool offline, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void AllMsgKeysImapDeleted (in nsMsgKeyArrayPtr keys, out boolean allDeleted); */
NS_IMETHODIMP nsMsgDatabase::AllMsgKeysImapDeleted(nsMsgKeyArray * keys, PRBool *allDeleted)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkImapDeleted (in nsMsgKey key, in boolean deleted, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkImapDeleted(nsMsgKey key, PRBool deleted, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsMsgKey FirstNew; */
NS_IMETHODIMP nsMsgDatabase::GetFirstNew(nsMsgKey *aFirstNew)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean HasNew (); */
NS_IMETHODIMP nsMsgDatabase::HasNew(PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void ClearNewList (in boolean notify); */
NS_IMETHODIMP nsMsgDatabase::ClearNewList(PRBool notify)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void AddToNewList (in nsMsgKey key); */
NS_IMETHODIMP nsMsgDatabase::AddToNewList(nsMsgKey key)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void SetSummaryValid (in boolean valid); */
NS_IMETHODIMP nsMsgDatabase::SetSummaryValid(PRBool valid)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void ListAllOfflineOpIds (in nsMsgKeyArrayPtr offlineOpIds); */
NS_IMETHODIMP nsMsgDatabase::ListAllOfflineOpIds(nsMsgKeyArray * offlineOpIds)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void ListAllOfflineDeletes (in nsMsgKeyArrayPtr offlineDeletes); */
NS_IMETHODIMP nsMsgDatabase::ListAllOfflineDeletes(nsMsgKeyArray * offlineDeletes)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsMsgKey LowWaterArticleNum; */
NS_IMETHODIMP nsMsgDatabase::GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsMsgKey HighWaterArticleNum; */
NS_IMETHODIMP nsMsgDatabase::GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgDatabase_h__ */
