MhspsClientRequestService Class Reference

class MhspsClientRequestService

Part of HSPS Plugin Configuration Management Service APIs. MhspsClientRequestService . HSPS Client Request Service API-definition. HSPS Client Request Service is intended to serve Rendering Engines with Application Themes and their associated resources. Implementation of this interface will provide access to HSPS Plugin Configuration database maintained by HSPS Definition Repository aka Plugin Registry. Definition Repository maintains plugin configurations in ChspsODT-objects. Themes can have resources like bitmaps etc. Resources can be accessed through this API also. Every individual resource has corresponding ChspsResource-object. Resource-objects are delivered to the client side in a resource list which is associated to its theme. Resource list exist only if there is any resources belonging to a theme. There can be only one theme activated for a specific application at one time. The information of activation of themes is stored in Symbian Central Repository -object. The Central Repository is requested on every theme request that Rendering Engine commences.

To initaite theme usage, Rendering Engine must call hspsGetODT() . There is no high-level or low-level parametrization used, however, API supports two parametrization mode; retrieving a theme with or without resources. The cases of retrieving a theme without resources are currently rare, but with partial theme update cases to be implemented with OTA Push and DM-cases, it will be quite applicable.

hspsGetODT() returns one of the following codes:
  • EhspsGetODTSuccess. Theme was received successfully. Client can start its rendering.

  • EhspsGetODTFailed. Theme was not received. Check Additional Return Code (not yet implemented) for the exact reason. Theme load can fail for e.g. for missing rights.

  • EhspsGetODTLowMemoryStrategy. Possible memory low to create memory chunk. Something must do to free memory and then try again.

After receiving the theme, Rendering Engine may subscribe the theme related events. These events may concern the changes of the theme status (meaning that some other theme is activated), or that the theme is updated. In both cases, client should reload the theme and do the rendering again. To act as a subscriber of these events, client must implement the interface MhspsClientRequestServiceObserver . Subscription is applied by calling hspsGetODTUpdate() . This function returns immediately one of the following codes:
  • EhspsGetODTUpdateSuccess - The subscription of the theme updates and/or status changes was successful. The cient must start observe the server events.

  • EhspsGetODTUpdateFailed - The subscription of the theme updates and status changes was failed.

Once success-response was received, the observation of the Client Request Service events can return one of the following codes:

  • EhspsGetODTUpdateStatus - Theme status was changed. Client must reset rendering and request theme again.

  • EhspsGetODTUpdateHot - Theme was updated. Client should reload the theme and then do the theme rendering again.

Rendering Engine can get information of the theme resources through the ChspsResource-objects delivered on Resource List. When ChspsODT-object's DOM-document has a reference to some URL, the access method to the URL-related resource can be found in ChspsResource-object. When access-method is clear, client should call hspsAccessResourceFile() function with resource file path and empty RFile-handle. In successful cases, valid file handle to the associated resource file is returned. This functionality is arranged by the means of Symbian 9.0 EKA2 Kernel's support for Platform Security Concept. The return code can be one of the following:
  • EhspsAccessResourceFileSuccess - request to get access to a theme resource file was successful.

  • EhspsAccessResourceFileFailed - request to get access to a theme resource file was unsuccessful possible in due to a security fault.

Client Request Service functions may also return one of the following codes:
  • EhspsServiceRequestSheduled, or

  • EhspsServiceRequestError.

For explanation of the meanings of these messages, see ThspsServiceCompletedMessage-documentation.

Since
S60 5.0

Member Functions Documentation

hspsAccessResourceFile(const TDesC &, const ThspsConfiguration &, RFile &)

ThspsServiceCompletedMessage hspsAccessResourceFile ( const TDesC & aResourceFileName,
const ThspsConfiguration & aConfiguration,
RFile & aFile
) [pure virtual]

hspsAccessResourceFile

Since
S60 5.0

Parameters

const TDesC & aResourceFileName is the path for resource file to requested. Resource file name is given in every ChspsResource-object listed on the resource list.
const ThspsConfiguration & aConfiguration identifies the application or interface from which the theme is to be found
RFile & aFile is an empty RFile object which a valid file handle to the resourec file will be placed on return. The file access is arranged by means of Symbian 9.0 EKA2 Platform Security file handle sharing concept.

hspsCancelGetODTUpdate()

ThspsServiceCompletedMessage hspsCancelGetODTUpdate ( ) [pure virtual]

hspsCancelGetODTUpdate

Since
S60 5.0

hspsGetODT(TInt, ChspsODT &)

ThspsServiceCompletedMessage hspsGetODT ( TInt aAppUid,
ChspsODT & aODT
) [pure virtual]

hspsGetODT

Since
S60 5.0

Parameters

TInt aAppUid is the UID of the application for which the theme is requested for.
ChspsODT & aODT is an empty ChspsODT-object in where the theme is expected to be placed when the call returns.

hspsGetODTUpdate()

ThspsServiceCompletedMessage hspsGetODTUpdate ( ) [pure virtual]

hspsGetODTUpdate

Since
S60 5.0