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

#ifndef __gen_nsIMsgHeaderParser_h__
#define __gen_nsIMsgHeaderParser_h__


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

#include "js/Value.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
#define NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID \
  "@mozilla.org/messenger/headerparser;1"

/* starting interface:    msgIAddressObject */
#define MSGIADDRESSOBJECT_IID_STR "b19f5636-ebc4-470e-b46c-98b5fc7e88c9"

#define MSGIADDRESSOBJECT_IID \
  {0xb19f5636, 0xebc4, 0x470e, \
    { 0xb4, 0x6c, 0x98, 0xb5, 0xfc, 0x7e, 0x88, 0xc9 }}

class NS_NO_VTABLE msgIAddressObject : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(MSGIADDRESSOBJECT_IID)

  /* readonly attribute AString name; */
  NS_IMETHOD GetName(nsAString & aName) = 0;

  /* readonly attribute AString email; */
  NS_IMETHOD GetEmail(nsAString & aEmail) = 0;

  /* readonly attribute jsval group; */
  NS_IMETHOD GetGroup(JS::MutableHandleValue aGroup) = 0;

  /* AString toString (); */
  NS_IMETHOD ToString(nsAString & _retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(msgIAddressObject, MSGIADDRESSOBJECT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MSGIADDRESSOBJECT \
  NS_IMETHOD GetName(nsAString & aName) override; \
  NS_IMETHOD GetEmail(nsAString & aEmail) override; \
  NS_IMETHOD GetGroup(JS::MutableHandleValue aGroup) override; \
  NS_IMETHOD ToString(nsAString & _retval) override; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MSGIADDRESSOBJECT(_to) \
  NS_IMETHOD GetName(nsAString & aName) override { return _to GetName(aName); } \
  NS_IMETHOD GetEmail(nsAString & aEmail) override { return _to GetEmail(aEmail); } \
  NS_IMETHOD GetGroup(JS::MutableHandleValue aGroup) override { return _to GetGroup(aGroup); } \
  NS_IMETHOD ToString(nsAString & _retval) override { return _to ToString(_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_MSGIADDRESSOBJECT(_to) \
  NS_IMETHOD GetName(nsAString & aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  NS_IMETHOD GetEmail(nsAString & aEmail) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEmail(aEmail); } \
  NS_IMETHOD GetGroup(JS::MutableHandleValue aGroup) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGroup(aGroup); } \
  NS_IMETHOD ToString(nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } 

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

/* Header file */
class _MYCLASS_ : public msgIAddressObject
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_MSGIADDRESSOBJECT

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* readonly attribute AString name; */
NS_IMETHODIMP _MYCLASS_::GetName(nsAString & aName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute AString email; */
NS_IMETHODIMP _MYCLASS_::GetEmail(nsAString & aEmail)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute jsval group; */
NS_IMETHODIMP _MYCLASS_::GetGroup(JS::MutableHandleValue aGroup)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString toString (); */
NS_IMETHODIMP _MYCLASS_::ToString(nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIMsgHeaderParser */
#define NS_IMSGHEADERPARSER_IID_STR "af2f9dd1-0226-4835-b981-a4f88b5e97cc"

#define NS_IMSGHEADERPARSER_IID \
  {0xaf2f9dd1, 0x0226, 0x4835, \
    { 0xb9, 0x81, 0xa4, 0xf8, 0x8b, 0x5e, 0x97, 0xcc }}

class NS_NO_VTABLE nsIMsgHeaderParser : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMSGHEADERPARSER_IID)

  /* void parseEncodedHeader (in ACString aEncodedHeader, in string aHeaderCharset, [optional] in bool aPreserveGroups, [optional] out unsigned long length, [array, size_is (length), retval] out msgIAddressObject addresses); */
  NS_IMETHOD ParseEncodedHeader(const nsACString & aEncodedHeader, const char * aHeaderCharset, bool aPreserveGroups, uint32_t *length, msgIAddressObject * **addresses) = 0;

  /* void parseDecodedHeader (in AString aDecodedHeader, [optional] in bool aPreserveGroups, [optional] out unsigned long length, [array, size_is (length), retval] out msgIAddressObject addresses); */
  NS_IMETHOD ParseDecodedHeader(const nsAString & aDecodedHeader, bool aPreserveGroups, uint32_t *length, msgIAddressObject * **addresses) = 0;

  /* AString makeMimeHeader ([array, size_is (aLength)] in msgIAddressObject aAddresses, in unsigned long aLength); */
  NS_IMETHOD MakeMimeHeader(msgIAddressObject **aAddresses, uint32_t aLength, nsAString & _retval) = 0;

  /* AString extractFirstName (in AString aDecodedHeader); */
  NS_IMETHOD ExtractFirstName(const nsAString & aDecodedHeader, nsAString & _retval) = 0;

  /* AUTF8String removeDuplicateAddresses (in AUTF8String aAddrs, [optional] in AUTF8String aOtherAddrs); */
  NS_IMETHOD RemoveDuplicateAddresses(const nsACString & aAddrs, const nsACString & aOtherAddrs, nsACString & _retval) = 0;

  /* msgIAddressObject makeMailboxObject (in AString aName, in AString aEmail); */
  NS_IMETHOD MakeMailboxObject(const nsAString & aName, const nsAString & aEmail, msgIAddressObject * *_retval) = 0;

  /* msgIAddressObject makeGroupObject (in AString aName, [array, size_is (aLength)] in msgIAddressObject aMembers, in unsigned long aLength); */
  NS_IMETHOD MakeGroupObject(const nsAString & aName, msgIAddressObject **aMembers, uint32_t aLength, msgIAddressObject * *_retval) = 0;

  /* void makeFromDisplayAddress (in AString aDisplayAddresses, [optional] out unsigned long count, [array, size_is (count), retval] out msgIAddressObject addresses); */
  NS_IMETHOD MakeFromDisplayAddress(const nsAString & aDisplayAddresses, uint32_t *count, msgIAddressObject * **addresses) = 0;

  /* [deprecated] void parseHeadersWithArray (in wstring aLine, [array, size_is (count)] out wstring aEmailAddresses, [array, size_is (count)] out wstring aNames, [array, size_is (count)] out wstring aFullNames, [retval] out unsigned long count); */
  NS_IMETHOD ParseHeadersWithArray(const char16_t * aLine, char16_t * **aEmailAddresses, char16_t * **aNames, char16_t * **aFullNames, uint32_t *count) = 0;

  /* [deprecated] ACString extractHeaderAddressMailboxes (in ACString aLine); */
  NS_IMETHOD ExtractHeaderAddressMailboxes(const nsACString & aLine, nsACString & _retval) = 0;

  /* [deprecated] AUTF8String extractHeaderAddressNames (in AUTF8String aLine); */
  NS_IMETHOD ExtractHeaderAddressNames(const nsACString & aLine, nsACString & _retval) = 0;

  /* [deprecated] AUTF8String extractHeaderAddressName (in AUTF8String aLine); */
  NS_IMETHOD ExtractHeaderAddressName(const nsACString & aLine, nsACString & _retval) = 0;

  /* [deprecated] AString makeMimeAddress (in AString aName, in AString aEmail); */
  NS_IMETHOD MakeMimeAddress(const nsAString & aName, const nsAString & aEmail, nsAString & _retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIMsgHeaderParser, NS_IMSGHEADERPARSER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMSGHEADERPARSER \
  NS_IMETHOD ParseEncodedHeader(const nsACString & aEncodedHeader, const char * aHeaderCharset, bool aPreserveGroups, uint32_t *length, msgIAddressObject * **addresses) override; \
  NS_IMETHOD ParseDecodedHeader(const nsAString & aDecodedHeader, bool aPreserveGroups, uint32_t *length, msgIAddressObject * **addresses) override; \
  NS_IMETHOD MakeMimeHeader(msgIAddressObject **aAddresses, uint32_t aLength, nsAString & _retval) override; \
  NS_IMETHOD ExtractFirstName(const nsAString & aDecodedHeader, nsAString & _retval) override; \
  NS_IMETHOD RemoveDuplicateAddresses(const nsACString & aAddrs, const nsACString & aOtherAddrs, nsACString & _retval) override; \
  NS_IMETHOD MakeMailboxObject(const nsAString & aName, const nsAString & aEmail, msgIAddressObject * *_retval) override; \
  NS_IMETHOD MakeGroupObject(const nsAString & aName, msgIAddressObject **aMembers, uint32_t aLength, msgIAddressObject * *_retval) override; \
  NS_IMETHOD MakeFromDisplayAddress(const nsAString & aDisplayAddresses, uint32_t *count, msgIAddressObject * **addresses) override; \
  NS_IMETHOD ParseHeadersWithArray(const char16_t * aLine, char16_t * **aEmailAddresses, char16_t * **aNames, char16_t * **aFullNames, uint32_t *count) override; \
  NS_IMETHOD ExtractHeaderAddressMailboxes(const nsACString & aLine, nsACString & _retval) override; \
  NS_IMETHOD ExtractHeaderAddressNames(const nsACString & aLine, nsACString & _retval) override; \
  NS_IMETHOD ExtractHeaderAddressName(const nsACString & aLine, nsACString & _retval) override; \
  NS_IMETHOD MakeMimeAddress(const nsAString & aName, const nsAString & aEmail, nsAString & _retval) override; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMSGHEADERPARSER(_to) \
  NS_IMETHOD ParseEncodedHeader(const nsACString & aEncodedHeader, const char * aHeaderCharset, bool aPreserveGroups, uint32_t *length, msgIAddressObject * **addresses) override { return _to ParseEncodedHeader(aEncodedHeader, aHeaderCharset, aPreserveGroups, length, addresses); } \
  NS_IMETHOD ParseDecodedHeader(const nsAString & aDecodedHeader, bool aPreserveGroups, uint32_t *length, msgIAddressObject * **addresses) override { return _to ParseDecodedHeader(aDecodedHeader, aPreserveGroups, length, addresses); } \
  NS_IMETHOD MakeMimeHeader(msgIAddressObject **aAddresses, uint32_t aLength, nsAString & _retval) override { return _to MakeMimeHeader(aAddresses, aLength, _retval); } \
  NS_IMETHOD ExtractFirstName(const nsAString & aDecodedHeader, nsAString & _retval) override { return _to ExtractFirstName(aDecodedHeader, _retval); } \
  NS_IMETHOD RemoveDuplicateAddresses(const nsACString & aAddrs, const nsACString & aOtherAddrs, nsACString & _retval) override { return _to RemoveDuplicateAddresses(aAddrs, aOtherAddrs, _retval); } \
  NS_IMETHOD MakeMailboxObject(const nsAString & aName, const nsAString & aEmail, msgIAddressObject * *_retval) override { return _to MakeMailboxObject(aName, aEmail, _retval); } \
  NS_IMETHOD MakeGroupObject(const nsAString & aName, msgIAddressObject **aMembers, uint32_t aLength, msgIAddressObject * *_retval) override { return _to MakeGroupObject(aName, aMembers, aLength, _retval); } \
  NS_IMETHOD MakeFromDisplayAddress(const nsAString & aDisplayAddresses, uint32_t *count, msgIAddressObject * **addresses) override { return _to MakeFromDisplayAddress(aDisplayAddresses, count, addresses); } \
  NS_IMETHOD ParseHeadersWithArray(const char16_t * aLine, char16_t * **aEmailAddresses, char16_t * **aNames, char16_t * **aFullNames, uint32_t *count) override { return _to ParseHeadersWithArray(aLine, aEmailAddresses, aNames, aFullNames, count); } \
  NS_IMETHOD ExtractHeaderAddressMailboxes(const nsACString & aLine, nsACString & _retval) override { return _to ExtractHeaderAddressMailboxes(aLine, _retval); } \
  NS_IMETHOD ExtractHeaderAddressNames(const nsACString & aLine, nsACString & _retval) override { return _to ExtractHeaderAddressNames(aLine, _retval); } \
  NS_IMETHOD ExtractHeaderAddressName(const nsACString & aLine, nsACString & _retval) override { return _to ExtractHeaderAddressName(aLine, _retval); } \
  NS_IMETHOD MakeMimeAddress(const nsAString & aName, const nsAString & aEmail, nsAString & _retval) override { return _to MakeMimeAddress(aName, aEmail, _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_NSIMSGHEADERPARSER(_to) \
  NS_IMETHOD ParseEncodedHeader(const nsACString & aEncodedHeader, const char * aHeaderCharset, bool aPreserveGroups, uint32_t *length, msgIAddressObject * **addresses) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseEncodedHeader(aEncodedHeader, aHeaderCharset, aPreserveGroups, length, addresses); } \
  NS_IMETHOD ParseDecodedHeader(const nsAString & aDecodedHeader, bool aPreserveGroups, uint32_t *length, msgIAddressObject * **addresses) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseDecodedHeader(aDecodedHeader, aPreserveGroups, length, addresses); } \
  NS_IMETHOD MakeMimeHeader(msgIAddressObject **aAddresses, uint32_t aLength, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeMimeHeader(aAddresses, aLength, _retval); } \
  NS_IMETHOD ExtractFirstName(const nsAString & aDecodedHeader, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtractFirstName(aDecodedHeader, _retval); } \
  NS_IMETHOD RemoveDuplicateAddresses(const nsACString & aAddrs, const nsACString & aOtherAddrs, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveDuplicateAddresses(aAddrs, aOtherAddrs, _retval); } \
  NS_IMETHOD MakeMailboxObject(const nsAString & aName, const nsAString & aEmail, msgIAddressObject * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeMailboxObject(aName, aEmail, _retval); } \
  NS_IMETHOD MakeGroupObject(const nsAString & aName, msgIAddressObject **aMembers, uint32_t aLength, msgIAddressObject * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeGroupObject(aName, aMembers, aLength, _retval); } \
  NS_IMETHOD MakeFromDisplayAddress(const nsAString & aDisplayAddresses, uint32_t *count, msgIAddressObject * **addresses) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeFromDisplayAddress(aDisplayAddresses, count, addresses); } \
  NS_IMETHOD ParseHeadersWithArray(const char16_t * aLine, char16_t * **aEmailAddresses, char16_t * **aNames, char16_t * **aFullNames, uint32_t *count) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ParseHeadersWithArray(aLine, aEmailAddresses, aNames, aFullNames, count); } \
  NS_IMETHOD ExtractHeaderAddressMailboxes(const nsACString & aLine, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtractHeaderAddressMailboxes(aLine, _retval); } \
  NS_IMETHOD ExtractHeaderAddressNames(const nsACString & aLine, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtractHeaderAddressNames(aLine, _retval); } \
  NS_IMETHOD ExtractHeaderAddressName(const nsACString & aLine, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtractHeaderAddressName(aLine, _retval); } \
  NS_IMETHOD MakeMimeAddress(const nsAString & aName, const nsAString & aEmail, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeMimeAddress(aName, aEmail, _retval); } 

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

/* Header file */
class nsMsgHeaderParser : public nsIMsgHeaderParser
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMSGHEADERPARSER

  nsMsgHeaderParser();

private:
  ~nsMsgHeaderParser();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsMsgHeaderParser, nsIMsgHeaderParser)

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

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

/* void parseEncodedHeader (in ACString aEncodedHeader, in string aHeaderCharset, [optional] in bool aPreserveGroups, [optional] out unsigned long length, [array, size_is (length), retval] out msgIAddressObject addresses); */
NS_IMETHODIMP nsMsgHeaderParser::ParseEncodedHeader(const nsACString & aEncodedHeader, const char * aHeaderCharset, bool aPreserveGroups, uint32_t *length, msgIAddressObject * **addresses)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void parseDecodedHeader (in AString aDecodedHeader, [optional] in bool aPreserveGroups, [optional] out unsigned long length, [array, size_is (length), retval] out msgIAddressObject addresses); */
NS_IMETHODIMP nsMsgHeaderParser::ParseDecodedHeader(const nsAString & aDecodedHeader, bool aPreserveGroups, uint32_t *length, msgIAddressObject * **addresses)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString makeMimeHeader ([array, size_is (aLength)] in msgIAddressObject aAddresses, in unsigned long aLength); */
NS_IMETHODIMP nsMsgHeaderParser::MakeMimeHeader(msgIAddressObject **aAddresses, uint32_t aLength, nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AString extractFirstName (in AString aDecodedHeader); */
NS_IMETHODIMP nsMsgHeaderParser::ExtractFirstName(const nsAString & aDecodedHeader, nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AUTF8String removeDuplicateAddresses (in AUTF8String aAddrs, [optional] in AUTF8String aOtherAddrs); */
NS_IMETHODIMP nsMsgHeaderParser::RemoveDuplicateAddresses(const nsACString & aAddrs, const nsACString & aOtherAddrs, nsACString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* msgIAddressObject makeMailboxObject (in AString aName, in AString aEmail); */
NS_IMETHODIMP nsMsgHeaderParser::MakeMailboxObject(const nsAString & aName, const nsAString & aEmail, msgIAddressObject * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* msgIAddressObject makeGroupObject (in AString aName, [array, size_is (aLength)] in msgIAddressObject aMembers, in unsigned long aLength); */
NS_IMETHODIMP nsMsgHeaderParser::MakeGroupObject(const nsAString & aName, msgIAddressObject **aMembers, uint32_t aLength, msgIAddressObject * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void makeFromDisplayAddress (in AString aDisplayAddresses, [optional] out unsigned long count, [array, size_is (count), retval] out msgIAddressObject addresses); */
NS_IMETHODIMP nsMsgHeaderParser::MakeFromDisplayAddress(const nsAString & aDisplayAddresses, uint32_t *count, msgIAddressObject * **addresses)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [deprecated] void parseHeadersWithArray (in wstring aLine, [array, size_is (count)] out wstring aEmailAddresses, [array, size_is (count)] out wstring aNames, [array, size_is (count)] out wstring aFullNames, [retval] out unsigned long count); */
NS_IMETHODIMP nsMsgHeaderParser::ParseHeadersWithArray(const char16_t * aLine, char16_t * **aEmailAddresses, char16_t * **aNames, char16_t * **aFullNames, uint32_t *count)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [deprecated] ACString extractHeaderAddressMailboxes (in ACString aLine); */
NS_IMETHODIMP nsMsgHeaderParser::ExtractHeaderAddressMailboxes(const nsACString & aLine, nsACString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [deprecated] AUTF8String extractHeaderAddressNames (in AUTF8String aLine); */
NS_IMETHODIMP nsMsgHeaderParser::ExtractHeaderAddressNames(const nsACString & aLine, nsACString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [deprecated] AUTF8String extractHeaderAddressName (in AUTF8String aLine); */
NS_IMETHODIMP nsMsgHeaderParser::ExtractHeaderAddressName(const nsACString & aLine, nsACString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [deprecated] AString makeMimeAddress (in AString aName, in AString aEmail); */
NS_IMETHODIMP nsMsgHeaderParser::MakeMimeAddress(const nsAString & aName, const nsAString & aEmail, nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMsgHeaderParser_h__ */
