home *** CD-ROM | disk | FTP | other *** search
/ Prima Shareware 3 / DuCom_Prima-Shareware-3_cd1.bin / PROGRAMO / delphi / TPOP3 / MAILBASE.INT < prev    next >
Encoding:
Text File  |  1996-04-26  |  1.8 KB  |  67 lines

  1. unit mailbase;
  2.  
  3. interface
  4.  
  5. uses
  6.   Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, Windows,
  7.   ExtCtrls, MailUtil, WinSock;
  8.  
  9. type
  10.   EMailError = class(Exception);
  11.   ESocketError = class(Exception);
  12.  
  13.   TMailBase = class(TComponent)
  14.   private
  15.     { Private declarations }
  16.     FServer : string;
  17.     FTimeOut : Integer;
  18.     FLogFileName : string;
  19.     FDefaultPort : word;
  20.     InvWnd : THandle;
  21.   protected
  22.     { Protected declarations }
  23.     MyWSAData : TWSAData;
  24.     TheSocket : TSocket;
  25.     AsyncHandle : THandle;
  26.     ServerInAddr : u_Long;
  27.     ServerIPAddr : string;
  28.     ThePort : word;
  29.     Timer : TTimer;
  30.     CurTick : Integer;
  31.     WsInitCount : Integer;
  32.     Log : TStrings;
  33.     TimedOut : boolean;
  34.     Canceled : boolean;
  35.     HostFound : boolean;
  36.     ServiceFound : boolean;
  37.     AsyncError : boolean;
  38.     ErrorNo : word;
  39.     ServiceName : string;
  40.     procedure WndProc(var Msg : TMessage);
  41.     procedure TimerOnTimer(Sender : TObject);
  42.     procedure TimerOn;
  43.     procedure TimerOff;
  44.     procedure ReInit; virtual;
  45.     procedure ResolveRemoteHost;
  46.     procedure GetService;
  47.     procedure OpenSocket;
  48.     procedure Connect;
  49.   public
  50.     { Public declarations }
  51.     constructor Create(AOwner : TComponent); override;
  52.     destructor Destroy; Override;
  53.     procedure WriteLogFile;
  54.     procedure Cancel; virtual;
  55.     procedure Open; virtual; {11.4}
  56.     procedure Close; virtual;
  57.     property LogFileName : string read FLogFileName write FLogFileName;
  58.     property DefaultPort : word read FDefaultPort write FDefaultPort;
  59.   published
  60.     { Published declarations }
  61.     property Server : string read FServer write FServer;
  62.     property TimeOut : Integer read FTimeOut write FTimeOut default 60;
  63.   end;
  64.  
  65. implementation
  66.  
  67.