📄 classpremoteconnection.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PRemoteConnection class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PRemoteConnection Class Reference</h1><code>#include <<a class="el" href="remconn_8h-source.html">remconn.h</a>></code><p><p>Inheritance diagram for PRemoteConnection:<p><center><img src="classPRemoteConnection.png" usemap="#PRemoteConnection_map" border="0" alt=""></center><map name="PRemoteConnection_map"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,125,24"></map><a href="classPRemoteConnection-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Error/Status functions</h2></td></tr><tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z313_0">Status</a> { <br> <a class="el" href="classPRemoteConnection.html#z313_0s0">Idle</a>, <a class="el" href="classPRemoteConnection.html#z313_0s1">Connected</a>, <a class="el" href="classPRemoteConnection.html#z313_0s2">InProgress</a>, <a class="el" href="classPRemoteConnection.html#z313_0s3">LineBusy</a>, <br> <a class="el" href="classPRemoteConnection.html#z313_0s4">NoDialTone</a>, <a class="el" href="classPRemoteConnection.html#z313_0s5">NoAnswer</a>, <a class="el" href="classPRemoteConnection.html#z313_0s6">PortInUse</a>, <a class="el" href="classPRemoteConnection.html#z313_0s7">NoNameOrNumber</a>, <br> <a class="el" href="classPRemoteConnection.html#z313_0s8">AccessDenied</a>, <a class="el" href="classPRemoteConnection.html#z313_0s9">HardwareFailure</a>, <a class="el" href="classPRemoteConnection.html#z313_0s10">GeneralFailure</a>, <a class="el" href="classPRemoteConnection.html#z313_0s11">ConnectionLost</a>, <br> <a class="el" href="classPRemoteConnection.html#z313_0s12">NotInstalled</a>, <a class="el" href="classPRemoteConnection.html#z313_0s13">NumStatuses</a><br> }</td></tr><tr><td> </td><td><font size=-1><em>Status codes for remote connection.</em> <a href="#z313_0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPRemoteConnection.html#z313_0">Status</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z313_1">GetStatus</a> () const</td></tr><tr><td nowrap align=right valign=top>DWORD </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z313_2">GetErrorCode</a> () const</td></tr><tr><td colspan=2><br><h2>Information functions</h2></td></tr><tr><td nowrap align=right valign=top>const <a class="el" href="classPString.html">PString</a> & </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z315_0">GetName</a> () const</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z315_1">GetAddress</a> ()</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPStringArray.html">PStringArray</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z315_2">GetAvailableNames</a> ()</td></tr><tr><td colspan=2><br><h2>Configuration functions</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPRemoteConnection.html#z313_0">Status</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z317_0">GetConfiguration</a> (<a class="el" href="structPRemoteConnection_1_1Configuration.html">Configuration</a> &config)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPRemoteConnection.html#z313_0">Status</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z317_1">SetConfiguration</a> (const <a class="el" href="structPRemoteConnection_1_1Configuration.html">Configuration</a> &config, BOOL create=FALSE)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPRemoteConnection.html#z313_0">Status</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z317_2">GetConfiguration</a> (const <a class="el" href="classPString.html">PString</a> &name, <a class="el" href="structPRemoteConnection_1_1Configuration.html">Configuration</a> &config)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPRemoteConnection.html#z313_0">Status</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z317_3">SetConfiguration</a> (const <a class="el" href="classPString.html">PString</a> &name, const <a class="el" href="structPRemoteConnection_1_1Configuration.html">Configuration</a> &config, BOOL create=FALSE)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPRemoteConnection.html#z313_0">Status</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z317_4">RemoveConfiguration</a> (const <a class="el" href="classPString.html">PString</a> &name)</td></tr><tr><td colspan=2><br><h2>Public Types</h2></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td colspan="2"><div class="groupHeader">Construction</div></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z307_0">PRemoteConnection</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Create a new remote connection.</em> <a href="#z307_0"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z307_1">PRemoteConnection</a> (const <a class="el" href="classPString.html">PString</a> &name)</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z307_2">~PRemoteConnection</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Disconnect remote connection.</em> <a href="#z307_2"></a><em></em></font><br><br></td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PObject</div></td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="classPObject.html#z199_0">Comparison</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z309_0">Compare</a> (const <a class="el" href="classPObject.html">PObject</a> &obj) const</td></tr><tr><td nowrap align=right valign=top>virtual PINDEX </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z309_1">HashFunction</a> () const</td></tr><tr><td colspan="2"><div class="groupHeader">Dial/Hangup functions</div></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z311_0">Open</a> (BOOL existing=FALSE)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z311_1">Open</a> (const <a class="el" href="classPString.html">PString</a> &name, BOOL existing=FALSE)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z311_2">Open</a> (const <a class="el" href="classPString.html">PString</a> &name, const <a class="el" href="classPString.html">PString</a> &username, const <a class="el" href="classPString.html">PString</a> &<a class="el" href="classPRemoteConnection.html#n2">password</a>, BOOL existing=FALSE)</td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#z311_3">Close</a> ()</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#n0">remoteName</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#n1">userName</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#n2">password</a></td></tr><tr><td nowrap align=right valign=top>DWORD </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#n3">osError</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#n4">pppDeviceName</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPPipeChannel.html">PPipeChannel</a> * </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#n5">pipeChannel</a></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#n6">wasConnected</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPRemoteConnection.html#z313_0">Status</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#n7">status</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPRemoteConnection.html#n8">deviceStr</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Remote Access Connection class. <p><hr><h2>Member Enumeration Documentation</h2><a name="z313_0" doxytag="PRemoteConnection::Status"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> enum PRemoteConnection::Status </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Status codes for remote connection.<p><dl compact><dt><b>Enumeration values: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a name="z313_0s0" doxytag="Idle"></a><em>Idle</em></em> </td><td>Connection has not been made and no attempt is being made.</td></tr><tr><td valign=top><em><a name="z313_0s1" doxytag="Connected"></a><em>Connected</em></em> </td><td>Connection is completed and active.</td></tr><tr><td valign=top><em><a name="z313_0s2" doxytag="InProgress"></a><em>InProgress</em></em> </td><td>Connection is in progress.</td></tr><tr><td valign=top><em><a name="z313_0s3" doxytag="LineBusy"></a><em>LineBusy</em></em> </td><td>Connection failed due to the line being busy.</td></tr><tr><td valign=top><em><a name="z313_0s4" doxytag="NoDialTone"></a><em>NoDialTone</em></em> </td><td>Connection failed due to the line havin no dial tone.</td></tr><tr><td valign=top><em><a name="z313_0s5" doxytag="NoAnswer"></a><em>NoAnswer</em></em> </td><td>Connection failed due to the remote not answering.</td></tr><tr><td valign=top><em><a name="z313_0s6" doxytag="PortInUse"></a><em>PortInUse</em></em> </td><td>Connection failed due to the port being in use.</td></tr><tr><td valign=top><em><a name="z313_0s7" doxytag="NoNameOrNumber"></a><em>NoNameOrNumber</em></em> </td><td>Connection failed due to the RAS setting name/number being incorrect.</td></tr><tr><td valign=top><em><a name="z313_0s8" doxytag="AccessDenied"></a><em>AccessDenied</em></em> </td><td>Connection failed due to insufficient privilege.</td></tr><tr><td valign=top><em><a name="z313_0s9" doxytag="HardwareFailure"></a><em>HardwareFailure</em></em> </td><td>Connection failed due to a hardware failure.</td></tr><tr><td valign=top><em><a name="z313_0s10" doxytag="GeneralFailure"></a><em>GeneralFailure</em></em> </td><td>Connection failed due to a general failure.</td></tr><tr><td valign=top><em><a name="z313_0s11" doxytag="ConnectionLost"></a><em>ConnectionLost</em></em> </td><td>Connection was lost after successful establishment.</td></tr><tr><td valign=top><em><a name="z313_0s12" doxytag="NotInstalled"></a><em>NotInstalled</em></em> </td><td>The Remote Access Operating System support is not installed.</td></tr><tr><td valign=top><em><a name="z313_0s13" doxytag="NumStatuses"></a><em>NumStatuses</em></em> </td><td></td></tr></table></dl> </td> </tr></table><hr><h2>Constructor & Destructor Documentation</h2><a name="z307_0" doxytag="PRemoteConnection::PRemoteConnection"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PRemoteConnection::PRemoteConnection </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a new remote connection.<p> </td> </tr></table><a name="z307_1" doxytag="PRemoteConnection::PRemoteConnection"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PRemoteConnection::PRemoteConnection </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname1" valign="top" nowrap> <em>name</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a new remote connection. This will initiate the connection using the specified settings. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>name</em> </td><td>Name of RAS configuration. </td></tr></table></dl> </td> </tr></table><a name="z307_2" doxytag="PRemoteConnection::~PRemoteConnection"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PRemoteConnection::~PRemoteConnection </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Disconnect remote connection.<p> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="z311_3" doxytag="PRemoteConnection::Close"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void PRemoteConnection::Close </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Close the remote connection. This will hang up/dosconnect the connection, net access will no longer be available to this site. </td> </tr></table><a name="z309_0" doxytag="PRemoteConnection::Compare"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual <a class="el" href="classPObject.html#z199_0">Comparison</a> PRemoteConnection::Compare </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPObject.html">PObject</a> & </td> <td class="mdname1" valign="top" nowrap> <em>obj</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Compare two connections. <dl compact><dt><b>Returns: </b></dt><dd>EqualTo of same RAS connectionconfiguration. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>obj</em> </td><td>Another connection instance. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPObject.html#z199_1">PObject</a>. </td> </tr></table><a name="z315_1" doxytag="PRemoteConnection::GetAddress"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classPString.html">PString</a> PRemoteConnection::GetAddress </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the IP address in dotted decimal form for the RAS connection.<p><dl compact><dt><b>Returns: </b></dt><dd> String for IP address, or empty string if none. </dl> </td> </tr></table><a name="z315_2" doxytag="PRemoteConnection::GetAvailableNames"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classPStringArray.html">PStringArray</a> PRemoteConnection::GetAvailableNames </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -