1.1 --- a/epoc32/include/etel.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/etel.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,1182 @@
1.4 -etel.h
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @publishedAll
1.25 + @released
1.26 +*/
1.27 +
1.28 +#if !defined(__ETEL_H__)
1.29 +/** @internalComponent */
1.30 +#define __ETEL_H__
1.31 +
1.32 +#if !defined(__E32BASE_H__)
1.33 +#include <e32base.h>
1.34 +#endif
1.35 +
1.36 +#if !defined (__C32COMM_H__)
1.37 +#include <c32comm.h>
1.38 +#endif
1.39 +
1.40 +#if !defined(__D32COMM_H__)
1.41 +#include <d32comm.h>
1.42 +#endif
1.43 +
1.44 +#if !defined(__FAXDEFN_H)
1.45 +#include <faxdefn.h>
1.46 +#endif
1.47 +/** Major version number.*/
1.48 +const TUint KEtelMajorVersionNumber=1;
1.49 +/** Minor version number. */
1.50 +const TUint KEtelMinorVersionNumber=0;
1.51 +/** Build number. */
1.52 +const TUint KEtelBuildVersionNumber=606;
1.53 +/**
1.54 +@internalComponent
1.55 +*/
1.56 +IMPORT_C void PanicClient(TInt aFault);
1.57 +
1.58 +//
1.59 +// Etel Core Error Definitions
1.60 +//
1.61 +
1.62 +const TInt KErrEtelCoreBase = -2000;
1.63 +
1.64 +/** The client is not the call owner and has attempted to perform an operation
1.65 +that requires ownership.*/
1.66 +const TInt KErrEtelNotCallOwner=KErrEtelCoreBase;
1.67 +/** An attempt has been made to load an ETel (TSY) module which contains a phone
1.68 +with the same name as one already loaded. */
1.69 +const TInt KErrEtelDuplicatePhoneName=KErrEtelCoreBase-1;
1.70 +/** An attempt has been made to acquire call ownership when the requesting client
1.71 +is already the call owner. */
1.72 +const TInt KErrEtelAlreadyCallOwner=KErrEtelCoreBase-2;
1.73 +/** A connection has been terminated because the carrier has been lost. */
1.74 +const TInt KErrEtelNoCarrier=KErrEtelCoreBase-3;
1.75 +/** An attempt to establish a connection with the RCall::Dial() function has failed
1.76 +because the remote party's line was busy. */
1.77 +const TInt KErrEtelBusyDetected=KErrEtelCoreBase-4;
1.78 +/** An attempt has been made to transfer call ownership, but no other clients are
1.79 +interested in acquiring ownership. */
1.80 +const TInt KErrEtelNoClientInterestedInThisCall=KErrEtelCoreBase-5;
1.81 +/** The TSY has failed to initialise the modem. This may be occur if the modem
1.82 +is disconnected during initialisation, or if an attempt is made to initialise
1.83 +an unsupported modem. */
1.84 +const TInt KErrEtelInitialisationFailure=KErrEtelCoreBase-6;
1.85 +/** An attempt has been made to perform an operation which requires the call to
1.86 +be connected - when the call is not connected. E.g. RCall:LoanDataPort(). */
1.87 +const TInt KErrEtelCallNotActive=KErrEtelCoreBase-7;
1.88 +/** A connection request has failed because there is no answer. */
1.89 +const TInt KErrEtelNoAnswer=KErrEtelCoreBase-8;
1.90 +/** A connection request has failed because there is no dial tone. For example,
1.91 +if there is no connection between the modem and the network. */
1.92 +const TInt KErrEtelNoDialTone=KErrEtelCoreBase-9;
1.93 +/** An attempt to configure the port has failed because the hardware cannot match
1.94 +the desired configuration. For example, if an attempt is made to configure
1.95 +the comms port to a baud rate it cannot support. */
1.96 +const TInt KErrEtelConfigPortFailure=KErrEtelCoreBase-10;
1.97 +/** Out of memory error - global chunk cannot be created. */
1.98 +const TInt KErrEtelFaxChunkNotCreated=KErrEtelCoreBase-11;
1.99 +/** The client is not the fax owner and has attempted to perform an operation that
1.100 +requires fax ownership.
1.101 +
1.102 +The fax client should be used to access fax functionality. Consequently, client
1.103 +code should not return this error. */
1.104 +const TInt KErrEtelNotFaxOwner=KErrEtelCoreBase-12;
1.105 +/** An attempt has been made to perform an operation which requires port ownership.
1.106 +However, the client does not own the port. */
1.107 +const TInt KErrEtelPortNotLoanedToClient=KErrEtelCoreBase-13;
1.108 +/** An operation has failed because the modem has been incorrectly configured. */
1.109 +const TInt KErrEtelWrongModemType=KErrEtelCoreBase-14;
1.110 +/** An operation has failed because the modem does not understand the request -
1.111 +possible bug in modem. */
1.112 +const TInt KErrEtelUnknownModemCapability=KErrEtelCoreBase-15;
1.113 +/** The call has already placed an 'answer incoming call' request. Only 1 request
1.114 +of a type (e.g. fax, voice, data) can be outstanding on the server at a time. */
1.115 +const TInt KErrEtelAnswerAlreadyOutstanding=KErrEtelCoreBase-16;
1.116 +/** An attempt to establish a connection with the modem has failed because the
1.117 +modem cannot be detected. */
1.118 +const TInt KErrEtelModemNotDetected=KErrEtelCoreBase-17;
1.119 +/** Operation failed because the modem settings are corrupt. */
1.120 +const TInt KErrEtelModemSettingsCorrupt=KErrEtelCoreBase-18;
1.121 +/** The Data port is in use by another call or application. */
1.122 +const TInt KErrEtelPortAlreadyLoaned=KErrEtelCoreBase-19;
1.123 +/** Another call active. Close it before opening a new one. */
1.124 +const TInt KErrEtelCallAlreadyActive=KErrEtelCoreBase-20;
1.125 +
1.126 +//
1.127 +//
1.128 +// RTelSubSessionBase
1.129 +//
1.130 +//
1.131 +class CPtrHolder;
1.132 +class RFile;
1.133 +/**
1.134 +A base class used in the derivation of RCall, RLine, and RPhone. It has no user
1.135 +accessible functions.
1.136 +
1.137 +@publishedPartner
1.138 +@released
1.139 +*/
1.140 +class RTelSubSessionBase : public RSubSessionBase
1.141 + {
1.142 +public:
1.143 + inline RSessionBase& SessionHandle() const;
1.144 + inline void SetSessionHandle(RSessionBase& aSession);
1.145 + inline void ResetSessionHandle();
1.146 + inline TInt SubSessionHandle();
1.147 +
1.148 + IMPORT_C void CancelAsyncRequest(TInt aReqToCancel) const;
1.149 +
1.150 + enum TReqPriorityType
1.151 + {
1.152 + EIsNotaPriorityRequest,
1.153 + EIsaPriorityRequest,
1.154 + EIsaEmergencyRequest
1.155 + };
1.156 +
1.157 +protected:
1.158 +
1.159 + IMPORT_C RTelSubSessionBase();
1.160 + IMPORT_C TInt Blank(const TInt aIpc,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.161 + IMPORT_C void Blank(const TInt aIpc,TRequestStatus& aStatus,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.162 +
1.163 + IMPORT_C TInt Set(const TInt aIpc,const TDesC8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.164 + IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.165 + IMPORT_C TInt Get(const TInt aIpc,TDes8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.166 + IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.167 +
1.168 + IMPORT_C TInt Set(const TInt aIpc,const TDesC8& aDes1,const TDesC8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.169 + IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC8& aDes1,const TDesC8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.170 + IMPORT_C TInt Get(const TInt aIpc,TDes8& aDes1,TDes8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.171 + IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes8& aDes1,TDes8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.172 +
1.173 + IMPORT_C TInt Set(const TInt aIpc,const TDesC16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.174 + IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.175 + IMPORT_C TInt Get(const TInt aIpc,TDes16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.176 + IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.177 +
1.178 + IMPORT_C TInt Set(const TInt aIpc,const TDesC16& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.179 + IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC16& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.180 + IMPORT_C TInt Set(const TInt aIpc,const TDesC8& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.181 + IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC8& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.182 +
1.183 + IMPORT_C TInt Get(const TInt aIpc,TDes16& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.184 + IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes16& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.185 + IMPORT_C TInt Get(const TInt aIpc,TDes8& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.186 + IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes8& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.187 +
1.188 + IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, const TDesC8& aDes1, TDes8& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.189 + IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, TDes8& aDes1, const TDesC16& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.190 + IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, const TDesC8&, TDes16& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.191 + IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, const TDesC16& aDes1, TDes16& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.192 +
1.193 + IMPORT_C TInt Set(const TInt aIpc, const RFile& aFile, TReqPriorityType aType = EIsNotaPriorityRequest) const;
1.194 +
1.195 + IMPORT_C TInt CancelReq(const TInt aIpc,const TInt aIpcToCancel) const;
1.196 + IMPORT_C TInt CancelSubSession() const;
1.197 +
1.198 +private:
1.199 + RTelSubSessionBase(const RTelSubSessionBase& aTelSubSessionBase);
1.200 + RSessionBase* iTelSession;
1.201 +protected:
1.202 + CPtrHolder* iPtrHolder;
1.203 + };
1.204 +
1.205 +//
1.206 +//
1.207 +// RFax
1.208 +//
1.209 +//
1.210 +class RCall;
1.211 +/**
1.212 +ETel fax subsession.
1.213 +
1.214 +Contains the fax client progress information structure.
1.215 +
1.216 +ETel does include server-side RFax objects, however the
1.217 +associated APIs are intended solely for use by ETel's own
1.218 +fax client. Consequently, only the TProgress structure is
1.219 +considered part of the public API.
1.220 +
1.221 +@publishedPartner
1.222 +@released
1.223 +*/
1.224 +class RFax : public RTelSubSessionBase
1.225 + {
1.226 +public:
1.227 + IMPORT_C RFax();
1.228 + IMPORT_C TInt Open(RCall& aCall);
1.229 + IMPORT_C void Close();
1.230 +
1.231 +//
1.232 +// Read,Write and Wait for Page End
1.233 +//
1.234 + IMPORT_C void Read(TRequestStatus& aStatus,TDes8& aDes);
1.235 + IMPORT_C void Write(TRequestStatus& aStatus,const TDesC8& aDes);
1.236 + IMPORT_C void WaitForEndOfPage(TRequestStatus& aStatus) const;
1.237 + IMPORT_C TInt TerminateFaxSession() const;
1.238 +//
1.239 +// Progress Information
1.240 +//
1.241 + struct TProgress
1.242 + /** Contains fax progress information.*/
1.243 + {
1.244 + /** Time of last progress update.*/
1.245 + TTime iLastUpdateTime;
1.246 + /** ID of remote fax - filled in after connection.*/
1.247 + TBuf<20> iAnswerback;
1.248 +
1.249 + /** Phase of session.*/
1.250 + TFaxPhase iPhase;
1.251 + /** Resolution of document.*/
1.252 + TFaxResolution iResolution;
1.253 + /** Compression method in use.*/
1.254 + TFaxCompression iCompression;
1.255 + /** Error correction mode. Reserved for future releases.*/
1.256 + TInt iECM;
1.257 +
1.258 + /** Last or current page being transferred.*/
1.259 + TInt iPage;
1.260 + /** Last or current line on page.*/
1.261 + TInt iLines;
1.262 + /** Speed of fax session.*/
1.263 + TInt iSpeed;
1.264 + };
1.265 +
1.266 + IMPORT_C TInt GetProgress(TProgress& aProgress);
1.267 +private:
1.268 + TProgress* iProgressPtr;
1.269 + RChunk iChunk;
1.270 +protected:
1.271 + IMPORT_C virtual void ConstructL();
1.272 + IMPORT_C virtual void Destruct();
1.273 + };
1.274 +
1.275 +//
1.276 +//
1.277 +// RCall
1.278 +//
1.279 +//
1.280 +class RTelServer;
1.281 +class RPhone;
1.282 +class RLine;
1.283 +/**
1.284 +Call sub-session.
1.285 +
1.286 +Provides access to the functionality associated with a specific call.
1.287 +
1.288 +This class is not intended for user derivation.
1.289 +
1.290 +@publishedPartner
1.291 +@released
1.292 +*/
1.293 +class RCall : public RTelSubSessionBase
1.294 + {
1.295 +public:
1.296 + IMPORT_C RCall();
1.297 + IMPORT_C TInt OpenNewCall(RTelServer& aServer,const TDesC& aName,TDes& aNewName);
1.298 + IMPORT_C TInt OpenNewCall(RTelServer& aServer,const TDesC& aName);
1.299 + IMPORT_C TInt OpenNewCall(RPhone& aPhone,const TDesC& aName,TDes& aNewName);
1.300 + IMPORT_C TInt OpenNewCall(RPhone& aPhone,const TDesC& aName);
1.301 + IMPORT_C TInt OpenNewCall(RLine& aLine,TDes& aNewName);
1.302 + IMPORT_C TInt OpenNewCall(RLine& aLine);
1.303 + IMPORT_C TInt OpenExistingCall(RTelServer& aServer,const TDesC& aName);
1.304 + IMPORT_C TInt OpenExistingCall(RPhone& aPhone,const TDesC& aName);
1.305 + IMPORT_C TInt OpenExistingCall(RLine& aLine,const TDesC& aName);
1.306 + IMPORT_C void Close();
1.307 +
1.308 +//
1.309 +// Call Status
1.310 +//
1.311 +/** Call status flags. */
1.312 + enum TStatus
1.313 + {
1.314 + /** The call status is not known. */
1.315 + EStatusUnknown,
1.316 + /** The call is idle. */
1.317 + EStatusIdle,
1.318 + /** The call is dialling. */
1.319 + EStatusDialling,
1.320 + /** The call is ringing (an incoming, unanswered call). */
1.321 + EStatusRinging,
1.322 + /** The call is being answered. */
1.323 + EStatusAnswering,
1.324 + /** The call is connecting (immediate call establishment, without dialling). */
1.325 + EStatusConnecting,
1.326 + /** The call is connected and active. */
1.327 + EStatusConnected,
1.328 + /** The call is being terminated. */
1.329 + EStatusHangingUp
1.330 + };
1.331 +
1.332 + IMPORT_C TInt GetStatus(TStatus& aStatus) const;
1.333 +
1.334 +//
1.335 +// Call Caps
1.336 +//
1.337 +/** Call capability flags. */
1.338 + enum TCapsEnum
1.339 + {
1.340 + /** The call supports data calls. */
1.341 + KCapsData=0x00000001,
1.342 + /** The call supports fax calls. */
1.343 + KCapsFax=0x00000002,
1.344 + /** The call supports voice calls. */
1.345 + KCapsVoice=0x00000004,
1.346 + /** The Dial request is currently a valid action. */
1.347 + KCapsDial=0x00000008,
1.348 + /** The Connect request is currently a valid action. */
1.349 + KCapsConnect=0x00000010,
1.350 + /** The Hang Up request is currently a valid action. */
1.351 + KCapsHangUp=0x00000020,
1.352 + /** The Answer request is currently a valid action. */
1.353 + KCapsAnswer=0x00000040,
1.354 + /** The Loan Data Port request is currently a valid action. */
1.355 + KCapsLoanDataPort=0x00000080,
1.356 + /** The Recover Data Port request is currently a valid action. */
1.357 + KCapsRecoverDataPort=0x00000100
1.358 + };
1.359 +
1.360 + struct TCaps
1.361 +/** Call capability information. */
1.362 + {
1.363 + /** Call capability flag. Contains a bitmask of values defined in the TCapsEnum
1.364 + enumeration.*/
1.365 + TUint iFlags;
1.366 + };
1.367 +
1.368 + IMPORT_C TInt GetCaps(TCaps& aCaps) const;
1.369 + IMPORT_C void NotifyCapsChange(TRequestStatus& aStatus, TCaps& aCaps);
1.370 + IMPORT_C void NotifyCapsChangeCancel() const;
1.371 +
1.372 +//
1.373 +// Bearer Service Information
1.374 +//
1.375 +/** Bearer capability flags. */
1.376 + enum TBearerCaps
1.377 + {
1.378 + /** V42bis modem compression protocol. */
1.379 + KBearerCapsCompressionV42bis=0x00000001,
1.380 + /** MNP5 modem compression protocol. */
1.381 + KBearerCapsCompressionMNP5=0x00000002,
1.382 + /** No compression supported. */
1.383 + KBearerCapsCompressionNone=0x00000004,
1.384 + /** LAPM error correction protocol. */
1.385 + KBearerCapsProtocolLAPM=0x00000008,
1.386 + /** MNP10 mode. */
1.387 + KBearerCapsProtocolALT_CELLULAR=0x00000010,
1.388 + /** MNP error correction. */
1.389 + KBearerCapsProtocolALT=0x00000020,
1.390 + /** No protocol information provided. */
1.391 + KBearerCapsProtocolNone=0x00000040,
1.392 + /** Compression protocol unknown. */
1.393 + KBearerCapsCompressionUnknown=0x00000080,
1.394 + /** Unable to establish protocol. */
1.395 + KBearerCapsProtocolUnknown=0x00000100
1.396 + };
1.397 +
1.398 +/** Bearer speed flags. */
1.399 + enum TCallBearerSpeed
1.400 + {
1.401 + /** Transfer rate of 57600 bps. */
1.402 + EBearerData57600,
1.403 + /** Transfer rate of 33600 bps. */
1.404 + EBearerData33600,
1.405 + /** Transfer rate of 31200 bps. */
1.406 + EBearerData31200,
1.407 + /** Transfer rate of 9200 bps. */
1.408 + EBearerData19200,
1.409 + /** Transfer rate of 4400 bps. */
1.410 + EBearerData14400,
1.411 + /** Transfer rate of 12000 bps. */
1.412 + EBearerData12000,
1.413 + /** Transfer rate of 9600 bps. */
1.414 + EBearerData9600,
1.415 + /** Transfer rate of 7200 bps. */
1.416 + EBearerData7200,
1.417 + /** Transfer rate of 4800 bps. */
1.418 + EBearerData4800,
1.419 + /** Transfer rate of 2400 bps. */
1.420 + EBearerData2400,
1.421 + /** Transfer rate of 200 bps. */
1.422 + EBearerData1200,
1.423 + /** V.23 75 bps forward, 1200 bps back */
1.424 + EBearerData75_1200,
1.425 + /** V.23 1200 bps forward, 75 bps back */
1.426 + EBearerData1200_75,
1.427 + /** Transfer rate of 300 bps. */
1.428 + EBearerData300,
1.429 + /** Transfer rate is unknown. */
1.430 + EBearerDataUnknown
1.431 + };
1.432 +
1.433 + struct TBearerService
1.434 +/** Call bearer information.
1.435 +
1.436 +@see TCallBearerSpeed */
1.437 + {
1.438 + /** The bearer capabilities. */
1.439 + TUint32 iBearerCaps;
1.440 + /** The bearer's speed.
1.441 +
1.442 + @see TCallBearerSpeed */
1.443 + TCallBearerSpeed iBearerSpeed;
1.444 + };
1.445 +
1.446 + IMPORT_C TInt GetBearerServiceInfo(TBearerService& aBearerService) const;
1.447 +
1.448 +//
1.449 +// Notifications
1.450 +//
1.451 +/** Hook status flags. */
1.452 + enum THookStatus
1.453 + {
1.454 + /** The line is currently off hook. */
1.455 + EHookStatusOff,
1.456 + /** The line is currently on hook. */
1.457 + EHookStatusOn,
1.458 + /** The status of the line's hook is currently unknown */
1.459 + EHookStatusUnknown
1.460 + };
1.461 +
1.462 + class TCallInfo
1.463 +/** Line call capability information.
1.464 +
1.465 +@see TName
1.466 +@publishedAll
1.467 +@released
1.468 +*/
1.469 + {
1.470 + public:
1.471 + IMPORT_C TCallInfo();
1.472 + /** The name of a call.
1.473 +
1.474 + @see TName */
1.475 + TName iCallName;
1.476 + TName iLineName;
1.477 + THookStatus iHookStatus;
1.478 + /** The call status.
1.479 +
1.480 + @see RCall::TStatus */
1.481 + TStatus iStatus;
1.482 + TTimeIntervalSeconds iDuration;
1.483 + };
1.484 +
1.485 + IMPORT_C TInt GetInfo(TCallInfo& aCallInfo) const;
1.486 + IMPORT_C void NotifyHookChange(TRequestStatus& aStatus,THookStatus& aHookStatus);
1.487 + IMPORT_C void NotifyHookChangeCancel() const;
1.488 + IMPORT_C void NotifyStatusChange(TRequestStatus& aStatus,TStatus& aCallStatus);
1.489 + IMPORT_C void NotifyStatusChangeCancel() const;
1.490 + IMPORT_C void NotifyCallDurationChange(TRequestStatus& aStatus,TTimeIntervalSeconds& aTime);
1.491 + IMPORT_C void NotifyCallDurationChangeCancel() const;
1.492 +
1.493 +//
1.494 +// Duration of call
1.495 +//
1.496 + IMPORT_C TInt GetCallDuration(TTimeIntervalSeconds& aTime) const;
1.497 +//
1.498 +// Connecting and Disconnecting
1.499 +//
1.500 +/** Passes telephone numbers into Dial functions. */
1.501 + typedef TDesC TTelNumberC;
1.502 + IMPORT_C TInt Dial(const TTelNumberC& aTelNumber) const;
1.503 + IMPORT_C TInt Dial(const TDesC8& aCallParams,const TTelNumberC& aTelNumber) const;
1.504 + IMPORT_C void Dial(TRequestStatus& aStatus,const TTelNumberC& aTelNumber);
1.505 + IMPORT_C void Dial(TRequestStatus& aStatus,const TDesC8& aCallParams,const TTelNumberC& aTelNumber);
1.506 + IMPORT_C void DialCancel() const;
1.507 + IMPORT_C TInt Connect() const;
1.508 + IMPORT_C TInt Connect(const TDesC8& aCallParams) const;
1.509 + IMPORT_C void Connect(TRequestStatus& aStatus);
1.510 + IMPORT_C void Connect(TRequestStatus& aStatus,const TDesC8& aCallParams);
1.511 + IMPORT_C void ConnectCancel() const;
1.512 + IMPORT_C TInt AnswerIncomingCall() const;
1.513 + IMPORT_C TInt AnswerIncomingCall(const TDesC8& aCallParams) const;
1.514 + IMPORT_C void AnswerIncomingCall(TRequestStatus& aStatus);
1.515 + IMPORT_C void AnswerIncomingCall(TRequestStatus& aStatus,const TDesC8& aCallParams);
1.516 + IMPORT_C void AnswerIncomingCallCancel() const;
1.517 + IMPORT_C TInt HangUp() const;
1.518 + IMPORT_C void HangUp(TRequestStatus& aStatus) const;
1.519 + IMPORT_C void HangUpCancel() const;
1.520 +
1.521 +//
1.522 +// Call Data Access
1.523 +//
1.524 + struct TCommPort
1.525 +/** Communications port information.
1.526 +
1.527 +@see TFileName */
1.528 + {
1.529 + /** The CSY module used by the C32 Communications Server to talk to the serial
1.530 + device.
1.531 + @deprecated This has been deprecated as all the information that is needed by the
1.532 + lower layers is now being passed in iPort.
1.533 +
1.534 + @see TFileName */
1.535 + TFileName iCsy;
1.536 + /** The port used by the C32 Communications Server to talk to the serial device.
1.537 + It holds both the Csy name and the Port name.
1.538 +
1.539 + @see TName */
1.540 + TName iPort;
1.541 + };
1.542 +
1.543 + IMPORT_C TInt LoanDataPort(TCommPort& aDataPort) const;
1.544 + IMPORT_C void LoanDataPort(TRequestStatus& aStatus,TCommPort& aDataPort);
1.545 + IMPORT_C void LoanDataPortCancel() const;
1.546 + IMPORT_C TInt RecoverDataPort() const;
1.547 +
1.548 +//
1.549 +// Call Ownership manipulation
1.550 +//
1.551 +/** Call ownership status flags. */
1.552 + enum TOwnershipStatus
1.553 + {
1.554 + /** The call is not owned. */
1.555 + EOwnershipUnowned,
1.556 + /** The call is owned, but not by this RCall instance. */
1.557 + EOwnershipOwnedByAnotherClient, // not the priority client
1.558 + /** The call is owned by this RCall instance. */
1.559 + EOwnershipOwnedByThisClient,
1.560 + /** The call is owned, but not by the priority client */
1.561 + EOwnershipThisIsPriorityClient // not owned by this (the priority) client
1.562 + };
1.563 +
1.564 + IMPORT_C TInt TransferOwnership() const;
1.565 + IMPORT_C void AcquireOwnership(TRequestStatus& aStatus) const;
1.566 + IMPORT_C void AcquireOwnershipCancel() const;
1.567 + IMPORT_C TInt GetOwnershipStatus(TOwnershipStatus& aOwnershipStatus) const;
1.568 + //
1.569 +//
1.570 +// Get and Set Call Parameters
1.571 +//
1.572 +/** Monitor speaker control setting flags. */
1.573 + enum TMonitorSpeakerControl
1.574 + {
1.575 + /** Speaker control is always off */
1.576 + EMonitorSpeakerControlAlwaysOff,
1.577 + /** Speaker control is on until the carrier is detected */
1.578 + EMonitorSpeakerControlOnUntilCarrier,
1.579 + /** Speaker control is always active. */
1.580 + EMonitorSpeakerControlAlwaysOn,
1.581 + /** Speaker control is on, except while dialling */
1.582 + EMonitorSpeakerControlOnExceptDuringDialling,
1.583 + /** Speaker control is unknown. */
1.584 + EMonitorSpeakerControlUnknown
1.585 + };
1.586 +
1.587 +/** Monitor speaker volume control setting flags. */
1.588 + enum TMonitorSpeakerVolume
1.589 + {
1.590 + /** Speaker volume is off. */
1.591 + EMonitorSpeakerVolumeOff,
1.592 + /** Speaker volume is low. */
1.593 + EMonitorSpeakerVolumeLow,
1.594 + /** Speaker volume is medium. */
1.595 + EMonitorSpeakerVolumeMedium,
1.596 + /** Speaker volume is high. */
1.597 + EMonitorSpeakerVolumeHigh,
1.598 + /** Speaker volume is unknown. */
1.599 + EMonitorSpeakerVolumeUnknown
1.600 + };
1.601 +
1.602 +/** Wait for dial tone flags. */
1.603 + enum TWaitForDialTone
1.604 + {
1.605 + /** Waiting for dial tone. */
1.606 + EDialToneWait,
1.607 + /** Not waiting for dial tone. */
1.608 + EDialToneNoWait
1.609 + };
1.610 +
1.611 + class TCallParams
1.612 + /**
1.613 + @publishedAll
1.614 + @released
1.615 + */
1.616 + {
1.617 + public:
1.618 + IMPORT_C TCallParams();
1.619 + IMPORT_C TCallParams(TMonitorSpeakerControl aSpeakerControl,
1.620 + TMonitorSpeakerVolume aSpeakerVolume,
1.621 + TUint aInterval,
1.622 + TWaitForDialTone aWaitForDialTone);
1.623 + IMPORT_C TInt ExtensionId();
1.624 + IMPORT_C TBool IsDefault();
1.625 + TMonitorSpeakerControl iSpeakerControl;
1.626 + TMonitorSpeakerVolume iSpeakerVolume;
1.627 + TUint iInterval;
1.628 + TWaitForDialTone iWaitForDialTone;
1.629 + protected:
1.630 + TBool iIsDefault;
1.631 + TInt iExtensionId;
1.632 + };
1.633 +
1.634 +/** Call parameters package
1.635 +
1.636 +The call parameters to be associated with a call may be passed into functions
1.637 +using this type.
1.638 +
1.639 +@see TCallParams */
1.640 + typedef TPckg<TCallParams> TCallParamsPckg;
1.641 +
1.642 + IMPORT_C TInt GetCallParams(TDes8& aParams) const;
1.643 +
1.644 +//
1.645 +// Fax Settings
1.646 +//
1.647 +/** Fax mode flags. */
1.648 + enum TFaxMode
1.649 + {
1.650 + /** Fax is transmitting */
1.651 + ETransmit,
1.652 + /** Fax is receiving. */
1.653 + EReceive
1.654 + };
1.655 +
1.656 +/** Fax retrieval type flags. */
1.657 + enum TFaxRetrieveType
1.658 + {
1.659 + /** Retrieving a fax opened from voice call (not currently supported by GSM networks). */
1.660 + EFaxOnDemand,
1.661 + /** Retrieve a fax opened from fax call. */
1.662 + EFaxPoll
1.663 + };
1.664 +
1.665 +/** Fax identifier size flags. */
1.666 + enum TConstants
1.667 + {
1.668 + /** 20 */
1.669 + KFaxIdUserNameMaxSize=20
1.670 + };
1.671 +
1.672 + struct TFaxSessionSettings
1.673 +/** Fax session settings information.
1.674 +
1.675 +@see TFaxMode */
1.676 + {
1.677 + /** The fax mode.
1.678 +
1.679 + @see TFaxMode */
1.680 + TFaxMode iMode;
1.681 + /** The mode of retrieving faxes.
1.682 +
1.683 + @see TFaxRetrieveType */
1.684 + TFaxRetrieveType iFaxRetrieveType;
1.685 + /** The class of fax
1.686 +
1.687 + @see TFaxClass */
1.688 + TFaxClass iFaxClass;
1.689 + /** The fax identifier string displayed at the top of the fax.
1.690 +
1.691 + @see KFaxIdUserNameMaxSize */
1.692 + TBuf<KFaxIdUserNameMaxSize> iFaxId;
1.693 + /** The maximum transfer speed that can be negotiated. */
1.694 + TInt iMaxSpeed;
1.695 + /** The minimum transfer speed that should be negotiated. */
1.696 + TInt iMinSpeed;
1.697 + /** The preferred compression mode used for negotiation. This may take one of the
1.698 + following values: EModifiedHuffman, EModifiedRead, EUncompressedModifiedRead,
1.699 + EModifiedModifiedRead. */
1.700 + TInt iPreferredECM;
1.701 + /** The delay used for Fax on Demand services. Measured in seconds. */
1.702 + TInt iFaxOnDemandDelay;
1.703 + // Tx Settings
1.704 + /** The preferred transmit resolution. This may take one of the following values:
1.705 + EFaxNormal EFaxFine
1.706 +
1.707 + @see TFaxResolution */
1.708 + TFaxResolution iTxResolution;
1.709 + /** Compression mode for transmitting faxes.
1.710 +
1.711 + @see TFaxCompression */
1.712 + TFaxCompression iTxCompression;
1.713 + /** The number of pages to be transmitted. */
1.714 + TInt iTxPages;
1.715 + // Rx Settings
1.716 + /** The preferred receive resolution. This may take one of the following values:
1.717 + EFaxNormal EFaxFine.
1.718 +
1.719 + @see TFaxResolution */
1.720 + TFaxResolution iRxResolution;
1.721 + /** Compression mode for receiving faxes.
1.722 +
1.723 + @see TFaxCompression */
1.724 + TFaxCompression iRxCompression;
1.725 + };
1.726 +
1.727 + IMPORT_C TInt GetFaxSettings(TFaxSessionSettings& aSettings) const;
1.728 + IMPORT_C TInt SetFaxSettings(const TFaxSessionSettings& aSettings) const;
1.729 + IMPORT_C TInt AdoptFaxSharedHeaderFile(const RFile& aSharedFile) const;
1.730 +//
1.731 +// Retrieval of call objects' reference count
1.732 +//
1.733 + IMPORT_C TInt ReferenceCount() const;
1.734 +
1.735 +protected:
1.736 + IMPORT_C virtual void ConstructL();
1.737 + IMPORT_C virtual void Destruct();
1.738 + };
1.739 +
1.740 +//
1.741 +//
1.742 +// RLine
1.743 +//
1.744 +//
1.745 +class RPhone;
1.746 +/**
1.747 +Provides access to the functionality associated with a specific line.
1.748 +
1.749 +This class is not intended for user derivation.
1.750 +
1.751 +@publishedPartner
1.752 +@released
1.753 +*/
1.754 +class RLine : public RTelSubSessionBase
1.755 + {
1.756 +public:
1.757 + IMPORT_C RLine();
1.758 + IMPORT_C TInt Open(RPhone& aPhone,const TDesC& aName);
1.759 + IMPORT_C TInt Open(RTelServer& aServer,const TDesC& aName);
1.760 + IMPORT_C void Close();
1.761 +
1.762 +//
1.763 +// Caps
1.764 +//
1.765 +/** Line capability flags. */
1.766 + enum TCapsFlags
1.767 + {
1.768 + /** The line supports data connections.*/
1.769 + KCapsData=0x00000001,
1.770 + /** The line supports fax connections. */
1.771 + KCapsFax=0x00000002,
1.772 + /** The line supports voice connections.*/
1.773 + KCapsVoice=0x00000004,
1.774 + /** The line supports incoming call notification requests. */
1.775 + KCapsEventIncomingCall=0x00010000,
1.776 + };
1.777 +
1.778 + struct TCaps
1.779 +/** Line capability information. */
1.780 + {
1.781 + /** Line capability flag. Contains a bitmask of the values defined in the TCapsFlags
1.782 + enumeration.*/
1.783 + TUint iFlags;
1.784 + };
1.785 +
1.786 + IMPORT_C TInt GetCaps(TCaps& aCaps) const;
1.787 + IMPORT_C void NotifyCapsChange(TRequestStatus& aStatus, TCaps& aCaps);
1.788 + IMPORT_C void NotifyCapsChangeCancel() const;
1.789 +
1.790 +//
1.791 +// Line and Hook Status
1.792 +//
1.793 + IMPORT_C TInt GetStatus(RCall::TStatus& aStatus) const;
1.794 + IMPORT_C TInt GetHookStatus(RCall::THookStatus& aHookStatus) const;
1.795 +
1.796 +//
1.797 +// Call enumeration and Information
1.798 +//
1.799 + struct TCallInfo
1.800 +/** Line call capability information.
1.801 +
1.802 +@see TName */
1.803 + {
1.804 + /** The name of a call.
1.805 +
1.806 + @see TName */
1.807 + TName iCallName;
1.808 + /** The call status.
1.809 +
1.810 + @see RCall::TStatus */
1.811 + RCall::TStatus iStatus;
1.812 + /** The call capabilities flag.
1.813 +
1.814 + @see RCall::TCapsEnum*/
1.815 + TUint32 iCallCapsFlags;
1.816 + };
1.817 +
1.818 + IMPORT_C TInt EnumerateCall(TInt& aCount) const;
1.819 + IMPORT_C TInt GetCallInfo(TInt aIndex,TCallInfo& aCallInfo) const;
1.820 +//
1.821 +// General line notification information
1.822 +//
1.823 + class TLineInfo
1.824 +/** Line information.
1.825 +
1.826 +@see RCall::TStatus
1.827 +@publishedAll
1.828 +@released
1.829 +*/
1.830 + {
1.831 + public:
1.832 + IMPORT_C TLineInfo();
1.833 + RCall::THookStatus iHookStatus;
1.834 + /** The current line status.
1.835 +
1.836 + @see RCall::TStatus */
1.837 + RCall::TStatus iStatus;
1.838 + TName iNameOfLastCallAdded;
1.839 + TName iNameOfCallForAnswering; // if an incoming call occurs, this contains the name
1.840 + // of the call to answer it on.
1.841 + };
1.842 +
1.843 +//
1.844 +// Notifications
1.845 +//
1.846 + IMPORT_C TInt GetInfo(TLineInfo& aLineInfo) const;
1.847 + IMPORT_C void NotifyIncomingCall(TRequestStatus& aStatus, TName& aName);
1.848 + IMPORT_C void NotifyIncomingCallCancel() const;
1.849 + IMPORT_C void NotifyHookChange(TRequestStatus& aStatus,RCall::THookStatus& aHookStatus);
1.850 + IMPORT_C void NotifyHookChangeCancel() const;
1.851 + IMPORT_C void NotifyStatusChange(TRequestStatus& aStatus,RCall::TStatus& aLineStatus);
1.852 + IMPORT_C void NotifyStatusChangeCancel() const;
1.853 + IMPORT_C void NotifyCallAdded(TRequestStatus& aStatus,TName& aName);
1.854 + IMPORT_C void NotifyCallAddedCancel() const;
1.855 +protected:
1.856 + IMPORT_C virtual void ConstructL();
1.857 + IMPORT_C virtual void Destruct();
1.858 + };
1.859 +
1.860 +//
1.861 +//
1.862 +// RPhone
1.863 +//
1.864 +//
1.865 +class RTelServer;
1.866 +/**
1.867 +Phone sub-session.
1.868 +
1.869 +Provides access to the functionality associated with a specific phone.
1.870 +
1.871 +This class is not intended for user derivation.
1.872 +
1.873 +@publishedPartner
1.874 +@released
1.875 +*/
1.876 +class RPhone : public RTelSubSessionBase
1.877 + {
1.878 +public:
1.879 + IMPORT_C RPhone();
1.880 + IMPORT_C TInt Open(RTelServer& aSession,const TDesC& aName);
1.881 + IMPORT_C void Close();
1.882 +
1.883 +//
1.884 +// Initialisation
1.885 +//
1.886 + IMPORT_C TInt Initialise();
1.887 + IMPORT_C void Initialise(TRequestStatus& aStatus);
1.888 + IMPORT_C void InitialiseCancel();
1.889 +
1.890 +//
1.891 +// Caps
1.892 +//
1.893 +/** Phone capability flags. */
1.894 + enum TCapsFlags
1.895 + {
1.896 + /** The capabilities of the phone are not known. */
1.897 + KCapsUnknown=0x00000001,
1.898 + /** The phone supports data calls. */
1.899 + KCapsData=0x00000002,
1.900 + /** The phone supports the fax class 1 interface. */
1.901 + KCapsFaxClassOne=0x0000004,
1.902 + /** The phone supports the fax class 1.0 interface. */
1.903 + KCapsFaxClassOnePointZero=0x0000008,
1.904 + /** The phone supports the fax class 2 interface. */
1.905 + KCapsFaxClassTwo=0x00000010,
1.906 + /** The phone supports the fax class 2.0 interface. */
1.907 + KCapsFaxClassTwoPointZero=0x00000020,
1.908 + /** The phone supports the fax class 2.1 interface. */
1.909 + KCapsFaxClassTwoPointOne=0x00000040,
1.910 + /** The phone supports voice calls. */
1.911 + KCapsVoice=0x00000080,
1.912 + /** The phone supports modem detection events, i.e. it can notify clients when
1.913 + the modem can be or can no longer be detected. */
1.914 + KCapsEventModemDetection=0x00010000,
1.915 + /** The phone supports the ability to take the communications port from whatever
1.916 + component is currently using it. */
1.917 + KCapsStealCommPort=0x00020000
1.918 + };
1.919 +
1.920 + struct TCaps
1.921 +/** Phone capability information. */
1.922 + {
1.923 + /** Phone capability flag. Contains bitmask of values defined in the TCapsFlags
1.924 + enumeration. */
1.925 + TUint iFlags;
1.926 + };
1.927 +
1.928 + IMPORT_C TInt GetCaps(TCaps& aCaps) const;
1.929 + IMPORT_C void NotifyCapsChange(TRequestStatus& aStatus, TCaps& aCaps);
1.930 + IMPORT_C void NotifyCapsChangeCancel() const;
1.931 +
1.932 +//
1.933 +// Status
1.934 +//
1.935 +/** Phone mode status flags. */
1.936 + enum TMode
1.937 + {
1.938 + /** Phone (modem) status unknown. */
1.939 + EModeUnknown,
1.940 + /** Phone is idle. */
1.941 + EModeIdle,
1.942 + /** Phone is establishing link. */
1.943 + EModeEstablishingLink,
1.944 + /** Modem is in data mode. */
1.945 + EModeOnlineData,
1.946 + /** Modem is in command mode and the line is active. */
1.947 + EModeOnlineCommand
1.948 + };
1.949 +
1.950 +/** Modem connection status flags. */
1.951 + enum TModemDetection
1.952 + {
1.953 + /** Modem present. */
1.954 + EDetectedPresent,
1.955 + /** Modem is not present. */
1.956 + EDetectedNotPresent,
1.957 + /** Modem connection status is unknown. */
1.958 + EDetectedUnknown
1.959 + };
1.960 +
1.961 + struct TStatus
1.962 +/** Current phone status.
1.963 +
1.964 +@see TModemDetection */
1.965 + {
1.966 + /** The current modem connection status.
1.967 +
1.968 + @see TModemDetection */
1.969 + TModemDetection iModemDetected;
1.970 + /** The current mode of the phone.
1.971 +
1.972 + @see TMode */
1.973 + TMode iMode;
1.974 + };
1.975 +
1.976 + IMPORT_C TInt GetStatus(TStatus& aStatus) const;
1.977 +
1.978 +//
1.979 +// Line Enumeration and Information
1.980 +//
1.981 + struct TLineInfo
1.982 +/** Line information.
1.983 +
1.984 +@see RCall::TStatus */
1.985 + {
1.986 + /** The current line status.
1.987 +
1.988 + @see RCall::TStatus */
1.989 + RCall::TStatus iStatus;
1.990 + /** The line capabilities flag.
1.991 +
1.992 + @see RLine::TCapsFlags */
1.993 + TUint32 iLineCapsFlags;
1.994 + /** The name of the line.
1.995 +
1.996 + @see TName */
1.997 + TName iName;
1.998 + };
1.999 +
1.1000 + IMPORT_C TInt EnumerateLines(TInt& aCount) const;
1.1001 + IMPORT_C TInt GetLineInfo(const TInt aIndex,TLineInfo& aLineInfo) const;
1.1002 +
1.1003 +//
1.1004 +// General phone notification information
1.1005 +//
1.1006 + class TPhoneInfo
1.1007 +/** Phone notification information.
1.1008 +
1.1009 +Collects all the information associated with an instance of the core API phone
1.1010 +class is collected together into a single, directly accessible, structure.
1.1011 +This increases the efficiency of applications that require access to the majority
1.1012 +of the phone's data.
1.1013 +
1.1014 +This class is not intended for user derivation.
1.1015 +
1.1016 +@see TNetworkType
1.1017 +@publishedAll
1.1018 +@released
1.1019 +*/
1.1020 + {
1.1021 + public:
1.1022 + IMPORT_C TPhoneInfo();
1.1023 + /** The current modem detection state (is it present or not).
1.1024 +
1.1025 + @see TModemDetection */
1.1026 + TModemDetection iDetection;
1.1027 + };
1.1028 +
1.1029 + IMPORT_C TInt GetInfo(TPhoneInfo& aPhoneInfo) const;
1.1030 +
1.1031 +//
1.1032 +// Notifications
1.1033 +//
1.1034 + IMPORT_C void NotifyModemDetected(TRequestStatus& aStatus,TModemDetection& aDetection);
1.1035 + IMPORT_C void NotifyModemDetectedCancel() const;
1.1036 +
1.1037 +//
1.1038 +// TEmergencyRequest is a bit-mask where each bit-flag represents
1.1039 +// the emergency request type that the client wishes to handle
1.1040 +//
1.1041 + enum TEmergencyRequest
1.1042 + {
1.1043 + /** Location Based Services Emergency Request */
1.1044 + EEmergencyLCSRequest = 0x00000001,
1.1045 + /** Circuit Switch Voice Call Emergency Request */
1.1046 + EEmergencyCSVoiceCallRequest = 0x00000002,
1.1047 + };
1.1048 +
1.1049 + IMPORT_C TInt SetEmergencyClient(const TUint32 aEmergencyRequest) const;
1.1050 +
1.1051 +protected:
1.1052 + IMPORT_C virtual void ConstructL();
1.1053 + IMPORT_C virtual void Destruct();
1.1054 + };
1.1055 +
1.1056 +//
1.1057 +//
1.1058 +// RTelServer
1.1059 +//
1.1060 +//
1.1061 +/**
1.1062 +Root telephony server session.
1.1063 +
1.1064 +Provides access to general telephony information and functionality. Clients
1.1065 +wishing to use the ETel Server must open a connection with the root server
1.1066 +using the functions defined in this class. They may then obtain information
1.1067 +about loaded TSY modules, and the phones that they support. To access functionality
1.1068 +associated with a specific phone, the client must open a sub-session for that
1.1069 +phone.
1.1070 +
1.1071 +This class is not intended for user derivation.
1.1072 +
1.1073 +@publishedPartner
1.1074 +@released
1.1075 +*/
1.1076 +class RTelServer : public RSessionBase
1.1077 + {
1.1078 +public:
1.1079 + enum { KDefaultMessageSlots=32 };
1.1080 +
1.1081 + IMPORT_C RTelServer();
1.1082 + IMPORT_C TInt Connect(TInt aMessageSlots =KDefaultMessageSlots);
1.1083 + inline TVersion Version() const;
1.1084 +
1.1085 +//
1.1086 +// Enumeration and Information
1.1087 +//
1.1088 +/** Types of telephony connection flags. */
1.1089 + enum TNetworkType
1.1090 + {
1.1091 + /** Wired analog network. */
1.1092 + ENetworkTypeWiredAnalog,
1.1093 + /** Wired digital network (not supported by ETel). */
1.1094 + ENetworkTypeWiredDigital,
1.1095 + /** Mobile analog network (not supported by ETel). */
1.1096 + ENetworkTypeMobileAnalog,
1.1097 + /** Mobile digital network. */
1.1098 + ENetworkTypeMobileDigital,
1.1099 + /** Unknown network type. */
1.1100 + ENetworkTypeUnknown
1.1101 + };
1.1102 +
1.1103 + struct TPhoneInfo
1.1104 +/** Phone notification information.
1.1105 +
1.1106 +Collects all the information associated with an instance of the core API phone
1.1107 +class is collected together into a single, directly accessible, structure.
1.1108 +This increases the efficiency of applications that require access to the majority
1.1109 +of the phone's data.
1.1110 +
1.1111 +This class is not intended for user derivation.
1.1112 +
1.1113 +@see TNetworkType */
1.1114 + {
1.1115 + /** The type of telephony connection supported by the phone.
1.1116 +
1.1117 + @see TNetworkType */
1.1118 + TNetworkType iNetworkType;
1.1119 + /** The name of the phone.
1.1120 +
1.1121 + @see TName */
1.1122 + TName iName;
1.1123 + /** The number of lines supported by the phone. */
1.1124 + TUint iNumberOfLines;
1.1125 + /** The extensions that the TSY module supports. */
1.1126 + TUint iExtensions;
1.1127 + };
1.1128 +
1.1129 + IMPORT_C TInt EnumeratePhones(TInt& aNoOfPhones) const;
1.1130 + IMPORT_C TInt GetPhoneInfo(const TInt aIndex,TPhoneInfo& aInfo) const;
1.1131 + IMPORT_C TInt GetTsyName(const TInt aIndexOfPhone, TDes& aTsyName) const;
1.1132 +
1.1133 +//
1.1134 +// Load and Unload Phone modules
1.1135 +//
1.1136 +
1.1137 + IMPORT_C TInt LoadPhoneModule(const TDesC& aFileName) const;
1.1138 + IMPORT_C TInt UnloadPhoneModule(const TDesC& aFileName) const;
1.1139 +
1.1140 +//
1.1141 +// Check whether specified Phone module (TSY) supports certain functionality
1.1142 +//
1.1143 +
1.1144 + IMPORT_C TInt IsSupportedByModule(const TDesC& aTsyName, const TInt aMixin, TBool& aResult) const;
1.1145 + IMPORT_C TInt GetTsyVersionNumber(const TDesC& aTsyName,TVersion& aVersion) const;
1.1146 +//
1.1147 +// Set this session as Priority client
1.1148 +//
1.1149 + /** @deprecated This function has been deprecated. Use RTelServer::SetPriorityClientV2 followed by
1.1150 + RPhone::SetEmergencyClient(EEmergencyCSVoiceCallRequest) */
1.1151 + IMPORT_C TInt SetPriorityClient() const;
1.1152 +
1.1153 +//
1.1154 +// Set this session to receive detailed errors
1.1155 +//
1.1156 +
1.1157 +/** Error granularity flags. */
1.1158 + enum TErrorGranularity
1.1159 + {
1.1160 + /** Client is only interested in core errors */
1.1161 + EErrorBasic,
1.1162 + /** Client is interested in extended errors */
1.1163 + EErrorExtended
1.1164 + };
1.1165 +
1.1166 + IMPORT_C TInt SetExtendedErrorGranularity(const TErrorGranularity aGranularity) const;
1.1167 +
1.1168 +//
1.1169 +// Debug calls - stubbed in release builds
1.1170 +//
1.1171 + IMPORT_C TInt __DbgMarkHeap();
1.1172 + IMPORT_C TInt __DbgCheckHeap(TInt aCount);
1.1173 + IMPORT_C TInt __DbgMarkEnd(TInt aCount);
1.1174 + IMPORT_C TInt __DbgFailNext(TInt aCount);
1.1175 + IMPORT_C TInt __DbgFailNextAvailable(TBool& aResult);
1.1176 +
1.1177 +//
1.1178 +// Set this session as Priority client
1.1179 +//
1.1180 + IMPORT_C TInt SetPriorityClientV2() const;
1.1181 +
1.1182 + };
1.1183 +
1.1184 +
1.1185 +#include <etel.inl>
1.1186 +#endif