CWidgetInstaller Class Reference

class CWidgetInstaller : public CBase

This class handles the install.

WidgetBackupRestore.exe
Since
3.1

Inherits from

Public Member Functions
~CWidgetInstaller()
IMPORT_C voidDeregisterWidgetL(const TUid &)
IMPORT_C voidFinishInstallL(TInt)
IMPORT_C voidInstallL(TDesC16 &)
IMPORT_C CWidgetInstaller *NewL()
voidNotifyCompletionL(TInt)
IMPORT_C voidRegisterWidgetL(const TDesC &, const TDesC &, const TDesC &, const TDesC &, const TUid &)
IMPORT_C TIntRenameIconFile(RFs &, RPointerArray< CWidgetPropertyValue > *)
IMPORT_C TIntRunError(TInt)
IMPORT_C RPointerArray< CWidgetPropertyValue > *WidgetPropertiesFromInstalledWidgetL(RFs &, const TDesC &, const TDesC &, TUid)
Private Member Functions
CWidgetInstaller()
voidBackupL()
voidConstructL()
voidConvertIconL(TUid &, const TDesC &)
TInt DriveInfo(TInt, TInt64 &)
voidFixWidgetPropsL()
TInt GetDirSizeL(const TDesC &)
TInt PreprocessWidgetBundleL(TDesC &)
voidProcessRestoreDirL(TDesC &)
voidRestoreL()
TInt SearchByExtL(const TDesC &, TUint, const TDesC &, TFileName &)
TInt SearchWidgetRootL(const TDesC &, TFileName &)
TBool SetDriveAndCheckSpaceL()
voidUpdateWidgetBasePathL(TDriveUnit &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CWidgetRegistrationManager *iAppManager
TFileName iBackupDir
TFileName iBundleRootName
CFileMan *iFileMgr
TFileName iOriginalDir
TBool iOverwriting
RPointerArray< CWidgetPropertyValue >iPropertyValues
RWidgetRegistryClientSession iRegistry
RFs iRfs
TBool iServerConnected
CWidgetConfigHandler *iWidgetConfigHandler

Constructor & Destructor Documentation

CWidgetInstaller()

CWidgetInstaller()[private]

C++ default constructor.

~CWidgetInstaller()

~CWidgetInstaller()[virtual]

Destructor.

Member Functions Documentation

BackupL()

voidBackupL()[private]
When overwriting an installed widget, backup so can restore on error
Since
3.2

ConstructL()

voidConstructL()[private]

2nd phase constructor.

ConvertIconL(TUid &, const TDesC &)

voidConvertIconL(TUid &aUid,
const TDesC &aIconPath
)[private]

ConvertIconL Specific to WidgetPreInstaller converts Icon.png to mbm 5.0

Parameters

TUid & aUid
const TDesC & aIconPath

DeregisterWidgetL(const TUid &)

IMPORT_C voidDeregisterWidgetL(const TUid &aUid)
Since
5.0

Parameters

const TUid & aUid

DriveInfo(TInt, TInt64 &)

TInt DriveInfo(TIntaDrive,
TInt64 &aDiskSpace
)[private]

Parameters

TInt aDrive
TInt64 & aDiskSpace

FinishInstallL(TInt)

IMPORT_C voidFinishInstallL(TIntaErr)

Called when installation or update is finished, do the final steps of registration, file clean up (remove temporary files, display complete message. Or handle error.

Parameters

TInt aErr

FixWidgetPropsL()

voidFixWidgetPropsL()[private]
Fix the widget properties need to restore from the backup
Since
5.0

GetDirSizeL(const TDesC &)

TInt GetDirSizeL(const TDesC &aDir)[private]

Parameters

const TDesC & aDir

InstallL(TDesC16 &)

IMPORT_C voidInstallL(TDesC16 &aRestoreDir)
Handle install request.
Since
3.1

Parameters

TDesC16 & aRestoreDir

NewL()

IMPORT_C CWidgetInstaller *NewL()[static]

Two-phased constructor.

NotifyCompletionL(TInt)

voidNotifyCompletionL(TIntaErr)
Used for notify icon convertion complete
Since
5.0

Parameters

TInt aErr

PreprocessWidgetBundleL(TDesC &)

TInt PreprocessWidgetBundleL(TDesC &aRestoreDir)[private]
Create widget entry by parsing the info.plist, insert the entry into the entry list if the entry is not already existing.
Since
3.1

Parameters

TDesC & aRestoreDir

ProcessRestoreDirL(TDesC &)

voidProcessRestoreDirL(TDesC &aRestoreDir)[private]

Parameters

TDesC & aRestoreDir

RegisterWidgetL(const TDesC &, const TDesC &, const TDesC &, const TDesC &, const TUid &)

IMPORT_C voidRegisterWidgetL(const TDesC &aMainHTML,
const TDesC &aBundleDisplayName,
const TDesC &aIconPath,
const TDesC &aDriveName,
const TUid &aUid
)
Since
5.0

Parameters

const TDesC & aMainHTML
const TDesC & aBundleDisplayName
const TDesC & aIconPath
const TDesC & aDriveName
const TUid & aUid

RenameIconFile(RFs &, RPointerArray< CWidgetPropertyValue > *)

IMPORT_C TIntRenameIconFile(RFs &aFs,
RPointerArray< CWidgetPropertyValue > *aEntry
)

If widget registry entry is assigned a new UID, then the processed icon file (mbm file), if any, needs to be renamed with the new UID.

Since
5.0

Parameters

RFs & aFs
RPointerArray< CWidgetPropertyValue > * aEntry

RestoreL()

voidRestoreL()[private]
When overwriting an installed widget, restore on error
Since
3.2

RunError(TInt)

IMPORT_C TIntRunError(TIntaError)
Since
3.2

Parameters

TInt aError

SearchByExtL(const TDesC &, TUint, const TDesC &, TFileName &)

TInt SearchByExtL(const TDesC &aDir,
TUintaSortKey,
const TDesC &aExt,
TFileName &aFoundName
)[private]

Return the name of file/dir found given path of dir to search in and search critiria. 3.2

Parameters

const TDesC & aDir
TUint aSortKey
const TDesC & aExt
TFileName & aFoundName

SearchWidgetRootL(const TDesC &, TFileName &)

TInt SearchWidgetRootL(const TDesC &aDir,
TFileName &aFoundName
)[private]

Return the name of dir which contains info.plist file.

Parameters

const TDesC & aDir
TFileName & aFoundName

SetDriveAndCheckSpaceL()

TBool SetDriveAndCheckSpaceL()[private]
Set drive to C: to install/update the widget
Since
3.2

UpdateWidgetBasePathL(TDriveUnit &)

voidUpdateWidgetBasePathL(TDriveUnit &aDrive)[private]
update basepath of widget
Since
3.2

Parameters

TDriveUnit & aDrive

WidgetPropertiesFromInstalledWidgetL(RFs &, const TDesC &, const TDesC &, TUid)

IMPORT_C RPointerArray< CWidgetPropertyValue > *WidgetPropertiesFromInstalledWidgetL(RFs &aFs,
const TDesC &aWidgetPath,
const TDesC &aLproj,
TUidaUid
)

Rebuild registry properties (except UID) from installed widget dir.

Since
5.0

Parameters

RFs & aFs
const TDesC & aWidgetPath
const TDesC & aLproj
TUid aUid

Member Data Documentation

CWidgetRegistrationManager * iAppManager

CWidgetRegistrationManager *iAppManager[private]

TFileName iBackupDir

TFileName iBackupDir[private]

TFileName iBundleRootName

TFileName iBundleRootName[private]

CFileMan * iFileMgr

CFileMan *iFileMgr[private]

TFileName iOriginalDir

TFileName iOriginalDir[private]

TBool iOverwriting

TBool iOverwriting[private]

RPointerArray< CWidgetPropertyValue > iPropertyValues

RPointerArray< CWidgetPropertyValue >iPropertyValues[private]

RWidgetRegistryClientSession iRegistry

RWidgetRegistryClientSession iRegistry[private]

RFs iRfs

RFs iRfs[private]

TBool iServerConnected

TBool iServerConnected[private]

CWidgetConfigHandler * iWidgetConfigHandler

CWidgetConfigHandler *iWidgetConfigHandler[private]