home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'AHMTIEmails.pas' rev: 3.00
-
- #ifndef AHMTIEmailsHPP
- #define AHMTIEmailsHPP
- #include <ScktComp.hpp>
- #include <AHMMails.hpp>
- #include <Classes.hpp>
- #include <Windows.hpp>
- #include <SysUtils.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Ahmtiemails
- {
- //-- type declarations -------------------------------------------------------
- typedef Shortint TAHMPStep;
-
- enum TAHMMailSessionState { Authorization, Transaction };
-
- typedef void __fastcall (__closure *TAHMOnError)(System::TObject* Sender, int Error, System::AnsiString
- VMessage);
-
- typedef void __fastcall (__closure *TAHMOnRead)(System::TObject* Sender, int BytesRead);
-
- typedef void __fastcall (__closure *TAHMOnCodingStart)(System::TObject* Sender, System::AnsiString FileName
- , int BytesCount);
-
- typedef void __fastcall (__closure *TAHMOnCodingProgress)(System::TObject* Sender, Word Percent);
-
- typedef void __fastcall (__closure *TAHMSendingProgress)(System::TObject* Sender, Word Percent);
-
- typedef void __fastcall (__closure *TAHMOnDelete)(System::TObject* Sender, Word Index);
-
- typedef void __fastcall (__closure *TAHMBeforeRetrieve)(System::TObject* sender, Word Index);
-
- class DELPHICLASS TAHMAttachment;
- class DELPHICLASS TAHMMessage;
- class DELPHICLASS TAHMMailHost;
- class DELPHICLASS TAHMMessages;
- class PASCALIMPLEMENTATION TAHMMessages : public Classes::TCollection
- {
- typedef Classes::TCollection inherited;
-
- private:
- TAHMMailHost* FAHMMailHost;
- TAHMMessage* __fastcall GetAHMMessage(int Index);
- void __fastcall SetAHMMessage(int Index, TAHMMessage* Value);
-
- protected:
- DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
-
- public:
- __property TAHMMailHost* Owner = {read=FAHMMailHost};
- __fastcall TAHMMessages(TAHMMailHost* AOwner);
- HIDESBASE TAHMMessage* __fastcall Add(void);
- bool __fastcall Delete(int Index);
- __property TAHMMessage* Items[int Index] = {read=GetAHMMessage, write=SetAHMMessage/*, default*/};
- public:
-
- /* TCollection.Destroy */ __fastcall virtual ~TAHMMessages(void) { }
-
- };
-
- class PASCALIMPLEMENTATION TAHMMailHost : public Ahmmails::TAHMMailsComponent
- {
- typedef Ahmmails::TAHMMailsComponent inherited;
-
- private:
- Scktcomp::TWinSocketStream* FSocketStream;
- Scktcomp::TClientSocket* FSocket;
- System::AnsiString FHost;
- System::AnsiString FPort;
- Classes::TNotifyEvent FOnExecute;
- TAHMPStep FProgressStep;
- TAHMMessages* FAHMMessages;
- void __fastcall SetAHMMessages(TAHMMessages* Value);
-
- public:
- __fastcall virtual TAHMMailHost(Classes::TComponent* AOwner);
- __fastcall virtual ~TAHMMailHost(void);
- virtual bool __fastcall Execute(void);
-
- __published:
- __property TAHMMessages* Messages = {read=FAHMMessages, write=SetAHMMessages};
- __property Classes::TNotifyEvent OnExecute = {read=FOnExecute, write=FOnExecute};
- __property TAHMPStep ProgressStep = {read=FProgressStep, write=FProgressStep, nodefault};
- __property System::AnsiString Port = {read=FPort, write=FPort};
- __property System::AnsiString Host = {read=FHost, write=FHost};
- };
-
- class DELPHICLASS TAHMAttachments;
- class PASCALIMPLEMENTATION TAHMAttachments : public Classes::TCollection
- {
- typedef Classes::TCollection inherited;
-
- private:
- TAHMMessage* FAHMMessage;
- TAHMAttachment* __fastcall GeTAHMAttachment(int Index);
- void __fastcall SeTAHMAttachment(int Index, TAHMAttachment* Value);
-
- protected:
- DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
- System::AnsiString __fastcall GetMimeType(const System::AnsiString FileName);
-
- public:
- __fastcall TAHMAttachments(TAHMMessage* AOwner);
- HIDESBASE TAHMAttachment* __fastcall Add(System::AnsiString Filename);
- bool __fastcall Delete(int Index);
- __property TAHMAttachment* Items[int Index] = {read=GeTAHMAttachment, write=SeTAHMAttachment/*, default
- */};
- public:
- /* TCollection.Destroy */ __fastcall virtual ~TAHMAttachments(void) { }
-
- };
-
- class PASCALIMPLEMENTATION TAHMMessage : public Classes::TCollectionItem
- {
- typedef Classes::TCollectionItem inherited;
-
- private:
- System::AnsiString FFrommail;
- System::AnsiString FReplyTo;
- System::AnsiString FSendTo;
- System::AnsiString FSubject;
- System::AnsiString FFromname;
- System::AnsiString FMessageID;
- System::AnsiString FInReplyTo;
- System::AnsiString FDate;
- Classes::TStrings* FMessage;
- TAHMMailHost* FAHMMailHost;
- Classes::TStrings* FAttTypes;
- TAHMAttachments* FAHMAttachments;
- void __fastcall SetAHMAttachments(TAHMAttachments* Value);
- void __fastcall SetMessage(Classes::TStrings* Value);
- virtual System::AnsiString __fastcall GetDisplayName(void);
-
- public:
- __fastcall virtual TAHMMessage(Classes::TCollection* Collection);
- __fastcall virtual ~TAHMMessage(void);
- __property TAHMMailHost* Owner = {read=FAHMMailHost};
- __property System::AnsiString Date = {read=FDate};
- __property System::AnsiString MessageID = {read=FMessageID};
- __property System::AnsiString InReplyTo = {read=FInReplyTo, write=FInReplyTo};
-
- __published:
- __property System::AnsiString FromMail = {read=FFrommail, write=FFrommail};
- __property System::AnsiString ReplyTo = {read=FReplyTo, write=FReplyTo};
- __property System::AnsiString SendTo = {read=FSendTo, write=FSendTo};
- __property System::AnsiString Subject = {read=FSubject, write=FSubject};
- __property System::AnsiString FromName = {read=FFromname, write=FFromname};
- __property Classes::TStrings* Message = {read=FMessage, write=SetMessage};
- __property TAHMAttachments* Attachments = {read=FAHMAttachments, write=SetAHMAttachments};
- };
-
- class PASCALIMPLEMENTATION TAHMAttachment : public Classes::TCollectionItem
- {
- typedef Classes::TCollectionItem inherited;
-
- private:
- System::AnsiString FFileName;
- Classes::TStringList* FBodyEncoded;
- Classes::TMemoryStream* FBodyBin;
- System::AnsiString FMimeType;
- TAHMMessage* FAHMMessage;
- virtual System::AnsiString __fastcall GetDisplayName(void);
-
- public:
- __fastcall virtual TAHMAttachment(Classes::TCollection* Collection);
- __fastcall virtual ~TAHMAttachment(void);
- void __fastcall SaveToFile(System::AnsiString FileName);
- __property TAHMMessage* Owner = {read=FAHMMessage};
- __property System::AnsiString MimeType = {read=FMimeType};
-
- __published:
- __property System::AnsiString FileName = {read=FFileName, write=FFileName};
- };
-
- class DELPHICLASS TAHMSMTPMail;
- class PASCALIMPLEMENTATION TAHMSMTPMail : public Ahmtiemails::TAHMMailHost
- {
- typedef Ahmtiemails::TAHMMailHost inherited;
-
- private:
- Classes::TStrings* FSignature;
- bool FBusy;
- bool FSMTPError;
- bool FConnected;
- System::AnsiString FReplyCode;
- System::AnsiString FReplyString;
- System::AnsiString FDateTimeFormat;
- Word FSendProgress;
- Word FEncodeProgress;
- bool FCanceled;
- Classes::TNotifyEvent FOnConnect;
- Classes::TNotifyEvent FOnDisconnect;
- Classes::TNotifyEvent FOnBeforeSend;
- Classes::TNotifyEvent FOnAfterSend;
- Classes::TNotifyEvent FOnSuccessSend;
- TAHMOnError FOnError;
- TAHMSendingProgress FOnSendProgress;
- TAHMOnCodingStart FOnEncodeStart;
- TAHMOnCodingProgress FOnEncodeProgress;
- Classes::TNotifyEvent FOnEncodeEnd;
- void __fastcall SetSignature(Classes::TStrings* Value);
- void __fastcall DoConnect(System::TObject* Sender, Scktcomp::TCustomWinSocket* Socket);
- void __fastcall DoDisconnect(System::TObject* Sender, Scktcomp::TCustomWinSocket* Socket);
- void __fastcall RaiseErrorAndExit(System::TObject* Sender, Scktcomp::TCustomWinSocket* Socket, Scktcomp::TErrorEvent
- ErrorEvent, int &ErrorCode);
- void __fastcall RaiseError(Scktcomp::TErrorEvent ErrorEvent);
- void __fastcall DoEncodeStart(System::AnsiString FileName, int Size);
- void __fastcall DoEncodeProgress(Word Percent);
- void __fastcall DoEncodeEnd(void);
- void __fastcall DoSendProgress(Word Percent);
- void __fastcall DoOnBeforeSend(void);
- void __fastcall DoOnAfterSend(void);
- System::AnsiString __fastcall CreateUIN(void);
- Classes::TStringList* __fastcall InitializeMessage(TAHMMessage* &VMessage);
- System::AnsiString __fastcall CreateBounds(void);
- System::AnsiString __fastcall GetSocketText(void);
- void __fastcall SendSocketText(const System::AnsiString VTxt);
-
- protected:
- void __fastcall Base64Encode(TAHMAttachment* &VAttachment);
-
- public:
- __fastcall virtual TAHMSMTPMail(Classes::TComponent* AOwner);
- __fastcall virtual ~TAHMSMTPMail(void);
- void __fastcall Connect(void);
- void __fastcall Disconnect(void);
- virtual bool __fastcall Execute(void);
- bool __fastcall SendMessage(TAHMMessage* VMessage);
- __property bool Connected = {read=FConnected, nodefault};
- __property System::AnsiString ReplyCode = {read=FReplyCode};
- __property System::AnsiString ReplyString = {read=FReplyString};
- __property bool SMTPError = {read=FSMTPError, nodefault};
- __property bool Canceled = {read=FCanceled, write=FCanceled, nodefault};
-
- __published:
- __property Classes::TStrings* Signature = {read=FSignature, write=SetSignature};
- __property System::AnsiString DateTimeFormat = {read=FDateTimeFormat, write=FDateTimeFormat};
- __property Classes::TNotifyEvent OnConnect = {read=FOnConnect, write=FOnConnect};
- __property Classes::TNotifyEvent OnDisconnect = {read=FOnDisconnect, write=FOnDisconnect};
- __property TAHMOnError OnError = {read=FOnError, write=FOnError};
- __property Classes::TNotifyEvent OnBeforeSend = {read=FOnBeforeSend, write=FOnBeforeSend};
- __property Classes::TNotifyEvent OnAfterSend = {read=FOnAfterSend, write=FOnAfterSend};
- __property Classes::TNotifyEvent OnSuccessSend = {read=FOnSuccessSend, write=FOnSuccessSend};
- __property TAHMOnCodingStart OnEncodeStart = {read=FOnEncodeStart, write=FOnEncodeStart};
- __property TAHMOnCodingProgress OnEncodeProgress = {read=FOnEncodeProgress, write=FOnEncodeProgress
- };
- __property Classes::TNotifyEvent OnEncodeEnd = {read=FOnEncodeEnd, write=FOnEncodeEnd};
- __property TAHMSendingProgress OnSendProgress = {read=FOnSendProgress, write=FOnSendProgress};
- };
-
- class DELPHICLASS TAHMPOPMail;
- class PASCALIMPLEMENTATION TAHMPOPMail : public Ahmtiemails::TAHMMailHost
- {
- typedef Ahmtiemails::TAHMMailHost inherited;
-
- private:
- TAHMMailSessionState FSessionState;
- System::AnsiString FUsername;
- System::AnsiString FPassword;
- bool FPOPError;
- System::AnsiString FPOPErrorString;
- bool FConnected;
- bool FReceivingVMessage;
- int FSize;
- Word FStep;
- System::AnsiString FReplyCode;
- System::AnsiString FReplyString;
- bool FCanceled;
- Word FDecodeProgress;
- Word FRetrieveProgress;
- bool FBusy;
- Classes::TStrings* FDeletedItems;
- bool FDelOfServ;
- Word FVMessagesCount;
- Classes::TNotifyEvent FOnConnect;
- Classes::TNotifyEvent FOnDisconnect;
- TAHMOnError FOnError;
- TAHMOnCodingStart FOnDecodeStart;
- TAHMOnCodingProgress FOnDecodeProgress;
- Classes::TNotifyEvent FOnDecodeEnd;
- TAHMBeforeRetrieve FOnBeforeRetrieve;
- Classes::TNotifyEvent FOnAfterRetrieve;
- TAHMOnCodingProgress FOnRetrieveProgress;
- TAHMOnDelete FOnDelete;
- void __fastcall DoConnect(System::TObject* Sender, Scktcomp::TCustomWinSocket* Socket);
- void __fastcall DoDisconnect(System::TObject* Sender, Scktcomp::TCustomWinSocket* Socket);
- void __fastcall RaiseError(int err);
- void __fastcall RaiseErrorAndExit(System::TObject* Sender, Scktcomp::TCustomWinSocket* Socket, Scktcomp::TErrorEvent
- ErrorEvent, int &ErrorCode);
- bool __fastcall FindInHeaders(const System::AnsiString que, const Classes::TStringList* StrList, int
- &Line);
- bool __fastcall FindInStringList(const System::AnsiString que, const Classes::TStringList* StrList,
- int &Line, int &position);
- bool __fastcall FindInStringListCS(const System::AnsiString que, const Classes::TStringList* StrList
- , int &Line, int &position);
- bool __fastcall GetUUAttachments(const Classes::TStringList* StrList, int &Line, System::AnsiString
- &FileName);
- System::AnsiString __fastcall GetSocketText(void);
- void __fastcall SendSocketText(const System::AnsiString VText);
-
- protected:
- void __fastcall Base64Decode(TAHMAttachment* &VAttachment);
- void __fastcall UUDecode(TAHMAttachment* &VAttachment);
-
- public:
- __fastcall virtual TAHMPOPMail(Classes::TComponent* AOwner);
- __fastcall virtual ~TAHMPOPMail(void);
- __property Classes::TStrings* DeletedItems = {read=FDeletedItems, write=FDeletedItems};
- void __fastcall Connect(void);
- bool __fastcall Login(void);
- Word __fastcall Init(void);
- TAHMMessage* __fastcall RetrieveMessage(Word Index);
- int __fastcall RetrieveAllMessages(TAHMMessages* AHMVMessageList);
- System::AnsiString __fastcall RetrieveHeaders(Word Index);
- void __fastcall DeleteMessage(Word Index);
- void __fastcall Disconnect(void);
- virtual bool __fastcall Execute(void);
- __property bool POPError = {read=FPOPError, nodefault};
- __property System::AnsiString ErrorString = {read=FPOPErrorString};
- __property Word VMessagesCount = {read=FVMessagesCount, nodefault};
- __property TAHMMailSessionState SessionState = {read=FSessionState, nodefault};
- __property bool Connected = {read=FConnected, nodefault};
- __property System::AnsiString ReplyCode = {read=FReplyCode};
- __property System::AnsiString ReplyString = {read=FReplyString};
- __property bool Canceled = {read=FCanceled, write=FCanceled, nodefault};
-
- __published:
- __property Messages = {stored=false};
- __property bool DeleteOfServer = {read=FDelOfServ, write=FDelOfServ, default=0};
- __property System::AnsiString Username = {read=FUsername, write=FUsername};
- __property System::AnsiString Password = {read=FPassword, write=FPassword};
- __property Classes::TNotifyEvent OnConnect = {read=FOnConnect, write=FOnConnect};
- __property Classes::TNotifyEvent OnDisconnect = {read=FOnDisconnect, write=FOnDisconnect};
- __property TAHMOnError OnError = {read=FOnError, write=FOnError};
- __property TAHMOnCodingStart OnDecodeStart = {read=FOnDecodeStart, write=FOnDecodeStart};
- __property TAHMOnCodingProgress OnDecodeProgress = {read=FOnDecodeProgress, write=FOnDecodeProgress
- };
- __property Classes::TNotifyEvent OnDecodeEnd = {read=FOnDecodeEnd, write=FOnDecodeEnd};
- __property TAHMBeforeRetrieve BeforeRetrieve = {read=FOnBeforeRetrieve, write=FOnBeforeRetrieve};
- __property Classes::TNotifyEvent AfterRetrieve = {read=FOnAfterRetrieve, write=FOnAfterRetrieve};
- __property TAHMOnCodingProgress OnRetrieveProgress = {read=FOnRetrieveProgress, write=FOnRetrieveProgress
- };
- __property TAHMOnDelete OnDelete = {read=FOnDelete, write=FOnDelete};
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define crlf "\r\n"
-
- } /* namespace Ahmtiemails */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Ahmtiemails;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // AHMTIEmails
-