class ChspsInstallationHandler : public CBase |
Class ChspsInstallationHandler. ChspsInstallationHandler performs all theme installation related functionality for hspsThemeServer.
Class inheritance: ================== ChspsInstallationHandler implements MhspsInstallationService from HSPS Theme Management Service and MContentHandler for XML-parsing of manifest file. For more information, see the architecture description in the beginning of this file.
Functionality: ============== ChspsInstallationHandler offer high- and low-level API-functionality. High-level and low-level calls are diffrentiated by their parametrization. High-level parametrization is directed to the be used by applications which need human readable data and offer a user interface. Low-level parametrization is directed to the machine-originated requestors like OTA Push or DM (Device Management) sub-systems where data is not needed to understand semanticly. Processing the installation task can be synchronous or asynchronous. Synchronous mode is applied everytime an installation is initiated. Application Theme may include resources. Importing these resources to the target device may need conversions. Such resources like some audio files etc., can be imported directly, however, most of the image-resources must be fitted for the target device because target screen device's color depth and/or pixel density varies. In this case, the needed conversions will be executed asynchronously. Asynchronous installation is executed in phases - resource by resource. Client application must initiate asynchronous mode by calling hspsInstallNextPhaseL() after testing that the synchronous call hspsInstallTheme() has returned EhspsInstallPhaseSuccess return code. This means that there are resources to convert asynchronoulsly. The rest of the asynchronous installation phases will be executed automatically, however, installation can be interrupted by calling hspsCancelInstallTheme() at any time. If installation is canceled, installation handler 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. HSPS Definition Repository takes care of saving everything on their appropriate places in the target device. Repository, i.e. theme storage, is loacted on hspsThemeServer's private-folder. The storage is organized by the information contained in ODT-header. 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 "HSPS Manifest File User Guide.doc".
EhspsInstallThemeSuccess,
EhspsInstallPhaseSuccess, or
EhspsInstallThemeFailed.
EhspsServiceRequestSheduled, or
EhspsServiceRequestError.
For explanation of the meanings of these messages, see ThspsServiceCompletedMessage-documentation.
Protected Member Functions | |
---|---|
void | RollBackL(ChspsODT &) |
Private Member Enumerations | |
---|---|
enum | TInstallationType { EInstallationTypeNew = 0, EInstallationTypeUpdate } |
Public Attributes | |
---|---|
ChspsResult * | iResult |
ChspsInstallationHandler | ( | ChspsThemeServer & | aThemeServer | ) | [private] |
ChspsThemeServer & aThemeServer |
void | ActivateThemeL | ( | ) | [private] |
void | AddDtdFileL | ( | const TDesC & | aPath, |
const TLanguage | aLanguage | |||
) | [private] |
Adds localized dtd resources from the provided subdirectory
void | AddInterfaceResourcesV2L | ( | const TDesC & | aPath | ) | [private] |
const TDesC & aPath |
void | AddLocalesL | ( | const TDesC & | aPath, |
const TBool | aProcessOnlyDTD | |||
) | [private] |
Finds locale specific subdirectories and resources and appends those into the resource array
void | AddResourceL | ( | CArrayPtrSeg< ChspsResource > & | aArray, |
const TPtrC | aFilename, | |||
const TLanguage | aLanguage, | |||
const ThspsResourceType | aResourceType, | |||
const TPtrC8 | aMimetype, | |||
const TPtrC8 | aTag | |||
) | [private] |
CArrayPtrSeg< ChspsResource > & aArray | is either iResourceArray or iLocalizedResourceArray instance |
const TPtrC aFilename | is full path and filename to the resource in an installation folder |
const TLanguage aLanguage | is language of the resource (use ELangNone if it's a common resource) |
const ThspsResourceType aResourceType | is MIME type or NULL |
const TPtrC8 aMimetype | (Optional) |
const TPtrC8 aTag | (Optional) |
void | AppendPluginConfigurationsL | ( | ChspsODT & | aAppODT | ) | [private] |
ChspsODT & aAppODT | is the ODT which should be modified |
void | ApplyUidRangeTestsL | ( | const TUint | aUid | ) | [private] |
Validates provided UID value.
const TUint aUid | Value to be checked |
TBool | CheckAutoInstallationValidityL | ( | ) |
void | CheckHeaderL | ( | ) | [private] |
void | CleanupL | ( | const ChspsODT & | aUpdateMask | ) | [private] |
const ChspsODT & aUpdateMask |
void | CompleteRequestL | ( | const ThspsServiceCompletedMessage | aReturnMessage, |
const TDesC8 & | aHeaderData = KNullDesC8 | |||
) | [private] |
const ThspsServiceCompletedMessage aReturnMessage | |
const TDesC8 & aHeaderData = KNullDesC8 |
void | ConstructL | ( | ) | [private] |
void | DisableNotifications | ( | ) |
void | DisableUdaEmmcInstallations | ( | ) |
void | DoInstallThemeL | ( | const TDesC & | aManifest | ) |
const TDesC & aManifest | is full path of the installation script file - a manifest file |
void | FinalizeParsingL | ( | ) | [private] |
void | FindResourceFilesL | ( | const TDesC & | aPath, |
const TBool | aRecursive, | |||
RArray< TInt > & | aDriveArray, | |||
CArrayFixFlat< TInt > * | aDeviceLanguages | |||
) | [private] |
void | GetActiveAppConfsL | ( | CArrayPtrSeg< ChspsODT > & | aActiveAppConfs | ) | [private] |
CArrayPtrSeg< ChspsODT > & aActiveAppConfs | Target list for active application configurations. |
TAny * | GetExtendedInterface | ( | const TInt32 | aUid | ) | [inline] |
const TInt32 aUid | the uid identifying the required interface. |
TFileName | GetInterfacePath | ( | ) | [private] |
Returns a path if V2 directory structure is in use and if an interface uid is known.
void | ImportPluginsL | ( | ) | [private] |
void | InstallSkeletonL | ( | ThspsServiceCompletedMessage & | aReturnMsg | ) | [private] |
ThspsServiceCompletedMessage & aReturnMsg |
TBool | IsPluginUsedInAppConfsL | ( | ) | [private] |
ChspsInstallationHandler * | NewL | ( | ChspsThemeServer & | aThemeServer | ) | [static] |
Two-phased constructor.
ChspsThemeServer & aThemeServer |
ChspsInstallationHandler * | NewLC | ( | ChspsThemeServer & | aThemeServer | ) | [static] |
ChspsThemeServer & aThemeServer |
void | NotifyOdtUpdatedL | ( | ) | [private] |
void | OnContentL | ( | const TDesC8 & | aBytes, |
TInt | aErrorCode | |||
) |
const TDesC8 & aBytes | is the raw content data for the element. The client is responsible for converting the data to the required character set if necessary. In some instances the content may be binary and must not be converted. |
TInt aErrorCode | is the error code. If this is not KErrNone then special action may be required. |
void | OnEndDocumentL | ( | TInt | aErrorCode | ) | [inline] |
TInt aErrorCode | is the error code. If this is not KErrNone then special action may be required. |
void | OnEndElementL | ( | const RTagInfo & | aElement, |
TInt | aErrorCode | |||
) |
void | OnEndPrefixMappingL | ( | const RString & | aPrefix, |
TInt | aErrorCode | |||
) | [inline] |
void | OnError | ( | TInt | aErrorCode | ) | [inline] |
TInt aErrorCode |
void | OnIgnorableWhiteSpaceL | ( | const TDesC8 & | aBytes, |
TInt | aErrorCode | |||
) | [inline] |
void | OnProcessingInstructionL | ( | const TDesC8 & | aTarget, |
const TDesC8 & | aData, | |||
TInt | aErrorCode | |||
) | [inline] |
void | OnSkippedEntityL | ( | const RString & | aName, |
TInt | aErrorCode | |||
) | [inline] |
void | OnStartDocumentL | ( | const RDocumentParameters & | aDocParam, |
TInt | aErrorCode | |||
) | [inline] |
const RDocumentParameters & aDocParam | Specifies the various parameters of the document. aDocParam.iCharacterSetName The character encoding of the document. |
TInt aErrorCode | is the error code. If this is not KErrNone then special action may be required. |
void | OnStartElementL | ( | const RTagInfo & | aElement, |
const RAttributeArray & | aAttributes, | |||
TInt | aErrorCode | |||
) |
const RTagInfo & aElement | is a handle to the element's details. |
const RAttributeArray & aAttributes | contains the attributes for the element. |
TInt aErrorCode | is the error code. If this is not KErrNone then special action may be required. |
void | OnStartPrefixMappingL | ( | const RString & | aPrefix, |
const RString & | aUri, | |||
TInt | aErrorCode | |||
) | [inline] |
void | ParseDocumentL | ( | ChspsODT & | aOdt | ) | [private] |
ChspsODT & aOdt |
void | ParseIconDeclarationL | ( | HBufC8 & | aValue8, |
const TDesC8 & | aTag, | |||
HBufC *& | aResultString | |||
) | [private] |
skin(<major id> <minor id>):mif(<path> <bitmapid> <maskid>)
mif(<path> <bitmapid> <maskid>)
uid(<application uid>)
<file name>="">.<png/svg>
void | ResetL | ( | ) | [private] |
void | RollBackL | ( | ChspsODT & | aOdt | ) | [protected] |
ChspsODT & aOdt | The ODT of the theme |
void | ServiceInstallNextPhaseL | ( | const RMessage2 & | aMessage | ) |
const RMessage2 & aMessage | Message from client |
void | ServiceInstallThemeL | ( | const RMessage2 & | aMessage | ) |
const RMessage2 & aMessage | Message from client |
void | SetODTAsResourceL | ( | ChspsODT & | aOdt | ) | [private] |
ChspsODT & aOdt |
ThspsServiceCompletedMessage | hspsCancelInstallTheme | ( | ) |
From MhspsInstallationService hspsCancelInstallTheme
void | hspsInstallNextPhaseL | ( | TDes8 & | aHeaderData, |
TRequestStatus & | aRequestStatus | |||
) |
TDes8 & aHeaderData | will return ODT-header of the latest installation phase in serialized (i.e. marshalled) data mode. This follows the low-level parametrization schema. |
TRequestStatus & aRequestStatus | will return the status of the asynchronous request returned by installer. |
ThspsServiceCompletedMessage | hspsInstallNextPhaseL | ( | ChspsODT & | ) | [inline] |
From MhspsInstallationService hspsInstallNextPhaseL
ChspsODT & |
ThspsServiceCompletedMessage | hspsInstallNextPhaseL | ( | TDes8 & | aHeaderData | ) |
From MhspsInstallationService hspsInstallNextPhaseL
TDes8 & aHeaderData | will return ODT-header of the latest installation phase in serialized (i.e. marshalled) data mode. This follows the low-level parametrization schema. |
ThspsServiceCompletedMessage | hspsInstallTheme | ( | const TDesC & | , |
ChspsODT & | ||||
) | [inline] |
From MhspsInstallationService hspsInstallTheme
ThspsServiceCompletedMessage | hspsInstallTheme | ( | const TDesC & | aManifestFileName, |
TDes8 & | aHeaderData | |||
) |
From MhspsInstallationService hspsInstallTheme
Installation type.
EInstallationTypeNew = 0 | |
EInstallationTypeUpdate |
ChspsDefinitionRepository & | iDefinitionRepository | [private] |
CArrayPtrSeg< ChspsResource > * | iTempLocalizedResourceList | [private] |
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.