CMPXClientList Class Reference

class CMPXClientList : public CBase

Manages a list of clients.

mpxcommon.lib

Inherits from

Public Member Functions
~CMPXClientList()
IMPORT_C voidAddClientL(TThreadId, CMPXMessageQueue *)
IMPORT_C voidAddClientL(TThreadId, TInt, CMPXMessageQueue *)
IMPORT_C voidAddClientL(TThreadId, TInt, CMPXMessageQueue *, const TInt)
IMPORT_C voidAddSubscriptionL(TInt, CMPXSubscription *)
IMPORT_C TIntClientCategory(TInt)
IMPORT_C TIntClientCount()
IMPORT_C TIntClientMode(TInt)
IMPORT_C TArray< TProcessId >ClientProcessList()
CMPXMessage *ConvertMsgLC(const TMPXMessage &)
IMPORT_C TIntFind(const CMPXMessageQueue &)
IMPORT_C TIntFind(TThreadId)
IMPORT_C TBoolIsClient(TThreadId)
IMPORT_C CMPXClientList *NewL(MMPXClientlistObserver *)
IMPORT_C voidRemoveAllSubscriptionsL(TInt)
IMPORT_C voidRemoveClient(TInt)
IMPORT_C voidRemoveSubscriptionL(TInt, const CMPXSubscription &)
IMPORT_C voidSendMsg(const CMPXMessage *, TInt)
IMPORT_C voidSendMsg(TInt, const CMPXMessage *, TInt)
voidSendMsgL(const TMPXMessage &)
voidSendMsgL(TInt, const TMPXMessage &)
IMPORT_C TIntSendSyncMsg(const CMPXMessage *)
IMPORT_C TIntSetPrimaryClient(CMPXMessageQueue &)
Private Member Functions
CMPXClientList(MMPXClientlistObserver *)
TBool ClientsMatch(const CClientId &, const CClientId &)
voidConstructL()
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 * aObserverobserver of the client list

~CMPXClientList()

IMPORT_C~CMPXClientList()[virtual]

Destructor.

Since
S60 3.2.3

Member Functions Documentation

AddClientL(TThreadId, CMPXMessageQueue *)

IMPORT_C voidAddClientL(TThreadIdaId,
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 aIdthread id of the client
CMPXMessageQueue * aMsgQueuemessage queue for the client

AddClientL(TThreadId, TInt, CMPXMessageQueue *)

IMPORT_C voidAddClientL(TThreadIdaId,
TIntaMode,
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 aIdthread id of the client
TInt aModeclient mode
CMPXMessageQueue * aMsgQueuemessage queue for the client

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

IMPORT_C voidAddClientL(TThreadIdaId,
TIntaMode,
CMPXMessageQueue *aMsgQueue,
const TIntaCategory
)

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 aIdthread id of the client
TInt aModeclient mode
CMPXMessageQueue * aMsgQueuemessage queue for the client
const TInt aCategorycategory of the client, refer to TMPXCategory

AddSubscriptionL(TInt, CMPXSubscription *)

IMPORT_C voidAddSubscriptionL(TIntaIndex,
CMPXSubscription *aSubscription
)

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

Since
S60 3.2.3

Parameters

TInt aIndexThe position within the list where the client is.
CMPXSubscription * aSubscriptionsubscription to add. Ownership is transferred.

ClientCategory(TInt)

IMPORT_C TIntClientCategory(TIntaIndex)const

Return client category.

Since
S60 3.2.3
panic
USER 0 if aIndex out of bound

Parameters

TInt aIndexindex to the client

ClientCount()

IMPORT_C TIntClientCount()const

The number of clients.

Since
S60 3.2.3

ClientMode(TInt)

IMPORT_C TIntClientMode(TIntaIndex)const

Return client mode.

Since
S60 3.2.3
panic
USER 0 if aIndex out of bound

Parameters

TInt aIndexindex 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 & aClient1client id of the client 1
const CClientId & aClient2client id of the client 2

ConstructL()

voidConstructL()[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 & aMsgTMPXMessage message

Find(const CMPXMessageQueue &)

IMPORT_C TIntFind(const CMPXMessageQueue &aMsgQueue)const

Find a client denoted by message queue in this list.

Since
S60 3.2.3

Parameters

const CMPXMessageQueue & aMsgQueueMessage queue for the client

Find(TThreadId)

IMPORT_C TIntFind(TThreadIdaId)const

Find a client denoted by thread id in the list.

Since
S60 3.2.3

Parameters

TThreadId aIdthread id of the client

IsClient(TThreadId)

IMPORT_C TBoolIsClient(TThreadIdaId)const

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

Since
S60 3.2.3

Parameters

TThreadId aIdthread id of the client

IsMsgSubscribedL(TInt, const CMPXMessage *)

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

Check if the msg subscribed by the client.

Since
S60 3.2.3

Parameters

TInt aIndexindex to the client
const CMPXMessage * aMsgmessage 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 = NULLobserver of the client list

RemoveAllSubscriptionsL(TInt)

IMPORT_C voidRemoveAllSubscriptionsL(TIntaIndex)

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

Since
S60 3.2.3

Parameters

TInt aIndexThe position within the list where the client is.

RemoveClient(TInt)

IMPORT_C voidRemoveClient(TIntaIndex)

Remove a client at a specified position.

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

Parameters

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

RemoveSubscriptionL(TInt, const CMPXSubscription &)

IMPORT_C voidRemoveSubscriptionL(TIntaIndex,
const CMPXSubscription &aSubscription
)

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

Since
S60 3.2.3

Parameters

TInt aIndexThe position within the list where the client is.
const CMPXSubscription & aSubscriptionsubscription to remove.

SendMsg(const CMPXMessage *, TInt)

IMPORT_C voidSendMsg(const CMPXMessage *aMsg,
TIntaError
)

Dispatches message to all clients.

Since
S60 3.2.3

Parameters

const CMPXMessage * aMsgmessage, pointer to message, ownership not transferred.
TInt aErrorerror code

SendMsg(TInt, const CMPXMessage *, TInt)

IMPORT_C voidSendMsg(TIntaIndex,
const CMPXMessage *aMsg,
TIntaError
)

Dispatches message to a client.

Since
S60 3.2.3

Parameters

TInt aIndexindex to the client
const CMPXMessage * aMsgmessage object, ownership not transferred.
TInt aErrorerror code

SendMsgL(const TMPXMessage &)

voidSendMsgL(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 & aMsgmessage

SendMsgL(TInt, const TMPXMessage &)

voidSendMsgL(TIntaIndex,
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 aIndexindex to the client
const TMPXMessage & aMsgmessage

SendSyncMsg(const CMPXMessage *)

IMPORT_C TIntSendSyncMsg(const CMPXMessage *aMsg)

Send a sync message to the primary client

Since
S60 9.2

Parameters

const CMPXMessage * aMsg

SetPrimaryClient(CMPXMessageQueue &)

IMPORT_C TIntSetPrimaryClient(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]