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

#ifndef __gen_nsIX509CertDB_h__
#define __gen_nsIX509CertDB_h__


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

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

class nsIX509Cert; /* forward declaration */

class nsIPK11Token; /* forward declaration */

class nsILocalFile; /* forward declaration */

class nsIInterfaceRequestor; /* forward declaration */

class nsIURI; /* forward declaration */

#define NS_X509CERTDB_CID { /* da48b3c0-1284-11d5-ac67-000064657374 */ \
    0xda48b3c0,                                                        \
    0x1284,                                                            \
    0x11d5,                                                            \
    {0xac, 0x67, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74}                   \
  }
#define NS_X509CERTDB_CONTRACTID "@mozilla.org/security/x509certdb;1"
typedef int (*nsCertCompareFunc)(nsIX509Cert *a, nsIX509Cert *b);

/* starting interface:    nsIOCSPResponder */
#define NS_IOCSPRESPONDER_IID_STR "96b2f5ae-4334-11d5-ba27-00108303b117"

#define NS_IOCSPRESPONDER_IID \
  {0x96b2f5ae, 0x4334, 0x11d5, \
    { 0xba, 0x27, 0x00, 0x10, 0x83, 0x03, 0xb1, 0x17 }}

class NS_NO_VTABLE nsIOCSPResponder : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IOCSPRESPONDER_IID)

  /* readonly attribute wstring responseSigner; */
  NS_IMETHOD GetResponseSigner(PRUnichar * *aResponseSigner) = 0;

  /* readonly attribute wstring serviceURL; */
  NS_IMETHOD GetServiceURL(PRUnichar * *aServiceURL) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIOCSPRESPONDER \
  NS_IMETHOD GetResponseSigner(PRUnichar * *aResponseSigner); \
  NS_IMETHOD GetServiceURL(PRUnichar * *aServiceURL); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIOCSPRESPONDER(_to) \
  NS_IMETHOD GetResponseSigner(PRUnichar * *aResponseSigner) { return _to GetResponseSigner(aResponseSigner); } \
  NS_IMETHOD GetServiceURL(PRUnichar * *aServiceURL) { return _to GetServiceURL(aServiceURL); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIOCSPRESPONDER(_to) \
  NS_IMETHOD GetResponseSigner(PRUnichar * *aResponseSigner) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetResponseSigner(aResponseSigner); } \
  NS_IMETHOD GetServiceURL(PRUnichar * *aServiceURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServiceURL(aServiceURL); } 

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

/* Header file */
class nsOCSPResponder : public nsIOCSPResponder
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIOCSPRESPONDER

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsOCSPResponder, nsIOCSPResponder)

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

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

/* readonly attribute wstring responseSigner; */
NS_IMETHODIMP nsOCSPResponder::GetResponseSigner(PRUnichar * *aResponseSigner)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring serviceURL; */
NS_IMETHODIMP nsOCSPResponder::GetServiceURL(PRUnichar * *aServiceURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsICrlEntry */
#define NS_ICRLENTRY_IID_STR "c185d920-4a3e-11d5-ba27-00108303b117"

#define NS_ICRLENTRY_IID \
  {0xc185d920, 0x4a3e, 0x11d5, \
    { 0xba, 0x27, 0x00, 0x10, 0x83, 0x03, 0xb1, 0x17 }}

class NS_NO_VTABLE nsICrlEntry : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICRLENTRY_IID)

  /* readonly attribute wstring org; */
  NS_IMETHOD GetOrg(PRUnichar * *aOrg) = 0;

  /* readonly attribute wstring orgUnit; */
  NS_IMETHOD GetOrgUnit(PRUnichar * *aOrgUnit) = 0;

  /* readonly attribute wstring lastUpdateLocale; */
  NS_IMETHOD GetLastUpdateLocale(PRUnichar * *aLastUpdateLocale) = 0;

  /* readonly attribute wstring nextUpdateLocale; */
  NS_IMETHOD GetNextUpdateLocale(PRUnichar * *aNextUpdateLocale) = 0;

  /* readonly attribute wstring nameInDb; */
  NS_IMETHOD GetNameInDb(PRUnichar * *aNameInDb) = 0;

  /* readonly attribute wstring lastFetchURL; */
  NS_IMETHOD GetLastFetchURL(PRUnichar * *aLastFetchURL) = 0;

  enum { TYPE_AUTOUPDATE_TIME_BASED = 1U };

  enum { TYPE_AUTOUPDATE_FREQ_BASED = 2U };

  /* wstring ComputeNextAutoUpdateTime (in unsigned long autoUpdateType, in double noOfDays); */
  NS_IMETHOD ComputeNextAutoUpdateTime(PRUint32 autoUpdateType, double noOfDays, PRUnichar **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICRLENTRY \
  NS_IMETHOD GetOrg(PRUnichar * *aOrg); \
  NS_IMETHOD GetOrgUnit(PRUnichar * *aOrgUnit); \
  NS_IMETHOD GetLastUpdateLocale(PRUnichar * *aLastUpdateLocale); \
  NS_IMETHOD GetNextUpdateLocale(PRUnichar * *aNextUpdateLocale); \
  NS_IMETHOD GetNameInDb(PRUnichar * *aNameInDb); \
  NS_IMETHOD GetLastFetchURL(PRUnichar * *aLastFetchURL); \
  NS_IMETHOD ComputeNextAutoUpdateTime(PRUint32 autoUpdateType, double noOfDays, PRUnichar **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICRLENTRY(_to) \
  NS_IMETHOD GetOrg(PRUnichar * *aOrg) { return _to GetOrg(aOrg); } \
  NS_IMETHOD GetOrgUnit(PRUnichar * *aOrgUnit) { return _to GetOrgUnit(aOrgUnit); } \
  NS_IMETHOD GetLastUpdateLocale(PRUnichar * *aLastUpdateLocale) { return _to GetLastUpdateLocale(aLastUpdateLocale); } \
  NS_IMETHOD GetNextUpdateLocale(PRUnichar * *aNextUpdateLocale) { return _to GetNextUpdateLocale(aNextUpdateLocale); } \
  NS_IMETHOD GetNameInDb(PRUnichar * *aNameInDb) { return _to GetNameInDb(aNameInDb); } \
  NS_IMETHOD GetLastFetchURL(PRUnichar * *aLastFetchURL) { return _to GetLastFetchURL(aLastFetchURL); } \
  NS_IMETHOD ComputeNextAutoUpdateTime(PRUint32 autoUpdateType, double noOfDays, PRUnichar **_retval) { return _to ComputeNextAutoUpdateTime(autoUpdateType, noOfDays, _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_NSICRLENTRY(_to) \
  NS_IMETHOD GetOrg(PRUnichar * *aOrg) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrg(aOrg); } \
  NS_IMETHOD GetOrgUnit(PRUnichar * *aOrgUnit) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrgUnit(aOrgUnit); } \
  NS_IMETHOD GetLastUpdateLocale(PRUnichar * *aLastUpdateLocale) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastUpdateLocale(aLastUpdateLocale); } \
  NS_IMETHOD GetNextUpdateLocale(PRUnichar * *aNextUpdateLocale) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNextUpdateLocale(aNextUpdateLocale); } \
  NS_IMETHOD GetNameInDb(PRUnichar * *aNameInDb) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNameInDb(aNameInDb); } \
  NS_IMETHOD GetLastFetchURL(PRUnichar * *aLastFetchURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastFetchURL(aLastFetchURL); } \
  NS_IMETHOD ComputeNextAutoUpdateTime(PRUint32 autoUpdateType, double noOfDays, PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ComputeNextAutoUpdateTime(autoUpdateType, noOfDays, _retval); } 

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

/* Header file */
class nsCrlEntry : public nsICrlEntry
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSICRLENTRY

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsCrlEntry, nsICrlEntry)

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

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

/* readonly attribute wstring org; */
NS_IMETHODIMP nsCrlEntry::GetOrg(PRUnichar * *aOrg)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring orgUnit; */
NS_IMETHODIMP nsCrlEntry::GetOrgUnit(PRUnichar * *aOrgUnit)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring lastUpdateLocale; */
NS_IMETHODIMP nsCrlEntry::GetLastUpdateLocale(PRUnichar * *aLastUpdateLocale)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring nextUpdateLocale; */
NS_IMETHODIMP nsCrlEntry::GetNextUpdateLocale(PRUnichar * *aNextUpdateLocale)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring nameInDb; */
NS_IMETHODIMP nsCrlEntry::GetNameInDb(PRUnichar * *aNameInDb)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring lastFetchURL; */
NS_IMETHODIMP nsCrlEntry::GetLastFetchURL(PRUnichar * *aLastFetchURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* wstring ComputeNextAutoUpdateTime (in unsigned long autoUpdateType, in double noOfDays); */
NS_IMETHODIMP nsCrlEntry::ComputeNextAutoUpdateTime(PRUint32 autoUpdateType, double noOfDays, PRUnichar **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIX509CertDB */
#define NS_IX509CERTDB_IID_STR "da48b3c0-1284-11d5-ac67-000064657374"

#define NS_IX509CERTDB_IID \
  {0xda48b3c0, 0x1284, 0x11d5, \
    { 0xac, 0x67, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}

class NS_NO_VTABLE nsIX509CertDB : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IX509CERTDB_IID)

  enum { UNTRUSTED = 0U };

  enum { TRUSTED_SSL = 1U };

  enum { TRUSTED_EMAIL = 2U };

  enum { TRUSTED_OBJSIGN = 4U };

  /* nsIX509Cert getCertByNickname (in nsIPK11Token aToken, in wstring aNickname); */
  NS_IMETHOD GetCertByNickname(nsIPK11Token *aToken, const PRUnichar *aNickname, nsIX509Cert **_retval) = 0;

  /* nsIX509Cert getCertByDBKey (in string aDBkey, in nsIPK11Token aToken); */
  NS_IMETHOD GetCertByDBKey(const char *aDBkey, nsIPK11Token *aToken, nsIX509Cert **_retval) = 0;

  /* void getCertNicknames (in nsIPK11Token aToken, in unsigned long aType, out unsigned long count, [array, size_is (count)] out wstring certNameList); */
  NS_IMETHOD GetCertNicknames(nsIPK11Token *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) = 0;

  /* [noscript, notxpcom] boolean getCertsByType (in unsigned long aType, in nsCertCompareFunc aCertCmpFn, out nsISupportsArray certs); */
  NS_IMETHOD_(PRBool) GetCertsByType(PRUint32 aType, nsCertCompareFunc aCertCmpFn, nsISupportsArray **certs) = 0;

  /* nsIX509Cert getEmailEncryptionCert (in wstring aNickname); */
  NS_IMETHOD GetEmailEncryptionCert(const PRUnichar *aNickname, nsIX509Cert **_retval) = 0;

  /* nsIX509Cert getEmailSigningCert (in wstring aNickname); */
  NS_IMETHOD GetEmailSigningCert(const PRUnichar *aNickname, nsIX509Cert **_retval) = 0;

  /* nsIX509Cert getCertByEmailAddress (in nsIPK11Token aToken, in string aEmailAddress); */
  NS_IMETHOD GetCertByEmailAddress(nsIPK11Token *aToken, const char *aEmailAddress, nsIX509Cert **_retval) = 0;

  /* [noscript] void importCertificates (in charPtr data, in unsigned long length, in unsigned long type, in nsIInterfaceRequestor ctx); */
  NS_IMETHOD ImportCertificates(char * data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) = 0;

  /* [noscript] void importEmailCertificate (in charPtr data, in unsigned long length, in nsIInterfaceRequestor ctx); */
  NS_IMETHOD ImportEmailCertificate(char * data, PRUint32 length, nsIInterfaceRequestor *ctx) = 0;

  /* [noscript] void importUserCertificate (in charPtr data, in unsigned long length, in nsIInterfaceRequestor ctx); */
  NS_IMETHOD ImportUserCertificate(char * data, PRUint32 length, nsIInterfaceRequestor *ctx) = 0;

  /* void deleteCertificate (in nsIX509Cert aCert); */
  NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert) = 0;

  /* void setCertTrust (in nsIX509Cert cert, in unsigned long type, in unsigned long trust); */
  NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) = 0;

  /* boolean getCertTrust (in nsIX509Cert cert, in unsigned long certType, in unsigned long trustType); */
  NS_IMETHOD GetCertTrust(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) = 0;

  /* void importPKCS12File (in nsIPK11Token aToken, in nsILocalFile aFile); */
  NS_IMETHOD ImportPKCS12File(nsIPK11Token *aToken, nsILocalFile *aFile) = 0;

  /* void exportPKCS12File (in nsIPK11Token aToken, in nsILocalFile aFile, in PRUint32 count, [array, size_is (count)] in nsIX509Cert aCerts); */
  NS_IMETHOD ExportPKCS12File(nsIPK11Token *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) = 0;

  /* nsISupportsArray getOCSPResponders (); */
  NS_IMETHOD GetOCSPResponders(nsISupportsArray **_retval) = 0;

  /* [noscript] void importCrl (in charPtr data, in unsigned long length, in nsIURI uri, in PRUint32 type, in PRBool doSilentDownload, in wstring crlKey); */
  NS_IMETHOD ImportCrl(char * data, PRUint32 length, nsIURI *uri, PRUint32 type, PRBool doSilentDownload, const PRUnichar *crlKey) = 0;

  /* boolean updateCRLFromURL (in wstring url, in wstring key); */
  NS_IMETHOD UpdateCRLFromURL(const PRUnichar *url, const PRUnichar *key, PRBool *_retval) = 0;

  /* nsISupportsArray getCrls (); */
  NS_IMETHOD GetCrls(nsISupportsArray **_retval) = 0;

  /* void deleteCrl (in PRUint32 crlIndex); */
  NS_IMETHOD DeleteCrl(PRUint32 crlIndex) = 0;

  /* void rescheduleCRLAutoUpdate (); */
  NS_IMETHOD RescheduleCRLAutoUpdate(void) = 0;

  /* readonly attribute boolean ocspOn; */
  NS_IMETHOD GetOcspOn(PRBool *aOcspOn) = 0;

  /* void disableOCSP (); */
  NS_IMETHOD DisableOCSP(void) = 0;

  /* void enableOCSP (); */
  NS_IMETHOD EnableOCSP(void) = 0;

  /* nsIX509Cert constructX509FromBase64 (in string base64); */
  NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIX509CERTDB \
  NS_IMETHOD GetCertByNickname(nsIPK11Token *aToken, const PRUnichar *aNickname, nsIX509Cert **_retval); \
  NS_IMETHOD GetCertByDBKey(const char *aDBkey, nsIPK11Token *aToken, nsIX509Cert **_retval); \
  NS_IMETHOD GetCertNicknames(nsIPK11Token *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList); \
  NS_IMETHOD_(PRBool) GetCertsByType(PRUint32 aType, nsCertCompareFunc aCertCmpFn, nsISupportsArray **certs); \
  NS_IMETHOD GetEmailEncryptionCert(const PRUnichar *aNickname, nsIX509Cert **_retval); \
  NS_IMETHOD GetEmailSigningCert(const PRUnichar *aNickname, nsIX509Cert **_retval); \
  NS_IMETHOD GetCertByEmailAddress(nsIPK11Token *aToken, const char *aEmailAddress, nsIX509Cert **_retval); \
  NS_IMETHOD ImportCertificates(char * data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx); \
  NS_IMETHOD ImportEmailCertificate(char * data, PRUint32 length, nsIInterfaceRequestor *ctx); \
  NS_IMETHOD ImportUserCertificate(char * data, PRUint32 length, nsIInterfaceRequestor *ctx); \
  NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert); \
  NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust); \
  NS_IMETHOD GetCertTrust(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval); \
  NS_IMETHOD ImportPKCS12File(nsIPK11Token *aToken, nsILocalFile *aFile); \
  NS_IMETHOD ExportPKCS12File(nsIPK11Token *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts); \
  NS_IMETHOD GetOCSPResponders(nsISupportsArray **_retval); \
  NS_IMETHOD ImportCrl(char * data, PRUint32 length, nsIURI *uri, PRUint32 type, PRBool doSilentDownload, const PRUnichar *crlKey); \
  NS_IMETHOD UpdateCRLFromURL(const PRUnichar *url, const PRUnichar *key, PRBool *_retval); \
  NS_IMETHOD GetCrls(nsISupportsArray **_retval); \
  NS_IMETHOD DeleteCrl(PRUint32 crlIndex); \
  NS_IMETHOD RescheduleCRLAutoUpdate(void); \
  NS_IMETHOD GetOcspOn(PRBool *aOcspOn); \
  NS_IMETHOD DisableOCSP(void); \
  NS_IMETHOD EnableOCSP(void); \
  NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIX509CERTDB(_to) \
  NS_IMETHOD GetCertByNickname(nsIPK11Token *aToken, const PRUnichar *aNickname, nsIX509Cert **_retval) { return _to GetCertByNickname(aToken, aNickname, _retval); } \
  NS_IMETHOD GetCertByDBKey(const char *aDBkey, nsIPK11Token *aToken, nsIX509Cert **_retval) { return _to GetCertByDBKey(aDBkey, aToken, _retval); } \
  NS_IMETHOD GetCertNicknames(nsIPK11Token *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) { return _to GetCertNicknames(aToken, aType, count, certNameList); } \
  NS_IMETHOD_(PRBool) GetCertsByType(PRUint32 aType, nsCertCompareFunc aCertCmpFn, nsISupportsArray **certs) { return _to GetCertsByType(aType, aCertCmpFn, certs); } \
  NS_IMETHOD GetEmailEncryptionCert(const PRUnichar *aNickname, nsIX509Cert **_retval) { return _to GetEmailEncryptionCert(aNickname, _retval); } \
  NS_IMETHOD GetEmailSigningCert(const PRUnichar *aNickname, nsIX509Cert **_retval) { return _to GetEmailSigningCert(aNickname, _retval); } \
  NS_IMETHOD GetCertByEmailAddress(nsIPK11Token *aToken, const char *aEmailAddress, nsIX509Cert **_retval) { return _to GetCertByEmailAddress(aToken, aEmailAddress, _retval); } \
  NS_IMETHOD ImportCertificates(char * data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) { return _to ImportCertificates(data, length, type, ctx); } \
  NS_IMETHOD ImportEmailCertificate(char * data, PRUint32 length, nsIInterfaceRequestor *ctx) { return _to ImportEmailCertificate(data, length, ctx); } \
  NS_IMETHOD ImportUserCertificate(char * data, PRUint32 length, nsIInterfaceRequestor *ctx) { return _to ImportUserCertificate(data, length, ctx); } \
  NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert) { return _to DeleteCertificate(aCert); } \
  NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) { return _to SetCertTrust(cert, type, trust); } \
  NS_IMETHOD GetCertTrust(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) { return _to GetCertTrust(cert, certType, trustType, _retval); } \
  NS_IMETHOD ImportPKCS12File(nsIPK11Token *aToken, nsILocalFile *aFile) { return _to ImportPKCS12File(aToken, aFile); } \
  NS_IMETHOD ExportPKCS12File(nsIPK11Token *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) { return _to ExportPKCS12File(aToken, aFile, count, aCerts); } \
  NS_IMETHOD GetOCSPResponders(nsISupportsArray **_retval) { return _to GetOCSPResponders(_retval); } \
  NS_IMETHOD ImportCrl(char * data, PRUint32 length, nsIURI *uri, PRUint32 type, PRBool doSilentDownload, const PRUnichar *crlKey) { return _to ImportCrl(data, length, uri, type, doSilentDownload, crlKey); } \
  NS_IMETHOD UpdateCRLFromURL(const PRUnichar *url, const PRUnichar *key, PRBool *_retval) { return _to UpdateCRLFromURL(url, key, _retval); } \
  NS_IMETHOD GetCrls(nsISupportsArray **_retval) { return _to GetCrls(_retval); } \
  NS_IMETHOD DeleteCrl(PRUint32 crlIndex) { return _to DeleteCrl(crlIndex); } \
  NS_IMETHOD RescheduleCRLAutoUpdate(void) { return _to RescheduleCRLAutoUpdate(); } \
  NS_IMETHOD GetOcspOn(PRBool *aOcspOn) { return _to GetOcspOn(aOcspOn); } \
  NS_IMETHOD DisableOCSP(void) { return _to DisableOCSP(); } \
  NS_IMETHOD EnableOCSP(void) { return _to EnableOCSP(); } \
  NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) { return _to ConstructX509FromBase64(base64, _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_NSIX509CERTDB(_to) \
  NS_IMETHOD GetCertByNickname(nsIPK11Token *aToken, const PRUnichar *aNickname, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCertByNickname(aToken, aNickname, _retval); } \
  NS_IMETHOD GetCertByDBKey(const char *aDBkey, nsIPK11Token *aToken, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCertByDBKey(aDBkey, aToken, _retval); } \
  NS_IMETHOD GetCertNicknames(nsIPK11Token *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCertNicknames(aToken, aType, count, certNameList); } \
  NS_IMETHOD_(PRBool) GetCertsByType(PRUint32 aType, nsCertCompareFunc aCertCmpFn, nsISupportsArray **certs) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCertsByType(aType, aCertCmpFn, certs); } \
  NS_IMETHOD GetEmailEncryptionCert(const PRUnichar *aNickname, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEmailEncryptionCert(aNickname, _retval); } \
  NS_IMETHOD GetEmailSigningCert(const PRUnichar *aNickname, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEmailSigningCert(aNickname, _retval); } \
  NS_IMETHOD GetCertByEmailAddress(nsIPK11Token *aToken, const char *aEmailAddress, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCertByEmailAddress(aToken, aEmailAddress, _retval); } \
  NS_IMETHOD ImportCertificates(char * data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportCertificates(data, length, type, ctx); } \
  NS_IMETHOD ImportEmailCertificate(char * data, PRUint32 length, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportEmailCertificate(data, length, ctx); } \
  NS_IMETHOD ImportUserCertificate(char * data, PRUint32 length, nsIInterfaceRequestor *ctx) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportUserCertificate(data, length, ctx); } \
  NS_IMETHOD DeleteCertificate(nsIX509Cert *aCert) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCertificate(aCert); } \
  NS_IMETHOD SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCertTrust(cert, type, trust); } \
  NS_IMETHOD GetCertTrust(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCertTrust(cert, certType, trustType, _retval); } \
  NS_IMETHOD ImportPKCS12File(nsIPK11Token *aToken, nsILocalFile *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportPKCS12File(aToken, aFile); } \
  NS_IMETHOD ExportPKCS12File(nsIPK11Token *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExportPKCS12File(aToken, aFile, count, aCerts); } \
  NS_IMETHOD GetOCSPResponders(nsISupportsArray **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOCSPResponders(_retval); } \
  NS_IMETHOD ImportCrl(char * data, PRUint32 length, nsIURI *uri, PRUint32 type, PRBool doSilentDownload, const PRUnichar *crlKey) { return !_to ? NS_ERROR_NULL_POINTER : _to->ImportCrl(data, length, uri, type, doSilentDownload, crlKey); } \
  NS_IMETHOD UpdateCRLFromURL(const PRUnichar *url, const PRUnichar *key, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateCRLFromURL(url, key, _retval); } \
  NS_IMETHOD GetCrls(nsISupportsArray **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCrls(_retval); } \
  NS_IMETHOD DeleteCrl(PRUint32 crlIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCrl(crlIndex); } \
  NS_IMETHOD RescheduleCRLAutoUpdate(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RescheduleCRLAutoUpdate(); } \
  NS_IMETHOD GetOcspOn(PRBool *aOcspOn) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOcspOn(aOcspOn); } \
  NS_IMETHOD DisableOCSP(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DisableOCSP(); } \
  NS_IMETHOD EnableOCSP(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnableOCSP(); } \
  NS_IMETHOD ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConstructX509FromBase64(base64, _retval); } 

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

/* Header file */
class nsX509CertDB : public nsIX509CertDB
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIX509CERTDB

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

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsX509CertDB, nsIX509CertDB)

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

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

/* nsIX509Cert getCertByNickname (in nsIPK11Token aToken, in wstring aNickname); */
NS_IMETHODIMP nsX509CertDB::GetCertByNickname(nsIPK11Token *aToken, const PRUnichar *aNickname, nsIX509Cert **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIX509Cert getCertByDBKey (in string aDBkey, in nsIPK11Token aToken); */
NS_IMETHODIMP nsX509CertDB::GetCertByDBKey(const char *aDBkey, nsIPK11Token *aToken, nsIX509Cert **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getCertNicknames (in nsIPK11Token aToken, in unsigned long aType, out unsigned long count, [array, size_is (count)] out wstring certNameList); */
NS_IMETHODIMP nsX509CertDB::GetCertNicknames(nsIPK11Token *aToken, PRUint32 aType, PRUint32 *count, PRUnichar ***certNameList)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript, notxpcom] boolean getCertsByType (in unsigned long aType, in nsCertCompareFunc aCertCmpFn, out nsISupportsArray certs); */
NS_IMETHODIMP_(PRBool) nsX509CertDB::GetCertsByType(PRUint32 aType, nsCertCompareFunc aCertCmpFn, nsISupportsArray **certs)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIX509Cert getEmailEncryptionCert (in wstring aNickname); */
NS_IMETHODIMP nsX509CertDB::GetEmailEncryptionCert(const PRUnichar *aNickname, nsIX509Cert **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIX509Cert getEmailSigningCert (in wstring aNickname); */
NS_IMETHODIMP nsX509CertDB::GetEmailSigningCert(const PRUnichar *aNickname, nsIX509Cert **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIX509Cert getCertByEmailAddress (in nsIPK11Token aToken, in string aEmailAddress); */
NS_IMETHODIMP nsX509CertDB::GetCertByEmailAddress(nsIPK11Token *aToken, const char *aEmailAddress, nsIX509Cert **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void importCertificates (in charPtr data, in unsigned long length, in unsigned long type, in nsIInterfaceRequestor ctx); */
NS_IMETHODIMP nsX509CertDB::ImportCertificates(char * data, PRUint32 length, PRUint32 type, nsIInterfaceRequestor *ctx)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void importEmailCertificate (in charPtr data, in unsigned long length, in nsIInterfaceRequestor ctx); */
NS_IMETHODIMP nsX509CertDB::ImportEmailCertificate(char * data, PRUint32 length, nsIInterfaceRequestor *ctx)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void importUserCertificate (in charPtr data, in unsigned long length, in nsIInterfaceRequestor ctx); */
NS_IMETHODIMP nsX509CertDB::ImportUserCertificate(char * data, PRUint32 length, nsIInterfaceRequestor *ctx)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void deleteCertificate (in nsIX509Cert aCert); */
NS_IMETHODIMP nsX509CertDB::DeleteCertificate(nsIX509Cert *aCert)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setCertTrust (in nsIX509Cert cert, in unsigned long type, in unsigned long trust); */
NS_IMETHODIMP nsX509CertDB::SetCertTrust(nsIX509Cert *cert, PRUint32 type, PRUint32 trust)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean getCertTrust (in nsIX509Cert cert, in unsigned long certType, in unsigned long trustType); */
NS_IMETHODIMP nsX509CertDB::GetCertTrust(nsIX509Cert *cert, PRUint32 certType, PRUint32 trustType, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void importPKCS12File (in nsIPK11Token aToken, in nsILocalFile aFile); */
NS_IMETHODIMP nsX509CertDB::ImportPKCS12File(nsIPK11Token *aToken, nsILocalFile *aFile)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void exportPKCS12File (in nsIPK11Token aToken, in nsILocalFile aFile, in PRUint32 count, [array, size_is (count)] in nsIX509Cert aCerts); */
NS_IMETHODIMP nsX509CertDB::ExportPKCS12File(nsIPK11Token *aToken, nsILocalFile *aFile, PRUint32 count, nsIX509Cert **aCerts)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISupportsArray getOCSPResponders (); */
NS_IMETHODIMP nsX509CertDB::GetOCSPResponders(nsISupportsArray **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void importCrl (in charPtr data, in unsigned long length, in nsIURI uri, in PRUint32 type, in PRBool doSilentDownload, in wstring crlKey); */
NS_IMETHODIMP nsX509CertDB::ImportCrl(char * data, PRUint32 length, nsIURI *uri, PRUint32 type, PRBool doSilentDownload, const PRUnichar *crlKey)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean updateCRLFromURL (in wstring url, in wstring key); */
NS_IMETHODIMP nsX509CertDB::UpdateCRLFromURL(const PRUnichar *url, const PRUnichar *key, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISupportsArray getCrls (); */
NS_IMETHODIMP nsX509CertDB::GetCrls(nsISupportsArray **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void deleteCrl (in PRUint32 crlIndex); */
NS_IMETHODIMP nsX509CertDB::DeleteCrl(PRUint32 crlIndex)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void rescheduleCRLAutoUpdate (); */
NS_IMETHODIMP nsX509CertDB::RescheduleCRLAutoUpdate()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean ocspOn; */
NS_IMETHODIMP nsX509CertDB::GetOcspOn(PRBool *aOcspOn)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void disableOCSP (); */
NS_IMETHODIMP nsX509CertDB::DisableOCSP()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void enableOCSP (); */
NS_IMETHODIMP nsX509CertDB::EnableOCSP()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIX509Cert constructX509FromBase64 (in string base64); */
NS_IMETHODIMP nsX509CertDB::ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIX509CertDB_h__ */
