24
|
1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@publishedPartner
|
|
19 |
@released
|
|
20 |
*/
|
|
21 |
|
|
22 |
#if !defined(__ETEL_H__)
|
|
23 |
/** @internalComponent */
|
|
24 |
#define __ETEL_H__
|
|
25 |
|
|
26 |
#if !defined(__E32BASE_H__)
|
|
27 |
#include <e32base.h>
|
|
28 |
#endif
|
|
29 |
|
|
30 |
#if !defined (__C32COMM_H__)
|
|
31 |
#include <c32comm.h>
|
|
32 |
#endif
|
|
33 |
|
|
34 |
#if !defined(__D32COMM_H__)
|
|
35 |
#include <d32comm.h>
|
|
36 |
#endif
|
|
37 |
|
|
38 |
#if !defined(__FAXDEFN_H)
|
|
39 |
#include <faxdefn.h>
|
|
40 |
#endif
|
|
41 |
/** Major version number.*/
|
|
42 |
const TUint KEtelMajorVersionNumber=1;
|
|
43 |
/** Minor version number. */
|
|
44 |
const TUint KEtelMinorVersionNumber=0;
|
|
45 |
/** Build number. */
|
|
46 |
const TUint KEtelBuildVersionNumber=606;
|
|
47 |
/**
|
|
48 |
@internalComponent
|
|
49 |
*/
|
|
50 |
IMPORT_C void PanicClient(TInt aFault);
|
|
51 |
|
|
52 |
//
|
|
53 |
// Etel Core Error Definitions
|
|
54 |
//
|
|
55 |
|
|
56 |
const TInt KErrEtelCoreBase = -2000;
|
|
57 |
|
|
58 |
/** The client is not the call owner and has attempted to perform an operation
|
|
59 |
that requires ownership.*/
|
|
60 |
const TInt KErrEtelNotCallOwner=KErrEtelCoreBase;
|
|
61 |
/** An attempt has been made to load an ETel (TSY) module which contains a phone
|
|
62 |
with the same name as one already loaded. */
|
|
63 |
const TInt KErrEtelDuplicatePhoneName=KErrEtelCoreBase-1;
|
|
64 |
/** An attempt has been made to acquire call ownership when the requesting client
|
|
65 |
is already the call owner. */
|
|
66 |
const TInt KErrEtelAlreadyCallOwner=KErrEtelCoreBase-2;
|
|
67 |
/** A connection has been terminated because the carrier has been lost. */
|
|
68 |
const TInt KErrEtelNoCarrier=KErrEtelCoreBase-3;
|
|
69 |
/** An attempt to establish a connection with the RCall::Dial() function has failed
|
|
70 |
because the remote party's line was busy. */
|
|
71 |
const TInt KErrEtelBusyDetected=KErrEtelCoreBase-4;
|
|
72 |
/** An attempt has been made to transfer call ownership, but no other clients are
|
|
73 |
interested in acquiring ownership. */
|
|
74 |
const TInt KErrEtelNoClientInterestedInThisCall=KErrEtelCoreBase-5;
|
|
75 |
/** The TSY has failed to initialise the modem. This may be occur if the modem
|
|
76 |
is disconnected during initialisation, or if an attempt is made to initialise
|
|
77 |
an unsupported modem. */
|
|
78 |
const TInt KErrEtelInitialisationFailure=KErrEtelCoreBase-6;
|
|
79 |
/** An attempt has been made to perform an operation which requires the call to
|
|
80 |
be connected - when the call is not connected. E.g. RCall:LoanDataPort(). */
|
|
81 |
const TInt KErrEtelCallNotActive=KErrEtelCoreBase-7;
|
|
82 |
/** A connection request has failed because there is no answer. */
|
|
83 |
const TInt KErrEtelNoAnswer=KErrEtelCoreBase-8;
|
|
84 |
/** A connection request has failed because there is no dial tone. For example,
|
|
85 |
if there is no connection between the modem and the network. */
|
|
86 |
const TInt KErrEtelNoDialTone=KErrEtelCoreBase-9;
|
|
87 |
/** An attempt to configure the port has failed because the hardware cannot match
|
|
88 |
the desired configuration. For example, if an attempt is made to configure
|
|
89 |
the comms port to a baud rate it cannot support. */
|
|
90 |
const TInt KErrEtelConfigPortFailure=KErrEtelCoreBase-10;
|
|
91 |
/** Out of memory error - global chunk cannot be created. */
|
|
92 |
const TInt KErrEtelFaxChunkNotCreated=KErrEtelCoreBase-11;
|
|
93 |
/** The client is not the fax owner and has attempted to perform an operation that
|
|
94 |
requires fax ownership.
|
|
95 |
|
|
96 |
The fax client should be used to access fax functionality. Consequently, client
|
|
97 |
code should not return this error. */
|
|
98 |
const TInt KErrEtelNotFaxOwner=KErrEtelCoreBase-12;
|
|
99 |
/** An attempt has been made to perform an operation which requires port ownership.
|
|
100 |
However, the client does not own the port. */
|
|
101 |
const TInt KErrEtelPortNotLoanedToClient=KErrEtelCoreBase-13;
|
|
102 |
/** An operation has failed because the modem has been incorrectly configured. */
|
|
103 |
const TInt KErrEtelWrongModemType=KErrEtelCoreBase-14;
|
|
104 |
/** An operation has failed because the modem does not understand the request -
|
|
105 |
possible bug in modem. */
|
|
106 |
const TInt KErrEtelUnknownModemCapability=KErrEtelCoreBase-15;
|
|
107 |
/** The call has already placed an 'answer incoming call' request. Only 1 request
|
|
108 |
of a type (e.g. fax, voice, data) can be outstanding on the server at a time. */
|
|
109 |
const TInt KErrEtelAnswerAlreadyOutstanding=KErrEtelCoreBase-16;
|
|
110 |
/** An attempt to establish a connection with the modem has failed because the
|
|
111 |
modem cannot be detected. */
|
|
112 |
const TInt KErrEtelModemNotDetected=KErrEtelCoreBase-17;
|
|
113 |
/** Operation failed because the modem settings are corrupt. */
|
|
114 |
const TInt KErrEtelModemSettingsCorrupt=KErrEtelCoreBase-18;
|
|
115 |
/** The Data port is in use by another call or application. */
|
|
116 |
const TInt KErrEtelPortAlreadyLoaned=KErrEtelCoreBase-19;
|
|
117 |
/** Another call active. Close it before opening a new one. */
|
|
118 |
const TInt KErrEtelCallAlreadyActive=KErrEtelCoreBase-20;
|
|
119 |
|
|
120 |
//
|
|
121 |
//
|
|
122 |
// RTelSubSessionBase
|
|
123 |
//
|
|
124 |
//
|
|
125 |
class CPtrHolder;
|
|
126 |
class RFile;
|
|
127 |
/**
|
|
128 |
A base class used in the derivation of RCall, RLine, and RPhone. It has no user
|
|
129 |
accessible functions.
|
|
130 |
|
|
131 |
@publishedPartner
|
|
132 |
@released
|
|
133 |
*/
|
|
134 |
class RTelSubSessionBase : public RSubSessionBase
|
|
135 |
{
|
|
136 |
public:
|
|
137 |
inline RSessionBase& SessionHandle() const;
|
|
138 |
inline void SetSessionHandle(RSessionBase& aSession);
|
|
139 |
inline void ResetSessionHandle();
|
|
140 |
inline TInt SubSessionHandle();
|
|
141 |
|
|
142 |
IMPORT_C void CancelAsyncRequest(TInt aReqToCancel) const;
|
|
143 |
|
|
144 |
enum TReqPriorityType
|
|
145 |
{
|
|
146 |
EIsNotaPriorityRequest,
|
|
147 |
EIsaPriorityRequest,
|
|
148 |
EIsaEmergencyRequest
|
|
149 |
};
|
|
150 |
|
|
151 |
protected:
|
|
152 |
|
|
153 |
IMPORT_C RTelSubSessionBase();
|
|
154 |
IMPORT_C TInt Blank(const TInt aIpc,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
155 |
IMPORT_C void Blank(const TInt aIpc,TRequestStatus& aStatus,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
156 |
|
|
157 |
IMPORT_C TInt Set(const TInt aIpc,const TDesC8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
158 |
IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
159 |
IMPORT_C TInt Get(const TInt aIpc,TDes8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
160 |
IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
161 |
|
|
162 |
IMPORT_C TInt Set(const TInt aIpc,const TDesC8& aDes1,const TDesC8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
163 |
IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC8& aDes1,const TDesC8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
164 |
IMPORT_C TInt Get(const TInt aIpc,TDes8& aDes1,TDes8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
165 |
IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes8& aDes1,TDes8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
166 |
|
|
167 |
IMPORT_C TInt Set(const TInt aIpc,const TDesC16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
168 |
IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
169 |
IMPORT_C TInt Get(const TInt aIpc,TDes16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
170 |
IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
171 |
|
|
172 |
IMPORT_C TInt Set(const TInt aIpc,const TDesC16& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
173 |
IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC16& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
174 |
IMPORT_C TInt Set(const TInt aIpc,const TDesC8& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
175 |
IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC8& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
176 |
|
|
177 |
IMPORT_C TInt Get(const TInt aIpc,TDes16& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
178 |
IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes16& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
179 |
IMPORT_C TInt Get(const TInt aIpc,TDes8& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
180 |
IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes8& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
181 |
|
|
182 |
IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, const TDesC8& aDes1, TDes8& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
183 |
IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, TDes8& aDes1, const TDesC16& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
184 |
IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, const TDesC8&, TDes16& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
185 |
IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, const TDesC16& aDes1, TDes16& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
186 |
|
|
187 |
IMPORT_C TInt Set(const TInt aIpc, const RFile& aFile, TReqPriorityType aType = EIsNotaPriorityRequest) const;
|
|
188 |
|
|
189 |
IMPORT_C TInt CancelReq(const TInt aIpc,const TInt aIpcToCancel) const;
|
|
190 |
IMPORT_C TInt CancelSubSession() const;
|
|
191 |
|
|
192 |
private:
|
|
193 |
RTelSubSessionBase(const RTelSubSessionBase& aTelSubSessionBase);
|
|
194 |
RSessionBase* iTelSession;
|
|
195 |
protected:
|
|
196 |
CPtrHolder* iPtrHolder;
|
|
197 |
};
|
|
198 |
|
|
199 |
//
|
|
200 |
//
|
|
201 |
// RFax
|
|
202 |
//
|
|
203 |
//
|
|
204 |
class RCall;
|
|
205 |
/**
|
|
206 |
ETel fax subsession.
|
|
207 |
|
|
208 |
Contains the fax client progress information structure.
|
|
209 |
|
|
210 |
ETel does include server-side RFax objects, however the
|
|
211 |
associated APIs are intended solely for use by ETel's own
|
|
212 |
fax client. Consequently, only the TProgress structure is
|
|
213 |
considered part of the public API.
|
|
214 |
|
|
215 |
@publishedPartner
|
|
216 |
@released
|
|
217 |
*/
|
|
218 |
class RFax : public RTelSubSessionBase
|
|
219 |
{
|
|
220 |
public:
|
|
221 |
IMPORT_C RFax();
|
|
222 |
IMPORT_C TInt Open(RCall& aCall);
|
|
223 |
IMPORT_C void Close();
|
|
224 |
|
|
225 |
//
|
|
226 |
// Read,Write and Wait for Page End
|
|
227 |
//
|
|
228 |
IMPORT_C void Read(TRequestStatus& aStatus,TDes8& aDes);
|
|
229 |
IMPORT_C void Write(TRequestStatus& aStatus,const TDesC8& aDes);
|
|
230 |
IMPORT_C void WaitForEndOfPage(TRequestStatus& aStatus) const;
|
|
231 |
IMPORT_C TInt TerminateFaxSession() const;
|
|
232 |
//
|
|
233 |
// Progress Information
|
|
234 |
//
|
|
235 |
struct TProgress
|
|
236 |
/** Contains fax progress information.*/
|
|
237 |
{
|
|
238 |
/** Time of last progress update.*/
|
|
239 |
TTime iLastUpdateTime;
|
|
240 |
/** ID of remote fax - filled in after connection.*/
|
|
241 |
TBuf<20> iAnswerback;
|
|
242 |
|
|
243 |
/** Phase of session.*/
|
|
244 |
TFaxPhase iPhase;
|
|
245 |
/** Resolution of document.*/
|
|
246 |
TFaxResolution iResolution;
|
|
247 |
/** Compression method in use.*/
|
|
248 |
TFaxCompression iCompression;
|
|
249 |
/** Error correction mode. Reserved for future releases.*/
|
|
250 |
TInt iECM;
|
|
251 |
|
|
252 |
/** Last or current page being transferred.*/
|
|
253 |
TInt iPage;
|
|
254 |
/** Last or current line on page.*/
|
|
255 |
TInt iLines;
|
|
256 |
/** Speed of fax session.*/
|
|
257 |
TInt iSpeed;
|
|
258 |
};
|
|
259 |
|
|
260 |
IMPORT_C TInt GetProgress(TProgress& aProgress);
|
|
261 |
private:
|
|
262 |
TProgress* iProgressPtr;
|
|
263 |
RChunk iChunk;
|
|
264 |
protected:
|
|
265 |
IMPORT_C virtual void ConstructL();
|
|
266 |
IMPORT_C virtual void Destruct();
|
|
267 |
};
|
|
268 |
|
|
269 |
//
|
|
270 |
//
|
|
271 |
// RCall
|
|
272 |
//
|
|
273 |
//
|
|
274 |
class RTelServer;
|
|
275 |
class RPhone;
|
|
276 |
class RLine;
|
|
277 |
/**
|
|
278 |
Call sub-session.
|
|
279 |
|
|
280 |
Provides access to the functionality associated with a specific call.
|
|
281 |
|
|
282 |
This class is not intended for user derivation.
|
|
283 |
|
|
284 |
@publishedPartner
|
|
285 |
@released
|
|
286 |
*/
|
|
287 |
class RCall : public RTelSubSessionBase
|
|
288 |
{
|
|
289 |
public:
|
|
290 |
IMPORT_C RCall();
|
|
291 |
IMPORT_C TInt OpenNewCall(RTelServer& aServer,const TDesC& aName,TDes& aNewName);
|
|
292 |
IMPORT_C TInt OpenNewCall(RTelServer& aServer,const TDesC& aName);
|
|
293 |
IMPORT_C TInt OpenNewCall(RPhone& aPhone,const TDesC& aName,TDes& aNewName);
|
|
294 |
IMPORT_C TInt OpenNewCall(RPhone& aPhone,const TDesC& aName);
|
|
295 |
IMPORT_C TInt OpenNewCall(RLine& aLine,TDes& aNewName);
|
|
296 |
IMPORT_C TInt OpenNewCall(RLine& aLine);
|
|
297 |
IMPORT_C TInt OpenExistingCall(RTelServer& aServer,const TDesC& aName);
|
|
298 |
IMPORT_C TInt OpenExistingCall(RPhone& aPhone,const TDesC& aName);
|
|
299 |
IMPORT_C TInt OpenExistingCall(RLine& aLine,const TDesC& aName);
|
|
300 |
IMPORT_C void Close();
|
|
301 |
|
|
302 |
//
|
|
303 |
// Call Status
|
|
304 |
//
|
|
305 |
/** Call status flags. */
|
|
306 |
enum TStatus
|
|
307 |
{
|
|
308 |
/** The call status is not known. */
|
|
309 |
EStatusUnknown,
|
|
310 |
/** The call is idle. */
|
|
311 |
EStatusIdle,
|
|
312 |
/** The call is dialling. */
|
|
313 |
EStatusDialling,
|
|
314 |
/** The call is ringing (an incoming, unanswered call). */
|
|
315 |
EStatusRinging,
|
|
316 |
/** The call is being answered. */
|
|
317 |
EStatusAnswering,
|
|
318 |
/** The call is connecting (immediate call establishment, without dialling). */
|
|
319 |
EStatusConnecting,
|
|
320 |
/** The call is connected and active. */
|
|
321 |
EStatusConnected,
|
|
322 |
/** The call is being terminated. */
|
|
323 |
EStatusHangingUp
|
|
324 |
};
|
|
325 |
|
|
326 |
IMPORT_C TInt GetStatus(TStatus& aStatus) const;
|
|
327 |
|
|
328 |
//
|
|
329 |
// Call Caps
|
|
330 |
//
|
|
331 |
/** Call capability flags. */
|
|
332 |
enum TCapsEnum
|
|
333 |
{
|
|
334 |
/** The call supports data calls. */
|
|
335 |
KCapsData=0x00000001,
|
|
336 |
/** The call supports fax calls. */
|
|
337 |
KCapsFax=0x00000002,
|
|
338 |
/** The call supports voice calls. */
|
|
339 |
KCapsVoice=0x00000004,
|
|
340 |
/** The Dial request is currently a valid action. */
|
|
341 |
KCapsDial=0x00000008,
|
|
342 |
/** The Connect request is currently a valid action. */
|
|
343 |
KCapsConnect=0x00000010,
|
|
344 |
/** The Hang Up request is currently a valid action. */
|
|
345 |
KCapsHangUp=0x00000020,
|
|
346 |
/** The Answer request is currently a valid action. */
|
|
347 |
KCapsAnswer=0x00000040,
|
|
348 |
/** The Loan Data Port request is currently a valid action. */
|
|
349 |
KCapsLoanDataPort=0x00000080,
|
|
350 |
/** The Recover Data Port request is currently a valid action. */
|
|
351 |
KCapsRecoverDataPort=0x00000100
|
|
352 |
};
|
|
353 |
|
|
354 |
struct TCaps
|
|
355 |
/** Call capability information. */
|
|
356 |
{
|
|
357 |
/** Call capability flag. Contains a bitmask of values defined in the TCapsEnum
|
|
358 |
enumeration.*/
|
|
359 |
TUint iFlags;
|
|
360 |
};
|
|
361 |
|
|
362 |
IMPORT_C TInt GetCaps(TCaps& aCaps) const;
|
|
363 |
IMPORT_C void NotifyCapsChange(TRequestStatus& aStatus, TCaps& aCaps);
|
|
364 |
IMPORT_C void NotifyCapsChangeCancel() const;
|
|
365 |
|
|
366 |
//
|
|
367 |
// Bearer Service Information
|
|
368 |
//
|
|
369 |
/** Bearer capability flags. */
|
|
370 |
enum TBearerCaps
|
|
371 |
{
|
|
372 |
/** V42bis modem compression protocol. */
|
|
373 |
KBearerCapsCompressionV42bis=0x00000001,
|
|
374 |
/** MNP5 modem compression protocol. */
|
|
375 |
KBearerCapsCompressionMNP5=0x00000002,
|
|
376 |
/** No compression supported. */
|
|
377 |
KBearerCapsCompressionNone=0x00000004,
|
|
378 |
/** LAPM error correction protocol. */
|
|
379 |
KBearerCapsProtocolLAPM=0x00000008,
|
|
380 |
/** MNP10 mode. */
|
|
381 |
KBearerCapsProtocolALT_CELLULAR=0x00000010,
|
|
382 |
/** MNP error correction. */
|
|
383 |
KBearerCapsProtocolALT=0x00000020,
|
|
384 |
/** No protocol information provided. */
|
|
385 |
KBearerCapsProtocolNone=0x00000040,
|
|
386 |
/** Compression protocol unknown. */
|
|
387 |
KBearerCapsCompressionUnknown=0x00000080,
|
|
388 |
/** Unable to establish protocol. */
|
|
389 |
KBearerCapsProtocolUnknown=0x00000100
|
|
390 |
};
|
|
391 |
|
|
392 |
/** Bearer speed flags. */
|
|
393 |
enum TCallBearerSpeed
|
|
394 |
{
|
|
395 |
/** Transfer rate of 57600 bps. */
|
|
396 |
EBearerData57600,
|
|
397 |
/** Transfer rate of 33600 bps. */
|
|
398 |
EBearerData33600,
|
|
399 |
/** Transfer rate of 31200 bps. */
|
|
400 |
EBearerData31200,
|
|
401 |
/** Transfer rate of 9200 bps. */
|
|
402 |
EBearerData19200,
|
|
403 |
/** Transfer rate of 4400 bps. */
|
|
404 |
EBearerData14400,
|
|
405 |
/** Transfer rate of 12000 bps. */
|
|
406 |
EBearerData12000,
|
|
407 |
/** Transfer rate of 9600 bps. */
|
|
408 |
EBearerData9600,
|
|
409 |
/** Transfer rate of 7200 bps. */
|
|
410 |
EBearerData7200,
|
|
411 |
/** Transfer rate of 4800 bps. */
|
|
412 |
EBearerData4800,
|
|
413 |
/** Transfer rate of 2400 bps. */
|
|
414 |
EBearerData2400,
|
|
415 |
/** Transfer rate of 200 bps. */
|
|
416 |
EBearerData1200,
|
|
417 |
/** V.23 75 bps forward, 1200 bps back */
|
|
418 |
EBearerData75_1200,
|
|
419 |
/** V.23 1200 bps forward, 75 bps back */
|
|
420 |
EBearerData1200_75,
|
|
421 |
/** Transfer rate of 300 bps. */
|
|
422 |
EBearerData300,
|
|
423 |
/** Transfer rate is unknown. */
|
|
424 |
EBearerDataUnknown
|
|
425 |
};
|
|
426 |
|
|
427 |
struct TBearerService
|
|
428 |
/** Call bearer information.
|
|
429 |
|
|
430 |
@see TCallBearerSpeed */
|
|
431 |
{
|
|
432 |
/** The bearer capabilities. */
|
|
433 |
TUint32 iBearerCaps;
|
|
434 |
/** The bearer's speed.
|
|
435 |
|
|
436 |
@see TCallBearerSpeed */
|
|
437 |
TCallBearerSpeed iBearerSpeed;
|
|
438 |
};
|
|
439 |
|
|
440 |
IMPORT_C TInt GetBearerServiceInfo(TBearerService& aBearerService) const;
|
|
441 |
|
|
442 |
//
|
|
443 |
// Notifications
|
|
444 |
//
|
|
445 |
/** Hook status flags. */
|
|
446 |
enum THookStatus
|
|
447 |
{
|
|
448 |
/** The line is currently off hook. */
|
|
449 |
EHookStatusOff,
|
|
450 |
/** The line is currently on hook. */
|
|
451 |
EHookStatusOn,
|
|
452 |
/** The status of the line's hook is currently unknown */
|
|
453 |
EHookStatusUnknown
|
|
454 |
};
|
|
455 |
|
|
456 |
class TCallInfo
|
|
457 |
/** Line call capability information.
|
|
458 |
|
|
459 |
@see TName
|
|
460 |
@publishedPartner
|
|
461 |
@released
|
|
462 |
*/
|
|
463 |
{
|
|
464 |
public:
|
|
465 |
IMPORT_C TCallInfo();
|
|
466 |
/** The name of a call.
|
|
467 |
|
|
468 |
@see TName */
|
|
469 |
TName iCallName;
|
|
470 |
TName iLineName;
|
|
471 |
THookStatus iHookStatus;
|
|
472 |
/** The call status.
|
|
473 |
|
|
474 |
@see RCall::TStatus */
|
|
475 |
TStatus iStatus;
|
|
476 |
TTimeIntervalSeconds iDuration;
|
|
477 |
};
|
|
478 |
|
|
479 |
IMPORT_C TInt GetInfo(TCallInfo& aCallInfo) const;
|
|
480 |
IMPORT_C void NotifyHookChange(TRequestStatus& aStatus,THookStatus& aHookStatus);
|
|
481 |
IMPORT_C void NotifyHookChangeCancel() const;
|
|
482 |
IMPORT_C void NotifyStatusChange(TRequestStatus& aStatus,TStatus& aCallStatus);
|
|
483 |
IMPORT_C void NotifyStatusChangeCancel() const;
|
|
484 |
IMPORT_C void NotifyCallDurationChange(TRequestStatus& aStatus,TTimeIntervalSeconds& aTime);
|
|
485 |
IMPORT_C void NotifyCallDurationChangeCancel() const;
|
|
486 |
|
|
487 |
//
|
|
488 |
// Duration of call
|
|
489 |
//
|
|
490 |
IMPORT_C TInt GetCallDuration(TTimeIntervalSeconds& aTime) const;
|
|
491 |
//
|
|
492 |
// Connecting and Disconnecting
|
|
493 |
//
|
|
494 |
/** Passes telephone numbers into Dial functions. */
|
|
495 |
typedef TDesC TTelNumberC;
|
|
496 |
IMPORT_C TInt Dial(const TTelNumberC& aTelNumber) const;
|
|
497 |
IMPORT_C TInt Dial(const TDesC8& aCallParams,const TTelNumberC& aTelNumber) const;
|
|
498 |
IMPORT_C void Dial(TRequestStatus& aStatus,const TTelNumberC& aTelNumber);
|
|
499 |
IMPORT_C void Dial(TRequestStatus& aStatus,const TDesC8& aCallParams,const TTelNumberC& aTelNumber);
|
|
500 |
IMPORT_C void DialCancel() const;
|
|
501 |
IMPORT_C TInt Connect() const;
|
|
502 |
IMPORT_C TInt Connect(const TDesC8& aCallParams) const;
|
|
503 |
IMPORT_C void Connect(TRequestStatus& aStatus);
|
|
504 |
IMPORT_C void Connect(TRequestStatus& aStatus,const TDesC8& aCallParams);
|
|
505 |
IMPORT_C void ConnectCancel() const;
|
|
506 |
IMPORT_C TInt AnswerIncomingCall() const;
|
|
507 |
IMPORT_C TInt AnswerIncomingCall(const TDesC8& aCallParams) const;
|
|
508 |
IMPORT_C void AnswerIncomingCall(TRequestStatus& aStatus);
|
|
509 |
IMPORT_C void AnswerIncomingCall(TRequestStatus& aStatus,const TDesC8& aCallParams);
|
|
510 |
IMPORT_C void AnswerIncomingCallCancel() const;
|
|
511 |
IMPORT_C TInt HangUp() const;
|
|
512 |
IMPORT_C void HangUp(TRequestStatus& aStatus) const;
|
|
513 |
IMPORT_C void HangUpCancel() const;
|
|
514 |
|
|
515 |
//
|
|
516 |
// Call Data Access
|
|
517 |
//
|
|
518 |
struct TCommPort
|
|
519 |
/** Communications port information.
|
|
520 |
|
|
521 |
@see TFileName */
|
|
522 |
{
|
|
523 |
/** The CSY module used by the C32 Communications Server to talk to the serial
|
|
524 |
device.
|
|
525 |
@deprecated This has been deprecated as all the information that is needed by the
|
|
526 |
lower layers is now being passed in iPort.
|
|
527 |
|
|
528 |
@see TFileName */
|
|
529 |
TFileName iCsy;
|
|
530 |
/** The port used by the C32 Communications Server to talk to the serial device.
|
|
531 |
It holds both the Csy name and the Port name.
|
|
532 |
|
|
533 |
@see TName */
|
|
534 |
TName iPort;
|
|
535 |
};
|
|
536 |
|
|
537 |
IMPORT_C TInt LoanDataPort(TCommPort& aDataPort) const;
|
|
538 |
IMPORT_C void LoanDataPort(TRequestStatus& aStatus,TCommPort& aDataPort);
|
|
539 |
IMPORT_C void LoanDataPortCancel() const;
|
|
540 |
IMPORT_C TInt RecoverDataPort() const;
|
|
541 |
|
|
542 |
//
|
|
543 |
// Call Ownership manipulation
|
|
544 |
//
|
|
545 |
/** Call ownership status flags. */
|
|
546 |
enum TOwnershipStatus
|
|
547 |
{
|
|
548 |
/** The call is not owned. */
|
|
549 |
EOwnershipUnowned,
|
|
550 |
/** The call is owned, but not by this RCall instance. */
|
|
551 |
EOwnershipOwnedByAnotherClient, // not the priority client
|
|
552 |
/** The call is owned by this RCall instance. */
|
|
553 |
EOwnershipOwnedByThisClient,
|
|
554 |
/** The call is owned, but not by the priority client */
|
|
555 |
EOwnershipThisIsPriorityClient // not owned by this (the priority) client
|
|
556 |
};
|
|
557 |
|
|
558 |
IMPORT_C TInt TransferOwnership() const;
|
|
559 |
IMPORT_C void AcquireOwnership(TRequestStatus& aStatus) const;
|
|
560 |
IMPORT_C void AcquireOwnershipCancel() const;
|
|
561 |
IMPORT_C TInt GetOwnershipStatus(TOwnershipStatus& aOwnershipStatus) const;
|
|
562 |
//
|
|
563 |
//
|
|
564 |
// Get and Set Call Parameters
|
|
565 |
//
|
|
566 |
/** Monitor speaker control setting flags. */
|
|
567 |
enum TMonitorSpeakerControl
|
|
568 |
{
|
|
569 |
/** Speaker control is always off */
|
|
570 |
EMonitorSpeakerControlAlwaysOff,
|
|
571 |
/** Speaker control is on until the carrier is detected */
|
|
572 |
EMonitorSpeakerControlOnUntilCarrier,
|
|
573 |
/** Speaker control is always active. */
|
|
574 |
EMonitorSpeakerControlAlwaysOn,
|
|
575 |
/** Speaker control is on, except while dialling */
|
|
576 |
EMonitorSpeakerControlOnExceptDuringDialling,
|
|
577 |
/** Speaker control is unknown. */
|
|
578 |
EMonitorSpeakerControlUnknown
|
|
579 |
};
|
|
580 |
|
|
581 |
/** Monitor speaker volume control setting flags. */
|
|
582 |
enum TMonitorSpeakerVolume
|
|
583 |
{
|
|
584 |
/** Speaker volume is off. */
|
|
585 |
EMonitorSpeakerVolumeOff,
|
|
586 |
/** Speaker volume is low. */
|
|
587 |
EMonitorSpeakerVolumeLow,
|
|
588 |
/** Speaker volume is medium. */
|
|
589 |
EMonitorSpeakerVolumeMedium,
|
|
590 |
/** Speaker volume is high. */
|
|
591 |
EMonitorSpeakerVolumeHigh,
|
|
592 |
/** Speaker volume is unknown. */
|
|
593 |
EMonitorSpeakerVolumeUnknown
|
|
594 |
};
|
|
595 |
|
|
596 |
/** Wait for dial tone flags. */
|
|
597 |
enum TWaitForDialTone
|
|
598 |
{
|
|
599 |
/** Waiting for dial tone. */
|
|
600 |
EDialToneWait,
|
|
601 |
/** Not waiting for dial tone. */
|
|
602 |
EDialToneNoWait
|
|
603 |
};
|
|
604 |
|
|
605 |
class TCallParams
|
|
606 |
/**
|
|
607 |
@publishedPartner
|
|
608 |
@released
|
|
609 |
*/
|
|
610 |
{
|
|
611 |
public:
|
|
612 |
IMPORT_C TCallParams();
|
|
613 |
IMPORT_C TCallParams(TMonitorSpeakerControl aSpeakerControl,
|
|
614 |
TMonitorSpeakerVolume aSpeakerVolume,
|
|
615 |
TUint aInterval,
|
|
616 |
TWaitForDialTone aWaitForDialTone);
|
|
617 |
IMPORT_C TInt ExtensionId();
|
|
618 |
IMPORT_C TBool IsDefault();
|
|
619 |
TMonitorSpeakerControl iSpeakerControl;
|
|
620 |
TMonitorSpeakerVolume iSpeakerVolume;
|
|
621 |
TUint iInterval;
|
|
622 |
TWaitForDialTone iWaitForDialTone;
|
|
623 |
protected:
|
|
624 |
TBool iIsDefault;
|
|
625 |
TInt iExtensionId;
|
|
626 |
};
|
|
627 |
|
|
628 |
/** Call parameters package
|
|
629 |
|
|
630 |
The call parameters to be associated with a call may be passed into functions
|
|
631 |
using this type.
|
|
632 |
|
|
633 |
@see TCallParams */
|
|
634 |
typedef TPckg<TCallParams> TCallParamsPckg;
|
|
635 |
|
|
636 |
IMPORT_C TInt GetCallParams(TDes8& aParams) const;
|
|
637 |
|
|
638 |
//
|
|
639 |
// Fax Settings
|
|
640 |
//
|
|
641 |
/** Fax mode flags. */
|
|
642 |
enum TFaxMode
|
|
643 |
{
|
|
644 |
/** Fax is transmitting */
|
|
645 |
ETransmit,
|
|
646 |
/** Fax is receiving. */
|
|
647 |
EReceive
|
|
648 |
};
|
|
649 |
|
|
650 |
/** Fax retrieval type flags. */
|
|
651 |
enum TFaxRetrieveType
|
|
652 |
{
|
|
653 |
/** Retrieving a fax opened from voice call (not currently supported by GSM networks). */
|
|
654 |
EFaxOnDemand,
|
|
655 |
/** Retrieve a fax opened from fax call. */
|
|
656 |
EFaxPoll
|
|
657 |
};
|
|
658 |
|
|
659 |
/** Fax identifier size flags. */
|
|
660 |
enum TConstants
|
|
661 |
{
|
|
662 |
/** 20 */
|
|
663 |
KFaxIdUserNameMaxSize=20
|
|
664 |
};
|
|
665 |
|
|
666 |
struct TFaxSessionSettings
|
|
667 |
/** Fax session settings information.
|
|
668 |
|
|
669 |
@see TFaxMode */
|
|
670 |
{
|
|
671 |
/** The fax mode.
|
|
672 |
|
|
673 |
@see TFaxMode */
|
|
674 |
TFaxMode iMode;
|
|
675 |
/** The mode of retrieving faxes.
|
|
676 |
|
|
677 |
@see TFaxRetrieveType */
|
|
678 |
TFaxRetrieveType iFaxRetrieveType;
|
|
679 |
/** The class of fax
|
|
680 |
|
|
681 |
@see TFaxClass */
|
|
682 |
TFaxClass iFaxClass;
|
|
683 |
/** The fax identifier string displayed at the top of the fax.
|
|
684 |
|
|
685 |
@see KFaxIdUserNameMaxSize */
|
|
686 |
TBuf<KFaxIdUserNameMaxSize> iFaxId;
|
|
687 |
/** The maximum transfer speed that can be negotiated. */
|
|
688 |
TInt iMaxSpeed;
|
|
689 |
/** The minimum transfer speed that should be negotiated. */
|
|
690 |
TInt iMinSpeed;
|
|
691 |
/** The preferred compression mode used for negotiation. This may take one of the
|
|
692 |
following values: EModifiedHuffman, EModifiedRead, EUncompressedModifiedRead,
|
|
693 |
EModifiedModifiedRead. */
|
|
694 |
TInt iPreferredECM;
|
|
695 |
/** The delay used for Fax on Demand services. Measured in seconds. */
|
|
696 |
TInt iFaxOnDemandDelay;
|
|
697 |
// Tx Settings
|
|
698 |
/** The preferred transmit resolution. This may take one of the following values:
|
|
699 |
EFaxNormal EFaxFine
|
|
700 |
|
|
701 |
@see TFaxResolution */
|
|
702 |
TFaxResolution iTxResolution;
|
|
703 |
/** Compression mode for transmitting faxes.
|
|
704 |
|
|
705 |
@see TFaxCompression */
|
|
706 |
TFaxCompression iTxCompression;
|
|
707 |
/** The number of pages to be transmitted. */
|
|
708 |
TInt iTxPages;
|
|
709 |
// Rx Settings
|
|
710 |
/** The preferred receive resolution. This may take one of the following values:
|
|
711 |
EFaxNormal EFaxFine.
|
|
712 |
|
|
713 |
@see TFaxResolution */
|
|
714 |
TFaxResolution iRxResolution;
|
|
715 |
/** Compression mode for receiving faxes.
|
|
716 |
|
|
717 |
@see TFaxCompression */
|
|
718 |
TFaxCompression iRxCompression;
|
|
719 |
};
|
|
720 |
|
|
721 |
IMPORT_C TInt GetFaxSettings(TFaxSessionSettings& aSettings) const;
|
|
722 |
IMPORT_C TInt SetFaxSettings(const TFaxSessionSettings& aSettings) const;
|
|
723 |
IMPORT_C TInt AdoptFaxSharedHeaderFile(const RFile& aSharedFile) const;
|
|
724 |
//
|
|
725 |
// Retrieval of call objects' reference count
|
|
726 |
//
|
|
727 |
IMPORT_C TInt ReferenceCount() const;
|
|
728 |
|
|
729 |
protected:
|
|
730 |
IMPORT_C virtual void ConstructL();
|
|
731 |
IMPORT_C virtual void Destruct();
|
|
732 |
};
|
|
733 |
|
|
734 |
//
|
|
735 |
//
|
|
736 |
// RLine
|
|
737 |
//
|
|
738 |
//
|
|
739 |
class RPhone;
|
|
740 |
/**
|
|
741 |
Provides access to the functionality associated with a specific line.
|
|
742 |
|
|
743 |
This class is not intended for user derivation.
|
|
744 |
|
|
745 |
@publishedPartner
|
|
746 |
@released
|
|
747 |
*/
|
|
748 |
class RLine : public RTelSubSessionBase
|
|
749 |
{
|
|
750 |
public:
|
|
751 |
IMPORT_C RLine();
|
|
752 |
IMPORT_C TInt Open(RPhone& aPhone,const TDesC& aName);
|
|
753 |
IMPORT_C TInt Open(RTelServer& aServer,const TDesC& aName);
|
|
754 |
IMPORT_C void Close();
|
|
755 |
|
|
756 |
//
|
|
757 |
// Caps
|
|
758 |
//
|
|
759 |
/** Line capability flags. */
|
|
760 |
enum TCapsFlags
|
|
761 |
{
|
|
762 |
/** The line supports data connections.*/
|
|
763 |
KCapsData=0x00000001,
|
|
764 |
/** The line supports fax connections. */
|
|
765 |
KCapsFax=0x00000002,
|
|
766 |
/** The line supports voice connections.*/
|
|
767 |
KCapsVoice=0x00000004,
|
|
768 |
/** The line supports incoming call notification requests. */
|
|
769 |
KCapsEventIncomingCall=0x00010000,
|
|
770 |
};
|
|
771 |
|
|
772 |
struct TCaps
|
|
773 |
/** Line capability information. */
|
|
774 |
{
|
|
775 |
/** Line capability flag. Contains a bitmask of the values defined in the TCapsFlags
|
|
776 |
enumeration.*/
|
|
777 |
TUint iFlags;
|
|
778 |
};
|
|
779 |
|
|
780 |
IMPORT_C TInt GetCaps(TCaps& aCaps) const;
|
|
781 |
IMPORT_C void NotifyCapsChange(TRequestStatus& aStatus, TCaps& aCaps);
|
|
782 |
IMPORT_C void NotifyCapsChangeCancel() const;
|
|
783 |
|
|
784 |
//
|
|
785 |
// Line and Hook Status
|
|
786 |
//
|
|
787 |
IMPORT_C TInt GetStatus(RCall::TStatus& aStatus) const;
|
|
788 |
IMPORT_C TInt GetHookStatus(RCall::THookStatus& aHookStatus) const;
|
|
789 |
|
|
790 |
//
|
|
791 |
// Call enumeration and Information
|
|
792 |
//
|
|
793 |
struct TCallInfo
|
|
794 |
/** Line call capability information.
|
|
795 |
|
|
796 |
@see TName */
|
|
797 |
{
|
|
798 |
/** The name of a call.
|
|
799 |
|
|
800 |
@see TName */
|
|
801 |
TName iCallName;
|
|
802 |
/** The call status.
|
|
803 |
|
|
804 |
@see RCall::TStatus */
|
|
805 |
RCall::TStatus iStatus;
|
|
806 |
/** The call capabilities flag.
|
|
807 |
|
|
808 |
@see RCall::TCapsEnum*/
|
|
809 |
TUint32 iCallCapsFlags;
|
|
810 |
};
|
|
811 |
|
|
812 |
IMPORT_C TInt EnumerateCall(TInt& aCount) const;
|
|
813 |
IMPORT_C TInt GetCallInfo(TInt aIndex,TCallInfo& aCallInfo) const;
|
|
814 |
//
|
|
815 |
// General line notification information
|
|
816 |
//
|
|
817 |
class TLineInfo
|
|
818 |
/** Line information.
|
|
819 |
|
|
820 |
@see RCall::TStatus
|
|
821 |
@publishedPartner
|
|
822 |
@released
|
|
823 |
*/
|
|
824 |
{
|
|
825 |
public:
|
|
826 |
IMPORT_C TLineInfo();
|
|
827 |
RCall::THookStatus iHookStatus;
|
|
828 |
/** The current line status.
|
|
829 |
|
|
830 |
@see RCall::TStatus */
|
|
831 |
RCall::TStatus iStatus;
|
|
832 |
TName iNameOfLastCallAdded;
|
|
833 |
TName iNameOfCallForAnswering; // if an incoming call occurs, this contains the name
|
|
834 |
// of the call to answer it on.
|
|
835 |
};
|
|
836 |
|
|
837 |
//
|
|
838 |
// Notifications
|
|
839 |
//
|
|
840 |
IMPORT_C TInt GetInfo(TLineInfo& aLineInfo) const;
|
|
841 |
IMPORT_C void NotifyIncomingCall(TRequestStatus& aStatus, TName& aName);
|
|
842 |
IMPORT_C void NotifyIncomingCallCancel() const;
|
|
843 |
IMPORT_C void NotifyHookChange(TRequestStatus& aStatus,RCall::THookStatus& aHookStatus);
|
|
844 |
IMPORT_C void NotifyHookChangeCancel() const;
|
|
845 |
IMPORT_C void NotifyStatusChange(TRequestStatus& aStatus,RCall::TStatus& aLineStatus);
|
|
846 |
IMPORT_C void NotifyStatusChangeCancel() const;
|
|
847 |
IMPORT_C void NotifyCallAdded(TRequestStatus& aStatus,TName& aName);
|
|
848 |
IMPORT_C void NotifyCallAddedCancel() const;
|
|
849 |
protected:
|
|
850 |
IMPORT_C virtual void ConstructL();
|
|
851 |
IMPORT_C virtual void Destruct();
|
|
852 |
};
|
|
853 |
|
|
854 |
//
|
|
855 |
//
|
|
856 |
// RPhone
|
|
857 |
//
|
|
858 |
//
|
|
859 |
class RTelServer;
|
|
860 |
/**
|
|
861 |
Phone sub-session.
|
|
862 |
|
|
863 |
Provides access to the functionality associated with a specific phone.
|
|
864 |
|
|
865 |
This class is not intended for user derivation.
|
|
866 |
|
|
867 |
@publishedPartner
|
|
868 |
@released
|
|
869 |
*/
|
|
870 |
class RPhone : public RTelSubSessionBase
|
|
871 |
{
|
|
872 |
public:
|
|
873 |
IMPORT_C RPhone();
|
|
874 |
IMPORT_C TInt Open(RTelServer& aSession,const TDesC& aName);
|
|
875 |
IMPORT_C void Close();
|
|
876 |
|
|
877 |
//
|
|
878 |
// Initialisation
|
|
879 |
//
|
|
880 |
IMPORT_C TInt Initialise();
|
|
881 |
IMPORT_C void Initialise(TRequestStatus& aStatus);
|
|
882 |
IMPORT_C void InitialiseCancel();
|
|
883 |
|
|
884 |
//
|
|
885 |
// Caps
|
|
886 |
//
|
|
887 |
/** Phone capability flags. */
|
|
888 |
enum TCapsFlags
|
|
889 |
{
|
|
890 |
/** The capabilities of the phone are not known. */
|
|
891 |
KCapsUnknown=0x00000001,
|
|
892 |
/** The phone supports data calls. */
|
|
893 |
KCapsData=0x00000002,
|
|
894 |
/** The phone supports the fax class 1 interface. */
|
|
895 |
KCapsFaxClassOne=0x0000004,
|
|
896 |
/** The phone supports the fax class 1.0 interface. */
|
|
897 |
KCapsFaxClassOnePointZero=0x0000008,
|
|
898 |
/** The phone supports the fax class 2 interface. */
|
|
899 |
KCapsFaxClassTwo=0x00000010,
|
|
900 |
/** The phone supports the fax class 2.0 interface. */
|
|
901 |
KCapsFaxClassTwoPointZero=0x00000020,
|
|
902 |
/** The phone supports the fax class 2.1 interface. */
|
|
903 |
KCapsFaxClassTwoPointOne=0x00000040,
|
|
904 |
/** The phone supports voice calls. */
|
|
905 |
KCapsVoice=0x00000080,
|
|
906 |
/** The phone supports modem detection events, i.e. it can notify clients when
|
|
907 |
the modem can be or can no longer be detected. */
|
|
908 |
KCapsEventModemDetection=0x00010000,
|
|
909 |
/** The phone supports the ability to take the communications port from whatever
|
|
910 |
component is currently using it. */
|
|
911 |
KCapsStealCommPort=0x00020000
|
|
912 |
};
|
|
913 |
|
|
914 |
struct TCaps
|
|
915 |
/** Phone capability information. */
|
|
916 |
{
|
|
917 |
/** Phone capability flag. Contains bitmask of values defined in the TCapsFlags
|
|
918 |
enumeration. */
|
|
919 |
TUint iFlags;
|
|
920 |
};
|
|
921 |
|
|
922 |
IMPORT_C TInt GetCaps(TCaps& aCaps) const;
|
|
923 |
IMPORT_C void NotifyCapsChange(TRequestStatus& aStatus, TCaps& aCaps);
|
|
924 |
IMPORT_C void NotifyCapsChangeCancel() const;
|
|
925 |
|
|
926 |
//
|
|
927 |
// Status
|
|
928 |
//
|
|
929 |
/** Phone mode status flags. */
|
|
930 |
enum TMode
|
|
931 |
{
|
|
932 |
/** Phone (modem) status unknown. */
|
|
933 |
EModeUnknown,
|
|
934 |
/** Phone is idle. */
|
|
935 |
EModeIdle,
|
|
936 |
/** Phone is establishing link. */
|
|
937 |
EModeEstablishingLink,
|
|
938 |
/** Modem is in data mode. */
|
|
939 |
EModeOnlineData,
|
|
940 |
/** Modem is in command mode and the line is active. */
|
|
941 |
EModeOnlineCommand
|
|
942 |
};
|
|
943 |
|
|
944 |
/** Modem connection status flags. */
|
|
945 |
enum TModemDetection
|
|
946 |
{
|
|
947 |
/** Modem present. */
|
|
948 |
EDetectedPresent,
|
|
949 |
/** Modem is not present. */
|
|
950 |
EDetectedNotPresent,
|
|
951 |
/** Modem connection status is unknown. */
|
|
952 |
EDetectedUnknown
|
|
953 |
};
|
|
954 |
|
|
955 |
struct TStatus
|
|
956 |
/** Current phone status.
|
|
957 |
|
|
958 |
@see TModemDetection */
|
|
959 |
{
|
|
960 |
/** The current modem connection status.
|
|
961 |
|
|
962 |
@see TModemDetection */
|
|
963 |
TModemDetection iModemDetected;
|
|
964 |
/** The current mode of the phone.
|
|
965 |
|
|
966 |
@see TMode */
|
|
967 |
TMode iMode;
|
|
968 |
};
|
|
969 |
|
|
970 |
IMPORT_C TInt GetStatus(TStatus& aStatus) const;
|
|
971 |
|
|
972 |
//
|
|
973 |
// Line Enumeration and Information
|
|
974 |
//
|
|
975 |
struct TLineInfo
|
|
976 |
/** Line information.
|
|
977 |
|
|
978 |
@see RCall::TStatus */
|
|
979 |
{
|
|
980 |
/** The current line status.
|
|
981 |
|
|
982 |
@see RCall::TStatus */
|
|
983 |
RCall::TStatus iStatus;
|
|
984 |
/** The line capabilities flag.
|
|
985 |
|
|
986 |
@see RLine::TCapsFlags */
|
|
987 |
TUint32 iLineCapsFlags;
|
|
988 |
/** The name of the line.
|
|
989 |
|
|
990 |
@see TName */
|
|
991 |
TName iName;
|
|
992 |
};
|
|
993 |
|
|
994 |
IMPORT_C TInt EnumerateLines(TInt& aCount) const;
|
|
995 |
IMPORT_C TInt GetLineInfo(const TInt aIndex,TLineInfo& aLineInfo) const;
|
|
996 |
|
|
997 |
//
|
|
998 |
// General phone notification information
|
|
999 |
//
|
|
1000 |
class TPhoneInfo
|
|
1001 |
/** Phone notification information.
|
|
1002 |
|
|
1003 |
Collects all the information associated with an instance of the core API phone
|
|
1004 |
class is collected together into a single, directly accessible, structure.
|
|
1005 |
This increases the efficiency of applications that require access to the majority
|
|
1006 |
of the phone's data.
|
|
1007 |
|
|
1008 |
This class is not intended for user derivation.
|
|
1009 |
|
|
1010 |
@see TNetworkType
|
|
1011 |
@publishedPartner
|
|
1012 |
@released
|
|
1013 |
*/
|
|
1014 |
{
|
|
1015 |
public:
|
|
1016 |
IMPORT_C TPhoneInfo();
|
|
1017 |
/** The current modem detection state (is it present or not).
|
|
1018 |
|
|
1019 |
@see TModemDetection */
|
|
1020 |
TModemDetection iDetection;
|
|
1021 |
};
|
|
1022 |
|
|
1023 |
IMPORT_C TInt GetInfo(TPhoneInfo& aPhoneInfo) const;
|
|
1024 |
|
|
1025 |
//
|
|
1026 |
// Notifications
|
|
1027 |
//
|
|
1028 |
IMPORT_C void NotifyModemDetected(TRequestStatus& aStatus,TModemDetection& aDetection);
|
|
1029 |
IMPORT_C void NotifyModemDetectedCancel() const;
|
|
1030 |
|
|
1031 |
//
|
|
1032 |
// TEmergencyRequest is a bit-mask where each bit-flag represents
|
|
1033 |
// the emergency request type that the client wishes to handle
|
|
1034 |
//
|
|
1035 |
enum TEmergencyRequest
|
|
1036 |
{
|
|
1037 |
/** Location Based Services Emergency Request */
|
|
1038 |
EEmergencyLCSRequest = 0x00000001,
|
|
1039 |
/** Circuit Switch Voice Call Emergency Request */
|
|
1040 |
EEmergencyCSVoiceCallRequest = 0x00000002,
|
|
1041 |
};
|
|
1042 |
|
|
1043 |
IMPORT_C TInt SetEmergencyClient(const TUint32 aEmergencyRequest) const;
|
|
1044 |
|
|
1045 |
protected:
|
|
1046 |
IMPORT_C virtual void ConstructL();
|
|
1047 |
IMPORT_C virtual void Destruct();
|
|
1048 |
};
|
|
1049 |
|
|
1050 |
//
|
|
1051 |
//
|
|
1052 |
// RTelServer
|
|
1053 |
//
|
|
1054 |
//
|
|
1055 |
/**
|
|
1056 |
Root telephony server session.
|
|
1057 |
|
|
1058 |
Provides access to general telephony information and functionality. Clients
|
|
1059 |
wishing to use the ETel Server must open a connection with the root server
|
|
1060 |
using the functions defined in this class. They may then obtain information
|
|
1061 |
about loaded TSY modules, and the phones that they support. To access functionality
|
|
1062 |
associated with a specific phone, the client must open a sub-session for that
|
|
1063 |
phone.
|
|
1064 |
|
|
1065 |
This class is not intended for user derivation.
|
|
1066 |
|
|
1067 |
@publishedPartner
|
|
1068 |
@released
|
|
1069 |
*/
|
|
1070 |
class RTelServer : public RSessionBase
|
|
1071 |
{
|
|
1072 |
public:
|
|
1073 |
enum { KDefaultMessageSlots=32 };
|
|
1074 |
|
|
1075 |
IMPORT_C RTelServer();
|
|
1076 |
IMPORT_C TInt Connect(TInt aMessageSlots =KDefaultMessageSlots);
|
|
1077 |
inline TVersion Version() const;
|
|
1078 |
|
|
1079 |
//
|
|
1080 |
// Enumeration and Information
|
|
1081 |
//
|
|
1082 |
/** Types of telephony connection flags. */
|
|
1083 |
enum TNetworkType
|
|
1084 |
{
|
|
1085 |
/** Wired analog network. */
|
|
1086 |
ENetworkTypeWiredAnalog,
|
|
1087 |
/** Wired digital network (not supported by ETel). */
|
|
1088 |
ENetworkTypeWiredDigital,
|
|
1089 |
/** Mobile analog network (not supported by ETel). */
|
|
1090 |
ENetworkTypeMobileAnalog,
|
|
1091 |
/** Mobile digital network. */
|
|
1092 |
ENetworkTypeMobileDigital,
|
|
1093 |
/** Unknown network type. */
|
|
1094 |
ENetworkTypeUnknown
|
|
1095 |
};
|
|
1096 |
|
|
1097 |
struct TPhoneInfo
|
|
1098 |
/** Phone notification information.
|
|
1099 |
|
|
1100 |
Collects all the information associated with an instance of the core API phone
|
|
1101 |
class is collected together into a single, directly accessible, structure.
|
|
1102 |
This increases the efficiency of applications that require access to the majority
|
|
1103 |
of the phone's data.
|
|
1104 |
|
|
1105 |
This class is not intended for user derivation.
|
|
1106 |
|
|
1107 |
@see TNetworkType */
|
|
1108 |
{
|
|
1109 |
/** The type of telephony connection supported by the phone.
|
|
1110 |
|
|
1111 |
@see TNetworkType */
|
|
1112 |
TNetworkType iNetworkType;
|
|
1113 |
/** The name of the phone.
|
|
1114 |
|
|
1115 |
@see TName */
|
|
1116 |
TName iName;
|
|
1117 |
/** The number of lines supported by the phone. */
|
|
1118 |
TUint iNumberOfLines;
|
|
1119 |
/** The extensions that the TSY module supports. */
|
|
1120 |
TUint iExtensions;
|
|
1121 |
};
|
|
1122 |
|
|
1123 |
IMPORT_C TInt EnumeratePhones(TInt& aNoOfPhones) const;
|
|
1124 |
IMPORT_C TInt GetPhoneInfo(const TInt aIndex,TPhoneInfo& aInfo) const;
|
|
1125 |
IMPORT_C TInt GetTsyName(const TInt aIndexOfPhone, TDes& aTsyName) const;
|
|
1126 |
|
|
1127 |
//
|
|
1128 |
// Load and Unload Phone modules
|
|
1129 |
//
|
|
1130 |
|
|
1131 |
IMPORT_C TInt LoadPhoneModule(const TDesC& aFileName) const;
|
|
1132 |
IMPORT_C TInt UnloadPhoneModule(const TDesC& aFileName) const;
|
|
1133 |
|
|
1134 |
//
|
|
1135 |
// Check whether specified Phone module (TSY) supports certain functionality
|
|
1136 |
//
|
|
1137 |
|
|
1138 |
IMPORT_C TInt IsSupportedByModule(const TDesC& aTsyName, const TInt aMixin, TBool& aResult) const;
|
|
1139 |
IMPORT_C TInt GetTsyVersionNumber(const TDesC& aTsyName,TVersion& aVersion) const;
|
|
1140 |
//
|
|
1141 |
// Set this session as Priority client
|
|
1142 |
//
|
|
1143 |
/** @deprecated This function has been deprecated. Use RTelServer::SetPriorityClientV2 followed by
|
|
1144 |
RPhone::SetEmergencyClient(EEmergencyCSVoiceCallRequest) */
|
|
1145 |
IMPORT_C TInt SetPriorityClient() const;
|
|
1146 |
|
|
1147 |
//
|
|
1148 |
// Set this session to receive detailed errors
|
|
1149 |
//
|
|
1150 |
|
|
1151 |
/** Error granularity flags. */
|
|
1152 |
enum TErrorGranularity
|
|
1153 |
{
|
|
1154 |
/** Client is only interested in core errors */
|
|
1155 |
EErrorBasic,
|
|
1156 |
/** Client is interested in extended errors */
|
|
1157 |
EErrorExtended
|
|
1158 |
};
|
|
1159 |
|
|
1160 |
IMPORT_C TInt SetExtendedErrorGranularity(const TErrorGranularity aGranularity) const;
|
|
1161 |
|
|
1162 |
//
|
|
1163 |
// Debug calls - stubbed in release builds
|
|
1164 |
//
|
|
1165 |
IMPORT_C TInt __DbgMarkHeap();
|
|
1166 |
IMPORT_C TInt __DbgCheckHeap(TInt aCount);
|
|
1167 |
IMPORT_C TInt __DbgMarkEnd(TInt aCount);
|
|
1168 |
IMPORT_C TInt __DbgFailNext(TInt aCount);
|
|
1169 |
IMPORT_C TInt __DbgFailNextAvailable(TBool& aResult);
|
|
1170 |
|
|
1171 |
//
|
|
1172 |
// Set this session as Priority client
|
|
1173 |
//
|
|
1174 |
IMPORT_C TInt SetPriorityClientV2() const;
|
|
1175 |
|
|
1176 |
//
|
|
1177 |
// Type of incoming request offered for clients to accept/reject.
|
|
1178 |
//
|
|
1179 |
enum TIncomingEventType
|
|
1180 |
{
|
|
1181 |
EUssdType
|
|
1182 |
};
|
|
1183 |
};
|
|
1184 |
|
|
1185 |
/** Registering interest in new incoming dialogues.
|
|
1186 |
|
|
1187 |
Interest Category flags. */
|
|
1188 |
enum TInterestCategory
|
|
1189 |
{
|
|
1190 |
/** Priority client. Only one can be registered with this category */
|
|
1191 |
EInterestCategoryPriority=0x00000001,
|
|
1192 |
/** Standard client */
|
|
1193 |
EInterestCategoryStandard=0x00000002,
|
|
1194 |
/** Default client. Only one can be registered with this category */
|
|
1195 |
EInterestCategoryDefault=0x00000004,
|
|
1196 |
};
|
|
1197 |
|
|
1198 |
|
|
1199 |
#include <etel.inl>
|
|
1200 |
#endif
|