Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: mda\client\utility.h
Link against: mediaclient.lib

Class CMdaServer

CMdaServer

Support

Supported from 6.0

Description

Manages a connection to the media server.

The class also maintains a list of object event listeners. When events occur to server-side objects owned by media server clients, the events are passed on to this class by the server, and this class sends them to the appropriate object event listener.

A pointer to an object of this class can be passed to several NewL() functions in media server APIs, for instance CMdaAudioToneUtility. In each case, if the pointer is NULL, a connection to the media server is made on the caller's behalf.

Derivation

CActiveThe core class of the active object abstraction
CBaseBase class for all classes to be instantiated on the heap
CMdaServerManages a connection to the media server

Defined in CMdaServer:
AddListenerL(), NewL(), Registry(), RemoveListener(), ~CMdaServer()

Inherited from CActive:
Cancel(), Deque(), DoCancel(), EPriorityHigh, EPriorityIdle, EPriorityLow, EPriorityStandard, EPriorityUserInput, IsActive(), IsAdded(), Priority(), RunError(), RunL(), SetActive(), SetPriority(), TPriority, iStatus

Inherited from CBase:
operator new()


Construction and destruction


NewL()

static CMdaServer* NewL();

Description

Connects to and starts the media server.

Return value

CMdaServer*

Connected session with the media server.


~CMdaServer()

~CMdaServer();

Description

Destructor. Closes the session with the media server.

Panic codes

EMdaUtilServerListenerListNotEmpty

Not all event listeners that were added to the server have been removed.

EMdaClientBaseSessionHasOpenObjects

The client has resources still open in the server.

[Top]


Object event listeners


AddListenerL()

void AddListenerL(MMdaObjectEventListener& aListener);

Description

Adds an object event listener, so that events can be passed to it.

Parameters

MMdaObjectEventListener& aListener

The object event listener to add to the list.


RemoveListener()

void RemoveListener(MMdaObjectEventListener& aListener);

Description

Removes an object event listener so that events can no longer be passed to it. The specified listener must be in the list, or a panic occurs.

Parameters

MMdaObjectEventListener& aListener

The object event listener to remove from the list.


Registry()

const RMdaRegistry& Registry();

Description

Gets a handle to the server side registry. This function would be called in order to query the registry, for instance to get the format of a file.

Return value

RMdaRegistry&

A handle to the server side registry.