RTelServer Class Reference

class RTelServer : public RSessionBase

Root telephony server session.

Provides access to general telephony information and functionality. Clients wishing to use the ETel Server must open a connection with the root server using the functions defined in this class. They may then obtain information about loaded TSY modules, and the phones that they support. To access functionality associated with a specific phone, the client must open a sub-session for that phone.

This class is not intended for user derivation.

Inherits from

Nested Classes and Structures

Public Member Functions
RTelServer()
IMPORT_C TIntEnumeratePhones(TInt &)
IMPORT_C TIntGetPhoneInfo(const TInt, TPhoneInfo &)
IMPORT_C TIntGetTsyName(const TInt, TDes &)
IMPORT_C TIntGetTsyVersionNumber(const TDesC &, TVersion &)
IMPORT_C TIntIsSupportedByModule(const TDesC &, const TInt, TBool &)
IMPORT_C TIntLoadPhoneModule(const TDesC &)
IMPORT_C TIntSetExtendedErrorGranularity(const TErrorGranularity)
IMPORT_C TIntSetPriorityClient()
IMPORT_C TIntSetPriorityClientV2()
IMPORT_C TIntUnloadPhoneModule(const TDesC &)
TVersion Version()
IMPORT_C TInt__DbgFailNextAvailable(TBool &)
IMPORT_C TInt__DbgMarkEnd(TInt)
IMPORT_C TInt__DbgMarkHeap()
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::Close()
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Public Member Enumerations
enumanonymous { KDefaultMessageSlots = 32 }
enumTErrorGranularity { EErrorBasic, EErrorExtended }
enumTNetworkType { ENetworkTypeWiredAnalog, ENetworkTypeWiredDigital, ENetworkTypeMobileAnalog, ENetworkTypeMobileDigital, ENetworkTypeUnknown }
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RTelServer()

IMPORT_CRTelServer()

Empty default C++ constructor.

Constructs and empty RTelServer object, and is present only to support virtual function table export.

Member Functions Documentation

EnumeratePhones(TInt &)

IMPORT_C TIntEnumeratePhones(TInt &aNoOfPhones)const

Get the total number of phones supported by all the ETel (TSY) modules currently loaded.

RTelServer::GetPhoneInfo()
capability
None

Parameters

TInt & aNoOfPhonesOn return, contains the number of phones available.

GetPhoneInfo(const TInt, TPhoneInfo &)

IMPORT_C TIntGetPhoneInfo(const TIntaIndex,
TPhoneInfo &aInfo
)const

Gets information associated with the specified phone.

capability
None

Parameters

const TInt aIndexIndex of the specified phone.
TPhoneInfo & aInfoOn return, contains the phone information.

GetTsyName(const TInt, TDes &)

IMPORT_C TIntGetTsyName(const TIntaIndexOfPhone,
TDes &aTsyName
)const

Gets the name of the TSY module to which the phone belongs.

capability
None

Parameters

const TInt aIndexOfPhoneIndex of the specified phone.
TDes & aTsyNameOn return, contains the name of the TSY module.

GetTsyVersionNumber(const TDesC &, TVersion &)

IMPORT_C TIntGetTsyVersionNumber(const TDesC &aTsyName,
TVersion &aVersion
)const

Parameters

const TDesC & aTsyName
TVersion & aVersion

IsSupportedByModule(const TDesC &, const TInt, TBool &)

IMPORT_C TIntIsSupportedByModule(const TDesC &aTsyName,
const TIntaMixin,
TBool &aResult
)const

Tests what types of extended functionality a TSY module supports. It is assumed the TSY module supports all functionality defined in this, the core, API.

TMultimodeETelV1Api TMultimodeETelV2Api TMultimodeETelV3Api TMultimodeETelV4Api TMultimodeEtelV5Api TMultimodeEtelV6Api TMultimodeETel3rdPartyV1Api
capability
None

Parameters

const TDesC & aTsyNameThe name of the TSY module.
const TInt aMixinA value defined in an enumeration defined in a public header file (etelmm.h) available both to the client and the TSY which represents a limited subset of functionality.
TBool & aResultOn return, contains the result of the query: TRUE (functionality available) or FALSE (functionality unavailable).

LoadPhoneModule(const TDesC &)

IMPORT_C TIntLoadPhoneModule(const TDesC &aFileName)const

Loads an ETel TSY module. The TSY name should either be know beforehand and be hard coded or the name of the TSY to be loaded can be obtained by querying the CommDb for the current TSY.

The file name need not include the TSY extension, as this is added by the server.

Once loaded, information about the phone(s) added by the module can be accessed using the EnumeratePhones() and GetPhoneInfo() functions.

capability
None

Parameters

const TDesC & aFileNameThe name of the module to be loaded.

SetExtendedErrorGranularity(const TErrorGranularity)

IMPORT_C TIntSetExtendedErrorGranularity(const TErrorGranularityaGranularity)const

Requests the server to register the specified error granularity against the client which calls it.

The options for error granularity are:

core error granularity, the default, means that a client will only receive errors using ETel and System error codes

extended error granularity allows a client to receive richer error information, using additional proprietary client/TSY error codes

After registering interest in extended errors, the client will receive an extended error code whenever a requests ends in an error that is translated by the TSY into one of the proprietary extended error codes. If an error occurs that the TSY cannot translate into an extended error, then the TSY will return one of the core errors instead. For this reason, the core error space and the extended error space must not clash.

capability
None

Parameters

const TErrorGranularity aGranularityError granularity to set

SetPriorityClient()

IMPORT_C TIntSetPriorityClient()const

This function has been deprecated. Use RTelServer::SetPriorityClientV2 followed by RPhone::SetEmergencyClient(EEmergencyCSVoiceCallRequest)

Requests the server to allocate priority status to the client that calls it.

To prevent an out of memory error, the server uses pre-allocated memory to service the requests of priority clients.

Only one client may have priority status in the system, and the first client to ask for it receives it. If another application has been given priority client status, the function returns KErrAlreadyExists.

If the API is called after the call to RPhone::SetEmergencyClient from the same session then the function returns KErrAlreadyExists.

Priority status should be requested early in an application's execution.

The server pre-allocates only a small amount of memory. If there is more than one active priority request it may run out. This was not an issue in v5 as there was only one priority request - the emergency call.

The API can be called only by the default phone application.

In case of hardware the API can be called by providing the SID of the default phone application in ETel.iby file found at A patchable constant KPriorityClientSid is used for defining the SID value.

For example: patchdata etel.dll 0x12345678

In case of emulator the API can be called by providing the SID of the default phone application in epoc.ini file found at

In epoc.ini file find the following line etel_KPriorityClientSid <SID>

For example: etel_KPriorityClientSid 0x12345678

capability
NetworkControl
capability
SID
Use RTelServer::SetPriorityClientV2 followed by RPhone::SetEmergencyClient(EEmergencyCSVoiceCallRequest)

SetPriorityClientV2()

IMPORT_C TIntSetPriorityClientV2()const

Requests the server to allocate priority status to the client that calls it.

Only one client may have priority status in the system, and the first client to ask for it receives it. If another application has been given priority client status, the function returns KErrAlreadyExists.

Priority status should be requested early in an application's execution.

The API can be called only by the default phone application.

In case of hardware the API can be called by providing the SID of the default phone application in ETel.iby file found at A patchable constant KPriorityClientSid is used for defining the SID value.

In ETel.iby file find the following line patchdata etel.dll <SID>

For example: patchdata etel.dll 0x12345678

In case of emulator the API can be called by providing the SID of the default phone application in epoc.ini file found at

In epoc.ini file find the following line etel_KPriorityClientSid <SID>

For example: etel_KPriorityClientSid 0x12345678

capability
NetworkControl
capability
SID

UnloadPhoneModule(const TDesC &)

IMPORT_C TIntUnloadPhoneModule(const TDesC &aFileName)const

Unloads an ETel TSY module.

The file name need not include the TSY extension, as this is added by the server.

TSY modules are automatically unloaded when the RTelServer session is closed, unless in use by another session.

capability
None

Parameters

const TDesC & aFileNameThe name of the module to be unloaded.

Version()

TVersion Version()const [inline]

Gets the version number of the ETel server.

__DbgFailNextAvailable(TBool &)

IMPORT_C TInt__DbgFailNextAvailable(TBool &aResult)

Check that the simulated heap allocation failure event is still available in the ETel Server thread. This is performed using a peek into the heap allocation data.

Note:

This API is only available on debug releases.

capability
None

Parameters

TBool & aResultReturn parameter indicating if the failure event is enabled. (e.g. the previous call to __DbgFailNext() is still active and has not completed yet).

__DbgMarkEnd(TInt)

IMPORT_C TInt__DbgMarkEnd(TIntaCount)

Perfom a heap mark end check using the standard Symbian OS __UHEAP_MARKENDC macro in the ETel Server thread.

Note:

This API is only available on debug releases.

__UHEAP_MARKENDC
capability
None

Parameters

TInt aCountThe number of heap cells expected to remain allocated at the current nest level.

__DbgMarkHeap()

IMPORT_C TInt__DbgMarkHeap()

Set a heap mark using the standard Symbian OS __UHEAP_MARK macro in the ETel Server thread.

Note:

This API is only available on debug releases.

__UHEAP_MARK
capability
None

Member Enumerations Documentation

Enum anonymous

Enumerators

KDefaultMessageSlots = 32

Enum TErrorGranularity

Error granularity flags.

Enumerators

EErrorBasic

Client is only interested in core errors

EErrorExtended

Client is interested in extended errors

Enum TNetworkType

Types of telephony connection flags.

Enumerators

ENetworkTypeWiredAnalog

Wired analog network.

ENetworkTypeWiredDigital

Wired digital network (not supported by ETel).

ENetworkTypeMobileAnalog

Mobile analog network (not supported by ETel).

ENetworkTypeMobileDigital

Mobile digital network.

ENetworkTypeUnknown

Unknown network type.