CMPXClientList Class Reference

class CMPXClientList : public CBase

Manages a list of clients.

mpxcommon.lib

Inherits from

Public Member Functions
~CMPXClientList ()
IMPORT_C void AddClientL ( TThreadId , CMPXMessageQueue *)
IMPORT_C void AddClientL ( TThreadId , TInt , CMPXMessageQueue *)
IMPORT_C void AddClientL ( TThreadId , TInt , CMPXMessageQueue *, const TInt )
IMPORT_C void AddSubscriptionL ( TInt , CMPXSubscription *)
IMPORT_C TInt ClientCategory ( TInt )
IMPORT_C TInt ClientCount ()
IMPORT_C TInt ClientMode ( TInt )
IMPORT_C TArray < TProcessId > ClientProcessList ()
CMPXMessage * ConvertMsgLC (const TMPXMessage &)
IMPORT_C TInt Find (const CMPXMessageQueue &)
IMPORT_C TInt Find ( TThreadId )
IMPORT_C TBool IsClient ( TThreadId )
IMPORT_C CMPXClientList * NewL (MMPXClientlistObserver *)
IMPORT_C void RemoveAllSubscriptionsL ( TInt )
IMPORT_C void RemoveClient ( TInt )
IMPORT_C void RemoveSubscriptionL ( TInt , const CMPXSubscription &)
IMPORT_C void SendMsg (const CMPXMessage *, TInt )
IMPORT_C void SendMsg ( TInt , const CMPXMessage *, TInt )
void SendMsgL (const TMPXMessage &)
void SendMsgL ( TInt , const TMPXMessage &)
IMPORT_C TInt SendSyncMsg (const CMPXMessage *)
IMPORT_C TInt SetPrimaryClient ( CMPXMessageQueue &)
Private Member Functions
CMPXClientList (MMPXClientlistObserver *)
TBool ClientsMatch (const CClientId &, const CClientId &)
void ConstructL ()
TBool IsMsgSubscribedL ( TInt , const CMPXMessage *)
NONSHARABLE_CLASS (CClientId)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
RArray < TProcessId > iClientProcesses
RPointerArray < CClientId > iClients
TIdentityRelation < CClientId > iIdentity
MMPXClientlistObserver * iObserver
CMPXMessageQueue * iPrimaryClient

Constructor & Destructor Documentation

CMPXClientList(MMPXClientlistObserver *)

CMPXClientList ( MMPXClientlistObserver * aObserver ) [private]

C++ constructor.

Since
S60 3.2.3

Parameters

MMPXClientlistObserver * aObserver observer of the client list

~CMPXClientList()

IMPORT_C ~CMPXClientList ( ) [virtual]

Destructor.

Since
S60 3.2.3

Member Functions Documentation

AddClientL(TThreadId, CMPXMessageQueue *)

IMPORT_C void AddClientL ( TThreadId aId,
CMPXMessageQueue * aMsgQueue
)

Add another client into the list.

Since
S60 3.2.3
leave
The function leaves with one of the system wide error codes, if the operation fails.

Parameters

TThreadId aId thread id of the client
CMPXMessageQueue * aMsgQueue message queue for the client

AddClientL(TThreadId, TInt, CMPXMessageQueue *)

IMPORT_C void AddClientL ( TThreadId aId,
TInt aMode,
CMPXMessageQueue * aMsgQueue
)

Add another client into the list.

Since
S60 3.2.3
leave
The function leaves with one of the system wide error codes, if the operation fails.

Parameters

TThreadId aId thread id of the client
TInt aMode client mode
CMPXMessageQueue * aMsgQueue message queue for the client

AddClientL(TThreadId, TInt, CMPXMessageQueue *, const TInt)

IMPORT_C void AddClientL ( TThreadId aId,
TInt aMode,
CMPXMessageQueue * aMsgQueue,
const TInt aCategory
)

Add another client into the list.

Since
S60 3.2.3
leave
The function leaves with one of the system wide error codes, if the operation fails.

Parameters

TThreadId aId thread id of the client
TInt aMode client mode
CMPXMessageQueue * aMsgQueue message queue for the client
const TInt aCategory category of the client, refer to TMPXCategory

AddSubscriptionL(TInt, CMPXSubscription *)

IMPORT_C void AddSubscriptionL ( TInt aIndex,
CMPXSubscription * aSubscription
)

Adds a subscription to a client identified by a specified position.

Since
S60 3.2.3

Parameters

TInt aIndex The position within the list where the client is.
CMPXSubscription * aSubscription subscription to add. Ownership is transferred.

ClientCategory(TInt)

IMPORT_C TInt ClientCategory ( TInt aIndex ) const

Return client category.

Since
S60 3.2.3
panic
USER 0 if aIndex out of bound

Parameters

TInt aIndex index to the client

ClientCount()

IMPORT_C TInt ClientCount ( ) const

The number of clients.

Since
S60 3.2.3

ClientMode(TInt)

IMPORT_C TInt ClientMode ( TInt aIndex ) const

Return client mode.

Since
S60 3.2.3
panic
USER 0 if aIndex out of bound

Parameters

TInt aIndex index to the client

ClientProcessList()

IMPORT_C TArray < TProcessId > ClientProcessList ( ) const

A list of process ids of all the clients in this list.

Since
S60 3.2.3

ClientsMatch(const CClientId &, const CClientId &)

TBool ClientsMatch ( const CClientId & aClient1,
const CClientId & aClient2
) [private, static]

Comparison function. If the names are set in the client objects, then that's used to test for equality. Otherwise, if the thread ids are set, that's used. Else, it's assumed that the equality test is based on process ids.

Since
S60 3.2.3

Parameters

const CClientId & aClient1 client id of the client 1
const CClientId & aClient2 client id of the client 2

ConstructL()

void ConstructL ( ) [private]

2nd phase constructor.

Since
S60 3.2.3

ConvertMsgLC(const TMPXMessage &)

CMPXMessage * ConvertMsgLC ( const TMPXMessage & aMsg ) [inline]

Convert TMPXMessage into CMPXMessage.

Since
S60 3.2.3
leave
The function leaves with one of the system wide error codes, if the operation fails.
should not be used

Parameters

const TMPXMessage & aMsg TMPXMessage message

Find(const CMPXMessageQueue &)

IMPORT_C TInt Find ( const CMPXMessageQueue & aMsgQueue ) const

Find a client denoted by message queue in this list.

Since
S60 3.2.3

Parameters

const CMPXMessageQueue & aMsgQueue Message queue for the client

Find(TThreadId)

IMPORT_C TInt Find ( TThreadId aId ) const

Find a client denoted by thread id in the list.

Since
S60 3.2.3

Parameters

TThreadId aId thread id of the client

IsClient(TThreadId)

IMPORT_C TBool IsClient ( TThreadId aId ) const

Is this (denoted by thread id) a client in this list?.

Since
S60 3.2.3

Parameters

TThreadId aId thread id of the client

IsMsgSubscribedL(TInt, const CMPXMessage *)

TBool IsMsgSubscribedL ( TInt aIndex,
const CMPXMessage * aMsg
) [private]

Check if the msg subscribed by the client.

Since
S60 3.2.3

Parameters

TInt aIndex index to the client
const CMPXMessage * aMsg message object, ownership not transferred.

NONSHARABLE_CLASS(CClientId)

NONSHARABLE_CLASS ( CClientId ) [private, inline]

Encapsulates a client: all the information associated with a client of the playback utility interface.

mpxcommon.lib

Parameters

CClientId

NewL(MMPXClientlistObserver *)

IMPORT_C CMPXClientList * NewL ( MMPXClientlistObserver * aObserver = NULL ) [static]

Two-phased constructor.

Since
S60 3.2.3

Parameters

MMPXClientlistObserver * aObserver = NULL observer of the client list

RemoveAllSubscriptionsL(TInt)

IMPORT_C void RemoveAllSubscriptionsL ( TInt aIndex )

Removes all subscriptions from a client identified by a specified position.

Since
S60 3.2.3

Parameters

TInt aIndex The position within the list where the client is.

RemoveClient(TInt)

IMPORT_C void RemoveClient ( TInt aIndex )

Remove a client at a specified position.

Since
S60 3.2.3
panic
USER 130, if aIndex is out of bound

Parameters

TInt aIndex The position within the list from where the client is to be removed

RemoveSubscriptionL(TInt, const CMPXSubscription &)

IMPORT_C void RemoveSubscriptionL ( TInt aIndex,
const CMPXSubscription & aSubscription
)

Removes a subscription from a client identified by a specified position.

Since
S60 3.2.3

Parameters

TInt aIndex The position within the list where the client is.
const CMPXSubscription & aSubscription subscription to remove.

SendMsg(const CMPXMessage *, TInt)

IMPORT_C void SendMsg ( const CMPXMessage * aMsg,
TInt aError
)

Dispatches message to all clients.

Since
S60 3.2.3

Parameters

const CMPXMessage * aMsg message, pointer to message, ownership not transferred.
TInt aError error code

SendMsg(TInt, const CMPXMessage *, TInt)

IMPORT_C void SendMsg ( TInt aIndex,
const CMPXMessage * aMsg,
TInt aError
)

Dispatches message to a client.

Since
S60 3.2.3

Parameters

TInt aIndex index to the client
const CMPXMessage * aMsg message object, ownership not transferred.
TInt aError error code

SendMsgL(const TMPXMessage &)

void SendMsgL ( const TMPXMessage & aMsg ) [inline]

Dispatches message to all clients.

Since
S60 3.2.3
leave
The function leaves with one of the system wide error codes, if the operation fails.
Use method CMPXClientList::SendMsg (const CMPXMessage* aMsg, TInt aError) instead.

Parameters

const TMPXMessage & aMsg message

SendMsgL(TInt, const TMPXMessage &)

void SendMsgL ( TInt aIndex,
const TMPXMessage & aMsg
) [inline]

Dispatches message to a client.

Since
S60 3.2.3
leave
The function leaves with one of the system wide error codes, if the operation fails.
Use method CMPXClientList::SendMsg (TInt aIndex, const CMPXMessage* aMsg, TInt aError) instead.

Parameters

TInt aIndex index to the client
const TMPXMessage & aMsg message

SendSyncMsg(const CMPXMessage *)

IMPORT_C TInt SendSyncMsg ( const CMPXMessage * aMsg )

Send a sync message to the primary client

Since
S60 9.2

Parameters

const CMPXMessage * aMsg

SetPrimaryClient(CMPXMessageQueue &)

IMPORT_C TInt SetPrimaryClient ( CMPXMessageQueue & aMsgQueue )

Sets the primary client

Since
S60 9.2

Parameters

CMPXMessageQueue & aMsgQueue

Member Data Documentation

RArray< TProcessId > iClientProcesses

RArray < TProcessId > iClientProcesses [private]

RPointerArray< CClientId > iClients

RPointerArray < CClientId > iClients [private]

TIdentityRelation< CClientId > iIdentity

TIdentityRelation < CClientId > iIdentity [private]

MMPXClientlistObserver * iObserver

MMPXClientlistObserver * iObserver [private]

CMPXMessageQueue * iPrimaryClient

CMPXMessageQueue * iPrimaryClient [private]