228 lines
8.2 KiB
C++
228 lines
8.2 KiB
C++
// Borland C++ Builder
|
|
// Copyright (c) 1995, 2005 by Borland Software Corporation
|
|
// All rights reserved
|
|
|
|
// (DO NOT EDIT: machine generated header) 'Jvmail.pas' rev: 10.00
|
|
|
|
#ifndef JvmailHPP
|
|
#define JvmailHPP
|
|
|
|
#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 <Windows.hpp> // Pascal unit
|
|
#include <Sysutils.hpp> // Pascal unit
|
|
#include <Classes.hpp> // Pascal unit
|
|
#include <Controls.hpp> // Pascal unit
|
|
#include <Forms.hpp> // Pascal unit
|
|
#include <Mapi.hpp> // Pascal unit
|
|
#include <Jclbase.hpp> // Pascal unit
|
|
#include <Jclmapi.hpp> // Pascal unit
|
|
#include <Jvcomponentbase.hpp> // Pascal unit
|
|
|
|
//-- user supplied -----------------------------------------------------------
|
|
|
|
namespace Jvmail
|
|
{
|
|
//-- type declarations -------------------------------------------------------
|
|
class DELPHICLASS TJvMailRecipient;
|
|
class PASCALIMPLEMENTATION TJvMailRecipient : public Classes::TCollectionItem
|
|
{
|
|
typedef Classes::TCollectionItem inherited;
|
|
|
|
private:
|
|
AnsiString FAddress;
|
|
AnsiString FName;
|
|
AnsiString __fastcall GetAddressAndName();
|
|
bool __fastcall GetValid(void);
|
|
|
|
protected:
|
|
virtual AnsiString __fastcall GetDisplayName();
|
|
|
|
public:
|
|
__property AnsiString AddressAndName = {read=GetAddressAndName};
|
|
|
|
__published:
|
|
__property AnsiString Address = {read=FAddress, write=FAddress};
|
|
__property AnsiString Name = {read=FName, write=FName};
|
|
__property bool Valid = {read=GetValid, nodefault};
|
|
public:
|
|
#pragma option push -w-inl
|
|
/* TCollectionItem.Create */ inline __fastcall virtual TJvMailRecipient(Classes::TCollection* Collection) : Classes::TCollectionItem(Collection) { }
|
|
#pragma option pop
|
|
#pragma option push -w-inl
|
|
/* TCollectionItem.Destroy */ inline __fastcall virtual ~TJvMailRecipient(void) { }
|
|
#pragma option pop
|
|
|
|
};
|
|
|
|
|
|
class DELPHICLASS TJvMailRecipients;
|
|
class DELPHICLASS TJvMail;
|
|
#pragma option push -b-
|
|
enum TJvMailLogonOption { loLogonUI, loNewSession, loDownloadMail };
|
|
#pragma option pop
|
|
|
|
typedef Set<TJvMailLogonOption, loLogonUI, loDownloadMail> TJvMailLogonOptions;
|
|
|
|
#pragma option push -b-
|
|
enum TJvMailReadOption { roUnreadOnly, roFifo, roPeek, roHeaderOnly, roAttachments };
|
|
#pragma option pop
|
|
|
|
typedef Set<TJvMailReadOption, roUnreadOnly, roAttachments> TJvMailReadOptions;
|
|
|
|
struct TJvMailReadedData
|
|
{
|
|
|
|
public:
|
|
AnsiString RecipientAddress;
|
|
AnsiString RecipientName;
|
|
AnsiString ConversationID;
|
|
System::TDateTime DateReceived;
|
|
} ;
|
|
|
|
typedef void __fastcall (__closure *TJvMailErrorEvent)(TJvMail* Sender, unsigned ErrorCode);
|
|
|
|
class PASCALIMPLEMENTATION TJvMail : public Jvcomponentbase::TJvComponent
|
|
{
|
|
typedef Jvcomponentbase::TJvComponent inherited;
|
|
|
|
private:
|
|
Classes::TStringList* FAttachment;
|
|
DynamicArray<MapiFileDesc > FAttachArray;
|
|
TJvMailRecipients* FBlindCopy;
|
|
Classes::TStringList* FBody;
|
|
AnsiString FBodyText;
|
|
TJvMailRecipients* FCarbonCopy;
|
|
TJvMailRecipients* FRecipient;
|
|
Jclmapi::TJclSimpleMapi* FSimpleMapi;
|
|
AnsiString FSubject;
|
|
unsigned FSessionHandle;
|
|
#pragma pack(push,1)
|
|
MapiMessage FMapiMessage;
|
|
#pragma pack(pop)
|
|
DynamicArray<MapiRecipDesc > FRecipArray;
|
|
bool FLongMsgId;
|
|
TJvMailLogonOptions FLogonOptions;
|
|
AnsiString FPassword;
|
|
AnsiString FProfileName;
|
|
DynamicArray<bool > FSaveTaskWindows;
|
|
Forms::TForm* FSaveTaskActiveForm;
|
|
AnsiString FSeedMessageID;
|
|
TJvMailReadOptions FReadOptions;
|
|
TJvMailReadedData FReadedMail;
|
|
TJvMailErrorEvent FOnError;
|
|
void __fastcall BeforeClientLibUnload(System::TObject* Sender);
|
|
void __fastcall SetBlindCopy(const TJvMailRecipients* Value);
|
|
void __fastcall SetCarbonCopy(const TJvMailRecipients* Value);
|
|
void __fastcall SetRecipient(const TJvMailRecipients* Value);
|
|
Classes::TStrings* __fastcall GetBody(void);
|
|
void __fastcall SetBody(const Classes::TStrings* Value);
|
|
bool __fastcall GetUserLogged(void);
|
|
Classes::TStrings* __fastcall GetAttachment(void);
|
|
void __fastcall SetAttachment(const Classes::TStrings* Value);
|
|
Jclmapi::TJclSimpleMapi* __fastcall GetSimpleMapi(void);
|
|
void __fastcall SetSeedMessageID(const AnsiString Value);
|
|
|
|
protected:
|
|
void __fastcall CheckLoadLib(void);
|
|
void __fastcall CheckUserLogged(void);
|
|
void __fastcall CreateMapiMessage(void);
|
|
void __fastcall CreateRecips(void);
|
|
void __fastcall DecodeAttachments(Mapi::PMapiFileDesc Attachments, int AttachCount);
|
|
void __fastcall DecodeRecipients(Mapi::PMapiRecipDesc Recips, int RecipCount);
|
|
void __fastcall FreeMapiMessage(void);
|
|
unsigned __fastcall LogonFlags(void);
|
|
void __fastcall RestoreTaskWindowsState(void);
|
|
void __fastcall SaveTaskWindowsState(void);
|
|
|
|
public:
|
|
__fastcall virtual TJvMail(Classes::TComponent* AOwner);
|
|
__fastcall virtual ~TJvMail(void);
|
|
bool __fastcall Address(const AnsiString Caption = "", int EditFields = 0x3);
|
|
void __fastcall Clear(void);
|
|
unsigned __fastcall ErrorCheck(unsigned Res);
|
|
bool __fastcall FindFirstMail(void);
|
|
bool __fastcall FindNextMail(void);
|
|
void __fastcall FreeSimpleMapi(void);
|
|
void __fastcall LogOff(void);
|
|
void __fastcall LogOn(void);
|
|
void __fastcall ReadMail(void);
|
|
AnsiString __fastcall ResolveName(const AnsiString Name);
|
|
AnsiString __fastcall SaveMail(const AnsiString MessageID);
|
|
void __fastcall SendMail(bool ShowDialog = true);
|
|
__property TJvMailReadedData ReadedMail = {read=FReadedMail};
|
|
__property AnsiString SeedMessageID = {read=FSeedMessageID, write=SetSeedMessageID};
|
|
__property unsigned SessionHandle = {read=FSessionHandle, nodefault};
|
|
__property Jclmapi::TJclSimpleMapi* SimpleMAPI = {read=GetSimpleMapi};
|
|
__property bool UserLogged = {read=GetUserLogged, nodefault};
|
|
|
|
__published:
|
|
__property Classes::TStrings* Attachment = {read=GetAttachment, write=SetAttachment};
|
|
__property TJvMailRecipients* BlindCopy = {read=FBlindCopy, write=SetBlindCopy};
|
|
__property Classes::TStrings* Body = {read=GetBody, write=SetBody};
|
|
__property TJvMailRecipients* CarbonCopy = {read=FCarbonCopy, write=SetCarbonCopy};
|
|
__property TJvMailLogonOptions LogonOptions = {read=FLogonOptions, write=FLogonOptions, default=3};
|
|
__property bool LongMsgId = {read=FLongMsgId, write=FLongMsgId, default=1};
|
|
__property AnsiString Password = {read=FPassword, write=FPassword};
|
|
__property AnsiString ProfileName = {read=FProfileName, write=FProfileName};
|
|
__property TJvMailReadOptions ReadOptions = {read=FReadOptions, write=FReadOptions, default=6};
|
|
__property TJvMailRecipients* Recipient = {read=FRecipient, write=SetRecipient};
|
|
__property AnsiString Subject = {read=FSubject, write=FSubject};
|
|
__property TJvMailErrorEvent OnError = {read=FOnError, write=FOnError};
|
|
};
|
|
|
|
|
|
class PASCALIMPLEMENTATION TJvMailRecipients : public Classes::TCollection
|
|
{
|
|
typedef Classes::TCollection inherited;
|
|
|
|
public:
|
|
TJvMailRecipient* operator[](int Index) { return Items[Index]; }
|
|
|
|
private:
|
|
TJvMail* FOwner;
|
|
unsigned FRecipientClass;
|
|
HIDESBASE TJvMailRecipient* __fastcall GetItem(int Index);
|
|
HIDESBASE void __fastcall SetItem(int Index, const TJvMailRecipient* Value);
|
|
|
|
protected:
|
|
virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
|
|
DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
|
|
|
|
public:
|
|
__fastcall TJvMailRecipients(TJvMail* AOwner, unsigned ARecipientClass);
|
|
HIDESBASE TJvMailRecipient* __fastcall Add(void);
|
|
int __fastcall AddRecipient(const AnsiString Address, const AnsiString Name = "");
|
|
virtual void __fastcall Assign(Classes::TPersistent* Source);
|
|
__property TJvMailRecipient* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
|
|
__property unsigned RecipientClass = {read=FRecipientClass, nodefault};
|
|
public:
|
|
#pragma option push -w-inl
|
|
/* TCollection.Destroy */ inline __fastcall virtual ~TJvMailRecipients(void) { }
|
|
#pragma option pop
|
|
|
|
};
|
|
|
|
|
|
typedef DynamicArray<MapiFileDesc > JvMail__4;
|
|
|
|
typedef DynamicArray<MapiRecipDesc > JvMail__5;
|
|
|
|
typedef DynamicArray<bool > JvMail__6;
|
|
|
|
//-- var, const, procedure ---------------------------------------------------
|
|
|
|
} /* namespace Jvmail */
|
|
using namespace Jvmail;
|
|
#pragma pack(pop)
|
|
#pragma option pop
|
|
|
|
#pragma delphiheader end.
|
|
//-- end unit ----------------------------------------------------------------
|
|
#endif // Jvmail
|