// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Idmessagecodermime.pas' rev: 10.00

#ifndef IdmessagecodermimeHPP
#define IdmessagecodermimeHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Idmessagecoder.hpp>	// Pascal unit
#include <Idmessage.hpp>	// Pascal unit
#include <Idobjs.hpp>	// Pascal unit
#include <Idglobal.hpp>	// Pascal unit
#include <Idsys.hpp>	// Pascal unit
#include <Idbasecomponent.hpp>	// Pascal unit
#include <Idcomponent.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Idmessagecodermime
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TIdMessageDecoderMIME;
class PASCALIMPLEMENTATION TIdMessageDecoderMIME : public Idmessagecoder::TIdMessageDecoder 
{
	typedef Idmessagecoder::TIdMessageDecoder inherited;
	
protected:
	AnsiString FFirstLine;
	bool FBodyEncoded;
	AnsiString FMIMEBoundary;
	AnsiString __fastcall GetProperHeaderItem(const AnsiString Line);
	virtual void __fastcall InitComponent(void);
	
public:
	__fastcall TIdMessageDecoderMIME(Classes::TComponent* AOwner, const AnsiString ALine)/* overload */;
	virtual Idmessagecoder::TIdMessageDecoder* __fastcall ReadBody(Classes::TStream* ADestStream, bool &VMsgEnd);
	void __fastcall CheckAndSetType(const AnsiString AContentType, AnsiString AContentDisposition);
	virtual void __fastcall ReadHeader(void);
	AnsiString __fastcall GetAttachmentFilename(const AnsiString AContentType, const AnsiString AContentDisposition);
	AnsiString __fastcall RemoveInvalidCharsFromFilename(const AnsiString AFilename);
	__property AnsiString MIMEBoundary = {read=FMIMEBoundary, write=FMIMEBoundary};
	__property bool BodyEncoded = {read=FBodyEncoded, write=FBodyEncoded, nodefault};
public:
	#pragma option push -w-inl
	/* TIdMessageDecoder.Destroy */ inline __fastcall virtual ~TIdMessageDecoderMIME(void) { }
	#pragma option pop
	
};


class DELPHICLASS TIdMessageDecoderInfoMIME;
class PASCALIMPLEMENTATION TIdMessageDecoderInfoMIME : public Idmessagecoder::TIdMessageDecoderInfo 
{
	typedef Idmessagecoder::TIdMessageDecoderInfo inherited;
	
public:
	virtual Idmessagecoder::TIdMessageDecoder* __fastcall CheckForStart(Idmessage::TIdMessage* ASender, const AnsiString ALine);
public:
	#pragma option push -w-inl
	/* TIdMessageDecoderInfo.Create */ inline __fastcall virtual TIdMessageDecoderInfoMIME(void) : Idmessagecoder::TIdMessageDecoderInfo() { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TIdMessageDecoderInfoMIME(void) { }
	#pragma option pop
	
};


class DELPHICLASS TIdMessageEncoderMIME;
class PASCALIMPLEMENTATION TIdMessageEncoderMIME : public Idmessagecoder::TIdMessageEncoder 
{
	typedef Idmessagecoder::TIdMessageEncoder inherited;
	
public:
	virtual void __fastcall Encode(Classes::TStream* ASrc, Classes::TStream* ADest)/* overload */;
public:
	#pragma option push -w-inl
	/* TIdComponent.Destroy */ inline __fastcall virtual ~TIdMessageEncoderMIME(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TIdBaseComponent.Create */ inline __fastcall TIdMessageEncoderMIME(Classes::TComponent* AOwner)/* overload */ : Idmessagecoder::TIdMessageEncoder(AOwner) { }
	#pragma option pop
	
	
/* Hoisted overloads: */
	
public:
	inline void __fastcall  Encode(const AnsiString AFilename, Classes::TStream* ADest){ TIdMessageEncoder::Encode(AFilename, ADest); }
	
};


class DELPHICLASS TIdMessageEncoderInfoMIME;
class PASCALIMPLEMENTATION TIdMessageEncoderInfoMIME : public Idmessagecoder::TIdMessageEncoderInfo 
{
	typedef Idmessagecoder::TIdMessageEncoderInfo inherited;
	
public:
	__fastcall virtual TIdMessageEncoderInfoMIME(void);
	virtual void __fastcall InitializeHeaders(Idmessage::TIdMessage* AMsg);
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TIdMessageEncoderInfoMIME(void) { }
	#pragma option pop
	
};


class DELPHICLASS TIdMIMEBoundaryStrings;
class PASCALIMPLEMENTATION TIdMIMEBoundaryStrings : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	AnsiString FIndyMIMEBoundary;
	void __fastcall GenerateStrings(void);
	
public:
	char __fastcall GenerateRandomChar(void);
	AnsiString __fastcall IndyMIMEBoundary();
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TIdMIMEBoundaryStrings(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TIdMIMEBoundaryStrings(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE TIdMIMEBoundaryStrings* IdMIMEBoundaryStrings;
#define MIMEGenericText "text/"
#define MIMEGenericMultiPart "multipart/"
#define MIME7Bit "7bit"
#define ValidWindowsFilenameChars "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456"\
	"7890^&'@{}[],$=!-#()%.+~_"

}	/* namespace Idmessagecodermime */
using namespace Idmessagecodermime;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Idmessagecodermime
