PTLib
Version 2.10.10
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
remconn.h
Go to the documentation of this file.
1
/*
2
* remconn.h
3
*
4
* Remote networking connection class.
5
*
6
* Portable Windows Library
7
*
8
* Copyright (c) 1993-1998 Equivalence Pty. Ltd.
9
*
10
* The contents of this file are subject to the Mozilla Public License
11
* Version 1.0 (the "License"); you may not use this file except in
12
* compliance with the License. You may obtain a copy of the License at
13
* http://www.mozilla.org/MPL/
14
*
15
* Software distributed under the License is distributed on an "AS IS"
16
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17
* the License for the specific language governing rights and limitations
18
* under the License.
19
*
20
* The Original Code is Portable Windows Library.
21
*
22
* The Initial Developer of the Original Code is Equivalence Pty. Ltd.
23
*
24
* Portions are Copyright (C) 1993 Free Software Foundation, Inc.
25
* All Rights Reserved.
26
*
27
* Contributor(s): ______________________________________.
28
*
29
* $Revision: 24177 $
30
* $Author: rjongbloed $
31
* $Date: 2010-04-05 06:52:04 -0500 (Mon, 05 Apr 2010) $
32
*/
33
34
#ifndef PTLIB_REMOTECONNECTION_H
35
#define PTLIB_REMOTECONNECTION_H
36
37
#ifdef P_USE_PRAGMA
38
#pragma interface
39
#endif
40
41
#include <
ptlib/pipechan.h
>
42
43
#ifdef _WIN32
44
#include <ras.h>
45
#include <raserror.h>
46
#endif
47
50
class
PRemoteConnection
:
public
PObject
51
{
52
PCLASSINFO(
PRemoteConnection
,
PObject
);
53
54
public
:
57
58
PRemoteConnection
();
59
63
PRemoteConnection
(
64
const
PString
& name
65
);
66
68
~PRemoteConnection
();
70
76
virtual
Comparison
Compare
(
77
const
PObject
& obj
78
)
const
;
79
83
virtual
PINDEX
HashFunction
()
const
;
85
90
PBoolean
Open
(
91
PBoolean
existing =
false
92
);
93
96
PBoolean
Open
(
97
const
PString
& name,
98
PBoolean
existing =
false
99
);
100
103
PBoolean
Open
(
104
const
PString
& name,
105
const
PString
& username,
106
const
PString
&
password
,
107
PBoolean
existing =
false
108
);
109
114
void
Close
();
116
119
120
enum
Status
{
122
Idle
,
124
Connected
,
126
InProgress
,
128
LineBusy
,
130
NoDialTone
,
132
NoAnswer
,
134
PortInUse
,
136
NoNameOrNumber
,
138
AccessDenied
,
140
HardwareFailure
,
142
GeneralFailure
,
144
ConnectionLost
,
146
NotInstalled
,
147
NumStatuses
148
};
149
155
Status
GetStatus
()
const
;
156
162
DWORD
GetErrorCode
()
const
{
return
osError
; }
164
172
const
PString
&
GetName
()
const
{
return
remoteName
; }
173
179
PString
GetAddress
();
180
187
static
PStringArray
GetAvailableNames
();
189
192
193
struct
Configuration
{
195
PString
device
;
197
PString
phoneNumber
;
199
PString
ipAddress
;
201
PString
dnsAddress
;
203
PString
script
;
205
PINDEX
subEntries
;
207
PBoolean
dialAllSubEntries
;
208
};
209
218
Status
GetConfiguration
(
219
Configuration
& config
220
);
221
230
static
Status
GetConfiguration
(
231
const
PString
& name,
232
Configuration
& config
233
);
234
243
Status
SetConfiguration
(
244
const
Configuration
& config,
245
PBoolean
create =
false
246
);
247
256
static
Status
SetConfiguration
(
257
const
PString
& name,
258
const
Configuration
& config,
259
PBoolean
create =
false
260
);
261
270
static
Status
RemoveConfiguration
(
271
const
PString
& name
272
);
274
275
protected
:
276
PString
remoteName
;
277
PString
userName
;
278
PString
password
;
279
DWORD
osError
;
280
281
private
:
282
PRemoteConnection
(
const
PRemoteConnection
&) { }
283
void
operator=(
const
PRemoteConnection
&) { }
284
void
Construct();
285
286
287
// Include platform dependent part of class
288
#ifdef _WIN32
289
#include "msos/ptlib/remconn.h"
290
#else
291
#include "unix/ptlib/remconn.h"
292
#endif
293
};
294
295
296
#endif // PTLIB_REMOTECONNECTION_H
297
298
299
// End Of File ///////////////////////////////////////////////////////////////
include
ptlib
remconn.h
Generated on Tue May 7 2013 17:25:46 for PTLib by
1.8.3.1