The Service Handler implements support for dynamically loadable service providers which offer services to consumer applications. The Service Handler maps consumers and service providers together via interests and data agreements and hides the consumers from the providers.
SERVICE is any command or functionality offered by a provider to consumer. The service includes typically menu item UI elements, but it can also just an engine type of command which executes specific functionality and reports status back to the consumer.
CONSUMER application accesses interesting services offered by service provider(s). The consumer uses only those services in which it is interested in. The interest is expressed using a set of criteria items.
INTEREST is a list of criteria items.
CRITERIA consists of set of attributes which guide the AIW Framework to use only those providers in which the consumer is interested in. The criteria consists of following attributes:
PROVIDER produces those services for a consumer that match the given criteria specified by the consumer. A provider can offer menu items and their command handling logic to the consumer applications. A provider can also offer base services that don't require any UI elements.
DATA AGREEMENT is an agreement between consumer and provider about parameters needed to be passed in a use case.
|
Public Member Functions |
virtual IMPORT_C | ~CAiwServiceHandler () |
| Destructor.
|
IMPORT_C void | Reset () |
| Resets the Service Handler, discards existing interest and unloads corresponding service providers.
|
IMPORT_C TInt | NbrOfProviders (const CAiwCriteriaItem *aCriteria) |
| Returns the amount of providers that fulfil the given criteria.
|
IMPORT_C void | AttachL (TInt aInterestResourceId) |
| Adds the given interest to the Service Handler from a resource and updates possibly existing old interest.
|
IMPORT_C void | AttachL (const RCriteriaArray &aInterest) |
| Adds given interest to the Service Handler from an array of criteria items.
|
IMPORT_C void | GetInterest (RCriteriaArray &aInterest) |
| Gets the currently valid interest in use by the Service Handler.
|
IMPORT_C void | DetachL (const RCriteriaArray &aInterest) |
| Removes given interest from the Service Handler.
|
IMPORT_C void | DetachL (TInt aInterestResourceId) |
| Removes given interest from the Service Handler.
|
IMPORT_C const CAiwCriteriaItem * | GetCriteria (TInt aId) |
| Returns criteria by ID.
|
IMPORT_C CAiwGenericParamList & | InParamListL () |
| Returns an empty instance of CAiwGenericParamList class.
|
IMPORT_C CAiwGenericParamList & | OutParamListL () |
| Returns an empty instance of CAiwGenericParamList class.
|
IMPORT_C void | InitializeMenuPaneL (CEikMenuPane &aMenuPane, TInt aMenuResourceId, TInt aBaseMenuCmdId, const CAiwGenericParamList &aInParamList) |
| Initialises menu pane with service commands from a provider.
|
IMPORT_C void | InitializeMenuPaneL (CEikMenuPane &aMenuPane, TInt aMenuResourceId, TInt aBaseMenuCmdId, const CAiwGenericParamList &aInParamList, TBool aUseSubmenuTextsIfAvailable) |
| Initialises menu pane with service commands from a provider.
|
IMPORT_C TInt | ServiceCmdByMenuCmd (TInt aMenuCmdId) const |
| Returns the service command ID associated to the menu command.
|
IMPORT_C void | ExecuteMenuCmdL (TInt aMenuCmdId, const CAiwGenericParamList &aInParamList, CAiwGenericParamList &aOutParamList, TUint aCmdOptions=0, MAiwNotifyCallback *aCallback=NULL) |
| Tells the provider to execute a menu command invoked by the consumer.
|
IMPORT_C void | AttachMenuL (TInt aMenuResourceId, TInt aInterestResourceId) |
| Attach menu related criteria items to the given menu.
|
IMPORT_C void | AttachMenuL (TInt aMenuResourceId, TResourceReader &aReader) |
| Attach menu related criteria items to the given menu.
|
IMPORT_C void | AttachMenuL (TInt aMenuResourceId, const RCriteriaArray &aInterest) |
| Attach menu related criteria items to the given menu.
|
IMPORT_C void | DetachMenu (TInt aMenuResourceId, TInt aInterestResourceId) |
| Detach menu related criteria items from the given menu.
|
IMPORT_C TBool | IsSubMenuEmpty (TInt aSubMenuId) |
| Checks if there are menu providers attached to given menu id.
|
IMPORT_C TBool | IsAiwMenu (TInt aMenuResourceId) |
| Returns boolean value indicating whether the given menu contains currently attached placeholders.
|
IMPORT_C TBool | HandleSubmenuL (CEikMenuPane &aPane) |
| Handles AIW submenus.
|
IMPORT_C void | ExecuteServiceCmdL (const TInt &aCmdId, const CAiwGenericParamList &aInParamList, CAiwGenericParamList &aOutParamList, TUint aCmdOptions=0, MAiwNotifyCallback *aCallback=0) |
| Executes a service command for all providers.
|
Static Public Member Functions |
static IMPORT_C CAiwServiceHandler * | NewL () |
| Constructs a Service Handler instance.
|
static IMPORT_C CAiwServiceHandler * | NewLC () |
| Constructs a Service Handler instance.
|
static IMPORT_C void | ReportMenuLaunch () |
| CEikMenuPane uses this method to inform AIF framework that a menu is launched.
|