EPOC   SDK Home Glossary Indexes Previous Next Up

RTelServer class


Contents


RTelServer class — Root telephony server session

Section Contents


Overview

Compatibility

Applications that use this class will not work correctly on a version of EPOC earlier than ER5.

Derivation

RSessionBase

Abstraction for session base class

Defined in

etel.h

Link against

etel.lib

Description

The root 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.

Writing derived classes

This class is not intended for user derivation


Construction and destruction


RTelServer() — Empty default C++ constructor

RTelServer();

Description

The C++ constructor is empty, and is present only to support virtual function table export: see Implications of static DLLs.


Connection request


Connect() — Connect to the server

TInt Connect(TInt aMessageSlots = KDefaultMessageSlots);

Description

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

Arguments

TInt aMessageSlots

The number of message slots available to this session.

Return value

TInt

An error code: see System error codes.


Query functions


Version() — Get server version number

TVersion Version() const;

Description

This function returns the version number of the ETel server.

Return value

TVersion

The server version and build numbers.


EnumeratePhones() — Get number of phones supported

TInt EnumeratePhones(TInt& aIndex) const;

Description

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

Arguments

TInt& aIndex

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

Return value

TInt

An error code: see System error codes.


GetPhoneInfo() — Get information for specified phone

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

Description

This function retrieves information associated with the specified phone.

Arguments

const TInt aIndex

Index of the specified phone.

TPhoneInfo& aInfo

On return, contains the phone information.

Return value

TInt

An error code: see System error codes.


GetTsyName() — Get the name of TSY module

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

Description

This function retrieves the name of the TSY module to which the phone belongs.

Arguments

const TInt aIndexOfPhone

Index of the specified phone.

TDes& aTsyName

On return, contains the name of the TSY module.

Return value

TInt

An error code: see System error codes.


IsSupportedByModule() — Test module for extended functionality

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

Description

This function allows a client to query a TSY module about what type of extended functionality it supports. It is assumed the TSY module supports all functionality defined in this, the core, API.

Arguments

const TDesC& aTsyName

The name of the TSY module.

const TInt aMixin

A bitmask of the extended functionality constants. See Extended functionality constants.

TBool& aResult

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

Return value

TInt

An error code: see System error codes.

Note:

Modifier functions


LoadPhoneModule() — Load an ETel module

TInt LoadPhoneModule(const TDesC& aFileName) const;

Description

This function 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 — see Loading a TSY module. Secondly, users can find TSY names by searching the \System\Libs\ directory for files with the extension tsy.

Arguments

const TDesC& aFileName

The name of the module to be loaded.

Return value

TInt

An error code: see System error codes.

Notes:

UnloadPhoneModule() — Unload an ETel module

TInt UnloadPhoneModule(const TDesC& aFileName) const;

Description

This function unloads an ETel TSY module.

Arguments

const TDesC& aFileName

The name of the module to be unloaded.

Return value

TInt

An error code: see System error codes.

Notes:

SetPriorityClient() — Give Client priority

TInt SetPriorityClient() const;

Description

This function is a request to 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.

Return value

TInt

An error code: see System error codes.

Notes:

Enumerations


Anonymous enum — Default number of message slots

KDefaultMessageSlots

Default number of message slots = 32


TNetworkType enum — Types of telephony connection

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.


Struct


TPhoneInfo struct — Phone information

TNetworkType iNetworkType

The type of telephony connection supported by the phone.

TName iName

The name of the phone.

TUint iNumberOfLines

The number of lines supported by the phone.

TUint iExtensions

The extensions that the TSY module supports.

EPOC       SDK Home Glossary Indexes Previous Next Up