Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 #if !defined(__ETEL_H__)
25 /** @internalComponent */
28 #if !defined(__E32BASE_H__)
32 #if !defined (__C32COMM_H__)
36 #if !defined(__D32COMM_H__)
40 #if !defined(__FAXDEFN_H)
43 /** Major version number.*/
44 const TUint KEtelMajorVersionNumber=1;
45 /** Minor version number. */
46 const TUint KEtelMinorVersionNumber=0;
48 const TUint KEtelBuildVersionNumber=606;
52 IMPORT_C void PanicClient(TInt aFault);
55 // Etel Core Error Definitions
58 const TInt KErrEtelCoreBase = -2000;
60 /** The client is not the call owner and has attempted to perform an operation
61 that requires ownership.*/
62 const TInt KErrEtelNotCallOwner=KErrEtelCoreBase;
63 /** An attempt has been made to load an ETel (TSY) module which contains a phone
64 with the same name as one already loaded. */
65 const TInt KErrEtelDuplicatePhoneName=KErrEtelCoreBase-1;
66 /** An attempt has been made to acquire call ownership when the requesting client
67 is already the call owner. */
68 const TInt KErrEtelAlreadyCallOwner=KErrEtelCoreBase-2;
69 /** A connection has been terminated because the carrier has been lost. */
70 const TInt KErrEtelNoCarrier=KErrEtelCoreBase-3;
71 /** An attempt to establish a connection with the RCall::Dial() function has failed
72 because the remote party's line was busy. */
73 const TInt KErrEtelBusyDetected=KErrEtelCoreBase-4;
74 /** An attempt has been made to transfer call ownership, but no other clients are
75 interested in acquiring ownership. */
76 const TInt KErrEtelNoClientInterestedInThisCall=KErrEtelCoreBase-5;
77 /** The TSY has failed to initialise the modem. This may be occur if the modem
78 is disconnected during initialisation, or if an attempt is made to initialise
79 an unsupported modem. */
80 const TInt KErrEtelInitialisationFailure=KErrEtelCoreBase-6;
81 /** An attempt has been made to perform an operation which requires the call to
82 be connected - when the call is not connected. E.g. RCall:LoanDataPort(). */
83 const TInt KErrEtelCallNotActive=KErrEtelCoreBase-7;
84 /** A connection request has failed because there is no answer. */
85 const TInt KErrEtelNoAnswer=KErrEtelCoreBase-8;
86 /** A connection request has failed because there is no dial tone. For example,
87 if there is no connection between the modem and the network. */
88 const TInt KErrEtelNoDialTone=KErrEtelCoreBase-9;
89 /** An attempt to configure the port has failed because the hardware cannot match
90 the desired configuration. For example, if an attempt is made to configure
91 the comms port to a baud rate it cannot support. */
92 const TInt KErrEtelConfigPortFailure=KErrEtelCoreBase-10;
93 /** Out of memory error - global chunk cannot be created. */
94 const TInt KErrEtelFaxChunkNotCreated=KErrEtelCoreBase-11;
95 /** The client is not the fax owner and has attempted to perform an operation that
96 requires fax ownership.
98 The fax client should be used to access fax functionality. Consequently, client
99 code should not return this error. */
100 const TInt KErrEtelNotFaxOwner=KErrEtelCoreBase-12;
101 /** An attempt has been made to perform an operation which requires port ownership.
102 However, the client does not own the port. */
103 const TInt KErrEtelPortNotLoanedToClient=KErrEtelCoreBase-13;
104 /** An operation has failed because the modem has been incorrectly configured. */
105 const TInt KErrEtelWrongModemType=KErrEtelCoreBase-14;
106 /** An operation has failed because the modem does not understand the request -
107 possible bug in modem. */
108 const TInt KErrEtelUnknownModemCapability=KErrEtelCoreBase-15;
109 /** The call has already placed an 'answer incoming call' request. Only 1 request
110 of a type (e.g. fax, voice, data) can be outstanding on the server at a time. */
111 const TInt KErrEtelAnswerAlreadyOutstanding=KErrEtelCoreBase-16;
112 /** An attempt to establish a connection with the modem has failed because the
113 modem cannot be detected. */
114 const TInt KErrEtelModemNotDetected=KErrEtelCoreBase-17;
115 /** Operation failed because the modem settings are corrupt. */
116 const TInt KErrEtelModemSettingsCorrupt=KErrEtelCoreBase-18;
117 /** The Data port is in use by another call or application. */
118 const TInt KErrEtelPortAlreadyLoaned=KErrEtelCoreBase-19;
119 /** Another call active. Close it before opening a new one. */
120 const TInt KErrEtelCallAlreadyActive=KErrEtelCoreBase-20;
124 // RTelSubSessionBase
130 A base class used in the derivation of RCall, RLine, and RPhone. It has no user
131 accessible functions.
136 class RTelSubSessionBase : public RSubSessionBase
139 inline RSessionBase& SessionHandle() const;
140 inline void SetSessionHandle(RSessionBase& aSession);
141 inline void ResetSessionHandle();
142 inline TInt SubSessionHandle();
144 IMPORT_C void CancelAsyncRequest(TInt aReqToCancel) const;
146 enum TReqPriorityType
148 EIsNotaPriorityRequest,
155 IMPORT_C RTelSubSessionBase();
156 IMPORT_C TInt Blank(const TInt aIpc,TReqPriorityType aType = EIsNotaPriorityRequest) const;
157 IMPORT_C void Blank(const TInt aIpc,TRequestStatus& aStatus,TReqPriorityType aType = EIsNotaPriorityRequest) const;
159 IMPORT_C TInt Set(const TInt aIpc,const TDesC8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
160 IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
161 IMPORT_C TInt Get(const TInt aIpc,TDes8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
162 IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes8& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
164 IMPORT_C TInt Set(const TInt aIpc,const TDesC8& aDes1,const TDesC8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
165 IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC8& aDes1,const TDesC8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
166 IMPORT_C TInt Get(const TInt aIpc,TDes8& aDes1,TDes8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
167 IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes8& aDes1,TDes8& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
169 IMPORT_C TInt Set(const TInt aIpc,const TDesC16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
170 IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
171 IMPORT_C TInt Get(const TInt aIpc,TDes16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
172 IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes16& aDes,TReqPriorityType aType = EIsNotaPriorityRequest) const;
174 IMPORT_C TInt Set(const TInt aIpc,const TDesC16& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
175 IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC16& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
176 IMPORT_C TInt Set(const TInt aIpc,const TDesC8& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
177 IMPORT_C void Set(const TInt aIpc,TRequestStatus& aStatus,const TDesC8& aDes1,const TDesC16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
179 IMPORT_C TInt Get(const TInt aIpc,TDes16& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
180 IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes16& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
181 IMPORT_C TInt Get(const TInt aIpc,TDes8& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
182 IMPORT_C void Get(const TInt aIpc,TRequestStatus& aStatus,TDes8& aDes1,TDes16& aDes2,TReqPriorityType aType = EIsNotaPriorityRequest) const;
184 IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, const TDesC8& aDes1, TDes8& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
185 IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, TDes8& aDes1, const TDesC16& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
186 IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, const TDesC8&, TDes16& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
187 IMPORT_C void SetAndGet(const TInt aIpc, TRequestStatus& aStatus, const TDesC16& aDes1, TDes16& aDes2, TReqPriorityType aType = EIsNotaPriorityRequest) const;
189 IMPORT_C TInt Set(const TInt aIpc, const RFile& aFile, TReqPriorityType aType = EIsNotaPriorityRequest) const;
191 IMPORT_C TInt CancelReq(const TInt aIpc,const TInt aIpcToCancel) const;
192 IMPORT_C TInt CancelSubSession() const;
195 RTelSubSessionBase(const RTelSubSessionBase& aTelSubSessionBase);
196 RSessionBase* iTelSession;
198 CPtrHolder* iPtrHolder;
210 Contains the fax client progress information structure.
212 ETel does include server-side RFax objects, however the
213 associated APIs are intended solely for use by ETel's own
214 fax client. Consequently, only the TProgress structure is
215 considered part of the public API.
220 class RFax : public RTelSubSessionBase
224 IMPORT_C TInt Open(RCall& aCall);
225 IMPORT_C void Close();
228 // Read,Write and Wait for Page End
230 IMPORT_C void Read(TRequestStatus& aStatus,TDes8& aDes);
231 IMPORT_C void Write(TRequestStatus& aStatus,const TDesC8& aDes);
232 IMPORT_C void WaitForEndOfPage(TRequestStatus& aStatus) const;
233 IMPORT_C TInt TerminateFaxSession() const;
235 // Progress Information
238 /** Contains fax progress information.*/
240 /** Time of last progress update.*/
241 TTime iLastUpdateTime;
242 /** ID of remote fax - filled in after connection.*/
243 TBuf<20> iAnswerback;
245 /** Phase of session.*/
247 /** Resolution of document.*/
248 TFaxResolution iResolution;
249 /** Compression method in use.*/
250 TFaxCompression iCompression;
251 /** Error correction mode. Reserved for future releases.*/
254 /** Last or current page being transferred.*/
256 /** Last or current line on page.*/
258 /** Speed of fax session.*/
262 IMPORT_C TInt GetProgress(TProgress& aProgress);
264 TProgress* iProgressPtr;
267 IMPORT_C virtual void ConstructL();
268 IMPORT_C virtual void Destruct();
282 Provides access to the functionality associated with a specific call.
284 This class is not intended for user derivation.
289 class RCall : public RTelSubSessionBase
293 IMPORT_C TInt OpenNewCall(RTelServer& aServer,const TDesC& aName,TDes& aNewName);
294 IMPORT_C TInt OpenNewCall(RTelServer& aServer,const TDesC& aName);
295 IMPORT_C TInt OpenNewCall(RPhone& aPhone,const TDesC& aName,TDes& aNewName);
296 IMPORT_C TInt OpenNewCall(RPhone& aPhone,const TDesC& aName);
297 IMPORT_C TInt OpenNewCall(RLine& aLine,TDes& aNewName);
298 IMPORT_C TInt OpenNewCall(RLine& aLine);
299 IMPORT_C TInt OpenExistingCall(RTelServer& aServer,const TDesC& aName);
300 IMPORT_C TInt OpenExistingCall(RPhone& aPhone,const TDesC& aName);
301 IMPORT_C TInt OpenExistingCall(RLine& aLine,const TDesC& aName);
302 IMPORT_C void Close();
307 /** Call status flags. */
310 /** The call status is not known. */
312 /** The call is idle. */
314 /** The call is dialling. */
316 /** The call is ringing (an incoming, unanswered call). */
318 /** The call is being answered. */
320 /** The call is connecting (immediate call establishment, without dialling). */
322 /** The call is connected and active. */
324 /** The call is being terminated. */
328 IMPORT_C TInt GetStatus(TStatus& aStatus) const;
333 /** Call capability flags. */
336 /** The call supports data calls. */
337 KCapsData=0x00000001,
338 /** The call supports fax calls. */
340 /** The call supports voice calls. */
341 KCapsVoice=0x00000004,
342 /** The Dial request is currently a valid action. */
343 KCapsDial=0x00000008,
344 /** The Connect request is currently a valid action. */
345 KCapsConnect=0x00000010,
346 /** The Hang Up request is currently a valid action. */
347 KCapsHangUp=0x00000020,
348 /** The Answer request is currently a valid action. */
349 KCapsAnswer=0x00000040,
350 /** The Loan Data Port request is currently a valid action. */
351 KCapsLoanDataPort=0x00000080,
352 /** The Recover Data Port request is currently a valid action. */
353 KCapsRecoverDataPort=0x00000100
357 /** Call capability information. */
359 /** Call capability flag. Contains a bitmask of values defined in the TCapsEnum
364 IMPORT_C TInt GetCaps(TCaps& aCaps) const;
365 IMPORT_C void NotifyCapsChange(TRequestStatus& aStatus, TCaps& aCaps);
366 IMPORT_C void NotifyCapsChangeCancel() const;
369 // Bearer Service Information
371 /** Bearer capability flags. */
374 /** V42bis modem compression protocol. */
375 KBearerCapsCompressionV42bis=0x00000001,
376 /** MNP5 modem compression protocol. */
377 KBearerCapsCompressionMNP5=0x00000002,
378 /** No compression supported. */
379 KBearerCapsCompressionNone=0x00000004,
380 /** LAPM error correction protocol. */
381 KBearerCapsProtocolLAPM=0x00000008,
383 KBearerCapsProtocolALT_CELLULAR=0x00000010,
384 /** MNP error correction. */
385 KBearerCapsProtocolALT=0x00000020,
386 /** No protocol information provided. */
387 KBearerCapsProtocolNone=0x00000040,
388 /** Compression protocol unknown. */
389 KBearerCapsCompressionUnknown=0x00000080,
390 /** Unable to establish protocol. */
391 KBearerCapsProtocolUnknown=0x00000100
394 /** Bearer speed flags. */
395 enum TCallBearerSpeed
397 /** Transfer rate of 57600 bps. */
399 /** Transfer rate of 33600 bps. */
401 /** Transfer rate of 31200 bps. */
403 /** Transfer rate of 9200 bps. */
405 /** Transfer rate of 4400 bps. */
407 /** Transfer rate of 12000 bps. */
409 /** Transfer rate of 9600 bps. */
411 /** Transfer rate of 7200 bps. */
413 /** Transfer rate of 4800 bps. */
415 /** Transfer rate of 2400 bps. */
417 /** Transfer rate of 200 bps. */
419 /** V.23 75 bps forward, 1200 bps back */
421 /** V.23 1200 bps forward, 75 bps back */
423 /** Transfer rate of 300 bps. */
425 /** Transfer rate is unknown. */
429 struct TBearerService
430 /** Call bearer information.
432 @see TCallBearerSpeed */
434 /** The bearer capabilities. */
436 /** The bearer's speed.
438 @see TCallBearerSpeed */
439 TCallBearerSpeed iBearerSpeed;
442 IMPORT_C TInt GetBearerServiceInfo(TBearerService& aBearerService) const;
447 /** Hook status flags. */
450 /** The line is currently off hook. */
452 /** The line is currently on hook. */
454 /** The status of the line's hook is currently unknown */
459 /** Line call capability information.
467 IMPORT_C TCallInfo();
468 /** The name of a call.
473 THookStatus iHookStatus;
476 @see RCall::TStatus */
478 TTimeIntervalSeconds iDuration;
481 IMPORT_C TInt GetInfo(TCallInfo& aCallInfo) const;
482 IMPORT_C void NotifyHookChange(TRequestStatus& aStatus,THookStatus& aHookStatus);
483 IMPORT_C void NotifyHookChangeCancel() const;
484 IMPORT_C void NotifyStatusChange(TRequestStatus& aStatus,TStatus& aCallStatus);
485 IMPORT_C void NotifyStatusChangeCancel() const;
486 IMPORT_C void NotifyCallDurationChange(TRequestStatus& aStatus,TTimeIntervalSeconds& aTime);
487 IMPORT_C void NotifyCallDurationChangeCancel() const;
492 IMPORT_C TInt GetCallDuration(TTimeIntervalSeconds& aTime) const;
494 // Connecting and Disconnecting
496 /** Passes telephone numbers into Dial functions. */
497 typedef TDesC TTelNumberC;
498 IMPORT_C TInt Dial(const TTelNumberC& aTelNumber) const;
499 IMPORT_C TInt Dial(const TDesC8& aCallParams,const TTelNumberC& aTelNumber) const;
500 IMPORT_C void Dial(TRequestStatus& aStatus,const TTelNumberC& aTelNumber);
501 IMPORT_C void Dial(TRequestStatus& aStatus,const TDesC8& aCallParams,const TTelNumberC& aTelNumber);
502 IMPORT_C void DialCancel() const;
503 IMPORT_C TInt Connect() const;
504 IMPORT_C TInt Connect(const TDesC8& aCallParams) const;
505 IMPORT_C void Connect(TRequestStatus& aStatus);
506 IMPORT_C void Connect(TRequestStatus& aStatus,const TDesC8& aCallParams);
507 IMPORT_C void ConnectCancel() const;
508 IMPORT_C TInt AnswerIncomingCall() const;
509 IMPORT_C TInt AnswerIncomingCall(const TDesC8& aCallParams) const;
510 IMPORT_C void AnswerIncomingCall(TRequestStatus& aStatus);
511 IMPORT_C void AnswerIncomingCall(TRequestStatus& aStatus,const TDesC8& aCallParams);
512 IMPORT_C void AnswerIncomingCallCancel() const;
513 IMPORT_C TInt HangUp() const;
514 IMPORT_C void HangUp(TRequestStatus& aStatus) const;
515 IMPORT_C void HangUpCancel() const;
521 /** Communications port information.
525 /** The CSY module used by the C32 Communications Server to talk to the serial
527 @deprecated This has been deprecated as all the information that is needed by the
528 lower layers is now being passed in iPort.
532 /** The port used by the C32 Communications Server to talk to the serial device.
533 It holds both the Csy name and the Port name.
539 IMPORT_C TInt LoanDataPort(TCommPort& aDataPort) const;
540 IMPORT_C void LoanDataPort(TRequestStatus& aStatus,TCommPort& aDataPort);
541 IMPORT_C void LoanDataPortCancel() const;
542 IMPORT_C TInt RecoverDataPort() const;
545 // Call Ownership manipulation
547 /** Call ownership status flags. */
548 enum TOwnershipStatus
550 /** The call is not owned. */
552 /** The call is owned, but not by this RCall instance. */
553 EOwnershipOwnedByAnotherClient, // not the priority client
554 /** The call is owned by this RCall instance. */
555 EOwnershipOwnedByThisClient,
556 /** The call is owned, but not by the priority client */
557 EOwnershipThisIsPriorityClient // not owned by this (the priority) client
560 IMPORT_C TInt TransferOwnership() const;
561 IMPORT_C void AcquireOwnership(TRequestStatus& aStatus) const;
562 IMPORT_C void AcquireOwnershipCancel() const;
563 IMPORT_C TInt GetOwnershipStatus(TOwnershipStatus& aOwnershipStatus) const;
566 // Get and Set Call Parameters
568 /** Monitor speaker control setting flags. */
569 enum TMonitorSpeakerControl
571 /** Speaker control is always off */
572 EMonitorSpeakerControlAlwaysOff,
573 /** Speaker control is on until the carrier is detected */
574 EMonitorSpeakerControlOnUntilCarrier,
575 /** Speaker control is always active. */
576 EMonitorSpeakerControlAlwaysOn,
577 /** Speaker control is on, except while dialling */
578 EMonitorSpeakerControlOnExceptDuringDialling,
579 /** Speaker control is unknown. */
580 EMonitorSpeakerControlUnknown
583 /** Monitor speaker volume control setting flags. */
584 enum TMonitorSpeakerVolume
586 /** Speaker volume is off. */
587 EMonitorSpeakerVolumeOff,
588 /** Speaker volume is low. */
589 EMonitorSpeakerVolumeLow,
590 /** Speaker volume is medium. */
591 EMonitorSpeakerVolumeMedium,
592 /** Speaker volume is high. */
593 EMonitorSpeakerVolumeHigh,
594 /** Speaker volume is unknown. */
595 EMonitorSpeakerVolumeUnknown
598 /** Wait for dial tone flags. */
599 enum TWaitForDialTone
601 /** Waiting for dial tone. */
603 /** Not waiting for dial tone. */
614 IMPORT_C TCallParams();
615 IMPORT_C TCallParams(TMonitorSpeakerControl aSpeakerControl,
616 TMonitorSpeakerVolume aSpeakerVolume,
618 TWaitForDialTone aWaitForDialTone);
619 IMPORT_C TInt ExtensionId();
620 IMPORT_C TBool IsDefault();
621 TMonitorSpeakerControl iSpeakerControl;
622 TMonitorSpeakerVolume iSpeakerVolume;
624 TWaitForDialTone iWaitForDialTone;
630 /** Call parameters package
632 The call parameters to be associated with a call may be passed into functions
636 typedef TPckg<TCallParams> TCallParamsPckg;
638 IMPORT_C TInt GetCallParams(TDes8& aParams) const;
643 /** Fax mode flags. */
646 /** Fax is transmitting */
648 /** Fax is receiving. */
652 /** Fax retrieval type flags. */
653 enum TFaxRetrieveType
655 /** Retrieving a fax opened from voice call (not currently supported by GSM networks). */
657 /** Retrieve a fax opened from fax call. */
661 /** Fax identifier size flags. */
665 KFaxIdUserNameMaxSize=20
668 struct TFaxSessionSettings
669 /** Fax session settings information.
677 /** The mode of retrieving faxes.
679 @see TFaxRetrieveType */
680 TFaxRetrieveType iFaxRetrieveType;
685 /** The fax identifier string displayed at the top of the fax.
687 @see KFaxIdUserNameMaxSize */
688 TBuf<KFaxIdUserNameMaxSize> iFaxId;
689 /** The maximum transfer speed that can be negotiated. */
691 /** The minimum transfer speed that should be negotiated. */
693 /** The preferred compression mode used for negotiation. This may take one of the
694 following values: EModifiedHuffman, EModifiedRead, EUncompressedModifiedRead,
695 EModifiedModifiedRead. */
697 /** The delay used for Fax on Demand services. Measured in seconds. */
698 TInt iFaxOnDemandDelay;
700 /** The preferred transmit resolution. This may take one of the following values:
703 @see TFaxResolution */
704 TFaxResolution iTxResolution;
705 /** Compression mode for transmitting faxes.
707 @see TFaxCompression */
708 TFaxCompression iTxCompression;
709 /** The number of pages to be transmitted. */
712 /** The preferred receive resolution. This may take one of the following values:
715 @see TFaxResolution */
716 TFaxResolution iRxResolution;
717 /** Compression mode for receiving faxes.
719 @see TFaxCompression */
720 TFaxCompression iRxCompression;
723 IMPORT_C TInt GetFaxSettings(TFaxSessionSettings& aSettings) const;
724 IMPORT_C TInt SetFaxSettings(const TFaxSessionSettings& aSettings) const;
725 IMPORT_C TInt AdoptFaxSharedHeaderFile(const RFile& aSharedFile) const;
727 // Retrieval of call objects' reference count
729 IMPORT_C TInt ReferenceCount() const;
732 IMPORT_C virtual void ConstructL();
733 IMPORT_C virtual void Destruct();
743 Provides access to the functionality associated with a specific line.
745 This class is not intended for user derivation.
750 class RLine : public RTelSubSessionBase
754 IMPORT_C TInt Open(RPhone& aPhone,const TDesC& aName);
755 IMPORT_C TInt Open(RTelServer& aServer,const TDesC& aName);
756 IMPORT_C void Close();
761 /** Line capability flags. */
764 /** The line supports data connections.*/
765 KCapsData=0x00000001,
766 /** The line supports fax connections. */
768 /** The line supports voice connections.*/
769 KCapsVoice=0x00000004,
770 /** The line supports incoming call notification requests. */
771 KCapsEventIncomingCall=0x00010000,
775 /** Line capability information. */
777 /** Line capability flag. Contains a bitmask of the values defined in the TCapsFlags
782 IMPORT_C TInt GetCaps(TCaps& aCaps) const;
783 IMPORT_C void NotifyCapsChange(TRequestStatus& aStatus, TCaps& aCaps);
784 IMPORT_C void NotifyCapsChangeCancel() const;
787 // Line and Hook Status
789 IMPORT_C TInt GetStatus(RCall::TStatus& aStatus) const;
790 IMPORT_C TInt GetHookStatus(RCall::THookStatus& aHookStatus) const;
793 // Call enumeration and Information
796 /** Line call capability information.
800 /** The name of a call.
806 @see RCall::TStatus */
807 RCall::TStatus iStatus;
808 /** The call capabilities flag.
810 @see RCall::TCapsEnum*/
811 TUint32 iCallCapsFlags;
814 IMPORT_C TInt EnumerateCall(TInt& aCount) const;
815 IMPORT_C TInt GetCallInfo(TInt aIndex,TCallInfo& aCallInfo) const;
817 // General line notification information
820 /** Line information.
828 IMPORT_C TLineInfo();
829 RCall::THookStatus iHookStatus;
830 /** The current line status.
832 @see RCall::TStatus */
833 RCall::TStatus iStatus;
834 TName iNameOfLastCallAdded;
835 TName iNameOfCallForAnswering; // if an incoming call occurs, this contains the name
836 // of the call to answer it on.
842 IMPORT_C TInt GetInfo(TLineInfo& aLineInfo) const;
843 IMPORT_C void NotifyIncomingCall(TRequestStatus& aStatus, TName& aName);
844 IMPORT_C void NotifyIncomingCallCancel() const;
845 IMPORT_C void NotifyHookChange(TRequestStatus& aStatus,RCall::THookStatus& aHookStatus);
846 IMPORT_C void NotifyHookChangeCancel() const;
847 IMPORT_C void NotifyStatusChange(TRequestStatus& aStatus,RCall::TStatus& aLineStatus);
848 IMPORT_C void NotifyStatusChangeCancel() const;
849 IMPORT_C void NotifyCallAdded(TRequestStatus& aStatus,TName& aName);
850 IMPORT_C void NotifyCallAddedCancel() const;
852 IMPORT_C virtual void ConstructL();
853 IMPORT_C virtual void Destruct();
865 Provides access to the functionality associated with a specific phone.
867 This class is not intended for user derivation.
872 class RPhone : public RTelSubSessionBase
876 IMPORT_C TInt Open(RTelServer& aSession,const TDesC& aName);
877 IMPORT_C void Close();
882 IMPORT_C TInt Initialise();
883 IMPORT_C void Initialise(TRequestStatus& aStatus);
884 IMPORT_C void InitialiseCancel();
889 /** Phone capability flags. */
892 /** The capabilities of the phone are not known. */
893 KCapsUnknown=0x00000001,
894 /** The phone supports data calls. */
895 KCapsData=0x00000002,
896 /** The phone supports the fax class 1 interface. */
897 KCapsFaxClassOne=0x0000004,
898 /** The phone supports the fax class 1.0 interface. */
899 KCapsFaxClassOnePointZero=0x0000008,
900 /** The phone supports the fax class 2 interface. */
901 KCapsFaxClassTwo=0x00000010,
902 /** The phone supports the fax class 2.0 interface. */
903 KCapsFaxClassTwoPointZero=0x00000020,
904 /** The phone supports the fax class 2.1 interface. */
905 KCapsFaxClassTwoPointOne=0x00000040,
906 /** The phone supports voice calls. */
907 KCapsVoice=0x00000080,
908 /** The phone supports modem detection events, i.e. it can notify clients when
909 the modem can be or can no longer be detected. */
910 KCapsEventModemDetection=0x00010000,
911 /** The phone supports the ability to take the communications port from whatever
912 component is currently using it. */
913 KCapsStealCommPort=0x00020000
917 /** Phone capability information. */
919 /** Phone capability flag. Contains bitmask of values defined in the TCapsFlags
924 IMPORT_C TInt GetCaps(TCaps& aCaps) const;
925 IMPORT_C void NotifyCapsChange(TRequestStatus& aStatus, TCaps& aCaps);
926 IMPORT_C void NotifyCapsChangeCancel() const;
931 /** Phone mode status flags. */
934 /** Phone (modem) status unknown. */
936 /** Phone is idle. */
938 /** Phone is establishing link. */
939 EModeEstablishingLink,
940 /** Modem is in data mode. */
942 /** Modem is in command mode and the line is active. */
946 /** Modem connection status flags. */
949 /** Modem present. */
951 /** Modem is not present. */
953 /** Modem connection status is unknown. */
958 /** Current phone status.
960 @see TModemDetection */
962 /** The current modem connection status.
964 @see TModemDetection */
965 TModemDetection iModemDetected;
966 /** The current mode of the phone.
972 IMPORT_C TInt GetStatus(TStatus& aStatus) const;
975 // Line Enumeration and Information
978 /** Line information.
980 @see RCall::TStatus */
982 /** The current line status.
984 @see RCall::TStatus */
985 RCall::TStatus iStatus;
986 /** The line capabilities flag.
988 @see RLine::TCapsFlags */
989 TUint32 iLineCapsFlags;
990 /** The name of the line.
996 IMPORT_C TInt EnumerateLines(TInt& aCount) const;
997 IMPORT_C TInt GetLineInfo(const TInt aIndex,TLineInfo& aLineInfo) const;
1000 // General phone notification information
1003 /** Phone notification information.
1005 Collects all the information associated with an instance of the core API phone
1006 class is collected together into a single, directly accessible, structure.
1007 This increases the efficiency of applications that require access to the majority
1008 of the phone's data.
1010 This class is not intended for user derivation.
1018 IMPORT_C TPhoneInfo();
1019 /** The current modem detection state (is it present or not).
1021 @see TModemDetection */
1022 TModemDetection iDetection;
1025 IMPORT_C TInt GetInfo(TPhoneInfo& aPhoneInfo) const;
1030 IMPORT_C void NotifyModemDetected(TRequestStatus& aStatus,TModemDetection& aDetection);
1031 IMPORT_C void NotifyModemDetectedCancel() const;
1034 // TEmergencyRequest is a bit-mask where each bit-flag represents
1035 // the emergency request type that the client wishes to handle
1037 enum TEmergencyRequest
1039 /** Location Based Services Emergency Request */
1040 EEmergencyLCSRequest = 0x00000001,
1041 /** Circuit Switch Voice Call Emergency Request */
1042 EEmergencyCSVoiceCallRequest = 0x00000002,
1045 IMPORT_C TInt SetEmergencyClient(const TUint32 aEmergencyRequest) const;
1048 IMPORT_C virtual void ConstructL();
1049 IMPORT_C virtual void Destruct();
1058 Root telephony server session.
1060 Provides access to general telephony information and functionality. Clients
1061 wishing to use the ETel Server must open a connection with the root server
1062 using the functions defined in this class. They may then obtain information
1063 about loaded TSY modules, and the phones that they support. To access functionality
1064 associated with a specific phone, the client must open a sub-session for that
1067 This class is not intended for user derivation.
1072 class RTelServer : public RSessionBase
1075 enum { KDefaultMessageSlots=32 };
1077 IMPORT_C RTelServer();
1078 IMPORT_C TInt Connect(TInt aMessageSlots =KDefaultMessageSlots);
1079 inline TVersion Version() const;
1082 // Enumeration and Information
1084 /** Types of telephony connection flags. */
1087 /** Wired analog network. */
1088 ENetworkTypeWiredAnalog,
1089 /** Wired digital network (not supported by ETel). */
1090 ENetworkTypeWiredDigital,
1091 /** Mobile analog network (not supported by ETel). */
1092 ENetworkTypeMobileAnalog,
1093 /** Mobile digital network. */
1094 ENetworkTypeMobileDigital,
1095 /** Unknown network type. */
1100 /** Phone notification information.
1102 Collects all the information associated with an instance of the core API phone
1103 class is collected together into a single, directly accessible, structure.
1104 This increases the efficiency of applications that require access to the majority
1105 of the phone's data.
1107 This class is not intended for user derivation.
1109 @see TNetworkType */
1111 /** The type of telephony connection supported by the phone.
1113 @see TNetworkType */
1114 TNetworkType iNetworkType;
1115 /** The name of the phone.
1119 /** The number of lines supported by the phone. */
1120 TUint iNumberOfLines;
1121 /** The extensions that the TSY module supports. */
1125 IMPORT_C TInt EnumeratePhones(TInt& aNoOfPhones) const;
1126 IMPORT_C TInt GetPhoneInfo(const TInt aIndex,TPhoneInfo& aInfo) const;
1127 IMPORT_C TInt GetTsyName(const TInt aIndexOfPhone, TDes& aTsyName) const;
1130 // Load and Unload Phone modules
1133 IMPORT_C TInt LoadPhoneModule(const TDesC& aFileName) const;
1134 IMPORT_C TInt UnloadPhoneModule(const TDesC& aFileName) const;
1137 // Check whether specified Phone module (TSY) supports certain functionality
1140 IMPORT_C TInt IsSupportedByModule(const TDesC& aTsyName, const TInt aMixin, TBool& aResult) const;
1141 IMPORT_C TInt GetTsyVersionNumber(const TDesC& aTsyName,TVersion& aVersion) const;
1143 // Set this session as Priority client
1145 /** @deprecated This function has been deprecated. Use RTelServer::SetPriorityClientV2 followed by
1146 RPhone::SetEmergencyClient(EEmergencyCSVoiceCallRequest) */
1147 IMPORT_C TInt SetPriorityClient() const;
1150 // Set this session to receive detailed errors
1153 /** Error granularity flags. */
1154 enum TErrorGranularity
1156 /** Client is only interested in core errors */
1158 /** Client is interested in extended errors */
1162 IMPORT_C TInt SetExtendedErrorGranularity(const TErrorGranularity aGranularity) const;
1165 // Debug calls - stubbed in release builds
1167 IMPORT_C TInt __DbgMarkHeap();
1168 IMPORT_C TInt __DbgCheckHeap(TInt aCount);
1169 IMPORT_C TInt __DbgMarkEnd(TInt aCount);
1170 IMPORT_C TInt __DbgFailNext(TInt aCount);
1171 IMPORT_C TInt __DbgFailNextAvailable(TBool& aResult);
1174 // Set this session as Priority client
1176 IMPORT_C TInt SetPriorityClientV2() const;