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

#ifndef __gen_nsIMimeConverter_h__
#define __gen_nsIMimeConverter_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
#include "prtypes.h"
// default line length for calling the encoder
#define kMIME_ENCODED_WORD_SIZE       72 
// Max length of charset name. 
#define kMAX_CSNAME                   64 
/* Opaque objects used by the encoder/decoder to store state. */
typedef struct MimeDecoderData MimeDecoderData;
typedef struct MimeEncoderData MimeEncoderData;

/* starting interface:    nsIMimeConverter */
#define NS_IMIMECONVERTER_IID_STR "59b73615-2285-4d88-a31c-1abfe4773f4f"

#define NS_IMIMECONVERTER_IID \
  {0x59b73615, 0x2285, 0x4d88, \
    { 0xa3, 0x1c, 0x1a, 0xbf, 0xe4, 0x77, 0x3f, 0x4f }}

class nsIMimeConverter : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMIMECONVERTER_IID)

  /* string encodeMimePartIIStr (in string header, in boolean structured, in string mailCharset, in long fieldnamelen, in long encodedWordSize); */
  NS_IMETHOD EncodeMimePartIIStr(const char *header, PRBool structured, const char *mailCharset, PRInt32 fieldnamelen, PRInt32 encodedWordSize, char **_retval) = 0;

  /* string encodeMimePartIIStr_UTF8 (in string header, in boolean structured, in string mailCharset, in long fieldnamelen, in long encodedWordSize); */
  NS_IMETHOD EncodeMimePartIIStr_UTF8(const char *header, PRBool structured, const char *mailCharset, PRInt32 fieldnamelen, PRInt32 encodedWordSize, char **_retval) = 0;

  NS_IMETHOD DecodeMimeHeader(const char *header, 
                              char **decodedString,
                              const char *default_charset = nsnull,
                              PRBool override_charset = PR_FALSE,
                              PRBool eatContinuations = PR_TRUE) = 0;
  // Decode routine (also converts output to unicode)
  // On success, decodedString is never null
  NS_IMETHOD DecodeMimeHeader(const char *header, 
                              PRUnichar **decodedString,
                              const char *default_charset = nsnull,
                              PRBool override_charset = PR_FALSE,
                              PRBool eatContinuations = PR_TRUE) = 0;
  // Decode routine (also converts output to unicode)
  // On success, decodedString is never null
  NS_IMETHOD DecodeMimeHeader(const char *header, 
                              nsAString& decodedString,
                              const char *default_charset = nsnull,
                              PRBool override_charset = PR_FALSE,
                              PRBool eatContinuations = PR_TRUE) = 0;
  NS_IMETHOD B64EncoderInit(nsresult (*PR_CALLBACK output_fn) (const char *buf, PRInt32 size, void *closure), 
                                void *closure, MimeEncoderData **returnEncoderData)  = 0;
  NS_IMETHOD QPEncoderInit (nsresult (*PR_CALLBACK output_fn) (const char *buf, 
                                PRInt32 size, void *closure), void *closure, 
                                MimeEncoderData ** returnEncoderData) = 0;
  NS_IMETHOD UUEncoderInit (char *filename, nsresult (*PR_CALLBACK output_fn) 
                               (const char *buf, PRInt32 size, void *closure), void *closure, 
                               MimeEncoderData ** returnEncoderData) = 0;
  NS_IMETHOD EncoderDestroy(MimeEncoderData *data, PRBool abort_p) = 0;
  NS_IMETHOD EncoderWrite (MimeEncoderData *data, const char *buffer, PRInt32 size, PRInt32 *written) = 0;
};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMIMECONVERTER \
  NS_IMETHOD EncodeMimePartIIStr(const char *header, PRBool structured, const char *mailCharset, PRInt32 fieldnamelen, PRInt32 encodedWordSize, char **_retval); \
  NS_IMETHOD EncodeMimePartIIStr_UTF8(const char *header, PRBool structured, const char *mailCharset, PRInt32 fieldnamelen, PRInt32 encodedWordSize, char **_retval); \

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMIMECONVERTER(_to) \
  NS_IMETHOD EncodeMimePartIIStr(const char *header, PRBool structured, const char *mailCharset, PRInt32 fieldnamelen, PRInt32 encodedWordSize, char **_retval) { return _to EncodeMimePartIIStr(header, structured, mailCharset, fieldnamelen, encodedWordSize, _retval); } \
  NS_IMETHOD EncodeMimePartIIStr_UTF8(const char *header, PRBool structured, const char *mailCharset, PRInt32 fieldnamelen, PRInt32 encodedWordSize, char **_retval) { return _to EncodeMimePartIIStr_UTF8(header, structured, mailCharset, fieldnamelen, encodedWordSize, _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_NSIMIMECONVERTER(_to) \
  NS_IMETHOD EncodeMimePartIIStr(const char *header, PRBool structured, const char *mailCharset, PRInt32 fieldnamelen, PRInt32 encodedWordSize, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EncodeMimePartIIStr(header, structured, mailCharset, fieldnamelen, encodedWordSize, _retval); } \
  NS_IMETHOD EncodeMimePartIIStr_UTF8(const char *header, PRBool structured, const char *mailCharset, PRInt32 fieldnamelen, PRInt32 encodedWordSize, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EncodeMimePartIIStr_UTF8(header, structured, mailCharset, fieldnamelen, encodedWordSize, _retval); } \

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

/* Header file */
class nsMimeConverter : public nsIMimeConverter
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIMIMECONVERTER

  nsMimeConverter();

private:
  ~nsMimeConverter();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMimeConverter, nsIMimeConverter)

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

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

/* string encodeMimePartIIStr (in string header, in boolean structured, in string mailCharset, in long fieldnamelen, in long encodedWordSize); */
NS_IMETHODIMP nsMimeConverter::EncodeMimePartIIStr(const char *header, PRBool structured, const char *mailCharset, PRInt32 fieldnamelen, PRInt32 encodedWordSize, char **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* string encodeMimePartIIStr_UTF8 (in string header, in boolean structured, in string mailCharset, in long fieldnamelen, in long encodedWordSize); */
NS_IMETHODIMP nsMimeConverter::EncodeMimePartIIStr_UTF8(const char *header, PRBool structured, const char *mailCharset, PRInt32 fieldnamelen, PRInt32 encodedWordSize, char **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIMimeConverter_h__ */
