#include <remconn.h>
Inheritance diagram for PRemoteConnection:
Error/Status functions | |
enum | Status { Idle, Connected, InProgress, LineBusy, NoDialTone, NoAnswer, PortInUse, NoNameOrNumber, AccessDenied, HardwareFailure, GeneralFailure, ConnectionLost, NotInstalled, NumStatuses } |
Status codes for remote connection. More... | |
Status | GetStatus () const |
DWORD | GetErrorCode () const |
Information functions | |
const PString & | GetName () const |
PString | GetAddress () |
static PStringArray | GetAvailableNames () |
Configuration functions | |
Status | GetConfiguration (Configuration &config) |
Status | SetConfiguration (const Configuration &config, BOOL create=FALSE) |
static Status | GetConfiguration (const PString &name, Configuration &config) |
static Status | SetConfiguration (const PString &name, const Configuration &config, BOOL create=FALSE) |
static Status | RemoveConfiguration (const PString &name) |
Public Member Functions | |
Overrides from class PObject | |
virtual Comparison | Compare (const PObject &obj) const |
virtual PINDEX | HashFunction () const |
Dial/Hangup functions | |
BOOL | Open (BOOL existing=FALSE) |
BOOL | Open (const PString &name, BOOL existing=FALSE) |
BOOL | Open (const PString &name, const PString &username, const PString &password, BOOL existing=FALSE) |
void | Close () |
Protected Attributes | |
PString | remoteName |
PString | userName |
PString | password |
DWORD | osError |
PString | pppDeviceName |
PPipeChannel * | pipeChannel |
BOOL | wasConnected |
Status | status |
PString | deviceStr |
Classes | |
struct | Configuration |
Structure for a RAS configuration. More... |
Status codes for remote connection.
PRemoteConnection::PRemoteConnection | ( | ) |
Create a new remote connection.
PRemoteConnection::PRemoteConnection | ( | const PString & | name | ) |
Create a new remote connection. This will initiate the connection using the specified settings.
name | Name of RAS configuration. |
PRemoteConnection::~PRemoteConnection | ( | ) |
Disconnect remote connection.
PRemoteConnection::PRemoteConnection | ( | ) |
Create a new remote connection.
PRemoteConnection::PRemoteConnection | ( | const PString & | name | ) |
Create a new remote connection. This will initiate the connection using the specified settings.
name | Name of RAS configuration. |
PRemoteConnection::~PRemoteConnection | ( | ) |
Disconnect remote connection.
virtual Comparison PRemoteConnection::Compare | ( | const PObject & | obj | ) | const [virtual] |
Compare two connections.
obj | Another connection instance. |
Reimplemented from PObject.
virtual PINDEX PRemoteConnection::HashFunction | ( | ) | const [virtual] |
Get has value for the connection
Reimplemented from PObject.
BOOL PRemoteConnection::Open | ( | BOOL | existing = FALSE |
) |
Open the remote connection.
existing | Flag for open only if already connected. |
BOOL PRemoteConnection::Open | ( | const PString & | name, | |
BOOL | existing = FALSE | |||
) |
Open the remote connection.
name | RAS name of of connection to open. |
existing | Flag for open only if already connected. |
BOOL PRemoteConnection::Open | ( | const PString & | name, | |
const PString & | username, | |||
const PString & | password, | |||
BOOL | existing = FALSE | |||
) |
Open the remote connection.
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. |
void PRemoteConnection::Close | ( | ) |
Close the remote connection. This will hang up/dosconnect the connection, net access will no longer be available to this site.
Status PRemoteConnection::GetStatus | ( | ) | const |
Get the current status of the RAS connection.
DWORD PRemoteConnection::GetErrorCode | ( | ) | const [inline] |
Get the error code for the last operation.
const PString& PRemoteConnection::GetName | ( | ) | const [inline] |
Get the name of the RAS connection.
PString PRemoteConnection::GetAddress | ( | ) |
Get the IP address in dotted decimal form for the RAS connection.
static PStringArray PRemoteConnection::GetAvailableNames | ( | ) | [static] |
Get an array of names for all of the available remote connections on this system.
Status PRemoteConnection::GetConfiguration | ( | Configuration & | config | ) |
Get the configuration of the specified remote access connection.
config | Configuration of remote connection |
static Status PRemoteConnection::GetConfiguration | ( | const PString & | name, | |
Configuration & | config | |||
) | [static] |
Get the configuration of the specified remote access connection.
name | Remote connection name to get configuration |
config | Configuration of remote connection |
Status PRemoteConnection::SetConfiguration | ( | const Configuration & | config, | |
BOOL | create = FALSE | |||
) |
Set the configuration of the specified remote access connection.
config | Configuration of remote connection |
create | Flag to create connection if not present |
static Status PRemoteConnection::SetConfiguration | ( | const PString & | name, | |
const Configuration & | config, | |||
BOOL | create = FALSE | |||
) | [static] |
Set the configuration of the specified remote access connection.
name | Remote connection name to configure |
config | Configuration of remote connection |
create | Flag to create connection if not present |
Remove the specified remote access connection.
name | Remote connection name to configure |
PString PRemoteConnection::remoteName [protected] |
PString PRemoteConnection::userName [protected] |
PString PRemoteConnection::password [protected] |
DWORD PRemoteConnection::osError [protected] |
PString PRemoteConnection::pppDeviceName [protected] |
PPipeChannel* PRemoteConnection::pipeChannel [protected] |
BOOL PRemoteConnection::wasConnected [protected] |
Status PRemoteConnection::status [protected] |
PString PRemoteConnection::deviceStr [protected] |