home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 November / Chip_2002-11_cd1.bin / zkuste / delphi / kompon / d456 / RASMG110.ZIP / RasManager.txt < prev   
Text File  |  2002-08-10  |  5KB  |  88 lines

  1.   RASManager.pas
  2.  
  3.   Written by Frank Plagge
  4.   Copyright (c) 1998-2002 by Frank Plagge, Elsterweg 39, 38446 Wolfsburg, Germany
  5.   All rights reserved
  6.  
  7.   *****************************************************************************
  8.   Remote Access external API
  9.   Public header for external API clients
  10.   ras.h   - Copyright (c) 1992-1996, Microsoft Corporation, all rights reserved
  11.   *****************************************************************************
  12.  
  13.   Please send comments to plagge@wolfsburg.de
  14.  
  15.   V 1.01 - Aug 7th, 1998
  16.            first implementation, never trust a version 1.00 :-)
  17.   V 1.02 - Aug 23th, 1998
  18.            + added real connected state
  19.              the property Connected represents the connection state from
  20.              RAS services. if the connection state for a service is needed
  21.              simply set the property RASName and next check the poperty
  22.              Connected.
  23.   V 1.03 - Sep 29th, 1998
  24.            + fixed some uninititialized function results
  25.   V 1.04 - Oct 17th, 1998
  26.            + minor changes
  27.            + documentation completed - it's never complete :-)
  28.            + first public release
  29.   V 1.05 - Apr 1st 2002
  30.            + added getting the phone number of a RAS service
  31.  
  32.   V 1.10 - July 26th 2002
  33.            + complete new interface and internal design. now all available
  34.              ras service can be managed by one instance
  35.   *****************************************************************************
  36.   NO REPRESENTATIONS ARE MADE ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY
  37.   PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
  38.   NEITHER FRANK PLAGGE OR ANY OTHER PERSON SHALL BE LIABLE FOR ANY DAMAGES
  39.   SUFFERED BY THE USE OF THIS SOFTWARE.
  40.   *****************************************************************************
  41.  
  42.   description:
  43.    This is a component for an easy access to ras services. It includes
  44.    connecting and disconnecting services as well as an easy access to
  45.    important properties like connection state, IP numbers of client and server,
  46.    phone number, aerea code, country code, device name, device type and a time
  47.    stamp of the last connection state change.
  48.  
  49.    I know there are much more possibilities with RAS, but there is no time to
  50.    implement all of them.
  51.  
  52.   *****************************************************************************
  53.  
  54.   properties and events at design time:
  55.  
  56.     property OnConnect: TOnConnectionEvent read FOnConnect write FOnConnect;           // connect event
  57.     property OnConnecting: TOnConnectingEvent read FOnConnecting write FOnConnecting;  // disconnect event
  58.     property OnDisconnect: TOnConnectionEvent read FOnDisconnect write FOnDisconnect;  // state change event during connection phase
  59.  
  60.   *****************************************************************************
  61.    properties and events at runtime:
  62.  
  63.     constructor Create(AOwner: TComponent); override;  // create a new instance
  64.     destructor Destroy; override;                      // destroy an existing instance
  65.     procedure Connect( Index: Integer );               // connect a ras service
  66.     procedure DisConnect(Index: Integer);              // disconnect a ras service
  67.     function  IndexOf( Name: string ) : Integer;       // get the index of a ras service by name
  68.     procedure Start;                                   // start the autorefresh mechanism
  69.     procedure Stop;                                    // stop the autorefresh mechanism
  70.     property Count: Integer read GetCount;             // get the number of available ras connections
  71.     property AreaCode[Index: Integer]: string read GetAreaCode;        // get area code by index
  72.     property Connected[Index: Integer]: Boolean read GetConnected;     // get connection state by index
  73.     property CountryCode[Index: Integer]: Integer read GetCountryCode; // get countryCode by index
  74.     property DeviceName[Index: Integer]: string read GetDeviceName;    // get device name by index
  75.     property DeviceType[Index: Integer]: string read GetDeviceType;    // get device type by index
  76.     property Handle[Index: Integer]: THRasConn read GetHandle;         // get ras service handle by index
  77.     property IPClient[Index: Integer]: string read GetIPClient;        // get client ip number by index
  78.     property IPServer[Index: Integer]: string read GetIPServer;        // get server ip number by index
  79.     property Name[Index: Integer]: string read GetName;                // get connection name by index
  80.     property PhoneNumber[Index: Integer]: string read GetPhoneNumber;  // get phone number by index
  81.     property TimeStamp[Index: Integer]: TDateTime read GetTimeStamp;   // get state toggle timestamp by index
  82.     property Version: string read GetVersion;
  83.  
  84.   *****************************************************************************
  85.   other very useful procedures
  86.  
  87.     function  GetStatusString(State: Integer): string;  // convert state to string message
  88.