Difference between revisions of "Unit POP3"
From Ultibo.org
Line 248: | Line 248: | ||
---- | ---- | ||
− | '' | + | |
+ | '''POP3 buffer''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TPOP3Buffer = class(TObject)</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>constructor Create(ASize:LongWord);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>destructor Destroy; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div> | ||
+ | |- | ||
+ | | <code>FLock:TCriticalSectionHandle;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FData:Pointer;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FSize:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FStart:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function AcquireLock:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function ReleaseLock:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function GetCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>property Count:LongWord read GetCount;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function ReadData:Char;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function WriteData(AChar:Char):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function WriteLock(var ASize:LongWord):Pointer;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function WriteUnlock(ACount:LongWord):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''POP3 client''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TPOP3Client = class(TWinsock2TCPClient)</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>constructor Create;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>destructor Destroy; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div> | ||
+ | |- | ||
+ | | <code>FOnRequest:TPOP3ClientNotifyEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnReply:TPOP3ClientNotifyEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FOnRequestStart:TNotifyEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnRequestEnd:TNotifyEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FBuffer:TPOP3Buffer;</code> | ||
+ | | Buffer for received data | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div> | ||
+ | |- | ||
+ | | <code>function GetReply(var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function SendRequest(const ARequest:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>property OnRequest:TPOP3ClientNotifyEvent read FOnRequest write FOnRequest;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnReply:TPOP3ClientNotifyEvent read FOnReply write FOnReply;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>property OnRequestStart:TNotifyEvent read FOnRequestStart write FOnRequestStart;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnRequestEnd:TNotifyEvent read FOnRequestEnd write FOnRequestEnd;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>property Buffer:TPOP3Buffer read FBuffer;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function DoConn(const AHost,APort:String; var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoStat(var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoList(const AMessage:String; var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoRetr(const AMessage:String; var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoDele(const AMessage:String; var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoNoop(var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoRset(var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoQuit(var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function DoTop(const AMessage,ACount:String; var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoUidl(const AMessage:String; var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoUser(const AUsername:String; var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoPass(const APassword:String; var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoApop(const AUsername,ADigest:String; var AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''POP3 connection''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TPOP3Connection = class(TListObject)</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>constructor Create;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>destructor Destroy; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div> | ||
+ | |- | ||
+ | | <code>FLock:TCriticalSectionHandle;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FHandle:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FRxByteCount:Int64;</code> | ||
+ | | Bytes Recv Count from Connection | ||
+ | |- | ||
+ | | <code>FTxByteCount:Int64;</code> | ||
+ | | Bytes Sent Count to Connection | ||
+ | |- | ||
+ | | <code>FRequestCount:Int64;</code> | ||
+ | | Requests Recv Count from Connection | ||
+ | |- | ||
+ | | <code>FReplyCount:Int64;</code> | ||
+ | | Replies Sent Count to Connection | ||
+ | |- | ||
+ | | <code>FRequestTime:TDateTime;</code> | ||
+ | | Last Request Time | ||
+ | |- | ||
+ | | <code>FReplyTime:TDateTime;</code> | ||
+ | | Last Reply Time | ||
+ | |- | ||
+ | | <code>FRemoteAddress:String;</code> | ||
+ | | Address of Remote Client | ||
+ | |- | ||
+ | | <code>FStatus:LongWord;</code> | ||
+ | | None,Conn,User,Data etc | ||
+ | |- | ||
+ | | <code>FUsername:String;</code> | ||
+ | | Current Username | ||
+ | |- | ||
+ | | <code>FPassword:String;</code> | ||
+ | | Current Password | ||
+ | |- | ||
+ | | <code>FTimestamp:String;</code> | ||
+ | | Timestamp for APOP authentication | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FThread:TThread;</code> | ||
+ | | TWinsock2TCPServerThread | ||
+ | |- | ||
+ | | <code>FBuffer:TPOP3Buffer;</code> | ||
+ | | Buffer for received data | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function AcquireLock:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function ReleaseLock:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure SetHandle(AHandle:LongWord);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function GetRxByteCount:Int64;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetRxByteCount(const ARxByteCount:Int64);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function GetTxByteCount:Int64;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetTxByteCount(const ATxByteCount:Int64);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function GetRequestCount:Int64;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetRequestCount(const ARequestCount:Int64);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function GetReplyCount:Int64;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetReplyCount(const AReplyCount:Int64);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function GetRequestTime:TDateTime;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetRequestTime(const ARequestTime:TDateTime);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function GetReplyTime:TDateTime;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetReplyTime(const AReplyTime:TDateTime);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function GetRemoteAddress:String;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetRemoteAddress(const ARemoteAddress:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetStatus(AStatus:LongWord);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function GetUsername:String;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetUsername(const AUsername:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function GetPassword:String;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetPassword(const APassword:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function GetTimestamp:String;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetTimestamp(const ATimestamp:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure SetThread(AThread:TThread);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>property Handle:LongWord read FHandle write SetHandle;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property RxByteCount:Int64 read GetRxByteCount write SetRxByteCount;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property TxByteCount:Int64 read GetTxByteCount write SetTxByteCount;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property RequestCount:Int64 read GetRequestCount write SetRequestCount;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property ReplyCount:Int64 read GetReplyCount write SetReplyCount;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property RequestTime:TDateTime read GetRequestTime write SetRequestTime;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property ReplyTime:TDateTime read GetReplyTime write SetReplyTime;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property RemoteAddress:String read GetRemoteAddress write SetRemoteAddress;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property Status:LongWord read FStatus write SetStatus;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property Username:String read GetUsername write SetUsername;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property Password:String read GetPassword write SetPassword;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property Timestamp:String read GetTimestamp write SetTimestamp;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>property Thread:TThread read FThread write SetThread;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property Buffer:TPOP3Buffer read FBuffer;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure IncrementRxByteCount(const ARxByteCount:Int64);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure IncrementTxByteCount(const ATxByteCount:Int64);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure IncrementRequestCount;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure IncrementReplyCount;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''POP3 listener''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TPOP3Listener = class(TWinsock2TCPListener)</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>constructor Create;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div> | ||
+ | |- | ||
+ | | <code>FOnConnected:TPOP3ConnectionEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnDisconnected:TPOP3ConnectionEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FOnCheckHost:TPOP3HostEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnCheckCount:TPOP3CountEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FOnRequest:TPOP3NotifyEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnReply:TPOP3NotifyEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FOnConn:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnStat:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnList:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnRetr:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnDele:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnNoop:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnRset:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnQuit:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FOnTop:TPOP3RequestExEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnUidl:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnUser:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnPass:TPOP3RequestEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FOnApop:TPOP3RequestExEvent;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div> | ||
+ | |- | ||
+ | | <code>procedure DoConnect(AThread:TWinsock2TCPServerThread); override;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoDisconnect(AThread:TWinsock2TCPServerThread); override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function DoCheckHost(AThread:TWinsock2TCPServerThread):Boolean; virtual;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function DoCheckCount(AThread:TWinsock2TCPServerThread):Boolean; virtual;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function DoExecute(AThread:TWinsock2TCPServerThread):Boolean; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure DoConn(AThread:TWinsock2TCPServerThread);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoStat(AThread:TWinsock2TCPServerThread);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoList(AThread:TWinsock2TCPServerThread; const AMessage:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoRetr(AThread:TWinsock2TCPServerThread; const AMessage:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoDele(AThread:TWinsock2TCPServerThread; const AMessage:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoNoop(AThread:TWinsock2TCPServerThread);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoRset(AThread:TWinsock2TCPServerThread);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoQuit(AThread:TWinsock2TCPServerThread);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure DoTop(AThread:TWinsock2TCPServerThread; const AMessage,ACount:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoUidl(AThread:TWinsock2TCPServerThread; const AMessage:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoUser(AThread:TWinsock2TCPServerThread; const AUsername:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoPass(AThread:TWinsock2TCPServerThread; const APassword:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure DoApop(AThread:TWinsock2TCPServerThread; const AUsername,ADigest:String);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function GetRequest(AThread:TWinsock2TCPServerThread; var ARequest:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function SendReply(AThread:TWinsock2TCPServerThread; const AReply:String):Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>property OnConnected:TPOP3ConnectionEvent read FOnConnected write FOnConnected;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnDisconnected:TPOP3ConnectionEvent read FOnDisconnected write FOnDisconnected;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>property OnCheckHost:TPOP3HostEvent read FOnCheckHost write FOnCheckHost;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnCheckCount:TPOP3CountEvent read FOnCheckCount write FOnCheckCount;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>property OnRequest:TPOP3NotifyEvent read FOnRequest write FOnRequest;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnReply:TPOP3NotifyEvent read FOnReply write FOnReply;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>property OnConn:TPOP3RequestEvent read FOnConn write FOnConn;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnStat:TPOP3RequestEvent read FOnStat write FOnStat;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnList:TPOP3RequestEvent read FOnList write FOnList;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnRetr:TPOP3RequestEvent read FOnRetr write FOnRetr;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnDele:TPOP3RequestEvent read FOnDele write FOnDele;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnNoop:TPOP3RequestEvent read FOnNoop write FOnNoop;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnRset:TPOP3RequestEvent read FOnRset write FOnRset;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnQuit:TPOP3RequestEvent read FOnQuit write FOnQuit;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>property OnTop:TPOP3RequestExEvent read FOnTop write FOnTop;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnUidl:TPOP3RequestEvent read FOnUidl write FOnUidl;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnUser:TPOP3RequestEvent read FOnUser write FOnUser;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnPass:TPOP3RequestEvent read FOnPass write FOnPass;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>property OnApop:TPOP3RequestExEvent read FOnApop write FOnApop;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === |
Revision as of 04:42, 17 March 2017
Return to Unit Reference
Contents
[hide]Description
Ultibo POP3 interface unit
To be documented
Constants
[Expand]
POP3 specific constants
POP3_*
[Expand]
POP3 status constants
POP3_STATUS_*
[Expand]
POP3 command constants
POP3_COMMAND_*
[Expand]
POP3 string constants
POP3_STRING_*
[Expand]
POP3 logging constants
POP3_LOG_*
Type definitions
POP3 client notify event
TPOP3ClientNotifyEvent = procedure(const ARequest:String) of Object;
|
POP3 host event
TPOP3HostEvent = function(AConnection:TPOP3Connection):Boolean of Object;
|
POP3 count event
TPOP3CountEvent = function(AConnection:TPOP3Connection):Boolean of Object;
|
POP3 notify event
TPOP3NotifyEvent = procedure(AConnection:TPOP3Connection; const ARequest:String) of Object;
|
POP3 request event
TPOP3RequestEvent = function(AConnection:TPOP3Connection; const ARequest:String; var AReply:String):Boolean of Object;
|
POP3 request extended event
TPOP3RequestExEvent = function(AConnection:TPOP3Connection; const ARequest,AData:String; var AReply:String):Boolean of Object;
|
POP3 connection event
TPOP3ConnectionEvent = procedure(AConnection:TPOP3Connection) of Object;
|
Class definitions
POP3 buffer
[Expand]
TPOP3Buffer = class(TObject)
POP3 client
[Expand]
TPOP3Client = class(TWinsock2TCPClient)
POP3 connection
[Expand]
TPOP3Connection = class(TListObject)
POP3 listener
[Expand]
TPOP3Listener = class(TWinsock2TCPListener)
Public variables
POP3 logging
POP3_DEFAULT_LOG_LEVEL:LongWord = POP3_LOG_LEVEL_DEBUG;
|
Minimum level for POP3 messages. Only messages with level greater than or equal to this will be printed. |
POP3_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
POP3 helper functions
Return to Unit Reference