class RMediatorServer : public RSessionBase |
Client API for Mediator Server.
The Mediator Server is used to pass information between clients. The services of Mediator Server include passing events and passing commands with respective responses. For events there can be multiple event providers and consumers. For commands there can be only one initiator and one responder.
The operations of Mediator server have the following hierarchy. Domain -> Category -> Event/Command -> Data
The domain means the application domain, the purpose, for which the services of Mediator Server are used.
The category means the functionality area within the domain to which an event or a command belongs to.
An event or a command is a message passed to Mediator server. Each message may have data assosiated with it. For each command exactly one response shall be sent.
Before any messages can be sent to Mediator Server, the messages need to be registered. When registering messages, the capabilities required to consume that message are defined. In case of commands timeout values for responses are also defined.
Private Member Functions | |
---|---|
TInt | StartServer() |
TVersion | Version() |
Inherited Enumerations | |
---|---|
RHandleBase:TAttributes | |
RSessionBase:TAttachMode |
Inherited Attributes | |
---|---|
RHandleBase::iHandle |
TInt | CancelCommand | ( | TUid | aDomain, |
TUid | aCategory, | |||
TInt | aCommandId | |||
) |
Cancel a command.
TInt | Connect | ( | ) |
Creates a connection to server. If server is not started, method will start the server first and then create a new session.
TInt | FetchNotificationCommandList | ( | TPtr8 & | aCommandArrayPtr | ) |
Fetch command list, if list size was larger than default boundary.
TPtr8 & aCommandArrayPtr | pointer to data buffer where Mediator writes data |
TInt | FetchNotificationEventList | ( | TPtr8 & | aEventArrayPtr | ) |
Fetch event list, if list size was larger than default boundary.
TPtr8 & aEventArrayPtr | pointer to data buffer where Mediator writes data |
TInt | FetchParameterData | ( | TPtr8 & | aParameterData | ) |
Fetch parameter data, if data size was larger than default boundary.
TPtr8 & aParameterData | pointer to data buffer where Mediator writes data |
TInt | GetCategories | ( | TUid | aDomain, |
RCategoryList & | aCategories | |||
) |
Get registered categories for the domain
TUid aDomain | UID for the domain. |
RCategoryList & aCategories | List of registered categories within the domain. |
TInt | GetCommands | ( | TUid | aDomain, |
TUid | aCategory, | |||
RCommandList & | aCommands | |||
) |
Get a list of registered commands.
TUid aDomain | The identifier of the domain. |
TUid aCategory | The identifier of the category. |
RCommandList & aCommands | The list of registered commands for the category. |
TInt | GetDomains | ( | RDomainList & | aDomains | ) |
Get registered domains
RDomainList & aDomains | The list of registered domains. |
TInt | GetEvents | ( | TUid | aDomain, |
TUid | aCategory, | |||
REventList & | aEvents | |||
) |
Get a list of registered events.
TUid aDomain | The identifier of the domain. |
TUid aCategory | The identifier of the category. |
REventList & aEvents | The list of registered events for the category. |
TInt | IssueCommand | ( | TUid | aDomain, |
TUid | aCategory, | |||
TInt | aCommandId, | |||
TVersion | aVersion, | |||
const TDesC8 & | aData | |||
) |
Issue a command.
TInt | IssueResponse | ( | TUid | aDomain, |
TUid | aCategory, | |||
TInt | aCommandId, | |||
TInt | aStatus, | |||
const TDesC8 & | aData | |||
) |
Issue a response to a command.
TInt | RaiseEvent | ( | TUid | aDomain, |
TUid | aCategory, | |||
TInt | aEventId, | |||
TVersion | aVersion, | |||
const TDesC8 & | aData | |||
) |
Raise an event.
void | ReceiveCommands | ( | TRequestStatus & | aStatus, |
TMediatorCategoryRetBuffer & | aCategoryBuffer, | |||
TCommandRetBuffer & | aCommandBuffer, | |||
TPtr8 & | aCommandData | |||
) |
Get command requests.
TRequestStatus & aStatus | |
TMediatorCategoryRetBuffer & aCategoryBuffer | Category buffer. |
TCommandRetBuffer & aCommandBuffer | Command buffer |
TPtr8 & aCommandData | Pointer descriptor to buffer where command data is written. |
void | ReceiveEvents | ( | TRequestStatus & | aStatus, |
TMediatorCategoryRetBuffer & | aCategoryBuffer, | |||
TEventRetBuffer & | aEventBuffer, | |||
TPtr8 & | aEventData | |||
) |
Start to receive events from Mediator Server
TRequestStatus & aStatus | TRequestStatus of the AO to be completed when event occurs. |
TMediatorCategoryRetBuffer & aCategoryBuffer | Category buffer. |
TEventRetBuffer & aEventBuffer | |
TPtr8 & aEventData | Pointer descriptor to buffer where event data is written. |
void | ReceiveNotifications | ( | TRequestStatus & | aStatus, |
TMediatorCategoryRetBuffer & | aCategoryBuffer, | |||
TNotificationTypeRetBuffer & | aTypeBuffer, | |||
TPtr8 & | aEventArrayPtr, | |||
TPtr8 & | aCommandArrayPtr | |||
) |
Get a list of registered commands.
TRequestStatus & aStatus | TRequestStatus of the operation to be completed when notification is received. |
TMediatorCategoryRetBuffer & aCategoryBuffer | Category buffer. |
TNotificationTypeRetBuffer & aTypeBuffer | Type buffer |
TPtr8 & aEventArrayPtr | Pointer descriptor to buffer where event data is written. |
TPtr8 & aCommandArrayPtr | Pointer descriptor to buffer where command data is written. |
TInt | RegisterCommandList | ( | TUid | aDomain, |
TUid | aCategory, | |||
const RCommandList & | aCommands | |||
) |
Register a command list. After registering the list clients can initiate and respond the commands.
TUid aDomain | The identifier of the domain. |
TUid aCategory | The identifier of the category. |
const RCommandList & aCommands | List of commands to be registered |
TInt | RegisterEventList | ( | TUid | aDomain, |
TUid | aCategory, | |||
const REventList & | aEvents | |||
) |
Registers an event list. After registering the list clients can provide and consume the events.
TUid aDomain | The identifier of the domain. |
TUid aCategory | The identifier of the category. |
const REventList & aEvents | List of events to be registered |
TInt | SubscribeEventList | ( | TUid | aDomain, |
TUid | aCategory, | |||
const REventList & | aEvents | |||
) |
Subscribes a list of events. Raised events will be delivered via the observer interface.
TUid aDomain | The identifier of the domain. |
TUid aCategory | The identifier of the category. |
const REventList & aEvents | List of the events to be subscribed. |
TInt | UnregisterCommandList | ( | TUid | aDomain, |
TUid | aCategory, | |||
const RCommandList & | aCommands | |||
) |
Unregister a command list. After unregistering no clients can initiate or respond to these events.
TUid aDomain | The identifier of the domain. |
TUid aCategory | The identifier of the category. |
const RCommandList & aCommands | List of commands to be unregistered. |
TInt | UnregisterEventList | ( | TUid | aDomain, |
TUid | aCategory, | |||
const REventList & | aEvents | |||
) |
Unregister an event list. After unregistering no clients can consume or provide these events.
TUid aDomain | The identifier of the domain. |
TUid aCategory | The identifier of the category. |
const REventList & aEvents | List of events to be unregistered. |
TInt | UnsubscribeEvent | ( | TUid | aDomain, |
TUid | aCategory, | |||
TInt | aEventId | |||
) |
Unsubscribe an event.
TInt | UnsubscribeEventList | ( | TUid | aDomain, |
TUid | aCategory, | |||
const REventList & | aEvents | |||
) |
Unsubscribe an event list.
TUid aDomain | The identifier of the domain. |
TUid aCategory | The identifier of the category. |
const REventList & aEvents | The list of events. |
void | WaitForCommandResponse | ( | TRequestStatus & | aStatus, |
TMediatorCategoryRetBuffer & | aCategoryBuffer, | |||
TCommandRetBuffer & | aCommandBuffer, | |||
TPtr8 & | aCommandData, | |||
TPckg< TInt > & | aStatusBuffer | |||
) |
Wait for command response.
TRequestStatus & aStatus | TRequestStatus of the AO to be completed when command response is received. |
TMediatorCategoryRetBuffer & aCategoryBuffer | Category buffer. |
TCommandRetBuffer & aCommandBuffer | Command buffer |
TPtr8 & aCommandData | Pointer descriptor to buffer where command data is written. |
TPckg< TInt > & aStatusBuffer | Status buffer. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.