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

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

#ifndef InmessagecoderHPP
#define InmessagecoderHPP

#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 <Classes.hpp>	// Pascal unit
#include <Incomponent.hpp>	// Pascal unit
#include <Inglobal.hpp>	// Pascal unit
#include <Inmessage.hpp>	// Pascal unit
#include <Instream.hpp>	// Pascal unit
#include <Instreamrandomaccess.hpp>	// Pascal unit
#include <Inbasecomponent.hpp>	// Pascal unit

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

namespace Inmessagecoder
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TInMessageCoderPartType { mcptUnknown, mcptText, mcptAttachment };
#pragma option pop

class DELPHICLASS TInMessageDecoder;
class PASCALIMPLEMENTATION TInMessageDecoder : public Incomponent::TInComponent 
{
	typedef Incomponent::TInComponent inherited;
	
protected:
	AnsiString FFilename;
	Classes::TStrings* FHeaders;
	TInMessageCoderPartType FPartType;
	Instream::TInStream* FSourceStream;
	virtual void __fastcall InitComponent(void);
	
public:
	virtual TInMessageDecoder* __fastcall ReadBody(Instream::TInStream* ADestStream, bool &AMsgEnd) = 0 ;
	virtual void __fastcall ReadHeader(void);
	AnsiString __fastcall ReadLn(AnsiString ATerminator = "\n");
	__fastcall virtual ~TInMessageDecoder(void);
	__property AnsiString Filename = {read=FFilename};
	__property Classes::TStrings* Headers = {read=FHeaders};
	__property TInMessageCoderPartType PartType = {read=FPartType, nodefault};
	__property Instream::TInStream* SourceStream = {read=FSourceStream, write=FSourceStream};
public:
	#pragma option push -w-inl
	/* TInBaseComponent.Create */ inline __fastcall TInMessageDecoder(Classes::TComponent* AOwner)/* overload */ : Incomponent::TInComponent(AOwner) { }
	#pragma option pop
	
};


class DELPHICLASS TInMessageDecoderInfo;
class PASCALIMPLEMENTATION TInMessageDecoderInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	virtual TInMessageDecoder* __fastcall CheckForStart(Inmessage::TInMessage* ASender, AnsiString ALine) = 0 ;
	__fastcall virtual TInMessageDecoderInfo(void);
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TInMessageDecoderInfo(void) { }
	#pragma option pop
	
};


class DELPHICLASS TInMessageDecoderList;
class PASCALIMPLEMENTATION TInMessageDecoderList : public System::TObject 
{
	typedef System::TObject inherited;
	
protected:
	Classes::TStringList* FMessageCoders;
	
public:
	/*         class method */ static TInMessageDecoderInfo* __fastcall ByName(TMetaClass* vmt, const AnsiString AName);
	/*         class method */ static TInMessageDecoder* __fastcall CheckForStart(TMetaClass* vmt, Inmessage::TInMessage* ASender, const AnsiString ALine);
	__fastcall TInMessageDecoderList(void);
	__fastcall virtual ~TInMessageDecoderList(void);
	/*         class method */ static void __fastcall RegisterDecoder(TMetaClass* vmt, const AnsiString AMessageCoderName, TInMessageDecoderInfo* AMessageCoderInfo);
};


class DELPHICLASS TInMessageEncoder;
class PASCALIMPLEMENTATION TInMessageEncoder : public Incomponent::TInComponent 
{
	typedef Incomponent::TInComponent inherited;
	
protected:
	AnsiString FFilename;
	int FPermissionCode;
	virtual void __fastcall InitComponent(void);
	
public:
	void __fastcall Encode(const AnsiString AFilename, Instream::TInStream* ADest)/* overload */;
	virtual void __fastcall Encode(Instreamrandomaccess::TInStreamRandomAccess* ASrc, Instream::TInStream* ADest) = 0 /* overload */;
	
__published:
	__property AnsiString Filename = {read=FFilename, write=FFilename};
	__property int PermissionCode = {read=FPermissionCode, write=FPermissionCode, nodefault};
public:
	#pragma option push -w-inl
	/* TInComponent.Destroy */ inline __fastcall virtual ~TInMessageEncoder(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TInBaseComponent.Create */ inline __fastcall TInMessageEncoder(Classes::TComponent* AOwner)/* overload */ : Incomponent::TInComponent(AOwner) { }
	#pragma option pop
	
};


typedef TMetaClass* TInMessageEncoderClass;

class DELPHICLASS TInMessageEncoderInfo;
class PASCALIMPLEMENTATION TInMessageEncoderInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
protected:
	TMetaClass* FMessageEncoderClass;
	
public:
	__fastcall virtual TInMessageEncoderInfo(void);
	virtual void __fastcall InitializeHeaders(Inmessage::TInMessage* AMsg);
	__property TMetaClass* MessageEncoderClass = {read=FMessageEncoderClass};
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TInMessageEncoderInfo(void) { }
	#pragma option pop
	
};


class DELPHICLASS TInMessageEncoderList;
class PASCALIMPLEMENTATION TInMessageEncoderList : public System::TObject 
{
	typedef System::TObject inherited;
	
protected:
	Classes::TStringList* FMessageCoders;
	
public:
	/*         class method */ static TInMessageEncoderInfo* __fastcall ByName(TMetaClass* vmt, const AnsiString AName);
	__fastcall TInMessageEncoderList(void);
	__fastcall virtual ~TInMessageEncoderList(void);
	/*         class method */ static void __fastcall RegisterEncoder(TMetaClass* vmt, const AnsiString AMessageEncoderName, TInMessageEncoderInfo* AMessageEncoderInfo);
};


//-- var, const, procedure ---------------------------------------------------

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

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