class PRemoteConnection: public PObject

Remote Access Connection class

Inheritance:


Public

[more] Construction
[more] Overrides from class PObject
[more] Dial/Hangup functions
[more] Error/Status functions
[more] Information functions
[more] Configuration functions


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous functions


Documentation

Remote Access Connection class
o Construction

o PRemoteConnection()
Create a new remote connection.

o PRemoteConnection( const PString & name )
Create a new remote connection. This will initiate the connection using the specified settings.
Parameters:
name - Name of RAS configuration.

o ~PRemoteConnection()
Disconnect remote connection.

o Overrides from class PObject

ovirtual Comparison Compare( const PObject & obj ) const
Compare two connections.
Returns:
EqualTo of same RAS connectionconfiguration.
Parameters:
obj - Another connection instance.

ovirtual PINDEX HashFunction() const
Get has value for the connection
Returns:
Hash value of the connection name string.

o Dial/Hangup functions

oBOOL Open( BOOL existing = FALSE )
Open the remote connection.
Parameters:
existing - Flag for open only if already connected.

oBOOL Open( const PString & name, BOOL existing = FALSE )
Open the remote connection.
Parameters:
name - RAS name of of connection to open.
existing - Flag for open only if already connected.

oBOOL Open( const PString & name, const PString & username, const PString & password, BOOL existing = FALSE )
Open the remote connection.
Parameters:
name - RAS name of of connection to open.
username - Username for remote log in.
password - password for remote log in.
existing - Flag for open only if already connected.

ovoid Close()
Close the remote connection. This will hang up/dosconnect the connection, net access will no longer be available to this site.

o Error/Status functions

oenum Status
Status codes for remote connection.

o Idle
Connection has not been made and no attempt is being made.

o Connected
Connection is completed and active.

o InProgress
Connection is in progress.

o LineBusy
Connection failed due to the line being busy.

o NoDialTone
Connection failed due to the line havin no dial tone.

o NoAnswer
Connection failed due to the remote not answering.

o PortInUse
Connection failed due to the port being in use.

o NoNameOrNumber
Connection failed due to the RAS setting name/number being incorrect.

o AccessDenied
Connection failed due to insufficient privilege.

o HardwareFailure
Connection failed due to a hardware failure.

o GeneralFailure
Connection failed due to a general failure.

o ConnectionLost
Connection was lost after successful establishment.

o NotInstalled
The Remote Access Operating System support is not installed.

oStatus GetStatus() const
Get the current status of the RAS connection.

Returns:
Status code.

oDWORD GetErrorCode() const
Get the error code for the last operation.

Returns:
Operating system error code.

o Information functions

oconst PString& GetName() const
Get the name of the RAS connection.

Returns:
String for IP address, or empty string if none.

oPString GetAddress()
Get the IP address in dotted decimal form for the RAS connection.

Returns:
String for IP address, or empty string if none.

ostatic PStringArray GetAvailableNames()
Get an array of names for all of the available remote connections on this system.

Returns:
Array of strings for remote connection names.

o Configuration functions

ostruct Configuration
Structure for a RAS configuration.

oPString device
Device name for connection eg /dev/modem

oPString phoneNumber
Telephone number to call to make the connection.

oPString ipAddress
IP address of local machine after connection is made.

oPString dnsAddress
DNS host on remote site.

oPString script
Script name for doing remote log in.

oPINDEX subEntries
Sub-entry number when Multi-link PPP is used.

oBOOL dialAllSubEntries
Always establish maximum bandwidth when Multi-link PPP is used.

oStatus GetConfiguration( Configuration & config )
Get the configuration of the specified remote access connection.

Returns:
Connected if the configuration information was obtained, NoNameOrNumber if the particular RAS name does not exist, NotInstalled if there is no RAS support in the operating system, GeneralFailure on any other error.
Parameters:
config - Configuration of remote connection

ostatic Status GetConfiguration( const PString & name, Configuration & config )
Get the configuration of the specified remote access connection.

Returns:
Connected if the configuration information was obtained, NoNameOrNumber if the particular RAS name does not exist, NotInstalled if there is no RAS support in the operating system, GeneralFailure on any other error.
Parameters:
name - Remote connection name to get configuration

oStatus SetConfiguration( const Configuration & config, BOOL create = FALSE )
Set the configuration of the specified remote access connection.

Returns:
Connected if the configuration information was set, NoNameOrNumber if the particular RAS name does not exist, NotInstalled if there is no RAS support in the operating system, GeneralFailure on any other error.
Parameters:
config - Configuration of remote connection
create - Flag to create connection if not present

ostatic Status SetConfiguration( const PString & name, const Configuration & config, BOOL create = FALSE )
Set the configuration of the specified remote access connection.

Returns:
Connected if the configuration information was set, NoNameOrNumber if the particular RAS name does not exist, NotInstalled if there is no RAS support in the operating system, GeneralFailure on any other error.
Parameters:
name - Remote connection name to configure
config - Configuration of remote connection
create - Flag to create connection if not present

ostatic Status RemoveConfiguration( const PString & name )
Remove the specified remote access connection.

Returns:
Connected if the configuration information was removed, NoNameOrNumber if the particular RAS name does not exist, NotInstalled if there is no RAS support in the operating system, GeneralFailure on any other error.
Parameters:
name - Remote connection name to configure


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.