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

#ifndef __gen_nsIMsgDatabase_h__
#define __gen_nsIMsgDatabase_h__


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

#ifndef __gen_nsIDBChangeAnnouncer_h__
#include "nsIDBChangeAnnouncer.h"
#endif

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

class nsIMsgDatabase; /* forward declaration */

class nsIMsgDBView; /* forward declaration */

class nsIDBChangeListener; /* forward declaration */

class nsIMsgDBHdr; /* forward declaration */

class nsISimpleEnumerator; /* forward declaration */

class nsIMsgThread; /* forward declaration */

class nsIDBFolderInfo; /* forward declaration */

class nsIMsgOfflineImapOperation; /* forward declaration */

class nsIMsgFolder; /* forward declaration */

class nsIMsgKeyArray; /* forward declaration */

class nsIFile; /* forward declaration */

class nsIArray; /* forward declaration */

typedef uint32_t  nsMsgRetainByPreference;


/* starting interface:    nsIMsgRetentionSettings */
#define NS_IMSGRETENTIONSETTINGS_IID_STR "fe8b7cec-eec8-4bcd-82ff-d8bb23cef3da"

#define NS_IMSGRETENTIONSETTINGS_IID \
  {0xfe8b7cec, 0xeec8, 0x4bcd, \
    { 0x82, 0xff, 0xd8, 0xbb, 0x23, 0xce, 0xf3, 0xda }}

class NS_NO_VTABLE nsIMsgRetentionSettings : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGRETENTIONSETTINGS_IID)

  enum {
    nsMsgRetainAll = 1U,
    nsMsgRetainByAge = 2U,
    nsMsgRetainByNumHeaders = 3U
  };

  /* attribute boolean useServerDefaults; */
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) = 0;
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) = 0;

  /* attribute nsMsgRetainByPreference retainByPreference; */
  NS_IMETHOD GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference) = 0;
  NS_IMETHOD SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference) = 0;

  /* attribute unsigned long daysToKeepHdrs; */
  NS_IMETHOD GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs) = 0;
  NS_IMETHOD SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs) = 0;

  /* attribute unsigned long numHeadersToKeep; */
  NS_IMETHOD GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep) = 0;
  NS_IMETHOD SetNumHeadersToKeep(uint32_t aNumHeadersToKeep) = 0;

  /* attribute boolean cleanupBodiesByDays; */
  NS_IMETHOD GetCleanupBodiesByDays(bool *aCleanupBodiesByDays) = 0;
  NS_IMETHOD SetCleanupBodiesByDays(bool aCleanupBodiesByDays) = 0;

  /* attribute unsigned long daysToKeepBodies; */
  NS_IMETHOD GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies) = 0;
  NS_IMETHOD SetDaysToKeepBodies(uint32_t aDaysToKeepBodies) = 0;

  /* attribute boolean applyToFlaggedMessages; */
  NS_IMETHOD GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages) = 0;
  NS_IMETHOD SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgRetentionSettings, NS_IMSGRETENTIONSETTINGS_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGRETENTIONSETTINGS \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override; \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override; \
  NS_IMETHOD GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference) override; \
  NS_IMETHOD SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference) override; \
  NS_IMETHOD GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs) override; \
  NS_IMETHOD SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs) override; \
  NS_IMETHOD GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep) override; \
  NS_IMETHOD SetNumHeadersToKeep(uint32_t aNumHeadersToKeep) override; \
  NS_IMETHOD GetCleanupBodiesByDays(bool *aCleanupBodiesByDays) override; \
  NS_IMETHOD SetCleanupBodiesByDays(bool aCleanupBodiesByDays) override; \
  NS_IMETHOD GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies) override; \
  NS_IMETHOD SetDaysToKeepBodies(uint32_t aDaysToKeepBodies) override; \
  NS_IMETHOD GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages) override; \
  NS_IMETHOD SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIMSGRETENTIONSETTINGS \
  NS_METHOD GetUseServerDefaults(bool *aUseServerDefaults); \
  NS_METHOD SetUseServerDefaults(bool aUseServerDefaults); \
  NS_METHOD GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference); \
  NS_METHOD SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference); \
  NS_METHOD GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs); \
  NS_METHOD SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs); \
  NS_METHOD GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep); \
  NS_METHOD SetNumHeadersToKeep(uint32_t aNumHeadersToKeep); \
  NS_METHOD GetCleanupBodiesByDays(bool *aCleanupBodiesByDays); \
  NS_METHOD SetCleanupBodiesByDays(bool aCleanupBodiesByDays); \
  NS_METHOD GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies); \
  NS_METHOD SetDaysToKeepBodies(uint32_t aDaysToKeepBodies); \
  NS_METHOD GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages); \
  NS_METHOD SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGRETENTIONSETTINGS(_to) \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override { return _to GetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override { return _to SetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference) override { return _to GetRetainByPreference(aRetainByPreference); } \
  NS_IMETHOD SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference) override { return _to SetRetainByPreference(aRetainByPreference); } \
  NS_IMETHOD GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs) override { return _to GetDaysToKeepHdrs(aDaysToKeepHdrs); } \
  NS_IMETHOD SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs) override { return _to SetDaysToKeepHdrs(aDaysToKeepHdrs); } \
  NS_IMETHOD GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep) override { return _to GetNumHeadersToKeep(aNumHeadersToKeep); } \
  NS_IMETHOD SetNumHeadersToKeep(uint32_t aNumHeadersToKeep) override { return _to SetNumHeadersToKeep(aNumHeadersToKeep); } \
  NS_IMETHOD GetCleanupBodiesByDays(bool *aCleanupBodiesByDays) override { return _to GetCleanupBodiesByDays(aCleanupBodiesByDays); } \
  NS_IMETHOD SetCleanupBodiesByDays(bool aCleanupBodiesByDays) override { return _to SetCleanupBodiesByDays(aCleanupBodiesByDays); } \
  NS_IMETHOD GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies) override { return _to GetDaysToKeepBodies(aDaysToKeepBodies); } \
  NS_IMETHOD SetDaysToKeepBodies(uint32_t aDaysToKeepBodies) override { return _to SetDaysToKeepBodies(aDaysToKeepBodies); } \
  NS_IMETHOD GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages) override { return _to GetApplyToFlaggedMessages(aApplyToFlaggedMessages); } \
  NS_IMETHOD SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages) override { return _to SetApplyToFlaggedMessages(aApplyToFlaggedMessages); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGRETENTIONSETTINGS(_to) \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRetainByPreference(aRetainByPreference); } \
  NS_IMETHOD SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRetainByPreference(aRetainByPreference); } \
  NS_IMETHOD GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDaysToKeepHdrs(aDaysToKeepHdrs); } \
  NS_IMETHOD SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDaysToKeepHdrs(aDaysToKeepHdrs); } \
  NS_IMETHOD GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNumHeadersToKeep(aNumHeadersToKeep); } \
  NS_IMETHOD SetNumHeadersToKeep(uint32_t aNumHeadersToKeep) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNumHeadersToKeep(aNumHeadersToKeep); } \
  NS_IMETHOD GetCleanupBodiesByDays(bool *aCleanupBodiesByDays) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCleanupBodiesByDays(aCleanupBodiesByDays); } \
  NS_IMETHOD SetCleanupBodiesByDays(bool aCleanupBodiesByDays) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCleanupBodiesByDays(aCleanupBodiesByDays); } \
  NS_IMETHOD GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDaysToKeepBodies(aDaysToKeepBodies); } \
  NS_IMETHOD SetDaysToKeepBodies(uint32_t aDaysToKeepBodies) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDaysToKeepBodies(aDaysToKeepBodies); } \
  NS_IMETHOD GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApplyToFlaggedMessages(aApplyToFlaggedMessages); } \
  NS_IMETHOD SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetApplyToFlaggedMessages(aApplyToFlaggedMessages); } 

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

/* Header file */
class nsMsgRetentionSettings : public nsIMsgRetentionSettings
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGRETENTIONSETTINGS

  nsMsgRetentionSettings();

private:
  ~nsMsgRetentionSettings();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsMsgRetentionSettings, nsIMsgRetentionSettings)

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

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

/* attribute boolean useServerDefaults; */
NS_IMETHODIMP nsMsgRetentionSettings::GetUseServerDefaults(bool *aUseServerDefaults)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgRetentionSettings::SetUseServerDefaults(bool aUseServerDefaults)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsMsgRetainByPreference retainByPreference; */
NS_IMETHODIMP nsMsgRetentionSettings::GetRetainByPreference(nsMsgRetainByPreference *aRetainByPreference)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgRetentionSettings::SetRetainByPreference(nsMsgRetainByPreference aRetainByPreference)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute unsigned long daysToKeepHdrs; */
NS_IMETHODIMP nsMsgRetentionSettings::GetDaysToKeepHdrs(uint32_t *aDaysToKeepHdrs)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgRetentionSettings::SetDaysToKeepHdrs(uint32_t aDaysToKeepHdrs)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute unsigned long numHeadersToKeep; */
NS_IMETHODIMP nsMsgRetentionSettings::GetNumHeadersToKeep(uint32_t *aNumHeadersToKeep)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgRetentionSettings::SetNumHeadersToKeep(uint32_t aNumHeadersToKeep)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean cleanupBodiesByDays; */
NS_IMETHODIMP nsMsgRetentionSettings::GetCleanupBodiesByDays(bool *aCleanupBodiesByDays)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgRetentionSettings::SetCleanupBodiesByDays(bool aCleanupBodiesByDays)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute unsigned long daysToKeepBodies; */
NS_IMETHODIMP nsMsgRetentionSettings::GetDaysToKeepBodies(uint32_t *aDaysToKeepBodies)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgRetentionSettings::SetDaysToKeepBodies(uint32_t aDaysToKeepBodies)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean applyToFlaggedMessages; */
NS_IMETHODIMP nsMsgRetentionSettings::GetApplyToFlaggedMessages(bool *aApplyToFlaggedMessages)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgRetentionSettings::SetApplyToFlaggedMessages(bool aApplyToFlaggedMessages)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIMsgDownloadSettings */
#define NS_IMSGDOWNLOADSETTINGS_IID_STR "86a9da90-14f1-11d5-a5c0-0060b0fc04b7"

#define NS_IMSGDOWNLOADSETTINGS_IID \
  {0x86a9da90, 0x14f1, 0x11d5, \
    { 0xa5, 0xc0, 0x00, 0x60, 0xb0, 0xfc, 0x04, 0xb7 }}

class NS_NO_VTABLE nsIMsgDownloadSettings : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGDOWNLOADSETTINGS_IID)

  /* attribute boolean useServerDefaults; */
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) = 0;
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) = 0;

  /* attribute boolean downloadByDate; */
  NS_IMETHOD GetDownloadByDate(bool *aDownloadByDate) = 0;
  NS_IMETHOD SetDownloadByDate(bool aDownloadByDate) = 0;

  /* attribute boolean downloadUnreadOnly; */
  NS_IMETHOD GetDownloadUnreadOnly(bool *aDownloadUnreadOnly) = 0;
  NS_IMETHOD SetDownloadUnreadOnly(bool aDownloadUnreadOnly) = 0;

  /* attribute unsigned long ageLimitOfMsgsToDownload; */
  NS_IMETHOD GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload) = 0;
  NS_IMETHOD SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgDownloadSettings, NS_IMSGDOWNLOADSETTINGS_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGDOWNLOADSETTINGS \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override; \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override; \
  NS_IMETHOD GetDownloadByDate(bool *aDownloadByDate) override; \
  NS_IMETHOD SetDownloadByDate(bool aDownloadByDate) override; \
  NS_IMETHOD GetDownloadUnreadOnly(bool *aDownloadUnreadOnly) override; \
  NS_IMETHOD SetDownloadUnreadOnly(bool aDownloadUnreadOnly) override; \
  NS_IMETHOD GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload) override; \
  NS_IMETHOD SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIMSGDOWNLOADSETTINGS \
  NS_METHOD GetUseServerDefaults(bool *aUseServerDefaults); \
  NS_METHOD SetUseServerDefaults(bool aUseServerDefaults); \
  NS_METHOD GetDownloadByDate(bool *aDownloadByDate); \
  NS_METHOD SetDownloadByDate(bool aDownloadByDate); \
  NS_METHOD GetDownloadUnreadOnly(bool *aDownloadUnreadOnly); \
  NS_METHOD SetDownloadUnreadOnly(bool aDownloadUnreadOnly); \
  NS_METHOD GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload); \
  NS_METHOD SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGDOWNLOADSETTINGS(_to) \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override { return _to GetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override { return _to SetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD GetDownloadByDate(bool *aDownloadByDate) override { return _to GetDownloadByDate(aDownloadByDate); } \
  NS_IMETHOD SetDownloadByDate(bool aDownloadByDate) override { return _to SetDownloadByDate(aDownloadByDate); } \
  NS_IMETHOD GetDownloadUnreadOnly(bool *aDownloadUnreadOnly) override { return _to GetDownloadUnreadOnly(aDownloadUnreadOnly); } \
  NS_IMETHOD SetDownloadUnreadOnly(bool aDownloadUnreadOnly) override { return _to SetDownloadUnreadOnly(aDownloadUnreadOnly); } \
  NS_IMETHOD GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload) override { return _to GetAgeLimitOfMsgsToDownload(aAgeLimitOfMsgsToDownload); } \
  NS_IMETHOD SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload) override { return _to SetAgeLimitOfMsgsToDownload(aAgeLimitOfMsgsToDownload); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGDOWNLOADSETTINGS(_to) \
  NS_IMETHOD GetUseServerDefaults(bool *aUseServerDefaults) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD SetUseServerDefaults(bool aUseServerDefaults) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUseServerDefaults(aUseServerDefaults); } \
  NS_IMETHOD GetDownloadByDate(bool *aDownloadByDate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDownloadByDate(aDownloadByDate); } \
  NS_IMETHOD SetDownloadByDate(bool aDownloadByDate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDownloadByDate(aDownloadByDate); } \
  NS_IMETHOD GetDownloadUnreadOnly(bool *aDownloadUnreadOnly) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDownloadUnreadOnly(aDownloadUnreadOnly); } \
  NS_IMETHOD SetDownloadUnreadOnly(bool aDownloadUnreadOnly) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDownloadUnreadOnly(aDownloadUnreadOnly); } \
  NS_IMETHOD GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAgeLimitOfMsgsToDownload(aAgeLimitOfMsgsToDownload); } \
  NS_IMETHOD SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAgeLimitOfMsgsToDownload(aAgeLimitOfMsgsToDownload); } 

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

/* Header file */
class nsMsgDownloadSettings : public nsIMsgDownloadSettings
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGDOWNLOADSETTINGS

  nsMsgDownloadSettings();

private:
  ~nsMsgDownloadSettings();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsMsgDownloadSettings, nsIMsgDownloadSettings)

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

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

/* attribute boolean useServerDefaults; */
NS_IMETHODIMP nsMsgDownloadSettings::GetUseServerDefaults(bool *aUseServerDefaults)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgDownloadSettings::SetUseServerDefaults(bool aUseServerDefaults)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean downloadByDate; */
NS_IMETHODIMP nsMsgDownloadSettings::GetDownloadByDate(bool *aDownloadByDate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgDownloadSettings::SetDownloadByDate(bool aDownloadByDate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean downloadUnreadOnly; */
NS_IMETHODIMP nsMsgDownloadSettings::GetDownloadUnreadOnly(bool *aDownloadUnreadOnly)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgDownloadSettings::SetDownloadUnreadOnly(bool aDownloadUnreadOnly)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute unsigned long ageLimitOfMsgsToDownload; */
NS_IMETHODIMP nsMsgDownloadSettings::GetAgeLimitOfMsgsToDownload(uint32_t *aAgeLimitOfMsgsToDownload)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgDownloadSettings::SetAgeLimitOfMsgsToDownload(uint32_t aAgeLimitOfMsgsToDownload)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

typedef int32_t  nsMsgDBCommit;


/* starting interface:    nsMsgDBCommitType */
#define NS_MSGDBCOMMITTYPE_IID_STR "15431853-e448-45dc-8978-9958bf74d9b7"

#define NS_MSGDBCOMMITTYPE_IID \
  {0x15431853, 0xe448, 0x45dc, \
    { 0x89, 0x78, 0x99, 0x58, 0xbf, 0x74, 0xd9, 0xb7 }}

class NS_NO_VTABLE nsMsgDBCommitType {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_MSGDBCOMMITTYPE_IID)

  enum {
    kLargeCommit = 1,
    kSessionCommit = 2,
    kCompressCommit = 3
  };

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsMsgDBCommitType, NS_MSGDBCOMMITTYPE_IID)

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

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSMSGDBCOMMITTYPE \

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

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_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_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

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


/* starting interface:    nsIMsgDBService */
#define NS_IMSGDBSERVICE_IID_STR "4cbbf024-3760-402d-89f3-6ababafeb07d"

#define NS_IMSGDBSERVICE_IID \
  {0x4cbbf024, 0x3760, 0x402d, \
    { 0x89, 0xf3, 0x6a, 0xba, 0xba, 0xfe, 0xb0, 0x7d }}

class NS_NO_VTABLE nsIMsgDBService : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGDBSERVICE_IID)

  /* nsIMsgDatabase openFolderDB (in nsIMsgFolder aFolder, in boolean aLeaveInvalidDB); */
  NS_IMETHOD OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) = 0;

  /* nsIMsgDatabase asyncOpenFolderDB (in nsIMsgFolder aFolder, in boolean aLeaveInvalidDB); */
  NS_IMETHOD AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) = 0;

  /* boolean openMore (in nsIMsgDatabase aDB, in unsigned long aTimeHint); */
  NS_IMETHOD OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval) = 0;

  /* nsIMsgDatabase createNewDB (in nsIMsgFolder aFolder); */
  NS_IMETHOD CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval) = 0;

  /* nsIMsgDatabase openMailDBFromFile (in nsIFile aFile, in nsIMsgFolder aFolder, in boolean aCreate, in boolean aLeaveInvalidDB); */
  NS_IMETHOD OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) = 0;

  /* void registerPendingListener (in nsIMsgFolder aFolder, in nsIDBChangeListener aListener); */
  NS_IMETHOD RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener) = 0;

  /* void unregisterPendingListener (in nsIDBChangeListener aListener); */
  NS_IMETHOD UnregisterPendingListener(nsIDBChangeListener *aListener) = 0;

  /* nsIMsgDatabase cachedDBForFolder (in nsIMsgFolder aFolder); */
  NS_IMETHOD CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval) = 0;

  /* void forceFolderDBClosed (in nsIMsgFolder aFolder); */
  NS_IMETHOD ForceFolderDBClosed(nsIMsgFolder *aFolder) = 0;

  /* readonly attribute nsIArray openDBs; */
  NS_IMETHOD GetOpenDBs(nsIArray * *aOpenDBs) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgDBService, NS_IMSGDBSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGDBSERVICE \
  NS_IMETHOD OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) override; \
  NS_IMETHOD AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) override; \
  NS_IMETHOD OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval) override; \
  NS_IMETHOD CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval) override; \
  NS_IMETHOD OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) override; \
  NS_IMETHOD RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener) override; \
  NS_IMETHOD UnregisterPendingListener(nsIDBChangeListener *aListener) override; \
  NS_IMETHOD CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval) override; \
  NS_IMETHOD ForceFolderDBClosed(nsIMsgFolder *aFolder) override; \
  NS_IMETHOD GetOpenDBs(nsIArray * *aOpenDBs) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIMSGDBSERVICE \
  NS_METHOD OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval); \
  NS_METHOD AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval); \
  NS_METHOD OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval); \
  NS_METHOD CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval); \
  NS_METHOD OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval); \
  NS_METHOD RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener); \
  NS_METHOD UnregisterPendingListener(nsIDBChangeListener *aListener); \
  NS_METHOD CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval); \
  NS_METHOD ForceFolderDBClosed(nsIMsgFolder *aFolder); \
  NS_METHOD GetOpenDBs(nsIArray * *aOpenDBs); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGDBSERVICE(_to) \
  NS_IMETHOD OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) override { return _to OpenFolderDB(aFolder, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) override { return _to AsyncOpenFolderDB(aFolder, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval) override { return _to OpenMore(aDB, aTimeHint, _retval); } \
  NS_IMETHOD CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval) override { return _to CreateNewDB(aFolder, _retval); } \
  NS_IMETHOD OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) override { return _to OpenMailDBFromFile(aFile, aFolder, aCreate, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener) override { return _to RegisterPendingListener(aFolder, aListener); } \
  NS_IMETHOD UnregisterPendingListener(nsIDBChangeListener *aListener) override { return _to UnregisterPendingListener(aListener); } \
  NS_IMETHOD CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval) override { return _to CachedDBForFolder(aFolder, _retval); } \
  NS_IMETHOD ForceFolderDBClosed(nsIMsgFolder *aFolder) override { return _to ForceFolderDBClosed(aFolder); } \
  NS_IMETHOD GetOpenDBs(nsIArray * *aOpenDBs) override { return _to GetOpenDBs(aOpenDBs); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGDBSERVICE(_to) \
  NS_IMETHOD OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenFolderDB(aFolder, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncOpenFolderDB(aFolder, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenMore(aDB, aTimeHint, _retval); } \
  NS_IMETHOD CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateNewDB(aFolder, _retval); } \
  NS_IMETHOD OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenMailDBFromFile(aFile, aFolder, aCreate, aLeaveInvalidDB, _retval); } \
  NS_IMETHOD RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterPendingListener(aFolder, aListener); } \
  NS_IMETHOD UnregisterPendingListener(nsIDBChangeListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterPendingListener(aListener); } \
  NS_IMETHOD CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CachedDBForFolder(aFolder, _retval); } \
  NS_IMETHOD ForceFolderDBClosed(nsIMsgFolder *aFolder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ForceFolderDBClosed(aFolder); } \
  NS_IMETHOD GetOpenDBs(nsIArray * *aOpenDBs) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOpenDBs(aOpenDBs); } 

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

/* Header file */
class nsMsgDBService : public nsIMsgDBService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGDBSERVICE

  nsMsgDBService();

private:
  ~nsMsgDBService();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsMsgDBService, nsIMsgDBService)

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

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

/* nsIMsgDatabase openFolderDB (in nsIMsgFolder aFolder, in boolean aLeaveInvalidDB); */
NS_IMETHODIMP nsMsgDBService::OpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgDatabase asyncOpenFolderDB (in nsIMsgFolder aFolder, in boolean aLeaveInvalidDB); */
NS_IMETHODIMP nsMsgDBService::AsyncOpenFolderDB(nsIMsgFolder *aFolder, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean openMore (in nsIMsgDatabase aDB, in unsigned long aTimeHint); */
NS_IMETHODIMP nsMsgDBService::OpenMore(nsIMsgDatabase *aDB, uint32_t aTimeHint, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgDatabase createNewDB (in nsIMsgFolder aFolder); */
NS_IMETHODIMP nsMsgDBService::CreateNewDB(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgDatabase openMailDBFromFile (in nsIFile aFile, in nsIMsgFolder aFolder, in boolean aCreate, in boolean aLeaveInvalidDB); */
NS_IMETHODIMP nsMsgDBService::OpenMailDBFromFile(nsIFile *aFile, nsIMsgFolder *aFolder, bool aCreate, bool aLeaveInvalidDB, nsIMsgDatabase * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void registerPendingListener (in nsIMsgFolder aFolder, in nsIDBChangeListener aListener); */
NS_IMETHODIMP nsMsgDBService::RegisterPendingListener(nsIMsgFolder *aFolder, nsIDBChangeListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void unregisterPendingListener (in nsIDBChangeListener aListener); */
NS_IMETHODIMP nsMsgDBService::UnregisterPendingListener(nsIDBChangeListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgDatabase cachedDBForFolder (in nsIMsgFolder aFolder); */
NS_IMETHODIMP nsMsgDBService::CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void forceFolderDBClosed (in nsIMsgFolder aFolder); */
NS_IMETHODIMP nsMsgDBService::ForceFolderDBClosed(nsIMsgFolder *aFolder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIArray openDBs; */
NS_IMETHODIMP nsMsgDBService::GetOpenDBs(nsIArray * *aOpenDBs)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIMsgDatabase */
#define NS_IMSGDATABASE_IID_STR "b64e66f8-4717-423a-be42-482658fb2199"

#define NS_IMSGDATABASE_IID \
  {0xb64e66f8, 0x4717, 0x423a, \
    { 0xbe, 0x42, 0x48, 0x26, 0x58, 0xfb, 0x21, 0x99 }}

class NS_NO_VTABLE nsIMsgDatabase : public nsIDBChangeAnnouncer {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGDATABASE_IID)

  /* void Close (in boolean aForceCommit); */
  NS_IMETHOD Close(bool aForceCommit) = 0;

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

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

  /* void clearCachedHdrs (); */
  NS_IMETHOD ClearCachedHdrs(void) = 0;

  /* void resetHdrCacheSize (in unsigned long size); */
  NS_IMETHOD ResetHdrCacheSize(uint32_t size) = 0;

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

  /* readonly attribute long long databaseSize; */
  NS_IMETHOD GetDatabaseSize(int64_t *aDatabaseSize) = 0;

  /* readonly attribute nsIMsgFolder folder; */
  NS_IMETHOD GetFolder(nsIMsgFolder * *aFolder) = 0;

  /* attribute PRTime lastUseTime; */
  NS_IMETHOD GetLastUseTime(PRTime *aLastUseTime) = 0;
  NS_IMETHOD SetLastUseTime(PRTime aLastUseTime) = 0;

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

  /* nsIMsgDBHdr getMsgHdrForMessageID (in string messageID); */
  NS_IMETHOD GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr * *_retval) = 0;

  /* nsIMsgDBHdr GetMsgHdrForGMMsgID (in string aGmailMessageID); */
  NS_IMETHOD GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr * *_retval) = 0;

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

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

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

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

  /* void ListAllKeys (in nsIMsgKeyArray array); */
  NS_IMETHOD ListAllKeys(nsIMsgKeyArray *array) = 0;

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

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

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

  /* nsISimpleEnumerator getFilterEnumerator (in nsIArray searchTerms, [optional] in boolean reverse); */
  NS_IMETHOD GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator * *_retval) = 0;

  /* boolean nextMatchingHdrs (in nsISimpleEnumerator enumerator, in long numHdrsToLookAt, in long maxResults, in nsIMutableArray matchingHdrs, out long numMatches); */
  NS_IMETHOD NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval) = 0;

  /* void syncCounts (); */
  NS_IMETHOD SyncCounts(void) = 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, bool bRead, nsIDBChangeListener *instigator) = 0;

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

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

  /* void MarkHdrNotNew (in nsIMsgDBHdr aMsgHdr, in nsIDBChangeListener aInstigator); */
  NS_IMETHOD MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator) = 0;

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

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

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

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

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

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

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

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

  /* void MarkThreadRead (in nsIMsgThread thread, in nsIDBChangeListener instigator, out unsigned long aCount, [array, size_is (aCount)] out nsMsgKey aKeys); */
  NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys) = 0;

  /* void MarkThreadIgnored (in nsIMsgThread thread, in nsMsgKey threadKey, in boolean bIgnored, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, bool 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, bool bWatched, nsIDBChangeListener *instigator) = 0;

  /* void MarkHeaderKilled (in nsIMsgDBHdr msg, in boolean bIgnored, in nsIDBChangeListener instigator); */
  NS_IMETHOD MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator) = 0;

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

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

  /* boolean IsWatched (in nsMsgKey key); */
  NS_IMETHOD IsWatched(nsMsgKey key, bool *_retval) = 0;

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

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

  /* void MarkAllRead (out unsigned long aCount, [array, size_is (aCount)] out nsMsgKey aKeys); */
  NS_IMETHOD MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys) = 0;

  /* void deleteMessages (in unsigned long aNumKeys, [array, size_is (aNumKeys)] in nsMsgKey nsMsgKeys, in nsIDBChangeListener instigator); */
  NS_IMETHOD DeleteMessages(uint32_t aNumKeys, nsMsgKey *nsMsgKeys, nsIDBChangeListener *instigator) = 0;

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

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

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

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

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

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

  /* void SetLabel (in nsMsgKey key, in nsMsgLabelValue label); */
  NS_IMETHOD SetLabel(nsMsgKey key, nsMsgLabelValue label) = 0;

  /* void setStringProperty (in nsMsgKey aKey, in string aProperty, in string aValue); */
  NS_IMETHOD SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue) = 0;

  /* void setStringPropertyByHdr (in nsIMsgDBHdr msgHdr, in string aProperty, in string aValue); */
  NS_IMETHOD SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue) = 0;

  /* void setUint32PropertyByHdr (in nsIMsgDBHdr aMsgHdr, in string aProperty, in unsigned long aValue); */
  NS_IMETHOD SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue) = 0;

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

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

  /* attribute nsIMsgRetentionSettings msgRetentionSettings; */
  NS_IMETHOD GetMsgRetentionSettings(nsIMsgRetentionSettings * *aMsgRetentionSettings) = 0;
  NS_IMETHOD SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings) = 0;

  /* void applyRetentionSettings (in nsIMsgRetentionSettings aMsgRetentionSettings, in boolean aDeleteViaFolder); */
  NS_IMETHOD ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder) = 0;

  /* attribute nsIMsgDownloadSettings msgDownloadSettings; */
  NS_IMETHOD GetMsgDownloadSettings(nsIMsgDownloadSettings * *aMsgDownloadSettings) = 0;
  NS_IMETHOD SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings) = 0;

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

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

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

  /* attribute boolean summaryValid; */
  NS_IMETHOD GetSummaryValid(bool *aSummaryValid) = 0;
  NS_IMETHOD SetSummaryValid(bool aSummaryValid) = 0;

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

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

  /* nsIMsgOfflineImapOperation GetOfflineOpForKey (in nsMsgKey messageKey, in boolean create); */
  NS_IMETHOD GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation * *_retval) = 0;

  /* void RemoveOfflineOp (in nsIMsgOfflineImapOperation op); */
  NS_IMETHOD RemoveOfflineOp(nsIMsgOfflineImapOperation *op) = 0;

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

  /* [noscript] void ListAllOfflineOpIds (in nsMsgKeyArrayPtr offlineOpIds); */
  NS_IMETHOD ListAllOfflineOpIds(nsTArray<nsMsgKey> *offlineOpIds) = 0;

  /* [noscript] void ListAllOfflineDeletes (in nsMsgKeyArrayPtr offlineDeletes); */
  NS_IMETHOD ListAllOfflineDeletes(nsTArray<nsMsgKey> *offlineDeletes) = 0;

  /* void ListAllOfflineMsgs (in nsIMsgKeyArray aKeys); */
  NS_IMETHOD ListAllOfflineMsgs(nsIMsgKeyArray *aKeys) = 0;

  /* void setAttributeOnPendingHdr (in nsIMsgDBHdr pendingHdr, in string property, in string propertyVal); */
  NS_IMETHOD SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal) = 0;

  /* void setUint32AttributeOnPendingHdr (in nsIMsgDBHdr pendingHdr, in string property, in unsigned long propertyVal); */
  NS_IMETHOD SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal) = 0;

  /* void setUint64AttributeOnPendingHdr (in nsIMsgDBHdr aPendingHdr, in string aProperty, in unsigned long long aPropertyVal); */
  NS_IMETHOD SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal) = 0;

  /* void updatePendingAttributes (in nsIMsgDBHdr aNewHdr); */
  NS_IMETHOD UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr) = 0;

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

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

  /* attribute nsMsgKey nextPseudoMsgKey; */
  NS_IMETHOD GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey) = 0;
  NS_IMETHOD SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey) = 0;

  /* readonly attribute nsMsgKey nextFakeOfflineMsgKey; */
  NS_IMETHOD GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey) = 0;

  /* void createCollationKey (in AString sourceString, out unsigned long aCount, [array, size_is (aCount)] out octet aKey); */
  NS_IMETHOD CreateCollationKey(const nsAString & sourceString, uint32_t *aCount, uint8_t **aKey) = 0;

  /* long compareCollationKeys (in unsigned long aLen1, [array, size_is (aLen1)] in octet key1, in unsigned long aLen2, [array, size_is (aLen2)] in octet key2); */
  NS_IMETHOD CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval) = 0;

  /* readonly attribute nsMsgViewFlagsTypeValue defaultViewFlags; */
  NS_IMETHOD GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags) = 0;

  /* readonly attribute nsMsgViewSortTypeValue defaultSortType; */
  NS_IMETHOD GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType) = 0;

  /* readonly attribute nsMsgViewSortOrderValue defaultSortOrder; */
  NS_IMETHOD GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder) = 0;

  /* attribute unsigned long msgHdrCacheSize; */
  NS_IMETHOD GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize) = 0;
  NS_IMETHOD SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize) = 0;

  /* void getNewList (out unsigned long count, [array, size_is (count)] out nsMsgKey newKeys); */
  NS_IMETHOD GetNewList(uint32_t *count, nsMsgKey **newKeys) = 0;

  /* nsISimpleEnumerator getCachedHits (in string aSearchFolderUri); */
  NS_IMETHOD GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator * *_retval) = 0;

  /* void refreshCache (in string aSearchFolderUri, in unsigned long aNumKeys, [array, size_is (aNumKeys)] in nsMsgKey aNewHits, out unsigned long aNumBadHits, [array, size_is (aNumBadHits)] out nsMsgKey aStaleHits); */
  NS_IMETHOD RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits) = 0;

  /* void updateHdrInCache (in string aSearchFolderUri, in nsIMsgDBHdr aHdr, in boolean aAdd); */
  NS_IMETHOD UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd) = 0;

  /* boolean hdrIsInCache (in string aSearchFolderUri, in nsIMsgDBHdr aHdr); */
  NS_IMETHOD HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgDatabase, NS_IMSGDATABASE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGDATABASE \
  NS_IMETHOD Close(bool aForceCommit) override; \
  NS_IMETHOD Commit(nsMsgDBCommit commitType) override; \
  NS_IMETHOD ForceClosed(void) override; \
  NS_IMETHOD ClearCachedHdrs(void) override; \
  NS_IMETHOD ResetHdrCacheSize(uint32_t size) override; \
  NS_IMETHOD GetDBFolderInfo(nsIDBFolderInfo * *aDBFolderInfo) override; \
  NS_IMETHOD GetDatabaseSize(int64_t *aDatabaseSize) override; \
  NS_IMETHOD GetFolder(nsIMsgFolder * *aFolder) override; \
  NS_IMETHOD GetLastUseTime(PRTime *aLastUseTime) override; \
  NS_IMETHOD SetLastUseTime(PRTime aLastUseTime) override; \
  NS_IMETHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr * *_retval) override; \
  NS_IMETHOD GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr * *_retval) override; \
  NS_IMETHOD GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr * *_retval) override; \
  NS_IMETHOD ContainsKey(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD CreateNewHdr(nsMsgKey aKey, nsIMsgDBHdr * *_retval) override; \
  NS_IMETHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, bool notify) override; \
  NS_IMETHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, bool addHdrToDB, nsIMsgDBHdr * *_retval) override; \
  NS_IMETHOD ListAllKeys(nsIMsgKeyArray *array) override; \
  NS_IMETHOD EnumerateMessages(nsISimpleEnumerator * *_retval) override; \
  NS_IMETHOD ReverseEnumerateMessages(nsISimpleEnumerator * *_retval) override; \
  NS_IMETHOD EnumerateThreads(nsISimpleEnumerator * *_retval) override; \
  NS_IMETHOD GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator * *_retval) override; \
  NS_IMETHOD NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval) override; \
  NS_IMETHOD SyncCounts(void) override; \
  NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread * *_retval) override; \
  NS_IMETHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, bool bRead, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, bool bReplied, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, bool mark, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator) override; \
  NS_IMETHOD MarkMDNNeeded(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD IsMDNNeeded(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD MarkMDNSent(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD IsMDNSent(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD MarkRead(nsMsgKey key, bool bRead, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkReplied(nsMsgKey key, bool bReplied, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkForwarded(nsMsgKey key, bool bForwarded, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkHasAttachments(nsMsgKey key, bool bHasAttachments, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys) override; \
  NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, bool bIgnored, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, bool bWatched, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD IsRead(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD IsIgnored(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD IsWatched(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD IsMarked(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD HasAttachments(nsMsgKey key, bool *_retval) override; \
  NS_IMETHOD MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys) override; \
  NS_IMETHOD DeleteMessages(uint32_t aNumKeys, nsMsgKey *nsMsgKeys, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, bool commit) override; \
  NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, bool commit, bool notify) override; \
  NS_IMETHOD RemoveHeaderMdbRow(nsIMsgDBHdr *msgHdr) override; \
  NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr) override; \
  NS_IMETHOD MarkMarked(nsMsgKey key, bool mark, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD MarkOffline(nsMsgKey key, bool offline, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD SetLabel(nsMsgKey key, nsMsgLabelValue label) override; \
  NS_IMETHOD SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue) override; \
  NS_IMETHOD SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue) override; \
  NS_IMETHOD SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue) override; \
  NS_IMETHOD MarkImapDeleted(nsMsgKey key, bool deleted, nsIDBChangeListener *instigator) override; \
  NS_IMETHOD GetFirstNew(nsMsgKey *aFirstNew) override; \
  NS_IMETHOD GetMsgRetentionSettings(nsIMsgRetentionSettings * *aMsgRetentionSettings) override; \
  NS_IMETHOD SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings) override; \
  NS_IMETHOD ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder) override; \
  NS_IMETHOD GetMsgDownloadSettings(nsIMsgDownloadSettings * *aMsgDownloadSettings) override; \
  NS_IMETHOD SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings) override; \
  NS_IMETHOD HasNew(bool *_retval) override; \
  NS_IMETHOD ClearNewList(bool notify) override; \
  NS_IMETHOD AddToNewList(nsMsgKey key) override; \
  NS_IMETHOD GetSummaryValid(bool *aSummaryValid) override; \
  NS_IMETHOD SetSummaryValid(bool aSummaryValid) override; \
  NS_IMETHOD StartBatch(void) override; \
  NS_IMETHOD EndBatch(void) override; \
  NS_IMETHOD GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation * *_retval) override; \
  NS_IMETHOD RemoveOfflineOp(nsIMsgOfflineImapOperation *op) override; \
  NS_IMETHOD EnumerateOfflineOps(nsISimpleEnumerator * *_retval) override; \
  NS_IMETHOD ListAllOfflineOpIds(nsTArray<nsMsgKey> *offlineOpIds) override; \
  NS_IMETHOD ListAllOfflineDeletes(nsTArray<nsMsgKey> *offlineDeletes) override; \
  NS_IMETHOD ListAllOfflineMsgs(nsIMsgKeyArray *aKeys) override; \
  NS_IMETHOD SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal) override; \
  NS_IMETHOD SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal) override; \
  NS_IMETHOD SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal) override; \
  NS_IMETHOD UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr) override; \
  NS_IMETHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum) override; \
  NS_IMETHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum) override; \
  NS_IMETHOD GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey) override; \
  NS_IMETHOD SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey) override; \
  NS_IMETHOD GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey) override; \
  NS_IMETHOD CreateCollationKey(const nsAString & sourceString, uint32_t *aCount, uint8_t **aKey) override; \
  NS_IMETHOD CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval) override; \
  NS_IMETHOD GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags) override; \
  NS_IMETHOD GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType) override; \
  NS_IMETHOD GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder) override; \
  NS_IMETHOD GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize) override; \
  NS_IMETHOD SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize) override; \
  NS_IMETHOD GetNewList(uint32_t *count, nsMsgKey **newKeys) override; \
  NS_IMETHOD GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator * *_retval) override; \
  NS_IMETHOD RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits) override; \
  NS_IMETHOD UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd) override; \
  NS_IMETHOD HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_retval) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSIMSGDATABASE \
  NS_METHOD Close(bool aForceCommit); \
  NS_METHOD Commit(nsMsgDBCommit commitType); \
  NS_METHOD ForceClosed(void); \
  NS_METHOD ClearCachedHdrs(void); \
  NS_METHOD ResetHdrCacheSize(uint32_t size); \
  NS_METHOD GetDBFolderInfo(nsIDBFolderInfo * *aDBFolderInfo); \
  NS_METHOD GetDatabaseSize(int64_t *aDatabaseSize); \
  NS_METHOD GetFolder(nsIMsgFolder * *aFolder); \
  NS_METHOD GetLastUseTime(PRTime *aLastUseTime); \
  NS_METHOD SetLastUseTime(PRTime aLastUseTime); \
  NS_METHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr * *_retval); \
  NS_METHOD GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr * *_retval); \
  NS_METHOD GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr * *_retval); \
  NS_METHOD ContainsKey(nsMsgKey key, bool *_retval); \
  NS_METHOD CreateNewHdr(nsMsgKey aKey, nsIMsgDBHdr * *_retval); \
  NS_METHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, bool notify); \
  NS_METHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, bool addHdrToDB, nsIMsgDBHdr * *_retval); \
  NS_METHOD ListAllKeys(nsIMsgKeyArray *array); \
  NS_METHOD EnumerateMessages(nsISimpleEnumerator * *_retval); \
  NS_METHOD ReverseEnumerateMessages(nsISimpleEnumerator * *_retval); \
  NS_METHOD EnumerateThreads(nsISimpleEnumerator * *_retval); \
  NS_METHOD GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator * *_retval); \
  NS_METHOD NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval); \
  NS_METHOD SyncCounts(void); \
  NS_METHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread * *_retval); \
  NS_METHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, bool bRead, nsIDBChangeListener *instigator); \
  NS_METHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, bool bReplied, nsIDBChangeListener *instigator); \
  NS_METHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, bool mark, nsIDBChangeListener *instigator); \
  NS_METHOD MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator); \
  NS_METHOD MarkMDNNeeded(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator); \
  NS_METHOD IsMDNNeeded(nsMsgKey key, bool *_retval); \
  NS_METHOD MarkMDNSent(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator); \
  NS_METHOD IsMDNSent(nsMsgKey key, bool *_retval); \
  NS_METHOD MarkRead(nsMsgKey key, bool bRead, nsIDBChangeListener *instigator); \
  NS_METHOD MarkReplied(nsMsgKey key, bool bReplied, nsIDBChangeListener *instigator); \
  NS_METHOD MarkForwarded(nsMsgKey key, bool bForwarded, nsIDBChangeListener *instigator); \
  NS_METHOD MarkHasAttachments(nsMsgKey key, bool bHasAttachments, nsIDBChangeListener *instigator); \
  NS_METHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys); \
  NS_METHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, bool bIgnored, nsIDBChangeListener *instigator); \
  NS_METHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, bool bWatched, nsIDBChangeListener *instigator); \
  NS_METHOD MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator); \
  NS_METHOD IsRead(nsMsgKey key, bool *_retval); \
  NS_METHOD IsIgnored(nsMsgKey key, bool *_retval); \
  NS_METHOD IsWatched(nsMsgKey key, bool *_retval); \
  NS_METHOD IsMarked(nsMsgKey key, bool *_retval); \
  NS_METHOD HasAttachments(nsMsgKey key, bool *_retval); \
  NS_METHOD MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys); \
  NS_METHOD DeleteMessages(uint32_t aNumKeys, nsMsgKey *nsMsgKeys, nsIDBChangeListener *instigator); \
  NS_METHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, bool commit); \
  NS_METHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, bool commit, bool notify); \
  NS_METHOD RemoveHeaderMdbRow(nsIMsgDBHdr *msgHdr); \
  NS_METHOD UndoDelete(nsIMsgDBHdr *msgHdr); \
  NS_METHOD MarkMarked(nsMsgKey key, bool mark, nsIDBChangeListener *instigator); \
  NS_METHOD MarkOffline(nsMsgKey key, bool offline, nsIDBChangeListener *instigator); \
  NS_METHOD SetLabel(nsMsgKey key, nsMsgLabelValue label); \
  NS_METHOD SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue); \
  NS_METHOD SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue); \
  NS_METHOD SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue); \
  NS_METHOD MarkImapDeleted(nsMsgKey key, bool deleted, nsIDBChangeListener *instigator); \
  NS_METHOD GetFirstNew(nsMsgKey *aFirstNew); \
  NS_METHOD GetMsgRetentionSettings(nsIMsgRetentionSettings * *aMsgRetentionSettings); \
  NS_METHOD SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings); \
  NS_METHOD ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder); \
  NS_METHOD GetMsgDownloadSettings(nsIMsgDownloadSettings * *aMsgDownloadSettings); \
  NS_METHOD SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings); \
  NS_METHOD HasNew(bool *_retval); \
  NS_METHOD ClearNewList(bool notify); \
  NS_METHOD AddToNewList(nsMsgKey key); \
  NS_METHOD GetSummaryValid(bool *aSummaryValid); \
  NS_METHOD SetSummaryValid(bool aSummaryValid); \
  NS_METHOD StartBatch(void); \
  NS_METHOD EndBatch(void); \
  NS_METHOD GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation * *_retval); \
  NS_METHOD RemoveOfflineOp(nsIMsgOfflineImapOperation *op); \
  NS_METHOD EnumerateOfflineOps(nsISimpleEnumerator * *_retval); \
  NS_METHOD ListAllOfflineOpIds(nsTArray<nsMsgKey> *offlineOpIds); \
  NS_METHOD ListAllOfflineDeletes(nsTArray<nsMsgKey> *offlineDeletes); \
  NS_METHOD ListAllOfflineMsgs(nsIMsgKeyArray *aKeys); \
  NS_METHOD SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal); \
  NS_METHOD SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal); \
  NS_METHOD SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal); \
  NS_METHOD UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr); \
  NS_METHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum); \
  NS_METHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum); \
  NS_METHOD GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey); \
  NS_METHOD SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey); \
  NS_METHOD GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey); \
  NS_METHOD CreateCollationKey(const nsAString & sourceString, uint32_t *aCount, uint8_t **aKey); \
  NS_METHOD CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval); \
  NS_METHOD GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags); \
  NS_METHOD GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType); \
  NS_METHOD GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder); \
  NS_METHOD GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize); \
  NS_METHOD SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize); \
  NS_METHOD GetNewList(uint32_t *count, nsMsgKey **newKeys); \
  NS_METHOD GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator * *_retval); \
  NS_METHOD RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits); \
  NS_METHOD UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd); \
  NS_METHOD HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGDATABASE(_to) \
  NS_IMETHOD Close(bool aForceCommit) override { return _to Close(aForceCommit); } \
  NS_IMETHOD Commit(nsMsgDBCommit commitType) override { return _to Commit(commitType); } \
  NS_IMETHOD ForceClosed(void) override { return _to ForceClosed(); } \
  NS_IMETHOD ClearCachedHdrs(void) override { return _to ClearCachedHdrs(); } \
  NS_IMETHOD ResetHdrCacheSize(uint32_t size) override { return _to ResetHdrCacheSize(size); } \
  NS_IMETHOD GetDBFolderInfo(nsIDBFolderInfo * *aDBFolderInfo) override { return _to GetDBFolderInfo(aDBFolderInfo); } \
  NS_IMETHOD GetDatabaseSize(int64_t *aDatabaseSize) override { return _to GetDatabaseSize(aDatabaseSize); } \
  NS_IMETHOD GetFolder(nsIMsgFolder * *aFolder) override { return _to GetFolder(aFolder); } \
  NS_IMETHOD GetLastUseTime(PRTime *aLastUseTime) override { return _to GetLastUseTime(aLastUseTime); } \
  NS_IMETHOD SetLastUseTime(PRTime aLastUseTime) override { return _to SetLastUseTime(aLastUseTime); } \
  NS_IMETHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr * *_retval) override { return _to GetMsgHdrForKey(key, _retval); } \
  NS_IMETHOD GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr * *_retval) override { return _to GetMsgHdrForMessageID(messageID, _retval); } \
  NS_IMETHOD GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr * *_retval) override { return _to GetMsgHdrForGMMsgID(aGmailMessageID, _retval); } \
  NS_IMETHOD ContainsKey(nsMsgKey key, bool *_retval) override { return _to ContainsKey(key, _retval); } \
  NS_IMETHOD CreateNewHdr(nsMsgKey aKey, nsIMsgDBHdr * *_retval) override { return _to CreateNewHdr(aKey, _retval); } \
  NS_IMETHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, bool notify) override { return _to AddNewHdrToDB(newHdr, notify); } \
  NS_IMETHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, bool addHdrToDB, nsIMsgDBHdr * *_retval) override { return _to CopyHdrFromExistingHdr(key, existingHdr, addHdrToDB, _retval); } \
  NS_IMETHOD ListAllKeys(nsIMsgKeyArray *array) override { return _to ListAllKeys(array); } \
  NS_IMETHOD EnumerateMessages(nsISimpleEnumerator * *_retval) override { return _to EnumerateMessages(_retval); } \
  NS_IMETHOD ReverseEnumerateMessages(nsISimpleEnumerator * *_retval) override { return _to ReverseEnumerateMessages(_retval); } \
  NS_IMETHOD EnumerateThreads(nsISimpleEnumerator * *_retval) override { return _to EnumerateThreads(_retval); } \
  NS_IMETHOD GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator * *_retval) override { return _to GetFilterEnumerator(searchTerms, reverse, _retval); } \
  NS_IMETHOD NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval) override { return _to NextMatchingHdrs(enumerator, numHdrsToLookAt, maxResults, matchingHdrs, numMatches, _retval); } \
  NS_IMETHOD SyncCounts(void) override { return _to SyncCounts(); } \
  NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread * *_retval) override { return _to GetThreadContainingMsgHdr(msgHdr, _retval); } \
  NS_IMETHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, bool bRead, nsIDBChangeListener *instigator) override { return _to MarkHdrRead(msgHdr, bRead, instigator); } \
  NS_IMETHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, bool bReplied, nsIDBChangeListener *instigator) override { return _to MarkHdrReplied(msgHdr, bReplied, instigator); } \
  NS_IMETHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, bool mark, nsIDBChangeListener *instigator) override { return _to MarkHdrMarked(msgHdr, mark, instigator); } \
  NS_IMETHOD MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator) override { return _to MarkHdrNotNew(aMsgHdr, aInstigator); } \
  NS_IMETHOD MarkMDNNeeded(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override { return _to MarkMDNNeeded(key, bNeeded, instigator); } \
  NS_IMETHOD IsMDNNeeded(nsMsgKey key, bool *_retval) override { return _to IsMDNNeeded(key, _retval); } \
  NS_IMETHOD MarkMDNSent(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override { return _to MarkMDNSent(key, bNeeded, instigator); } \
  NS_IMETHOD IsMDNSent(nsMsgKey key, bool *_retval) override { return _to IsMDNSent(key, _retval); } \
  NS_IMETHOD MarkRead(nsMsgKey key, bool bRead, nsIDBChangeListener *instigator) override { return _to MarkRead(key, bRead, instigator); } \
  NS_IMETHOD MarkReplied(nsMsgKey key, bool bReplied, nsIDBChangeListener *instigator) override { return _to MarkReplied(key, bReplied, instigator); } \
  NS_IMETHOD MarkForwarded(nsMsgKey key, bool bForwarded, nsIDBChangeListener *instigator) override { return _to MarkForwarded(key, bForwarded, instigator); } \
  NS_IMETHOD MarkHasAttachments(nsMsgKey key, bool bHasAttachments, nsIDBChangeListener *instigator) override { return _to MarkHasAttachments(key, bHasAttachments, instigator); } \
  NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys) override { return _to MarkThreadRead(thread, instigator, aCount, aKeys); } \
  NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, bool bIgnored, nsIDBChangeListener *instigator) override { return _to MarkThreadIgnored(thread, threadKey, bIgnored, instigator); } \
  NS_IMETHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, bool bWatched, nsIDBChangeListener *instigator) override { return _to MarkThreadWatched(thread, threadKey, bWatched, instigator); } \
  NS_IMETHOD MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator) override { return _to MarkHeaderKilled(msg, bIgnored, instigator); } \
  NS_IMETHOD IsRead(nsMsgKey key, bool *_retval) override { return _to IsRead(key, _retval); } \
  NS_IMETHOD IsIgnored(nsMsgKey key, bool *_retval) override { return _to IsIgnored(key, _retval); } \
  NS_IMETHOD IsWatched(nsMsgKey key, bool *_retval) override { return _to IsWatched(key, _retval); } \
  NS_IMETHOD IsMarked(nsMsgKey key, bool *_retval) override { return _to IsMarked(key, _retval); } \
  NS_IMETHOD HasAttachments(nsMsgKey key, bool *_retval) override { return _to HasAttachments(key, _retval); } \
  NS_IMETHOD MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys) override { return _to MarkAllRead(aCount, aKeys); } \
  NS_IMETHOD DeleteMessages(uint32_t aNumKeys, nsMsgKey *nsMsgKeys, nsIDBChangeListener *instigator) override { return _to DeleteMessages(aNumKeys, nsMsgKeys, instigator); } \
  NS_IMETHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, bool commit) override { return _to DeleteMessage(key, instigator, commit); } \
  NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, bool commit, bool notify) override { return _to DeleteHeader(msgHdr, instigator, commit, notify); } \
  NS_IMETHOD RemoveHeaderMdbRow(nsIMsgDBHdr *msgHdr) override { return _to RemoveHeaderMdbRow(msgHdr); } \
  NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr) override { return _to UndoDelete(msgHdr); } \
  NS_IMETHOD MarkMarked(nsMsgKey key, bool mark, nsIDBChangeListener *instigator) override { return _to MarkMarked(key, mark, instigator); } \
  NS_IMETHOD MarkOffline(nsMsgKey key, bool offline, nsIDBChangeListener *instigator) override { return _to MarkOffline(key, offline, instigator); } \
  NS_IMETHOD SetLabel(nsMsgKey key, nsMsgLabelValue label) override { return _to SetLabel(key, label); } \
  NS_IMETHOD SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue) override { return _to SetStringProperty(aKey, aProperty, aValue); } \
  NS_IMETHOD SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue) override { return _to SetStringPropertyByHdr(msgHdr, aProperty, aValue); } \
  NS_IMETHOD SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue) override { return _to SetUint32PropertyByHdr(aMsgHdr, aProperty, aValue); } \
  NS_IMETHOD MarkImapDeleted(nsMsgKey key, bool deleted, nsIDBChangeListener *instigator) override { return _to MarkImapDeleted(key, deleted, instigator); } \
  NS_IMETHOD GetFirstNew(nsMsgKey *aFirstNew) override { return _to GetFirstNew(aFirstNew); } \
  NS_IMETHOD GetMsgRetentionSettings(nsIMsgRetentionSettings * *aMsgRetentionSettings) override { return _to GetMsgRetentionSettings(aMsgRetentionSettings); } \
  NS_IMETHOD SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings) override { return _to SetMsgRetentionSettings(aMsgRetentionSettings); } \
  NS_IMETHOD ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder) override { return _to ApplyRetentionSettings(aMsgRetentionSettings, aDeleteViaFolder); } \
  NS_IMETHOD GetMsgDownloadSettings(nsIMsgDownloadSettings * *aMsgDownloadSettings) override { return _to GetMsgDownloadSettings(aMsgDownloadSettings); } \
  NS_IMETHOD SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings) override { return _to SetMsgDownloadSettings(aMsgDownloadSettings); } \
  NS_IMETHOD HasNew(bool *_retval) override { return _to HasNew(_retval); } \
  NS_IMETHOD ClearNewList(bool notify) override { return _to ClearNewList(notify); } \
  NS_IMETHOD AddToNewList(nsMsgKey key) override { return _to AddToNewList(key); } \
  NS_IMETHOD GetSummaryValid(bool *aSummaryValid) override { return _to GetSummaryValid(aSummaryValid); } \
  NS_IMETHOD SetSummaryValid(bool aSummaryValid) override { return _to SetSummaryValid(aSummaryValid); } \
  NS_IMETHOD StartBatch(void) override { return _to StartBatch(); } \
  NS_IMETHOD EndBatch(void) override { return _to EndBatch(); } \
  NS_IMETHOD GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation * *_retval) override { return _to GetOfflineOpForKey(messageKey, create, _retval); } \
  NS_IMETHOD RemoveOfflineOp(nsIMsgOfflineImapOperation *op) override { return _to RemoveOfflineOp(op); } \
  NS_IMETHOD EnumerateOfflineOps(nsISimpleEnumerator * *_retval) override { return _to EnumerateOfflineOps(_retval); } \
  NS_IMETHOD ListAllOfflineOpIds(nsTArray<nsMsgKey> *offlineOpIds) override { return _to ListAllOfflineOpIds(offlineOpIds); } \
  NS_IMETHOD ListAllOfflineDeletes(nsTArray<nsMsgKey> *offlineDeletes) override { return _to ListAllOfflineDeletes(offlineDeletes); } \
  NS_IMETHOD ListAllOfflineMsgs(nsIMsgKeyArray *aKeys) override { return _to ListAllOfflineMsgs(aKeys); } \
  NS_IMETHOD SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal) override { return _to SetAttributeOnPendingHdr(pendingHdr, property, propertyVal); } \
  NS_IMETHOD SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal) override { return _to SetUint32AttributeOnPendingHdr(pendingHdr, property, propertyVal); } \
  NS_IMETHOD SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal) override { return _to SetUint64AttributeOnPendingHdr(aPendingHdr, aProperty, aPropertyVal); } \
  NS_IMETHOD UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr) override { return _to UpdatePendingAttributes(aNewHdr); } \
  NS_IMETHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum) override { return _to GetLowWaterArticleNum(aLowWaterArticleNum); } \
  NS_IMETHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum) override { return _to GetHighWaterArticleNum(aHighWaterArticleNum); } \
  NS_IMETHOD GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey) override { return _to GetNextPseudoMsgKey(aNextPseudoMsgKey); } \
  NS_IMETHOD SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey) override { return _to SetNextPseudoMsgKey(aNextPseudoMsgKey); } \
  NS_IMETHOD GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey) override { return _to GetNextFakeOfflineMsgKey(aNextFakeOfflineMsgKey); } \
  NS_IMETHOD CreateCollationKey(const nsAString & sourceString, uint32_t *aCount, uint8_t **aKey) override { return _to CreateCollationKey(sourceString, aCount, aKey); } \
  NS_IMETHOD CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval) override { return _to CompareCollationKeys(aLen1, key1, aLen2, key2, _retval); } \
  NS_IMETHOD GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags) override { return _to GetDefaultViewFlags(aDefaultViewFlags); } \
  NS_IMETHOD GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType) override { return _to GetDefaultSortType(aDefaultSortType); } \
  NS_IMETHOD GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder) override { return _to GetDefaultSortOrder(aDefaultSortOrder); } \
  NS_IMETHOD GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize) override { return _to GetMsgHdrCacheSize(aMsgHdrCacheSize); } \
  NS_IMETHOD SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize) override { return _to SetMsgHdrCacheSize(aMsgHdrCacheSize); } \
  NS_IMETHOD GetNewList(uint32_t *count, nsMsgKey **newKeys) override { return _to GetNewList(count, newKeys); } \
  NS_IMETHOD GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator * *_retval) override { return _to GetCachedHits(aSearchFolderUri, _retval); } \
  NS_IMETHOD RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits) override { return _to RefreshCache(aSearchFolderUri, aNumKeys, aNewHits, aNumBadHits, aStaleHits); } \
  NS_IMETHOD UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd) override { return _to UpdateHdrInCache(aSearchFolderUri, aHdr, aAdd); } \
  NS_IMETHOD HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_retval) override { return _to HdrIsInCache(aSearchFolderUri, aHdr, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMSGDATABASE(_to) \
  NS_IMETHOD Close(bool aForceCommit) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(aForceCommit); } \
  NS_IMETHOD Commit(nsMsgDBCommit commitType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Commit(commitType); } \
  NS_IMETHOD ForceClosed(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ForceClosed(); } \
  NS_IMETHOD ClearCachedHdrs(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearCachedHdrs(); } \
  NS_IMETHOD ResetHdrCacheSize(uint32_t size) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetHdrCacheSize(size); } \
  NS_IMETHOD GetDBFolderInfo(nsIDBFolderInfo * *aDBFolderInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDBFolderInfo(aDBFolderInfo); } \
  NS_IMETHOD GetDatabaseSize(int64_t *aDatabaseSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDatabaseSize(aDatabaseSize); } \
  NS_IMETHOD GetFolder(nsIMsgFolder * *aFolder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFolder(aFolder); } \
  NS_IMETHOD GetLastUseTime(PRTime *aLastUseTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastUseTime(aLastUseTime); } \
  NS_IMETHOD SetLastUseTime(PRTime aLastUseTime) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLastUseTime(aLastUseTime); } \
  NS_IMETHOD GetMsgHdrForKey(nsMsgKey key, nsIMsgDBHdr * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgHdrForKey(key, _retval); } \
  NS_IMETHOD GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgHdrForMessageID(messageID, _retval); } \
  NS_IMETHOD GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgHdrForGMMsgID(aGmailMessageID, _retval); } \
  NS_IMETHOD ContainsKey(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ContainsKey(key, _retval); } \
  NS_IMETHOD CreateNewHdr(nsMsgKey aKey, nsIMsgDBHdr * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateNewHdr(aKey, _retval); } \
  NS_IMETHOD AddNewHdrToDB(nsIMsgDBHdr *newHdr, bool notify) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddNewHdrToDB(newHdr, notify); } \
  NS_IMETHOD CopyHdrFromExistingHdr(nsMsgKey key, nsIMsgDBHdr *existingHdr, bool addHdrToDB, nsIMsgDBHdr * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyHdrFromExistingHdr(key, existingHdr, addHdrToDB, _retval); } \
  NS_IMETHOD ListAllKeys(nsIMsgKeyArray *array) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ListAllKeys(array); } \
  NS_IMETHOD EnumerateMessages(nsISimpleEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateMessages(_retval); } \
  NS_IMETHOD ReverseEnumerateMessages(nsISimpleEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReverseEnumerateMessages(_retval); } \
  NS_IMETHOD EnumerateThreads(nsISimpleEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateThreads(_retval); } \
  NS_IMETHOD GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFilterEnumerator(searchTerms, reverse, _retval); } \
  NS_IMETHOD NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NextMatchingHdrs(enumerator, numHdrsToLookAt, maxResults, matchingHdrs, numMatches, _retval); } \
  NS_IMETHOD SyncCounts(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SyncCounts(); } \
  NS_IMETHOD GetThreadContainingMsgHdr(nsIMsgDBHdr *msgHdr, nsIMsgThread * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetThreadContainingMsgHdr(msgHdr, _retval); } \
  NS_IMETHOD MarkHdrRead(nsIMsgDBHdr *msgHdr, bool bRead, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHdrRead(msgHdr, bRead, instigator); } \
  NS_IMETHOD MarkHdrReplied(nsIMsgDBHdr *msgHdr, bool bReplied, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHdrReplied(msgHdr, bReplied, instigator); } \
  NS_IMETHOD MarkHdrMarked(nsIMsgDBHdr *msgHdr, bool mark, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHdrMarked(msgHdr, mark, instigator); } \
  NS_IMETHOD MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHdrNotNew(aMsgHdr, aInstigator); } \
  NS_IMETHOD MarkMDNNeeded(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkMDNNeeded(key, bNeeded, instigator); } \
  NS_IMETHOD IsMDNNeeded(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsMDNNeeded(key, _retval); } \
  NS_IMETHOD MarkMDNSent(nsMsgKey key, bool bNeeded, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkMDNSent(key, bNeeded, instigator); } \
  NS_IMETHOD IsMDNSent(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsMDNSent(key, _retval); } \
  NS_IMETHOD MarkRead(nsMsgKey key, bool bRead, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkRead(key, bRead, instigator); } \
  NS_IMETHOD MarkReplied(nsMsgKey key, bool bReplied, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkReplied(key, bReplied, instigator); } \
  NS_IMETHOD MarkForwarded(nsMsgKey key, bool bForwarded, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkForwarded(key, bForwarded, instigator); } \
  NS_IMETHOD MarkHasAttachments(nsMsgKey key, bool bHasAttachments, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHasAttachments(key, bHasAttachments, instigator); } \
  NS_IMETHOD MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkThreadRead(thread, instigator, aCount, aKeys); } \
  NS_IMETHOD MarkThreadIgnored(nsIMsgThread *thread, nsMsgKey threadKey, bool bIgnored, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkThreadIgnored(thread, threadKey, bIgnored, instigator); } \
  NS_IMETHOD MarkThreadWatched(nsIMsgThread *thread, nsMsgKey threadKey, bool bWatched, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkThreadWatched(thread, threadKey, bWatched, instigator); } \
  NS_IMETHOD MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkHeaderKilled(msg, bIgnored, instigator); } \
  NS_IMETHOD IsRead(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsRead(key, _retval); } \
  NS_IMETHOD IsIgnored(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsIgnored(key, _retval); } \
  NS_IMETHOD IsWatched(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsWatched(key, _retval); } \
  NS_IMETHOD IsMarked(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsMarked(key, _retval); } \
  NS_IMETHOD HasAttachments(nsMsgKey key, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAttachments(key, _retval); } \
  NS_IMETHOD MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkAllRead(aCount, aKeys); } \
  NS_IMETHOD DeleteMessages(uint32_t aNumKeys, nsMsgKey *nsMsgKeys, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteMessages(aNumKeys, nsMsgKeys, instigator); } \
  NS_IMETHOD DeleteMessage(nsMsgKey key, nsIDBChangeListener *instigator, bool commit) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteMessage(key, instigator, commit); } \
  NS_IMETHOD DeleteHeader(nsIMsgDBHdr *msgHdr, nsIDBChangeListener *instigator, bool commit, bool notify) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteHeader(msgHdr, instigator, commit, notify); } \
  NS_IMETHOD RemoveHeaderMdbRow(nsIMsgDBHdr *msgHdr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveHeaderMdbRow(msgHdr); } \
  NS_IMETHOD UndoDelete(nsIMsgDBHdr *msgHdr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UndoDelete(msgHdr); } \
  NS_IMETHOD MarkMarked(nsMsgKey key, bool mark, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkMarked(key, mark, instigator); } \
  NS_IMETHOD MarkOffline(nsMsgKey key, bool offline, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkOffline(key, offline, instigator); } \
  NS_IMETHOD SetLabel(nsMsgKey key, nsMsgLabelValue label) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLabel(key, label); } \
  NS_IMETHOD SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStringProperty(aKey, aProperty, aValue); } \
  NS_IMETHOD SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStringPropertyByHdr(msgHdr, aProperty, aValue); } \
  NS_IMETHOD SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUint32PropertyByHdr(aMsgHdr, aProperty, aValue); } \
  NS_IMETHOD MarkImapDeleted(nsMsgKey key, bool deleted, nsIDBChangeListener *instigator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MarkImapDeleted(key, deleted, instigator); } \
  NS_IMETHOD GetFirstNew(nsMsgKey *aFirstNew) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFirstNew(aFirstNew); } \
  NS_IMETHOD GetMsgRetentionSettings(nsIMsgRetentionSettings * *aMsgRetentionSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgRetentionSettings(aMsgRetentionSettings); } \
  NS_IMETHOD SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMsgRetentionSettings(aMsgRetentionSettings); } \
  NS_IMETHOD ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ApplyRetentionSettings(aMsgRetentionSettings, aDeleteViaFolder); } \
  NS_IMETHOD GetMsgDownloadSettings(nsIMsgDownloadSettings * *aMsgDownloadSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgDownloadSettings(aMsgDownloadSettings); } \
  NS_IMETHOD SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMsgDownloadSettings(aMsgDownloadSettings); } \
  NS_IMETHOD HasNew(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasNew(_retval); } \
  NS_IMETHOD ClearNewList(bool notify) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearNewList(notify); } \
  NS_IMETHOD AddToNewList(nsMsgKey key) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddToNewList(key); } \
  NS_IMETHOD GetSummaryValid(bool *aSummaryValid) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSummaryValid(aSummaryValid); } \
  NS_IMETHOD SetSummaryValid(bool aSummaryValid) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSummaryValid(aSummaryValid); } \
  NS_IMETHOD StartBatch(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StartBatch(); } \
  NS_IMETHOD EndBatch(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EndBatch(); } \
  NS_IMETHOD GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOfflineOpForKey(messageKey, create, _retval); } \
  NS_IMETHOD RemoveOfflineOp(nsIMsgOfflineImapOperation *op) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveOfflineOp(op); } \
  NS_IMETHOD EnumerateOfflineOps(nsISimpleEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateOfflineOps(_retval); } \
  NS_IMETHOD ListAllOfflineOpIds(nsTArray<nsMsgKey> *offlineOpIds) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ListAllOfflineOpIds(offlineOpIds); } \
  NS_IMETHOD ListAllOfflineDeletes(nsTArray<nsMsgKey> *offlineDeletes) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ListAllOfflineDeletes(offlineDeletes); } \
  NS_IMETHOD ListAllOfflineMsgs(nsIMsgKeyArray *aKeys) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ListAllOfflineMsgs(aKeys); } \
  NS_IMETHOD SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAttributeOnPendingHdr(pendingHdr, property, propertyVal); } \
  NS_IMETHOD SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUint32AttributeOnPendingHdr(pendingHdr, property, propertyVal); } \
  NS_IMETHOD SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUint64AttributeOnPendingHdr(aPendingHdr, aProperty, aPropertyVal); } \
  NS_IMETHOD UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdatePendingAttributes(aNewHdr); } \
  NS_IMETHOD GetLowWaterArticleNum(nsMsgKey *aLowWaterArticleNum) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLowWaterArticleNum(aLowWaterArticleNum); } \
  NS_IMETHOD GetHighWaterArticleNum(nsMsgKey *aHighWaterArticleNum) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHighWaterArticleNum(aHighWaterArticleNum); } \
  NS_IMETHOD GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNextPseudoMsgKey(aNextPseudoMsgKey); } \
  NS_IMETHOD SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNextPseudoMsgKey(aNextPseudoMsgKey); } \
  NS_IMETHOD GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNextFakeOfflineMsgKey(aNextFakeOfflineMsgKey); } \
  NS_IMETHOD CreateCollationKey(const nsAString & sourceString, uint32_t *aCount, uint8_t **aKey) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCollationKey(sourceString, aCount, aKey); } \
  NS_IMETHOD CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareCollationKeys(aLen1, key1, aLen2, key2, _retval); } \
  NS_IMETHOD GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultViewFlags(aDefaultViewFlags); } \
  NS_IMETHOD GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultSortType(aDefaultSortType); } \
  NS_IMETHOD GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultSortOrder(aDefaultSortOrder); } \
  NS_IMETHOD GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMsgHdrCacheSize(aMsgHdrCacheSize); } \
  NS_IMETHOD SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMsgHdrCacheSize(aMsgHdrCacheSize); } \
  NS_IMETHOD GetNewList(uint32_t *count, nsMsgKey **newKeys) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNewList(count, newKeys); } \
  NS_IMETHOD GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCachedHits(aSearchFolderUri, _retval); } \
  NS_IMETHOD RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RefreshCache(aSearchFolderUri, aNumKeys, aNewHits, aNumBadHits, aStaleHits); } \
  NS_IMETHOD UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateHdrInCache(aSearchFolderUri, aHdr, aAdd); } \
  NS_IMETHOD HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HdrIsInCache(aSearchFolderUri, aHdr, _retval); } 

#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();

private:
  ~nsMsgDatabase();

protected:
  /* additional members */
};

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

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

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

/* void Close (in boolean aForceCommit); */
NS_IMETHODIMP nsMsgDatabase::Close(bool aForceCommit)
{
    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;
}

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

/* void resetHdrCacheSize (in unsigned long size); */
NS_IMETHODIMP nsMsgDatabase::ResetHdrCacheSize(uint32_t size)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

/* readonly attribute long long databaseSize; */
NS_IMETHODIMP nsMsgDatabase::GetDatabaseSize(int64_t *aDatabaseSize)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIMsgFolder folder; */
NS_IMETHODIMP nsMsgDatabase::GetFolder(nsIMsgFolder * *aFolder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute PRTime lastUseTime; */
NS_IMETHODIMP nsMsgDatabase::GetLastUseTime(PRTime *aLastUseTime)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgDatabase::SetLastUseTime(PRTime aLastUseTime)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

/* nsIMsgDBHdr getMsgHdrForMessageID (in string messageID); */
NS_IMETHODIMP nsMsgDatabase::GetMsgHdrForMessageID(const char * messageID, nsIMsgDBHdr * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIMsgDBHdr GetMsgHdrForGMMsgID (in string aGmailMessageID); */
NS_IMETHODIMP nsMsgDatabase::GetMsgHdrForGMMsgID(const char * aGmailMessageID, nsIMsgDBHdr * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

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

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

/* void ListAllKeys (in nsIMsgKeyArray array); */
NS_IMETHODIMP nsMsgDatabase::ListAllKeys(nsIMsgKeyArray *array)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

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

/* nsISimpleEnumerator getFilterEnumerator (in nsIArray searchTerms, [optional] in boolean reverse); */
NS_IMETHODIMP nsMsgDatabase::GetFilterEnumerator(nsIArray *searchTerms, bool reverse, nsISimpleEnumerator * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean nextMatchingHdrs (in nsISimpleEnumerator enumerator, in long numHdrsToLookAt, in long maxResults, in nsIMutableArray matchingHdrs, out long numMatches); */
NS_IMETHODIMP nsMsgDatabase::NextMatchingHdrs(nsISimpleEnumerator *enumerator, int32_t numHdrsToLookAt, int32_t maxResults, nsIMutableArray *matchingHdrs, int32_t *numMatches, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void syncCounts (); */
NS_IMETHODIMP nsMsgDatabase::SyncCounts()
{
    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, bool 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, bool 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, bool mark, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkHdrNotNew (in nsIMsgDBHdr aMsgHdr, in nsIDBChangeListener aInstigator); */
NS_IMETHODIMP nsMsgDatabase::MarkHdrNotNew(nsIMsgDBHdr *aMsgHdr, nsIDBChangeListener *aInstigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

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

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

/* void MarkRead (in nsMsgKey key, in boolean bRead, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkRead(nsMsgKey key, bool 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, bool 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, bool 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, bool bHasAttachments, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkThreadRead (in nsIMsgThread thread, in nsIDBChangeListener instigator, out unsigned long aCount, [array, size_is (aCount)] out nsMsgKey aKeys); */
NS_IMETHODIMP nsMsgDatabase::MarkThreadRead(nsIMsgThread *thread, nsIDBChangeListener *instigator, uint32_t *aCount, nsMsgKey **aKeys)
{
    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, bool 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, bool bWatched, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void MarkHeaderKilled (in nsIMsgDBHdr msg, in boolean bIgnored, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkHeaderKilled(nsIMsgDBHdr *msg, bool bIgnored, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

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

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

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

/* void MarkAllRead (out unsigned long aCount, [array, size_is (aCount)] out nsMsgKey aKeys); */
NS_IMETHODIMP nsMsgDatabase::MarkAllRead(uint32_t *aCount, nsMsgKey **aKeys)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void deleteMessages (in unsigned long aNumKeys, [array, size_is (aNumKeys)] in nsMsgKey nsMsgKeys, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::DeleteMessages(uint32_t aNumKeys, nsMsgKey *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, bool 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, bool commit, bool notify)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

/* void MarkMarked (in nsMsgKey key, in boolean mark, in nsIDBChangeListener instigator); */
NS_IMETHODIMP nsMsgDatabase::MarkMarked(nsMsgKey key, bool 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, bool offline, nsIDBChangeListener *instigator)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void SetLabel (in nsMsgKey key, in nsMsgLabelValue label); */
NS_IMETHODIMP nsMsgDatabase::SetLabel(nsMsgKey key, nsMsgLabelValue label)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setStringProperty (in nsMsgKey aKey, in string aProperty, in string aValue); */
NS_IMETHODIMP nsMsgDatabase::SetStringProperty(nsMsgKey aKey, const char * aProperty, const char * aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setStringPropertyByHdr (in nsIMsgDBHdr msgHdr, in string aProperty, in string aValue); */
NS_IMETHODIMP nsMsgDatabase::SetStringPropertyByHdr(nsIMsgDBHdr *msgHdr, const char * aProperty, const char * aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setUint32PropertyByHdr (in nsIMsgDBHdr aMsgHdr, in string aProperty, in unsigned long aValue); */
NS_IMETHODIMP nsMsgDatabase::SetUint32PropertyByHdr(nsIMsgDBHdr *aMsgHdr, const char * aProperty, uint32_t aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

/* attribute nsIMsgRetentionSettings msgRetentionSettings; */
NS_IMETHODIMP nsMsgDatabase::GetMsgRetentionSettings(nsIMsgRetentionSettings * *aMsgRetentionSettings)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgDatabase::SetMsgRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void applyRetentionSettings (in nsIMsgRetentionSettings aMsgRetentionSettings, in boolean aDeleteViaFolder); */
NS_IMETHODIMP nsMsgDatabase::ApplyRetentionSettings(nsIMsgRetentionSettings *aMsgRetentionSettings, bool aDeleteViaFolder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIMsgDownloadSettings msgDownloadSettings; */
NS_IMETHODIMP nsMsgDatabase::GetMsgDownloadSettings(nsIMsgDownloadSettings * *aMsgDownloadSettings)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgDatabase::SetMsgDownloadSettings(nsIMsgDownloadSettings *aMsgDownloadSettings)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

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

/* attribute boolean summaryValid; */
NS_IMETHODIMP nsMsgDatabase::GetSummaryValid(bool *aSummaryValid)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgDatabase::SetSummaryValid(bool aSummaryValid)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

/* nsIMsgOfflineImapOperation GetOfflineOpForKey (in nsMsgKey messageKey, in boolean create); */
NS_IMETHODIMP nsMsgDatabase::GetOfflineOpForKey(nsMsgKey messageKey, bool create, nsIMsgOfflineImapOperation * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void RemoveOfflineOp (in nsIMsgOfflineImapOperation op); */
NS_IMETHODIMP nsMsgDatabase::RemoveOfflineOp(nsIMsgOfflineImapOperation *op)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

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

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

/* void ListAllOfflineMsgs (in nsIMsgKeyArray aKeys); */
NS_IMETHODIMP nsMsgDatabase::ListAllOfflineMsgs(nsIMsgKeyArray *aKeys)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAttributeOnPendingHdr (in nsIMsgDBHdr pendingHdr, in string property, in string propertyVal); */
NS_IMETHODIMP nsMsgDatabase::SetAttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, const char * propertyVal)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setUint32AttributeOnPendingHdr (in nsIMsgDBHdr pendingHdr, in string property, in unsigned long propertyVal); */
NS_IMETHODIMP nsMsgDatabase::SetUint32AttributeOnPendingHdr(nsIMsgDBHdr *pendingHdr, const char * property, uint32_t propertyVal)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setUint64AttributeOnPendingHdr (in nsIMsgDBHdr aPendingHdr, in string aProperty, in unsigned long long aPropertyVal); */
NS_IMETHODIMP nsMsgDatabase::SetUint64AttributeOnPendingHdr(nsIMsgDBHdr *aPendingHdr, const char * aProperty, uint64_t aPropertyVal)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void updatePendingAttributes (in nsIMsgDBHdr aNewHdr); */
NS_IMETHODIMP nsMsgDatabase::UpdatePendingAttributes(nsIMsgDBHdr *aNewHdr)
{
    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;
}

/* attribute nsMsgKey nextPseudoMsgKey; */
NS_IMETHODIMP nsMsgDatabase::GetNextPseudoMsgKey(nsMsgKey *aNextPseudoMsgKey)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgDatabase::SetNextPseudoMsgKey(nsMsgKey aNextPseudoMsgKey)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsMsgKey nextFakeOfflineMsgKey; */
NS_IMETHODIMP nsMsgDatabase::GetNextFakeOfflineMsgKey(nsMsgKey *aNextFakeOfflineMsgKey)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void createCollationKey (in AString sourceString, out unsigned long aCount, [array, size_is (aCount)] out octet aKey); */
NS_IMETHODIMP nsMsgDatabase::CreateCollationKey(const nsAString & sourceString, uint32_t *aCount, uint8_t **aKey)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* long compareCollationKeys (in unsigned long aLen1, [array, size_is (aLen1)] in octet key1, in unsigned long aLen2, [array, size_is (aLen2)] in octet key2); */
NS_IMETHODIMP nsMsgDatabase::CompareCollationKeys(uint32_t aLen1, uint8_t *key1, uint32_t aLen2, uint8_t *key2, int32_t *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsMsgViewFlagsTypeValue defaultViewFlags; */
NS_IMETHODIMP nsMsgDatabase::GetDefaultViewFlags(nsMsgViewFlagsTypeValue *aDefaultViewFlags)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsMsgViewSortTypeValue defaultSortType; */
NS_IMETHODIMP nsMsgDatabase::GetDefaultSortType(nsMsgViewSortTypeValue *aDefaultSortType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsMsgViewSortOrderValue defaultSortOrder; */
NS_IMETHODIMP nsMsgDatabase::GetDefaultSortOrder(nsMsgViewSortOrderValue *aDefaultSortOrder)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute unsigned long msgHdrCacheSize; */
NS_IMETHODIMP nsMsgDatabase::GetMsgHdrCacheSize(uint32_t *aMsgHdrCacheSize)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMsgDatabase::SetMsgHdrCacheSize(uint32_t aMsgHdrCacheSize)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getNewList (out unsigned long count, [array, size_is (count)] out nsMsgKey newKeys); */
NS_IMETHODIMP nsMsgDatabase::GetNewList(uint32_t *count, nsMsgKey **newKeys)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISimpleEnumerator getCachedHits (in string aSearchFolderUri); */
NS_IMETHODIMP nsMsgDatabase::GetCachedHits(const char * aSearchFolderUri, nsISimpleEnumerator * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void refreshCache (in string aSearchFolderUri, in unsigned long aNumKeys, [array, size_is (aNumKeys)] in nsMsgKey aNewHits, out unsigned long aNumBadHits, [array, size_is (aNumBadHits)] out nsMsgKey aStaleHits); */
NS_IMETHODIMP nsMsgDatabase::RefreshCache(const char * aSearchFolderUri, uint32_t aNumKeys, nsMsgKey *aNewHits, uint32_t *aNumBadHits, nsMsgKey **aStaleHits)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void updateHdrInCache (in string aSearchFolderUri, in nsIMsgDBHdr aHdr, in boolean aAdd); */
NS_IMETHODIMP nsMsgDatabase::UpdateHdrInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool aAdd)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean hdrIsInCache (in string aSearchFolderUri, in nsIMsgDBHdr aHdr); */
NS_IMETHODIMP nsMsgDatabase::HdrIsInCache(const char * aSearchFolderUri, nsIMsgDBHdr *aHdr, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgDatabase_h__ */
