Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: etel.h
Link against: etel.lib

Class RTelServer

RTelServer

Support

Supported from 5.0

Description

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

Derivation

RHandleBaseHandle to an object
RSessionBaseClient-side handle to a session with a server
RTelServerRoot telephony server session

Defined in RTelServer:
Anonymous, Connect(), EErrorBasic, EErrorExtended, ENetworkTypeMobileAnalog, ENetworkTypeMobileDigital, ENetworkTypeUnknown, ENetworkTypeWiredAnalog, ENetworkTypeWiredDigital, EnumeratePhones(), GetPhoneInfo(), GetTsyName(), GetTsyVersionNumber(), IsSupportedByModule(), KDefaultMessageSlots, LoadPhoneModule(), RTelServer(), SetExtendedErrorGranularity(), SetPriorityClient(), TErrorGranularity, TNetworkType, TPhoneInfo, UnloadPhoneModule(), Version()

Inherited from RHandleBase:
Close(), Duplicate(), Handle(), SetHandle()

Inherited from RSessionBase:
Attach(), CreateSession(), EAutoAttach, EExplicitAttach, Send(), SendReceive(), SetRetry(), Share(), TAttachMode


Construction and destruction


RTelServer()

RTelServer();

Description

Empty default C++ constructor.

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

[Top]


Connection request


Connect()

TInt Connect(TInt aMessageSlots = KDefaultMessageSlots);

Description

Connects the client to the ETel Server. It must be used before any of other functions during a telephony session.

Parameters

TInt aMessageSlots

The number of message slots available to this session.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.

[Top]


Query functions


Version()

TVersion Version() const;

Description

Gets the version number of the ETel server.

Return value

TVersion

The server version and build numbers.


EnumeratePhones()

TInt EnumeratePhones(TInt& aIndex) const;

Description

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

Note:

Parameters

TInt& aIndex

On return, contains the total number of phones belonging to the currently loaded modules.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


GetPhoneInfo()

TInt GetPhoneInfo(const TInt aIndex,TPhoneInfo& aInfo) const;

Description

Gets information associated with the specified phone.

Parameters

const TInt aIndex

Index of the specified phone.

TPhoneInfo& aInfo

On return, contains the phone information.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


GetTsyName()

TInt GetTsyName(const TInt aIndexOfPhone, TDes& aTsyName) const;

Description

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

Parameters

const TInt aIndexOfPhone

Index of the specified phone.

TDes& aTsyName

On return, contains the name of the TSY module.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


GetTsyVersionNumber()

TInt GetTsyVersionNumber(const TDesC& aTsyName,TVersion& aVersion) const;

Support

Supported from 5.1

Description

Gets the version number of the specified TSY module.

Parameters

const TDesC& aTsyName

TSY module for which to get version number

TVersion& aVersion

On return, the version number

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


IsSupportedByModule()

TInt IsSupportedByModule(const TDesC& aTsyName, const TInt aMixin, TBool& aResult) const;

Description

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.

Parameters

const TDesC& aTsyName

The name of the TSY module.

const TInt aMixin

A bitmask of the extended functionality constants.

TBool& aResult

On return, contains the result of the query: TRUE (functionality available) or FALSE (functionality unavailable).

Return value

TInt

KErrNone if successful, KErrNotFound if the specified TSY module is not available, otherwise another of the system-wide error codes.

[Top]


Modifier functions


LoadPhoneModule()

TInt LoadPhoneModule(const TDesC& aFileName) const;

Description

Loads an ETel TSY module. The name of the TSY to be loaded can be obtained in two ways. Firstly it can be obtained by querying the CommDb for the current TSY. Secondly, users can find TSY names by searching the \System\Libs\ directory for files with the extension tsy.

Notes:

Parameters

const TDesC& aFileName

The name of the module to be loaded.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.

See also:


UnloadPhoneModule()

TInt UnloadPhoneModule(const TDesC& aFileName) const;

Description

Unloads an ETel TSY module.

Notes:

Parameters

const TDesC& aFileName

The name of the module to be unloaded.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


SetExtendedErrorGranularity()

TInt SetExtendedErrorGranularity(const TErrorGranularity aGranularity) const;

Support

Supported from 5.1

Description

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

The options for error granularity are:

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.

Parameters

const TErrorGranularity aGranularity

Error granularity to set

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


SetPriorityClient()

TInt SetPriorityClient() const;

Description

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.

Notes:

Return value

TInt

KErrNone if successful, KErrNoMemory if a leave occurs during the pre-allocation of memory, otherwise another of the system-wide error codes.

[Top]


Enumerations


Enum Anonymous

Anonymous

Description

Default number of message slots.

KDefaultMessageSlots

Default number of message slots = 32


Enum TErrorGranularity

TErrorGranularity

Description

Error granularity flags.

EErrorBasic

Client is only interested in core errors

EErrorExtended

Client is interested in extended errors


Enum TNetworkType

TNetworkType

Description

Types of telephony connection flags.

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.

[Top]


Struct


Struct TPhoneInfo

TPhoneInfo

Description

Phone information.

Defined in RTelServer::TPhoneInfo:
iExtensions, iName, iNetworkType, iNumberOfLines

iNetworkType


TNetworkType iNetworkType

Description

The type of telephony connection supported by the phone.

iName


TName iName

Description

The name of the phone.

iNumberOfLines


TUint iNumberOfLines

Description

The number of lines supported by the phone.

iExtensions


TUint iExtensions

Description

The extensions that the TSY module supports.