class ChspsClient : public CActive |
ChspsClient . ChspsClient performs all client-side theme installation and maintenance related functionality. Theme maintenance services includes theme listings, theme activation, theme removal, and default theme restoring functionality.
Class inheritance: ================== ChspsClient derives CActive for asynchronous request handling, and MhspsInstallationService and MhspsMaintenanceService from Homescreenpluginservices.
Theme installation functionality: ================================= Client application must call hspsInstallNextPhaseL() after testing that the synchronous call hspsInstallTheme() has returned EhspsInstallPhaseSuccess return code signalling that actual installation is allowed. The rest of the installation phases will be executed automatically, however, installation can be interrupted by calling hspsCancelInstallTheme() at any time. If installation is canceled, hspsThemeServer initiates roll-back functionality removing inconsistent installation. Installation service uses specific manifest-file format to get informed about the xml, css, dtd, and resource files to be installed. Resource files might be locale-specific or generic as well. hspsThemeServer takes care of saving everything on their appropriate places in the target device's user disk. Theme storage is located in hspsThemeServer's private-folder. Locales are instructed in manifest file also. Manifest file's file-extension must be .dat, but actually, the file-name can be whatever, however, when low-level parametrization is used, the name must be "manifest.dat" and it must be the last file extracted from the installation package. For more information of manifest-file format, see Homescreen wikipages.
EhspsInstallThemeSuccess,
EhspsInstallPhaseSuccess, or
EhspsInstallThemeFailed.
EhspsServiceRequestSheduled, or
EhspsServiceRequestError.
For explanation of the meanings of these messages, see ThspsServiceCompletedMessage-documentation.
EhspsGetListHeadersSuccess - there is at least one Application Theme available matching on query. Call first hspsGetNextHeader() to get the headers. Same call will set the subscribtion of new ones possible coming available later.
EhspsGetListHeadersEmpty - there is no themes matching on the query available at the time, however, some might be exist later in due to installations. Client application should retain the subcription.
EhspsGetListHeadersFailed - service request failed for some reason. Possible reasons are for e.g. the missing rights to list headers queried.
Additional Return Code Support ( ChspsResult ) will express for e.g. the number of headers to be delivered or possible system error code in failed cases.
By MhspsServiceObserver::HandlehspsServiceMessage() call-back function implementation, client application must listen the following ThspsServiceCompletedMessage-messages:
EhspsGetListHeadersUpdate - header list on the client side has a new object appended at the end of the list,
EhspsGetListHeadersRestart - header list on server side has changed so much that the client must empty the list printed on screen. New list will be delivered immediately. The subscription stands.
EhspsGetListHeadersEmpty - header list on server side is now empty. The client must empty the list on screen if printed. The subscription stands.
EhspsGetListHeadersFailed - operation has failed. Client should cancel request and restart.
EhspsServiceRequestSheduled, or
EhspsServiceRequestError.
For explanation of the meanings of these messages, see ThspsServiceCompletedMessage-documentation.
Public Member Functions | |
---|---|
~ChspsClient () | |
IMPORT_C void | GethspsResult ( ChspsResult &) |
IMPORT_C ChspsClient * | NewL ( MhspsThemeManagementServiceObserver &) |
IMPORT_C ChspsClient * | NewLC ( MhspsThemeManagementServiceObserver &) |
IMPORT_C void | SetLogBus (void *) |
IMPORT_C ThspsServiceCompletedMessage | hspsAddPlugin (const TInt , const TInt , const TInt , const TInt , TInt &) |
IMPORT_C ThspsServiceCompletedMessage | hspsCancelGetListHeaders () |
IMPORT_C ThspsServiceCompletedMessage | hspsCancelInstallTheme () |
IMPORT_C TInt | hspsGetHeaders (const ChspsODT &, const TBool , CArrayPtrFlat < ChspsODT > &) |
IMPORT_C ThspsServiceCompletedMessage | hspsGetListHeaders (const ChspsODT &, const TBool , CArrayPtrFlat < ChspsODT > &) |
IMPORT_C ThspsServiceCompletedMessage | hspsGetListHeaders (const TDesC8 &, CArrayPtrSeg < HBufC8 > &) |
IMPORT_C ThspsServiceCompletedMessage | hspsGetNextHeader () |
IMPORT_C ThspsServiceCompletedMessage | hspsGetPluginOdtL (const TInt , const TInt , ChspsODT *) |
IMPORT_C ThspsServiceCompletedMessage | hspsInstallNextPhaseL ( ChspsODT &) |
IMPORT_C ThspsServiceCompletedMessage | hspsInstallNextPhaseL ( TDes8 &) |
IMPORT_C ThspsServiceCompletedMessage | hspsInstallTheme (const TDesC &, ChspsODT &) |
IMPORT_C ThspsServiceCompletedMessage | hspsInstallTheme (const TDesC &, TDes8 &) |
IMPORT_C ThspsServiceCompletedMessage | hspsMovePluginsL (const TInt , const TInt , const CArrayFixFlat < TInt > &) |
IMPORT_C ThspsServiceCompletedMessage | hspsPluginUpdateL (const ChspsODT &) |
IMPORT_C ThspsServiceCompletedMessage | hspsReinstallConf ( TInt , TInt ) |
IMPORT_C ThspsServiceCompletedMessage | hspsRemovePlugin (const TInt , const TInt ) |
IMPORT_C ThspsServiceCompletedMessage | hspsRemoveThemeL (const ChspsODT &) |
IMPORT_C ThspsServiceCompletedMessage | hspsReplacePlugin (const TInt , const TInt , const TInt ) |
IMPORT_C ThspsServiceCompletedMessage | hspsRestoreActiveAppConf (const TInt , const TInt ) |
IMPORT_C ThspsServiceCompletedMessage | hspsRestoreConfigurations (const TInt , const ThspsRestore ) |
IMPORT_C ThspsServiceCompletedMessage | hspsRestoreDefault (const ChspsODT &, ChspsODT &) |
IMPORT_C ThspsServiceCompletedMessage | hspsSetActivePlugin (const TInt , const TInt ) |
IMPORT_C ThspsServiceCompletedMessage | hspsSetActiveTheme (const ChspsODT &, ChspsODT &) |
IMPORT_C ThspsServiceCompletedMessage | hspsSetActiveTheme (const TDesC8 &, TDes8 &) |
IMPORT_C ThspsServiceCompletedMessage | hspsSetConfState (const TInt , const TInt , const ThspsConfigurationState , const ThspsConfStateChangeFilter ) |
IMPORT_C ThspsServiceCompletedMessage | hspsSetPluginSettings (const ChspsODT &, const TInt , ChspsDomDocument &, const TBool ) |
Protected Member Functions | |
---|---|
void | DoCancel () |
TInt | RunError ( TInt ) |
void | RunL () |
Private Member Functions | |
---|---|
ChspsClient ( MhspsThemeManagementServiceObserver &) | |
void | AppendHeaderListL ( TDesC8 &) |
void | ConstructL () |
TInt | StreamOdtL ( TDes &, const TInt , ChspsODT *) |
void | UpdatehspsResult ( TDesC8 &) |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Private Attributes | |
---|---|
ThspsServiceRequestMessage | iCancelRequestMessage |
ChspsODT * | iHeader |
TBuf8 < KMaxHeaderDataLength8 > | iHeaderData |
CArrayPtrSeg < HBufC8 > * | iHeaderDataList |
CArrayPtrFlat < ChspsODT > * | iHeaderList |
TBool | iODTMode |
MhspsThemeManagementServiceObserver & | iObserver |
ChspsODT * | iOdt |
ChspsResult * | iResult |
TBuf8 < KMaxResultDataLength8 > | iResultData |
HBufC8 * | iSearchMaskData |
RhspsClientSession | iSession |
HBufC8 * | iSetMaskData |
TBool | iSubscription |
Inherited Attributes | |
---|---|
CActive::iStatus |
ChspsClient | ( | MhspsThemeManagementServiceObserver & | aObserver | ) | [private] |
ChspsClient . Performs the first phase of two phase construction.
MhspsThemeManagementServiceObserver & aObserver | The object to be used to handle updates from the server. |
~ChspsClient | ( | ) | [virtual] |
~ChspsClient.
Destructor. Destroys the object and release all memory objects.
void | AppendHeaderListL | ( | TDesC8 & | aHeaderData | ) | [private] |
Creates a header object from header data (iHeaderData) and adds created header to the header list (iHeaderList)
TDesC8 & aHeaderData | Header data |
void | ConstructL | ( | ) | [private] |
ConstructL. Performs the second phase construction of a ChspsClient object.
void | DoCancel | ( | ) | [protected, virtual] |
From CActive , DoCancel. Cancels any outstanding operation.
IMPORT_C void | GethspsResult | ( | ChspsResult & | aResult | ) |
GethspsResult
ChspsResult & aResult | is a ChspsResult object containing additional information of query result. |
IMPORT_C ChspsClient * | NewL | ( | MhspsThemeManagementServiceObserver & | aObserver | ) | [static] |
NewL.
Two-phased constructor. Creates a ChspsClient object using two phase construction, and return a pointer to the created object.
MhspsThemeManagementServiceObserver & aObserver | The object to be used to handle updates from the server. |
IMPORT_C ChspsClient * | NewLC | ( | MhspsThemeManagementServiceObserver & | aObserver | ) | [static] |
NewLC.
Two-phased constructor. Creates a ChspsClinet object using two phase construction, and return a pointer to the created object.
MhspsThemeManagementServiceObserver & aObserver | The object to be used to handle updates from the server. |
TInt | RunError | ( | TInt | aError | ) | [protected, virtual] |
TInt aError |
void | RunL | ( | ) | [protected, virtual] |
From CActive , RunL. Callback function. Invoked to handle responses from the server.
IMPORT_C void | SetLogBus | ( | void * | aLogBus | ) |
Internal log bus setter. Empty method in product builds.
void * aLogBus | Log bus to be set. |
TInt | StreamOdtL | ( | TDes & | aOdtPath, |
const TInt | aAppUid, | |||
ChspsODT * | aPluginOdt | |||
) | [private] |
void | UpdatehspsResult | ( | TDesC8 & | aResultData | ) | [private] |
Updates iResult
TDesC8 & aResultData | Result data |
IMPORT_C ThspsServiceCompletedMessage | hspsAddPlugin | ( | const TInt | aAppUid, |
const TInt | aConfId, | |||
const TInt | aPluginUid, | |||
const TInt | aPosition, | |||
TInt & | aAddedPluginId | |||
) |
IMPORT_C ThspsServiceCompletedMessage | hspsCancelGetListHeaders | ( | ) |
From MhspsMaintenanceService .
IMPORT_C ThspsServiceCompletedMessage | hspsCancelInstallTheme | ( | ) |
From MhspsInstallationService .
IMPORT_C TInt | hspsGetHeaders | ( | const ChspsODT & | aSearchMask, |
const TBool | aCopyLogos, | |||
CArrayPtrFlat < ChspsODT > & | aHeaderList | |||
) |
Returns ODT header list according to the defined search mask
const ChspsODT & aSearchMask | is ChspsODT-object which attributes are filled to present search parameters for theme set queried by client. This parametrisation follows the high-level schema. |
const TBool aCopyLogos | is set if client wants to view logos |
CArrayPtrFlat < ChspsODT > & aHeaderList | is an list object able to carry ChspsODT-objects. |
IMPORT_C ThspsServiceCompletedMessage | hspsGetListHeaders | ( | const ChspsODT & | aSearchMask, |
const TBool | aCopyLogos, | |||
CArrayPtrFlat < ChspsODT > & | aHeaderList | |||
) |
From MhspsMaintenanceService .
const ChspsODT & aSearchMask | |
const TBool aCopyLogos | |
CArrayPtrFlat < ChspsODT > & aHeaderList |
IMPORT_C ThspsServiceCompletedMessage | hspsGetListHeaders | ( | const TDesC8 & | aSearchMaskData, |
CArrayPtrSeg < HBufC8 > & | aHeaderDataList | |||
) |
From MhspsMaintenanceService .
const TDesC8 & aSearchMaskData | |
CArrayPtrSeg < HBufC8 > & aHeaderDataList |
IMPORT_C ThspsServiceCompletedMessage | hspsGetNextHeader | ( | ) |
From MhspsMaintenanceService .
IMPORT_C ThspsServiceCompletedMessage | hspsGetPluginOdtL | ( | const TInt | aAppUid, |
const TInt | aPluginUid, | |||
ChspsODT * | aPluginOdt | |||
) |
IMPORT_C ThspsServiceCompletedMessage | hspsInstallNextPhaseL | ( | ChspsODT & | aHeader | ) |
From MhspsInstallationService .
ChspsODT & aHeader |
IMPORT_C ThspsServiceCompletedMessage | hspsInstallNextPhaseL | ( | TDes8 & | aHeaderData | ) |
From MhspsInstallationService .
TDes8 & aHeaderData |
IMPORT_C ThspsServiceCompletedMessage | hspsInstallTheme | ( | const TDesC & | aManifestFileName, |
ChspsODT & | aHeader | |||
) |
From MhspsInstallationService .
IMPORT_C ThspsServiceCompletedMessage | hspsInstallTheme | ( | const TDesC & | aManifestFileName, |
TDes8 & | aHeaderData | |||
) |
From MhspsInstallationService .
IMPORT_C ThspsServiceCompletedMessage | hspsMovePluginsL | ( | const TInt | aAppUid, |
const TInt | aConfId, | |||
const CArrayFixFlat < TInt > & | aPluginIdList | |||
) |
const TInt aAppUid | |
const TInt aConfId | |
const CArrayFixFlat < TInt > & aPluginIdList |
IMPORT_C ThspsServiceCompletedMessage | hspsPluginUpdateL | ( | const ChspsODT & | ) |
Updates plugin configuration in all application configuration
const ChspsODT & |
IMPORT_C ThspsServiceCompletedMessage | hspsReinstallConf | ( | TInt | aAppUid, |
TInt | aConfUid | |||
) |
Reinstalls requested configuration
IMPORT_C ThspsServiceCompletedMessage | hspsRemovePlugin | ( | const TInt | aAppUid, |
const TInt | aPluginId | |||
) |
IMPORT_C ThspsServiceCompletedMessage | hspsRemoveThemeL | ( | const ChspsODT & | aSetMask | ) |
From MhspsMaintenanceService .
const ChspsODT & aSetMask |
IMPORT_C ThspsServiceCompletedMessage | hspsReplacePlugin | ( | const TInt | aAppUid, |
const TInt | aPluginId, | |||
const TInt | aConfUid | |||
) |
IMPORT_C ThspsServiceCompletedMessage | hspsRestoreActiveAppConf | ( | const TInt | aAppUid, |
const TInt | aConfUid | |||
) |
IMPORT_C ThspsServiceCompletedMessage | hspsRestoreConfigurations | ( | const TInt | aAppUid, |
const ThspsRestore | aRestore | |||
) |
const TInt aAppUid | Application uid |
const ThspsRestore aRestore | Operation to be executed |
IMPORT_C ThspsServiceCompletedMessage | hspsRestoreDefault | ( | const ChspsODT & | aSetMask, |
ChspsODT & | aHeader | |||
) |
From MhspsMaintenanceService .
IMPORT_C ThspsServiceCompletedMessage | hspsSetActivePlugin | ( | const TInt | aAppUid, |
const TInt | aPluginId | |||
) |
IMPORT_C ThspsServiceCompletedMessage | hspsSetActiveTheme | ( | const ChspsODT & | aSetMask, |
ChspsODT & | aHeader | |||
) |
From MhspsMaintenanceService .
IMPORT_C ThspsServiceCompletedMessage | hspsSetActiveTheme | ( | const TDesC8 & | aSetMaskData, |
TDes8 & | aHeaderData | |||
) |
From MhspsMaintenanceService .
IMPORT_C ThspsServiceCompletedMessage | hspsSetConfState | ( | const TInt | aAppUid, |
const TInt | aConfId, | |||
const ThspsConfigurationState | aState, | |||
const ThspsConfStateChangeFilter | aFilter | |||
) |
IMPORT_C ThspsServiceCompletedMessage | hspsSetPluginSettings | ( | const ChspsODT & | aHeader, |
const TInt | aPluginId, | |||
ChspsDomDocument & | aDom, | |||
const TBool | aPluginStoringStatus | |||
) |
const ChspsODT & aHeader | |
const TInt aPluginId | |
ChspsDomDocument & aDom | |
const TBool aPluginStoringStatus |
ThspsServiceRequestMessage | iCancelRequestMessage | [private] |
Message to cancel outstanding request.
CArrayPtrSeg < HBufC8 > * | iHeaderDataList | [private] |
An pointer array given by service requester to be filled with headers.
MhspsThemeManagementServiceObserver & | iObserver | [private] |
iObserver, observer which handles updates from the server.
RhspsClientSession | iSession | [private] |
iSession, the theme server session.
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.