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

#ifndef __gen_nsICMSMessage_h__
#define __gen_nsICMSMessage_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
#define NS_CMSMESSAGE_CONTRACTID "@mozilla.org/nsCMSMessage;1"
class nsIX509Cert; /* forward declaration */

class nsIArray; /* forward declaration */


/* starting interface:    nsICMSMessage */
#define NS_ICMSMESSAGE_IID_STR "cfd6af3d-8ac6-401a-afc8-3f94275c1c11"

#define NS_ICMSMESSAGE_IID \
  {0xcfd6af3d, 0x8ac6, 0x401a, \
    { 0xaf, 0xc8, 0x3f, 0x94, 0x27, 0x5c, 0x1c, 0x11 }}

class NS_NO_VTABLE nsICMSMessage : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICMSMESSAGE_IID)

  /* void contentIsSigned (out boolean aSigned); */
  NS_IMETHOD ContentIsSigned(bool *aSigned) = 0;

  /* void contentIsEncrypted (out boolean aEncrypted); */
  NS_IMETHOD ContentIsEncrypted(bool *aEncrypted) = 0;

  /* void getSignerCommonName (out string aName); */
  NS_IMETHOD GetSignerCommonName(char * *aName) = 0;

  /* void getSignerEmailAddress (out string aEmail); */
  NS_IMETHOD GetSignerEmailAddress(char * *aEmail) = 0;

  /* void getSignerCert (out nsIX509Cert scert); */
  NS_IMETHOD GetSignerCert(nsIX509Cert * *scert) = 0;

  /* void getEncryptionCert (out nsIX509Cert ecert); */
  NS_IMETHOD GetEncryptionCert(nsIX509Cert * *ecert) = 0;

  /* void verifySignature (); */
  NS_IMETHOD VerifySignature(void) = 0;

  /* void verifyDetachedSignature (in UnsignedCharPtr aDigestData, in unsigned long aDigestDataLen); */
  NS_IMETHOD VerifyDetachedSignature(unsigned char *aDigestData, uint32_t aDigestDataLen) = 0;

  /* void CreateEncrypted (in nsIArray aRecipientCerts); */
  NS_IMETHOD CreateEncrypted(nsIArray *aRecipientCerts) = 0;

  /* void CreateSigned (in nsIX509Cert scert, in nsIX509Cert ecert, in UnsignedCharPtr aDigestData, in unsigned long aDigestDataLen); */
  NS_IMETHOD CreateSigned(nsIX509Cert *scert, nsIX509Cert *ecert, unsigned char *aDigestData, uint32_t aDigestDataLen) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsICMSMessage, NS_ICMSMESSAGE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICMSMESSAGE \
  NS_IMETHOD ContentIsSigned(bool *aSigned) MOZ_OVERRIDE; \
  NS_IMETHOD ContentIsEncrypted(bool *aEncrypted) MOZ_OVERRIDE; \
  NS_IMETHOD GetSignerCommonName(char * *aName) MOZ_OVERRIDE; \
  NS_IMETHOD GetSignerEmailAddress(char * *aEmail) MOZ_OVERRIDE; \
  NS_IMETHOD GetSignerCert(nsIX509Cert * *scert) MOZ_OVERRIDE; \
  NS_IMETHOD GetEncryptionCert(nsIX509Cert * *ecert) MOZ_OVERRIDE; \
  NS_IMETHOD VerifySignature(void) MOZ_OVERRIDE; \
  NS_IMETHOD VerifyDetachedSignature(unsigned char *aDigestData, uint32_t aDigestDataLen) MOZ_OVERRIDE; \
  NS_IMETHOD CreateEncrypted(nsIArray *aRecipientCerts) MOZ_OVERRIDE; \
  NS_IMETHOD CreateSigned(nsIX509Cert *scert, nsIX509Cert *ecert, unsigned char *aDigestData, uint32_t aDigestDataLen) MOZ_OVERRIDE; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICMSMESSAGE(_to) \
  NS_IMETHOD ContentIsSigned(bool *aSigned) MOZ_OVERRIDE { return _to ContentIsSigned(aSigned); } \
  NS_IMETHOD ContentIsEncrypted(bool *aEncrypted) MOZ_OVERRIDE { return _to ContentIsEncrypted(aEncrypted); } \
  NS_IMETHOD GetSignerCommonName(char * *aName) MOZ_OVERRIDE { return _to GetSignerCommonName(aName); } \
  NS_IMETHOD GetSignerEmailAddress(char * *aEmail) MOZ_OVERRIDE { return _to GetSignerEmailAddress(aEmail); } \
  NS_IMETHOD GetSignerCert(nsIX509Cert * *scert) MOZ_OVERRIDE { return _to GetSignerCert(scert); } \
  NS_IMETHOD GetEncryptionCert(nsIX509Cert * *ecert) MOZ_OVERRIDE { return _to GetEncryptionCert(ecert); } \
  NS_IMETHOD VerifySignature(void) MOZ_OVERRIDE { return _to VerifySignature(); } \
  NS_IMETHOD VerifyDetachedSignature(unsigned char *aDigestData, uint32_t aDigestDataLen) MOZ_OVERRIDE { return _to VerifyDetachedSignature(aDigestData, aDigestDataLen); } \
  NS_IMETHOD CreateEncrypted(nsIArray *aRecipientCerts) MOZ_OVERRIDE { return _to CreateEncrypted(aRecipientCerts); } \
  NS_IMETHOD CreateSigned(nsIX509Cert *scert, nsIX509Cert *ecert, unsigned char *aDigestData, uint32_t aDigestDataLen) MOZ_OVERRIDE { return _to CreateSigned(scert, ecert, aDigestData, aDigestDataLen); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICMSMESSAGE(_to) \
  NS_IMETHOD ContentIsSigned(bool *aSigned) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->ContentIsSigned(aSigned); } \
  NS_IMETHOD ContentIsEncrypted(bool *aEncrypted) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->ContentIsEncrypted(aEncrypted); } \
  NS_IMETHOD GetSignerCommonName(char * *aName) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSignerCommonName(aName); } \
  NS_IMETHOD GetSignerEmailAddress(char * *aEmail) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSignerEmailAddress(aEmail); } \
  NS_IMETHOD GetSignerCert(nsIX509Cert * *scert) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSignerCert(scert); } \
  NS_IMETHOD GetEncryptionCert(nsIX509Cert * *ecert) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEncryptionCert(ecert); } \
  NS_IMETHOD VerifySignature(void) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->VerifySignature(); } \
  NS_IMETHOD VerifyDetachedSignature(unsigned char *aDigestData, uint32_t aDigestDataLen) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->VerifyDetachedSignature(aDigestData, aDigestDataLen); } \
  NS_IMETHOD CreateEncrypted(nsIArray *aRecipientCerts) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateEncrypted(aRecipientCerts); } \
  NS_IMETHOD CreateSigned(nsIX509Cert *scert, nsIX509Cert *ecert, unsigned char *aDigestData, uint32_t aDigestDataLen) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateSigned(scert, ecert, aDigestData, aDigestDataLen); } 

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

/* Header file */
class nsCMSMessage : public nsICMSMessage
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSICMSMESSAGE

  nsCMSMessage();

private:
  ~nsCMSMessage();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsCMSMessage, nsICMSMessage)

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

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

/* void contentIsSigned (out boolean aSigned); */
NS_IMETHODIMP nsCMSMessage::ContentIsSigned(bool *aSigned)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void contentIsEncrypted (out boolean aEncrypted); */
NS_IMETHODIMP nsCMSMessage::ContentIsEncrypted(bool *aEncrypted)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getSignerCommonName (out string aName); */
NS_IMETHODIMP nsCMSMessage::GetSignerCommonName(char * *aName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getSignerEmailAddress (out string aEmail); */
NS_IMETHODIMP nsCMSMessage::GetSignerEmailAddress(char * *aEmail)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getSignerCert (out nsIX509Cert scert); */
NS_IMETHODIMP nsCMSMessage::GetSignerCert(nsIX509Cert * *scert)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void getEncryptionCert (out nsIX509Cert ecert); */
NS_IMETHODIMP nsCMSMessage::GetEncryptionCert(nsIX509Cert * *ecert)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void verifySignature (); */
NS_IMETHODIMP nsCMSMessage::VerifySignature()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void verifyDetachedSignature (in UnsignedCharPtr aDigestData, in unsigned long aDigestDataLen); */
NS_IMETHODIMP nsCMSMessage::VerifyDetachedSignature(unsigned char *aDigestData, uint32_t aDigestDataLen)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void CreateEncrypted (in nsIArray aRecipientCerts); */
NS_IMETHODIMP nsCMSMessage::CreateEncrypted(nsIArray *aRecipientCerts)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void CreateSigned (in nsIX509Cert scert, in nsIX509Cert ecert, in UnsignedCharPtr aDigestData, in unsigned long aDigestDataLen); */
NS_IMETHODIMP nsCMSMessage::CreateSigned(nsIX509Cert *scert, nsIX509Cert *ecert, unsigned char *aDigestData, uint32_t aDigestDataLen)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsICMSMessage_h__ */
