# HG changeset patch
# User hgs
# Date 1287575576 -10800
# Node ID 9dcba1ee99f7e2bcbf5cfb78a6647f931b13764e
# Parent d1838696558c6a24ac83672e88f541dfc689bac6
201041
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/appmngr2runtimeapi.metaxml
--- a/appinstall_plat/appmngr2runtimeapi/appmngr2runtimeapi.metaxml Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-
-
-AppMngr2 Runtime Plugin API
-Application Manager uses plug-ins for run-time specific services, such as installing and uninstalling. Runtime Plugin implements these services for particular run-time type, like SISX, Java or Widget. AppMngr2 Runtime Plugin API is ECOM interface that defines Application Manager run-time plug-ins.
-c++
-AppMngr2
-
-
-
-
-no
-no
-
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/bwins/appmngr2pluginapiu.def
--- a/appinstall_plat/appmngr2runtimeapi/bwins/appmngr2pluginapiu.def Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-EXPORTS
- ??0CAppMngr2AppInfo@@IAE@AAVCAppMngr2Runtime@@AAVRFs@@@Z @ 1 NONAME ; CAppMngr2AppInfo::CAppMngr2AppInfo(class CAppMngr2Runtime &, class RFs &)
- ??0CAppMngr2InfoIterator@@QAE@AAVCAppMngr2InfoBase@@W4TAppMngr2InfoType@@@Z @ 2 NONAME ; CAppMngr2InfoIterator::CAppMngr2InfoIterator(class CAppMngr2InfoBase &, enum TAppMngr2InfoType)
- ??0CAppMngr2PackageInfo@@IAE@AAVCAppMngr2Runtime@@AAVRFs@@@Z @ 3 NONAME ; CAppMngr2PackageInfo::CAppMngr2PackageInfo(class CAppMngr2Runtime &, class RFs &)
- ??0CAppMngr2Runtime@@IAE@AAVMAppMngr2RuntimeObserver@@@Z @ 4 NONAME ; CAppMngr2Runtime::CAppMngr2Runtime(class MAppMngr2RuntimeObserver &)
- ??1CAppMngr2AppInfo@@UAE@XZ @ 5 NONAME ; CAppMngr2AppInfo::~CAppMngr2AppInfo(void)
- ??1CAppMngr2InfoIterator@@UAE@XZ @ 6 NONAME ; CAppMngr2InfoIterator::~CAppMngr2InfoIterator(void)
- ??1CAppMngr2PackageInfo@@UAE@XZ @ 7 NONAME ; CAppMngr2PackageInfo::~CAppMngr2PackageInfo(void)
- ??1CAppMngr2RecognizedFile@@UAE@XZ @ 8 NONAME ; CAppMngr2RecognizedFile::~CAppMngr2RecognizedFile(void)
- ??1CAppMngr2Runtime@@UAE@XZ @ 9 NONAME ; CAppMngr2Runtime::~CAppMngr2Runtime(void)
- ?AddNearestResourceFileL@CAppMngr2Runtime@@QAEHABVTDesC16@@@Z @ 10 NONAME ; int CAppMngr2Runtime::AddNearestResourceFileL(class TDesC16 const &)
- ?BaseConstructL@CAppMngr2InfoIterator@@QAEXXZ @ 11 NONAME ; void CAppMngr2InfoIterator::BaseConstructL(void)
- ?ConstructL@CAppMngr2AppInfo@@QAEXXZ @ 12 NONAME ; void CAppMngr2AppInfo::ConstructL(void)
- ?ConstructL@CAppMngr2PackageInfo@@QAEXXZ @ 13 NONAME ; void CAppMngr2PackageInfo::ConstructL(void)
- ?DataType@CAppMngr2RecognizedFile@@QAEABVTDataType@@XZ @ 14 NONAME ; class TDataType const & CAppMngr2RecognizedFile::DataType(void)
- ?EikonEnv@CAppMngr2Runtime@@QAEAAVCEikonEnv@@XZ @ 15 NONAME ; class CEikonEnv & CAppMngr2Runtime::EikonEnv(void)
- ?FileName@CAppMngr2RecognizedFile@@QAEABVTDesC16@@XZ @ 16 NONAME ; class TDesC16 const & CAppMngr2RecognizedFile::FileName(void)
- ?FullBitmapFileNameLC@CAppMngr2Runtime@@QAEPAVHBufC16@@ABVTDesC16@@@Z @ 17 NONAME ; class HBufC16 * CAppMngr2Runtime::FullBitmapFileNameLC(class TDesC16 const &)
- ?FullBitmapFileNameLC@TAppMngr2DriveUtils@@SAPAVHBufC16@@ABVTDesC16@@AAVRFs@@@Z @ 18 NONAME ; class HBufC16 * TAppMngr2DriveUtils::FullBitmapFileNameLC(class TDesC16 const &, class RFs &)
- ?GetAdditionalDirsToScanL@CAppMngr2Runtime@@UAEXAAVRFs@@AAV?$RPointerArray@VHBufC16@@@@@Z @ 19 NONAME ; void CAppMngr2Runtime::GetAdditionalDirsToScanL(class RFs &, class RPointerArray &)
- ?GetMenuItemsL@CAppMngr2InfoBase@@UAEXAAV?$RPointerArray@USData@CEikMenuPaneItem@@@@@Z @ 20 NONAME ; void CAppMngr2InfoBase::GetMenuItemsL(class RPointerArray &)
- ?GetMiddleSoftkeyCommandL@CAppMngr2InfoBase@@UAEXAAH0@Z @ 21 NONAME ; void CAppMngr2InfoBase::GetMiddleSoftkeyCommandL(int &, int &)
- ?HasNext@CAppMngr2InfoIterator@@UBEHXZ @ 22 NONAME ; int CAppMngr2InfoIterator::HasNext(void) const
- ?IndicatorIconIndex@CAppMngr2InfoBase@@UBEHXZ @ 23 NONAME ; int CAppMngr2InfoBase::IndicatorIconIndex(void) const
- ?IsDRMForwardable@TAppMngr2DRMUtils@@SAHABVTDesC16@@@Z @ 24 NONAME ; int TAppMngr2DRMUtils::IsDRMForwardable(class TDesC16 const &)
- ?IsDRMProtected@TAppMngr2DRMUtils@@SAHABVTDesC16@@@Z @ 25 NONAME ; int TAppMngr2DRMUtils::IsDRMProtected(class TDesC16 const &)
- ?IsDRMRightsObjectExpiredOrMissingL@TAppMngr2DRMUtils@@SAHABVTDesC16@@@Z @ 26 NONAME ; int TAppMngr2DRMUtils::IsDRMRightsObjectExpiredOrMissingL(class TDesC16 const &)
- ?IsDRMRightsObjectMissingL@TAppMngr2DRMUtils@@SAHABVTDesC16@@@Z @ 27 NONAME ; int TAppMngr2DRMUtils::IsDRMRightsObjectMissingL(class TDesC16 const &)
- ?IsShowOnTop@CAppMngr2InfoBase@@QBEHXZ @ 28 NONAME ; int CAppMngr2InfoBase::IsShowOnTop(void) const
- ?Location@CAppMngr2InfoBase@@QBE?AW4TAppMngr2Location@@XZ @ 29 NONAME ; enum TAppMngr2Location CAppMngr2InfoBase::Location(void) const
- ?LocationDrive@CAppMngr2InfoBase@@QBE?AVTDriveUnit@@XZ @ 30 NONAME ; class TDriveUnit CAppMngr2InfoBase::LocationDrive(void) const
- ?LocationFromDriveL@TAppMngr2DriveUtils@@SA?AW4TAppMngr2Location@@HAAVRFs@@@Z @ 31 NONAME ; enum TAppMngr2Location TAppMngr2DriveUtils::LocationFromDriveL(int, class RFs &)
- ?LocationFromFileNameL@TAppMngr2DriveUtils@@SA?AW4TAppMngr2Location@@ABVTDesC16@@AAVRFs@@@Z @ 32 NONAME ; enum TAppMngr2Location TAppMngr2DriveUtils::LocationFromFileNameL(class TDesC16 const &, class RFs &)
- ?NearestResourceFileLC@TAppMngr2DriveUtils@@SAPAV?$TBuf@$0BAA@@@ABVTDesC16@@AAVRFs@@@Z @ 33 NONAME ; class TBuf<256> * TAppMngr2DriveUtils::NearestResourceFileLC(class TDesC16 const &, class RFs &)
- ?NewL@CAppMngr2RecognizedFile@@SAPAV1@ABVTDesC16@@ABVTDataType@@@Z @ 34 NONAME ; class CAppMngr2RecognizedFile * CAppMngr2RecognizedFile::NewL(class TDesC16 const &, class TDataType const &)
- ?NewL@CAppMngr2RecognizedFile@@SAPAV1@PAVHBufC16@@0@Z @ 35 NONAME ; class CAppMngr2RecognizedFile * CAppMngr2RecognizedFile::NewL(class HBufC16 *, class HBufC16 *)
- ?NewL@CAppMngr2Runtime@@SAPAV1@VTUid@@AAVMAppMngr2RuntimeObserver@@@Z @ 36 NONAME ; class CAppMngr2Runtime * CAppMngr2Runtime::NewL(class TUid, class MAppMngr2RuntimeObserver &)
- ?Next@CAppMngr2InfoIterator@@UAEXAAVTPtrC16@@0@Z @ 37 NONAME ; void CAppMngr2InfoIterator::Next(class TPtrC16 &, class TPtrC16 &)
- ?Observer@CAppMngr2Runtime@@QAEAAVMAppMngr2RuntimeObserver@@XZ @ 38 NONAME ; class MAppMngr2RuntimeObserver & CAppMngr2Runtime::Observer(void)
- ?ReadMenuItemDataFromResourceL@CAppMngr2InfoBase@@QAEXHAAUSData@CEikMenuPaneItem@@@Z @ 39 NONAME ; void CAppMngr2InfoBase::ReadMenuItemDataFromResourceL(int, struct CEikMenuPaneItem::SData &)
- ?Reset@CAppMngr2InfoIterator@@UAEXXZ @ 40 NONAME ; void CAppMngr2InfoIterator::Reset(void)
- ?Runtime@CAppMngr2InfoBase@@QBEAAVCAppMngr2Runtime@@XZ @ 41 NONAME ; class CAppMngr2Runtime & CAppMngr2InfoBase::Runtime(void) const
- ?RuntimeUid@CAppMngr2Runtime@@QBE?BVTUid@@XZ @ 42 NONAME ; class TUid const CAppMngr2Runtime::RuntimeUid(void) const
- ?SetAllFieldsL@CAppMngr2InfoIterator@@MAEXXZ @ 43 NONAME ; void CAppMngr2InfoIterator::SetAllFieldsL(void)
- ?SetFieldL@CAppMngr2InfoIterator@@IAEXHABVTDesC16@@@Z @ 44 NONAME ; void CAppMngr2InfoIterator::SetFieldL(int, class TDesC16 const &)
- ?SetLocationL@CAppMngr2InfoIterator@@MAEXXZ @ 45 NONAME ; void CAppMngr2InfoIterator::SetLocationL(void)
- ?SetOtherFieldsL@CAppMngr2InfoIterator@@MAEXXZ @ 46 NONAME ; void CAppMngr2InfoIterator::SetOtherFieldsL(void)
- ?SetStatusL@CAppMngr2InfoIterator@@MAEXXZ @ 47 NONAME ; void CAppMngr2InfoIterator::SetStatusL(void)
- ?ShowDeleteConfirmationQueryL@CAppMngr2PackageInfo@@IAEHXZ @ 48 NONAME ; int CAppMngr2PackageInfo::ShowDeleteConfirmationQueryL(void)
- ?SizeStringWithUnitsL@CAppMngr2InfoBase@@QAEPAVHBufC16@@_J@Z @ 49 NONAME ; class HBufC16 * CAppMngr2InfoBase::SizeStringWithUnitsL(long long)
- ?SpecificIconL@CAppMngr2InfoBase@@UBEPAVCGulIcon@@XZ @ 50 NONAME ; class CGulIcon * CAppMngr2InfoBase::SpecificIconL(void) const
- ?SpecificIndicatorIconL@CAppMngr2InfoBase@@UBEPAVCGulIcon@@XZ @ 51 NONAME ; class CGulIcon * CAppMngr2InfoBase::SpecificIndicatorIconL(void) const
- ?SupportsGenericCommand@CAppMngr2InfoBase@@UAEHH@Z @ 52 NONAME ; int CAppMngr2InfoBase::SupportsGenericCommand(int)
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/eabi/appmngr2pluginapiu.def
--- a/appinstall_plat/appmngr2runtimeapi/eabi/appmngr2pluginapiu.def Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-EXPORTS
- _ZN16CAppMngr2AppInfo10ConstructLEv @ 1 NONAME
- _ZN16CAppMngr2AppInfoC2ER16CAppMngr2RuntimeR3RFs @ 2 NONAME
- _ZN16CAppMngr2AppInfoD0Ev @ 3 NONAME
- _ZN16CAppMngr2AppInfoD1Ev @ 4 NONAME
- _ZN16CAppMngr2AppInfoD2Ev @ 5 NONAME
- _ZN16CAppMngr2Runtime20FullBitmapFileNameLCERK7TDesC16 @ 6 NONAME
- _ZN16CAppMngr2Runtime23AddNearestResourceFileLERK7TDesC16 @ 7 NONAME
- _ZN16CAppMngr2Runtime24GetAdditionalDirsToScanLER3RFsR13RPointerArrayI7HBufC16E @ 8 NONAME
- _ZN16CAppMngr2Runtime4NewLE4TUidR24MAppMngr2RuntimeObserver @ 9 NONAME
- _ZN16CAppMngr2Runtime8EikonEnvEv @ 10 NONAME
- _ZN16CAppMngr2Runtime8ObserverEv @ 11 NONAME
- _ZN16CAppMngr2RuntimeC2ER24MAppMngr2RuntimeObserver @ 12 NONAME
- _ZN16CAppMngr2RuntimeD0Ev @ 13 NONAME
- _ZN16CAppMngr2RuntimeD1Ev @ 14 NONAME
- _ZN16CAppMngr2RuntimeD2Ev @ 15 NONAME
- _ZN17CAppMngr2InfoBase13GetMenuItemsLER13RPointerArrayIN16CEikMenuPaneItem5SDataEE @ 16 NONAME
- _ZN17CAppMngr2InfoBase20SizeStringWithUnitsLEx @ 17 NONAME
- _ZN17CAppMngr2InfoBase22SupportsGenericCommandEi @ 18 NONAME
- _ZN17CAppMngr2InfoBase24GetMiddleSoftkeyCommandLERiS0_ @ 19 NONAME
- _ZN17CAppMngr2InfoBase29ReadMenuItemDataFromResourceLEiRN16CEikMenuPaneItem5SDataE @ 20 NONAME
- _ZN17TAppMngr2DRMUtils14IsDRMProtectedERK7TDesC16 @ 21 NONAME
- _ZN17TAppMngr2DRMUtils16IsDRMForwardableERK7TDesC16 @ 22 NONAME
- _ZN17TAppMngr2DRMUtils25IsDRMRightsObjectMissingLERK7TDesC16 @ 23 NONAME
- _ZN17TAppMngr2DRMUtils34IsDRMRightsObjectExpiredOrMissingLERK7TDesC16 @ 24 NONAME
- _ZN19TAppMngr2DriveUtils18LocationFromDriveLEiR3RFs @ 25 NONAME
- _ZN19TAppMngr2DriveUtils20FullBitmapFileNameLCERK7TDesC16R3RFs @ 26 NONAME
- _ZN19TAppMngr2DriveUtils21LocationFromFileNameLERK7TDesC16R3RFs @ 27 NONAME
- _ZN19TAppMngr2DriveUtils21NearestResourceFileLCERK7TDesC16R3RFs @ 28 NONAME
- _ZN20CAppMngr2PackageInfo10ConstructLEv @ 29 NONAME
- _ZN20CAppMngr2PackageInfo28ShowDeleteConfirmationQueryLEv @ 30 NONAME
- _ZN20CAppMngr2PackageInfoC2ER16CAppMngr2RuntimeR3RFs @ 31 NONAME
- _ZN20CAppMngr2PackageInfoD0Ev @ 32 NONAME
- _ZN20CAppMngr2PackageInfoD1Ev @ 33 NONAME
- _ZN20CAppMngr2PackageInfoD2Ev @ 34 NONAME
- _ZN21CAppMngr2InfoIterator10SetStatusLEv @ 35 NONAME
- _ZN21CAppMngr2InfoIterator12SetLocationLEv @ 36 NONAME
- _ZN21CAppMngr2InfoIterator13SetAllFieldsLEv @ 37 NONAME
- _ZN21CAppMngr2InfoIterator14BaseConstructLEv @ 38 NONAME
- _ZN21CAppMngr2InfoIterator15SetOtherFieldsLEv @ 39 NONAME
- _ZN21CAppMngr2InfoIterator4NextER7TPtrC16S1_ @ 40 NONAME
- _ZN21CAppMngr2InfoIterator5ResetEv @ 41 NONAME
- _ZN21CAppMngr2InfoIterator9SetFieldLEiRK7TDesC16 @ 42 NONAME
- _ZN21CAppMngr2InfoIteratorC1ER17CAppMngr2InfoBase17TAppMngr2InfoType @ 43 NONAME
- _ZN21CAppMngr2InfoIteratorC2ER17CAppMngr2InfoBase17TAppMngr2InfoType @ 44 NONAME
- _ZN21CAppMngr2InfoIteratorD0Ev @ 45 NONAME
- _ZN21CAppMngr2InfoIteratorD1Ev @ 46 NONAME
- _ZN21CAppMngr2InfoIteratorD2Ev @ 47 NONAME
- _ZN23CAppMngr2RecognizedFile4NewLEP7HBufC16S1_ @ 48 NONAME
- _ZN23CAppMngr2RecognizedFile4NewLERK7TDesC16RK9TDataType @ 49 NONAME
- _ZN23CAppMngr2RecognizedFile8DataTypeEv @ 50 NONAME
- _ZN23CAppMngr2RecognizedFile8FileNameEv @ 51 NONAME
- _ZN23CAppMngr2RecognizedFileD0Ev @ 52 NONAME
- _ZN23CAppMngr2RecognizedFileD1Ev @ 53 NONAME
- _ZN23CAppMngr2RecognizedFileD2Ev @ 54 NONAME
- _ZNK16CAppMngr2Runtime10RuntimeUidEv @ 55 NONAME
- _ZNK17CAppMngr2InfoBase11IsShowOnTopEv @ 56 NONAME
- _ZNK17CAppMngr2InfoBase13LocationDriveEv @ 57 NONAME
- _ZNK17CAppMngr2InfoBase13SpecificIconLEv @ 58 NONAME
- _ZNK17CAppMngr2InfoBase18IndicatorIconIndexEv @ 59 NONAME
- _ZNK17CAppMngr2InfoBase22SpecificIndicatorIconLEv @ 60 NONAME
- _ZNK17CAppMngr2InfoBase7RuntimeEv @ 61 NONAME
- _ZNK17CAppMngr2InfoBase8LocationEv @ 62 NONAME
- _ZNK21CAppMngr2InfoIterator7HasNextEv @ 63 NONAME
- _ZTI16CAppMngr2AppInfo @ 64 NONAME ; ##
- _ZTI16CAppMngr2Runtime @ 65 NONAME ; ##
- _ZTI17CAppMngr2InfoBase @ 66 NONAME ; ##
- _ZTI20CAppMngr2PackageInfo @ 67 NONAME ; ##
- _ZTI21CAppMngr2InfoIterator @ 68 NONAME ; ##
- _ZTI23CAppMngr2RecognizedFile @ 69 NONAME ; ##
- _ZTV16CAppMngr2AppInfo @ 70 NONAME ; ##
- _ZTV16CAppMngr2Runtime @ 71 NONAME ; ##
- _ZTV17CAppMngr2InfoBase @ 72 NONAME ; ##
- _ZTV20CAppMngr2PackageInfo @ 73 NONAME ; ##
- _ZTV21CAppMngr2InfoIterator @ 74 NONAME ; ##
- _ZTV23CAppMngr2RecognizedFile @ 75 NONAME ; ##
- _ZThn4_N21CAppMngr2InfoIterator4NextER7TPtrC16S1_ @ 76 NONAME ; ##
- _ZThn4_N21CAppMngr2InfoIterator5ResetEv @ 77 NONAME ; ##
- _ZThn4_NK21CAppMngr2InfoIterator7HasNextEv @ 78 NONAME ; ##
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/group/appmngr2pluginapi.mmp
--- a/appinstall_plat/appmngr2runtimeapi/group/appmngr2pluginapi.mmp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Runtime plugin API
-*
-*/
-
-
-#include
-#include
-
-TARGET appmngr2pluginapi.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x20016BF3
-
-CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE appmngr2runtime.cpp
-SOURCE appmngr2infobase.cpp
-SOURCE appmngr2appinfo.cpp
-SOURCE appmngr2packageinfo.cpp
-SOURCE appmngr2driveutils.cpp
-SOURCE appmngr2drmutils.cpp
-SOURCE appmngr2infoiterator.cpp
-SOURCE appmngr2recognizedfile.cpp
-
-USERINCLUDE ../inc
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib // Base
-LIBRARY ecom.lib // ECom
-LIBRARY commonengine.lib // StringLoader
-LIBRARY avkon.lib // AknTextUtils
-LIBRARY cone.lib // CCoeEnv
-LIBRARY eikcore.lib // CEikonEnv
-LIBRARY bafl.lib // TResourceReader, BaflUtils
-LIBRARY efsrv.lib // TParse
-LIBRARY caf.lib // ContentAccess::CContent
-LIBRARY drmhelper.lib // CDRMHelper
-LIBRARY platformenv.lib // DriveInfo
-LIBRARY apmime.lib // TDataType
-
-DEBUGLIBRARY flogger.lib // RFileLogger
-
-SMPSAFE
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/group/bld.inf
--- a/appinstall_plat/appmngr2runtimeapi/group/bld.inf Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for AppMngr2 Runtime Plugin API
-*
-*/
-
-
-#include
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-../inc/appmngr2appinfo.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2appinfo.h )
-../inc/appmngr2cleanuputils.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2cleanuputils.h )
-../inc/appmngr2cleanuputils.inl MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2cleanuputils.inl )
-../inc/appmngr2driveutils.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2driveutils.h )
-../inc/appmngr2drmutils.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2drmutils.h )
-../inc/appmngr2common.hrh MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2common.hrh )
-../inc/appmngr2infobase.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2infobase.h )
-../inc/appmngr2infoiterator.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2infoiterator.h )
-../inc/appmngr2packageinfo.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2packageinfo.h )
-../inc/appmngr2runtime.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2runtime.h )
-../inc/appmngr2runtimeobserver.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2runtimeobserver.h )
-../inc/appmngr2recognizedfile.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2recognizedfile.h )
-../inc/appmngr2debugconfig.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2debugconfig.h )
-../inc/appmngr2debugutils.h MW_LAYER_PLATFORM_EXPORT_PATH( appmngr2debugutils.h )
-
-// export iby files
-../rom/appmngr2runtime.iby CORE_MW_LAYER_IBY_EXPORT_PATH( appmngr2runtime.iby )
-
-PRJ_MMPFILES
-appmngr2pluginapi.mmp
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2appinfo.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2appinfo.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppInfo represents installed application
-*
-*/
-
-
-#ifndef C_APPMNGR2APPINFO_H
-#define C_APPMNGR2APPINFO_H
-
-#include "appmngr2infobase.h" // CAppMngr2InfoBase
-
-/**
- * CAppMngr2AppInfo represents installed application.
- *
- * Runtime plug-in must define it's own CAppMngr2AppInfo derived class
- * to provide the actual functionality for abstract functions defined in
- * CAppMngr2InfoBase class.
- *
- * @lib appmngr2pluginapi.lib
- * @since S60 v5.1
- */
-class CAppMngr2AppInfo : public CAppMngr2InfoBase
- {
-public: // constructor and destructor
- IMPORT_C void ConstructL();
- IMPORT_C ~CAppMngr2AppInfo();
-
-protected: // new functions
- /**
- * Exported protected constructor for derived classes
- */
- IMPORT_C CAppMngr2AppInfo( CAppMngr2Runtime& aRuntime, RFs& aFsSession );
- };
-
-#endif // C_APPMNGR2APPINFO_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2cleanuputils.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2cleanuputils.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility definitions to push pointer arrays in cleanup stack
-*
-*/
-
-
-#ifndef C_APPMNGR2CLEANUPUTILS_H
-#define C_APPMNGR2CLEANUPUTILS_H
-
-template
-class CleanupResetAndDestroy
- {
-public:
- inline static void PushL( T& aRef );
-private:
- static void ResetAndDestroy( TAny *aPtr );
- };
-
-template
-inline void CleanupResetAndDestroyPushL( T& aRef );
-
-#include "appmngr2cleanuputils.inl"
-
-#endif // C_APPMNGR2CLEANUPUTILS_H
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2cleanuputils.inl
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2cleanuputils.inl Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility definitions to push pointer arrays in cleanup stack
-*
-*/
-
-
-template
-inline void CleanupResetAndDestroy::PushL( T& aRef )
- {
- CleanupStack::PushL( TCleanupItem( &ResetAndDestroy, &aRef ) );
- }
-
-template
-void CleanupResetAndDestroy::ResetAndDestroy( TAny *aPtr )
- {
- if( aPtr )
- {
- static_cast( aPtr )->ResetAndDestroy();
- }
- }
-
-template
-inline void CleanupResetAndDestroyPushL( T& aRef )
- {
- CleanupResetAndDestroy::PushL( aRef );
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2common.hrh
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2common.hrh Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Common resource ids for AppMngr2 runtime plug-ins
-*
-*/
-
-
-#ifndef APPMNGR2COMMON_HRH
-#define APPMNGR2COMMON_HRH
-
-enum TAppMngr2GenericCommand
- {
- EAppMngr2CmdNone,
- EAppMngr2CmdViewDetails,
- EAppMngr2CmdUninstall,
- EAppMngr2CmdInstall,
- EAppMngr2PlaceForPluginSpecificCmds,
- EAppMngr2CmdRemove,
- EAppMngr2CmdLog,
- EAppMngr2ReservedForOtherGenericCommands
- };
-
-#define KAppMngr2FirstFreePluginSpecificCmd 30
-
-enum TAppMngr2IconIndex
- {
- // Range 0 ... 0x2FFF reserved for runtime plug-in icon indexes
-
- // Specific icons flag
- EAppMngr2UseSpecificIcon = 0x3000, // use item specific icons
-
- // Default icon indexes
- EAppMngr2NoIndicatorIcon, // no indicator icon, item in phone memory
- EAppMngr2IconQgnIndiAmInstMmcAdd, // item in memory card indicator icon
- EAppMngr2IconQgnIndiFmgrMsAdd, // item in mass storage indicator icon
- EAppMngr2ReservedForOtherDefaultIcons
- };
-
-
-// AppMngr2 UID value
-#define KAppMngr2AppUidValue 0x101F8512
-
-// AppMngr2 View ID values
-#define KAppMngr2InstalledViewIdValue 2
-#define KAppMngr2PackagesViewIdValue 5
-
-
-#endif // APPMNGR2COMMON_HRH
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2debugconfig.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2debugconfig.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Defines trace macros
-*
-*/
-
-
-#ifndef APPMNGR2DEBUGCONFIG_H
-#define APPMNGR2DEBUGCONFIG_H
-
-#ifdef _DEBUG
-
-
-/* ---------------------------------------------------------------------------
- * Enable/disable traces
- * ---------------------------------------------------------------------------
- * Uncomment one of the following macros to enable tracing:
- */
-//#define PRINT_FLOG_TO_RDEBUG
-//#define PRINT_FLOG_TO_UTRACE
-//#define PRINT_FLOG_TO_FLOGGER
-/*
- * Select the trace type by uncommenting FLOG_DEBUG_TRACES or
- * FLOG_PERFORMANCE_TRACES (or both) below.
- *
- * Note that also SYMBIAN_TRACE_ENABLE must be defined in order
- * to use PRINT_FLOG_TO_UTRACE.
- */
-
-
-/* ---------------------------------------------------------------------------
- * Debug traces
- * ---------------------------------------------------------------------------
- * Uncomment the following line to enable debug traces:
- */
-//#define FLOG_DEBUG_TRACES
-/*
- * Debug traces are generated using FLOG macro. FLOG takes a format
- * string and variable number of arguments, like TDes::Format(). Except
- * that format string "x" is replaced with string literal _L("x"), so
- * string literal _L() should not be used when calling FLOG.
- *
- * Examples:
- * FLOG( "CAppMngr2AppUi::ConstructL" );
- * FLOG( "CAppMngr2AppUi::HandleCommandL( %d )", aCommand );
- * FLOG( "Scanning %d: %S", iIndex, &iDirName ) );
- */
-
-
-/* ---------------------------------------------------------------------------
- * Performance traces
- * ---------------------------------------------------------------------------
- * Uncomment the following line to enable performance traces:
- */
-//#define FLOG_PERFORMANCE_TRACES
-/*
- * Performance traces measure and print times that different
- * code fragments take (in milliseconds). Please note that
- * printing traces is usually slow and this may affect to the
- * results if debug or other performance traces are printed
- * out from the timed functions.
- *
- * There are two sets of performance tracing macros: static and
- * dynamic. Parameter is used to match corresponding macros and
- * it is also printed in trace output. Macros use temporary TTime
- * variables, hence macros (using the same parameter label) must
- * be in the same scope.
- *
- * The macros are:
- * FLOG_PERF_STATIC_BEGIN - records start time
- * FLOG_PERF_STATIC_END - records end time and prints results
- * FLOG_PERF_DEFINE - defines temporary variables
- * FLOG_PERF_START - records start time (fast)
- * FLOG_PERF_STOP - records end time (fast)
- * FLOG_PERF_PRINT - prints out the results (slow)
- *
- * Examples:
- * FLOG_PERF_STATIC_BEGIN( LoadPluginsL )
- * LoadPluginsL();
- * FLOG_PERF_STATIC_END( LoadPluginsL )
- * FLOG_PERF_STATIC_BEGIN( CreateScannerL )
- * CreateScannerL();
- * FLOG_PERF_STATIC_END( CreateScannerL )
- * FLOG_PERF_STATIC_BEGIN( FetchDataTypesL )
- * FetchDataTypesL();
- * FLOG_PERF_STATIC_END( FetchDataTypesL )
- *
- * This generates traces like:
- * AppMngr2: PERF LoadPluginsL: 157 ms
- * AppMngr2: PERF CreateScannerL: 8 ms
- * AppMngr2: PERF FetchDataTypesL: 2 ms
- *
- * Dynamic macros do the same thing as static macros, but possibly
- * slow parts (that may affect to results) are put into separate
- * FLOG_PERF_DEFINE and FLOG_PERF_PRINT macros. Printing the trace
- * is usually slow, which may affect to results (e.g. if static
- * macros are nested). Dynamic macros can be used to measure run
- * times of active objects too.
- *
- * Semicolons are not needed after FLOG macros. Semicolons can be
- * used, but they may issue "illegal empty declaration" warning
- * after FLOG_PERF_DEFINE() macros when traces are disabled.
- */
-
-
-// Sanity check: each FLOG macro produces compilation error if
-// PRINT_FLOG_TO_UTRACE is defined but SYMBIAN_TRACE_ENABLE is not.
-#if( defined( PRINT_FLOG_TO_UTRACE ) && !defined( SYMBIAN_TRACE_ENABLE ) )
-#error "SYMBIAN_TRACE_ENABLE not defined, PRINT_FLOG_TO_UTRACE needs it."
-#endif
-
-// Sanity check: traces can be printed to only one target (RDebug, UTrace, or FLogger)
-#if( defined( PRINT_FLOG_TO_RDEBUG ) && defined( PRINT_FLOG_TO_UTRACE ) )
-#error "Cannot define both PRINT_FLOG_TO_RDEBUG and PRINT_FLOG_TO_UTRACE macros."
-#endif
-#if( defined( PRINT_FLOG_TO_RDEBUG ) && defined( PRINT_FLOG_TO_FLOGGER ) )
-#error "Cannot define both PRINT_FLOG_TO_RDEBUG and PRINT_FLOG_TO_FLOGGER macros."
-#endif
-#if( defined( PRINT_FLOG_TO_UTRACE ) && defined( PRINT_FLOG_TO_FLOGGER ) )
-#error "Cannot define both PRINT_FLOG_TO_UTRACE and PRINT_FLOG_TO_FLOGGER macros."
-#endif
-
-// Sanity check: when traces are enabled, also trace type must be selected.
-#if( defined( PRINT_FLOG_TO_RDEBUG ) || defined( PRINT_FLOG_TO_UTRACE ) || defined( PRINT_FLOG_TO_FLOGGER ) )
-#define FLOG_TRACES_ENABLED
-#endif
-#if( defined( FLOG_TRACES_ENABLED ) )
-#if( !defined( FLOG_DEBUG_TRACES ) && !defined( FLOG_PERFORMANCE_TRACES ) )
-#error "Traces enabled but FLOG_DEBUG_TRACES or FLOG_PERFORMANCE_TRACES is not defined."
-#endif
-#endif
-
-#endif // _DEBUG
-
-#endif // APPMNGR2DEBUGCONFIG_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2debugutils.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2debugutils.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Defines trace macros
-*
-*/
-
-
-#ifndef APPMNGR2DEBUGUTILS_H
-#define APPMNGR2DEBUGUTILS_H
-
-#include "appmngr2debugconfig.h" // Configuration macros
-#ifdef PRINT_FLOG_TO_RDEBUG
-#include // RDebug
-#endif
-#ifdef PRINT_FLOG_TO_UTRACE
-#include // TUTrace
-#endif
-#ifdef PRINT_FLOG_TO_FLOGGER
-#include // RFileLogger
-#endif
-#ifdef FLOG_PERFORMANCE_TRACES
-#include // TTime, TTimeIntervalMicroSeconds
-#endif
-
-inline void DebugPrint( TRefByValue aFmt, ... );
-
-#ifdef FLOG_TRACES_ENABLED
-
-#ifdef FLOG_PERFORMANCE_TRACES
-
-// Static macros
-#define FLOG_PERF_STATIC_BEGIN(a) TTime perf_begin_ ##a ; perf_begin_ ##a.UniversalTime();
-#define FLOG_PERF_STATIC_END(a) TTime perf_end_ ##a; perf_end_ ##a.UniversalTime(); \
- TTimeIntervalMicroSeconds perf_diff_ ##a; \
- perf_diff_ ##a = perf_end_ ##a.MicroSecondsFrom( perf_begin_ ##a ); \
- _LIT( perf_name_ ##a, #a ); \
- DebugPrint( _L("PERF %S: %Ld ms" ), &perf_name_ ##a, perf_diff_ ##a.Int64() / TInt64( 1000 ) );
-
-// Dynamic macros
-#define FLOG_PERF_DEFINE(a) TTime perf_begin_ ##a; TTime perf_end_ ##a; \
- TTimeIntervalMicroSeconds perf_diff_ ##a;
-#define FLOG_PERF_START(a) perf_begin_ ##a.UniversalTime();
-#define FLOG_PERF_STOP(a) perf_end_ ##a.UniversalTime();
-#define FLOG_PERF_PRINT(a) _LIT( perf_name_ ##a, #a ); \
- perf_diff_ ##a = perf_end_ ##a.MicroSecondsFrom( perf_begin_ ##a ); \
- DebugPrint( _L("PERF %S: %Ld ms" ), &perf_name_ ##a, perf_diff_ ##a.Int64() / TInt64( 1000 ) );
-
-#else
-
-#define FLOG_PERF_STATIC_BEGIN(a)
-#define FLOG_PERF_STATIC_END(a)
-#define FLOG_PERF_DEFINE(a)
-#define FLOG_PERF_START(a)
-#define FLOG_PERF_STOP(a)
-#define FLOG_PERF_PRINT(a)
-
-#endif // FLOG_PERFORMANCE_TRACES
-
-
-#if( defined( FLOG_DEBUG_TRACES ) )
-#define FLOG( a, ARGS... ) DebugPrint( _L( a ), ##ARGS );
-#else
-#define FLOG( a, ARGS... )
-#endif // FLOG_DEBUG_TRACES
-
-
-#else
-#define FLOG_PERF_STATIC_BEGIN(a)
-#define FLOG_PERF_STATIC_END(a)
-#define FLOG_PERF_DEFINE(a)
-#define FLOG_PERF_START(a)
-#define FLOG_PERF_STOP(a)
-#define FLOG_PERF_PRINT(a)
-#define FLOG( a, ARGS... )
-#endif // FLOG_TRACES_ENABLED
-
-
-const TInt KMaxPrintSize = 256;
-_LIT( KAppMngr2Tag, "AppMngr2: " );
-
-#if( defined( PRINT_FLOG_TO_UTRACE ) )
-
-inline void DebugPrint( TRefByValue aFmt, ... )
- {
- VA_LIST list;
- VA_START( list, aFmt );
- TBuf buf;
- buf.Copy( KAppMngr2Tag );
- buf.AppendFormatList( aFmt, list );
- TUTrace::PrintfPrimary( KDebug, EFalse, EFalse, buf );
- }
-
-#elif( defined( PRINT_FLOG_TO_RDEBUG ) )
-
-inline void DebugPrint( TRefByValue aFmt, ... )
- {
- VA_LIST list;
- VA_START( list, aFmt );
- TBuf buf;
- buf.Copy( KAppMngr2Tag );
- buf.AppendFormatList( aFmt, list );
- RDebug::Print( buf );
- }
-
-#elif( defined( PRINT_FLOG_TO_FLOGGER ) )
-
-_LIT( KLogDir, "AppMngr2" );
-_LIT( KLogFile, "AppMngr2.txt" );
-
-inline void DebugPrint( TRefByValue aFmt, ... )
- {
- VA_LIST list;
- VA_START( list, aFmt );
- RFileLogger::WriteFormat( KLogDir, KLogFile, EFileLoggingModeAppend, aFmt, list );
- }
-
-#else
-
-// No implementation needed, DebugPrint() not used
-
-#endif
-
-#endif // APPMNGR2DEBUGUTILS_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2driveutils.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2driveutils.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility definitions for drive and file handling
-*
-*/
-
-
-#ifndef C_APPMNGR2DRIVEUTILS_H
-#define C_APPMNGR2DRIVEUTILS_H
-
-#include // TAppMngr2Location
-
-/**
- * Utility functions to get TAppMngr2Location values and to
- * construct resource and bitmap file names.
- *
- * @lib appmngr2pluginapi.lib
- * @since S60 v5.1
- */
-class TAppMngr2DriveUtils
- {
-public: // new functions
- /**
- * Returns location info (TAppMngr2Location) based on given file name (aFileName).
- *
- * @param aFileName File which location is needed
- * @param aFs File server session
- * @return TAppMngr2Location Location of the file
- */
- IMPORT_C static TAppMngr2Location LocationFromFileNameL( const TDesC& aFileName, RFs& aFs );
-
- /**
- * Returns location info (TAppMngr2Location) based on given drive (aDrive).
- *
- * @param aDrive Drive which location is needed
- * @param aFs File server session
- * @return TAppMngr2Location Location of the drive
- */
- IMPORT_C static TAppMngr2Location LocationFromDriveL( TInt aDrive, RFs& aFs );
-
- /**
- * Returns the nearest resource file using for given file (aFileName) using
- * EDefaultRom drive, KDC_RESOURCE_FILES_DIR, and BaflUtils::NearestLanguageFile().
- *
- * TFileName object is allocated on heap and it is left in the cleanup stack.
- * The caller of this method is responsible to delete the allocated TFileName object.
- *
- * @param aFileName Resource file name
- * @param aFs File server session
- * @return TFileName* Full name of the nearest resource file to load
- */
- IMPORT_C static TFileName* NearestResourceFileLC( const TDesC& aFileName, RFs& aFs );
-
- /**
- * Returns full bitmap file name. Constructs file name using EDefaultRom
- * drive, KDC_APP_BITMAP_DIR directory, and given MBM/MIF file name.
- *
- * Full file name is allocated on heap and it is left in the cleanup stack.
- * The caller of this method is responsible to delete the allocated HBufC object.
- *
- * @param aBitmapFile MBM or MIF file name
- * @return HBufC* Full file name for aBitmapFile
- */
- IMPORT_C static HBufC* FullBitmapFileNameLC( const TDesC& aBitmapFile, RFs& aFs );
-
- };
-
-#endif // C_APPMNGR2DRIVEUTILS_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2drmutils.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2drmutils.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility definitions for DRM file handling
-*
-*/
-
-
-#ifndef C_APPMNGR2DRMUTILS_H
-#define C_APPMNGR2DRMUTILS_H
-
-#include // basic definitions
-
-/**
- * Utility functions to check the DRM status of a given file.
- *
- * @lib appmngr2pluginapi.lib
- * @since S60 v5.1
- */
-class TAppMngr2DRMUtils
- {
-public: // new functions
- IMPORT_C static TBool IsDRMProtected( const TDesC& aFileName );
- IMPORT_C static TBool IsDRMForwardable( const TDesC& aFileName );
- IMPORT_C static TBool IsDRMRightsObjectExpiredOrMissingL( const TDesC& aFileName );
- IMPORT_C static TBool IsDRMRightsObjectMissingL( const TDesC& aFileName );
- };
-
-#endif // C_APPMNGR2DRMUTILS_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2infobase.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2infobase.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,382 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base class definitions for items displayed in AppMngr2
-*
-*/
-
-
-#ifndef C_APPMNGR2INFOBASE_H
-#define C_APPMNGR2INFOBASE_H
-
-#include // CBase
-#include // CEikMenuPaneItem::SData
-
-class CAppMngr2Runtime;
-
-enum TAppMngr2Location
- {
- EAppMngr2LocationPhone,
- EAppMngr2LocationMemoryCard,
- EAppMngr2LocationMassStorage
- };
-
-/**
- * CAppMngr2InfoBase is the base class for objects representing:
- * - installed applications and
- * - installation packages (aka installation files).
- *
- * Installed applications and installation packages are displayed in the
- * Appliction Manager UI using the data that Runtime plug-ins provide with
- * CAppMngr2InfoBase derived objects. Application Manager gets the data via
- * GetInstalledAppsL() and GetInstallationFilesL() metods in CAppMngr2Runtime
- * class.
- *
- * CAppMngr2InfoBase contains the common functionality for both installed
- * applications and installation packages. Derived classes CAppMngr2AppInfo
- * and CAppMngr2PackageInfo are placeholders for more specific functionality.
- *
- * CAppMngr2InfoBase, as well as CAppMngr2AppInfo and CAppMngr2PackageInfo,
- * are abstracts classes. Runtime plug-ins must provide the actual implementation
- * by using derived classes.
- *
- * @lib appmngr2pluginapi.lib
- * @since S60 v5.1
- */
-class CAppMngr2InfoBase : public CBase
- {
-public: // constructor and destructor
- void ConstructL();
- ~CAppMngr2InfoBase();
-
-public: // new functions
- /**
- * Reference to the CAppMngr2Runtime object of this plugin.
- *
- * @return CAppMngr2Runtime& Runtime object
- */
- IMPORT_C CAppMngr2Runtime& Runtime() const;
-
- /**
- * Icon index of this item (installed application or installation package).
- *
- * Items are displayed in a list in the UI. Each item has an icon image,
- * two labels (name and details) and an optional small indicator icon.
- * IconIndex() method provides index for the icon image.
- *
- * Icon index can be either:
- * - index to icon array loaded in CAppMngr2Runtime::LoadIconsL() method
- * - special value EAppMngr2UseSpecificIcon defined in AppMngr2Common.hrh
- *
- * If item has a specific icon that no other items use, return value
- * EAppMngr2UseSpecificIcon and load the specific icon via SpecificIconL().
- *
- * There are no default icons, each plug-in must provide implementation
- * for IconIndex() method.
- *
- * @return TInt Icon index
- */
- virtual TInt IconIndex() const = 0;
-
- /**
- * Optional specific icon for this item.
- *
- * Returns new icon specific for the item. Note that this method is not
- * used unless IconIndex() method returns EAppMngr2UseSpecificIcon value.
- *
- * The caller of this method is responsible to delete the returned
- * icon object.
- *
- * Default implementation leaves with KErrNotSupported. Plug-in must
- * override it if IconIndex() returns EAppMngr2UseSpecificIcon value.
- *
- * If the same icon bitmap is used in many items, it is more efficient
- * to load it once in CAppMngr2Runtime::LoadIconsL() and return icon
- * indexes form IconIndex() method.
- *
- * @return CGulIcon Item specific icon
- */
- IMPORT_C virtual CGulIcon* SpecificIconL() const;
-
- /**
- * Name of this item.
- *
- * Items are displayed in a list in the UI. The list uses two labels
- * (name and details) for each item. Descriptor that the Name() method
- * returns is displayed as the first label (the 1st line of the item).
- *
- * @return const TDesC& Displayable name
- */
- virtual const TDesC& Name() const = 0;
-
- /**
- * Details (size) of this item.
- *
- * Items are displayed in a list in the UI. The list uses two labels
- * (name and details) for each item. Descriptor that the Details() method
- * returns is displayed as the second label (the 2nd line of the item).
- *
- * Plug-ins can use SizeStringWithUnitsL() method to create details
- * string to display the item size in UI.
- *
- * @returns const TDesC& Displayable additional information line
- */
- virtual const TDesC& Details() const = 0;
-
- /**
- * Indicator icon index of this item.
- *
- * Icon index can be either:
- * - default icon index defined in TAppMngr2IconIndex in AppMngr2Common.hrh
- * - index to icon array loaded in CAppMngr2Runtime::LoadIconsL() method
- * - special value EAppMngr2UseSpecificIcon defined in AppMngr2Common.hrh
- *
- * Default implementation returns the default icon indexes based on
- * the value of iLocation member variable, so plug-ins usually does not
- * need to override this method.
- *
- * If EAppMngr2UseSpecificIcon value is returned, SpecificIndicatorIconL()
- * method is called to get the indicator icon.
- *
- * @return TInt Index to the icon array, or a TAppMngr2IconIndex value
- */
- IMPORT_C virtual TInt IndicatorIconIndex() const;
-
- /**
- * Optional specific indicator icon for this item.
- *
- * Returns new indicator icon specific for the item. Note that this
- * method is not used unless IndicatorIconIndex() method returns
- * special EAppMngr2UseSpecificIcon value.
- *
- * The caller of this method is responsible to delete the returned
- * icon object.
- *
- * Default implementation leaves with KErrNotSupported. Plug-in must
- * override it if IndicatorIconIndex() returns EAppMngr2UseSpecificIcon.
- *
- * If the same icon bitmap is used in many items, it is more efficient
- * to load it once in CAppMngr2Runtime::LoadIconsL() and return icon
- * indexes form IconIndex() method.
- *
- * @return CGulIcon Item specific icon
- */
- IMPORT_C virtual CGulIcon* SpecificIndicatorIconL() const;
-
- /**
- * ShowOnTop highlight status of this item.
- *
- * Returns ETrue if this item should be highlighted (e.g. displayed
- * separately on top of other items in installation files/installed
- * applications list). All items are displayed in alphabetical order.
- * If ShowOnTop flag is set, then the item is displayed before other
- * items (or in completely separate list of highligted items). All
- * separately displayed items are listed in alphabetical order too.
- *
- * @return TBool ETrue, if this item should be displayed separately
- */
- IMPORT_C TBool IsShowOnTop() const;
-
- /**
- * Optional specific menu items for this item.
- *
- * If the item supports specific menu commands, return the menu pane
- * data. Plug-in can use ReadMenuItemDataFromResourceL() method to
- * read menu pane data from resources. Menu commands are run via
- * HandleCommandL() method.
- *
- * The caller of this method is responsible to delete the returned
- * CEikMenuPaneItem::SData data structs.
- *
- * Default implementation is empty.
- *
- * @param aMenuCmds Array where plug-in specific menu items are added
- */
- IMPORT_C virtual void GetMenuItemsL( RPointerArray& aMenuCmds );
-
- /**
- * Enable generic menu commands for this item.
- *
- * Generic menu commands are defined in TAppMngr2GenericCommands enum in
- * AppMngr2Common.hrh. Generic commands are hidden from the menu if the
- * currently selected item does not support them. Return ETrue for those
- * command ids that are supported by this item. Generic commands are
- * run via HandleCommandL() method.
- *
- * @param aCmdId Generic command id
- * @return TBool ETrue if command aCmdId is supported
- */
- IMPORT_C virtual TBool SupportsGenericCommand( TInt aCmdId );
-
- /**
- * Optional specific middle softkey command for this item.
- *
- * If the item supports specific middle softkey command, return TBUF
- * resource id (for the command label) and command id. Item specific
- * command is run via HandleCommandL() method when user presses the
- * middle softkey.
- *
- * Default middle softkey command is used, if plug-in does not override it.
- *
- * @param aResourceId Command label to be displayed in UI (TBUF resource)
- * @param aCommandId Command id to be passed to HandleCommandL
- */
- IMPORT_C virtual void GetMiddleSoftkeyCommandL( TInt& aResourceId, TInt& aCommandId );
-
- /**
- * Starts asynchronously a user invoked command.
- *
- * The command can be a generic one or specific to the plug-in. The ids
- * for the generic commands are defined in AppMngr2Common.hrh (see the
- * enumeration TAppMngr2GenericCommand). The plug-in specific commands
- * are defined via GetMenuItemsL() and GetMiddleSoftkeyCommandL() methods.
- *
- * The caller of this method must call HandleCommandResultL() after the
- * asynchronous request has been completed.
- *
- * This asynchronous request must be completed properly using the method
- * User::RequestComplete() even if the command itself has been implemented
- * in synchronous manner.
- *
- * @param aCommandId Id of the command to be run
- * @param aStatus Active object request status
- */
- virtual void HandleCommandL( TInt aCommandId, TRequestStatus& aStatus ) = 0;
-
- /**
- * Handles the completion result of an asynchronous command.
- *
- * This method is provided so that the plug-in may decide upon handling
- * possible errors encountered during the command processing (note that
- * the completion status is received directly by the caller of the method
- * HandleCommandL() and not by this plug-in). These actions may include
- * for example closing open sessions and deleting objects.
- *
- * This function should leave if an error note should be displayed in
- * the UI (e.g. KErrNoMemory). Note that the result may be KErrCancel
- * or SwiUI::KSWInstErrUserCancel if the user cancelled the operation.
- *
- * @param aResult Completion code, KErrNone or some error code
- */
- virtual void HandleCommandResultL( TInt aResult ) = 0;
-
- /**
- * Cancels the current asynchronous command.
- *
- * This method may be called at any time when an asynchronous command
- * is started using HandleCommandL() method. It must cancel the running
- * command as quickly as possible.
- */
- virtual void CancelCommand() = 0;
-
- /**
- * Utility function to create displayable string that contains size
- * followed by kilobyte (kB), megabyte (MB) or gigabyte (GB) units.
- *
- * Size is rounded and formatted using the relevant unit, for example
- * SizeStringWithUnitsL( 5120 ) returns "5 kB".
- *
- * The caller of this method is responsible to delete the returned string.
- *
- * @param aSizeInBytes Item size
- * @return HBufC* New string that contains displayable size string
- */
- IMPORT_C HBufC* SizeStringWithUnitsL( TInt64 aSizeInBytes );
-
- /**
- * Utility function to construct CEikMenuPaneItem from MENU_ITEM resource.
- *
- * @param aResourceId MENU_ITEM resource id
- * @param aMenuItem CEikMenuPaneItem::SData struct that is filled in
- */
- IMPORT_C void ReadMenuItemDataFromResourceL( TInt aResourceId,
- CEikMenuPaneItem::SData& aMenuItem );
-
- /**
- * Returns the location of installation file or installed application.
- *
- * Remote drives are not supported. Derived class must fill in the
- * iLocation member variable to provide data for this function.
- *
- * @return TAppMngr2Location Location of the item
- */
- IMPORT_C TAppMngr2Location Location() const;
-
- /**
- * Returns the drive where installation file is located, or where
- * installed application is installed.
- *
- * Derived class must fill in the iLocationDrive member variable
- * to provide data for this function.
- *
- * @return TDriveUnit Drive where the item is located
- */
- IMPORT_C TDriveUnit LocationDrive() const;
-
-protected: // new functions
- /**
- * Constructor, not exported because used via CAppMngr2AppInfo and CAppMngr2PackageInfo
- */
- CAppMngr2InfoBase( CAppMngr2Runtime& aRuntime, RFs& aFsSession );
-
-protected: // data
- /**
- * Location of this item.
- *
- * Default implementation of IndicatorIconIndex() function uses this
- * value to return the default indicator icon index. See also the
- * Location() function defined above.
- */
- TAppMngr2Location iLocation;
-
- /**
- * Drive of this item.
- *
- * Location drive defines the drive where this item resides (either
- * installation package is stored, or application is installed).
- * CAppMngr2InfoIterator uses this value to display the drive
- * in "Details" dialog. See also the LocationDrive() function
- * defined above.
- */
- TDriveUnit iLocationDrive;
-
- /**
- * ShowOnTop (highlight) flag.
- *
- * If ShowOnTop flag is ETrue, the item is highlighted in UI. It
- * may be displayed on top of other items in installed application
- * or installation files list, or it may be displayed in separate
- * list of highlighted items.
- *
- * For example, new or untrusted installed applications can be highlighted.
- * When set, the item needs to show the reason why iShowOnTop is enabled
- * (e.g. by using "new" or "untrusted" icon). See also the IsShowOnTop()
- * function defined above.
- */
- TBool iShowOnTop;
-
- /**
- * File server session, provided by framework when item is created.
- */
- RFs& iFs;
-
-private: // data
- /**
- * Reference to CAppMngr2Runtime class for this item.
- * See also the Runtime() function defined above.
- */
- CAppMngr2Runtime& iRuntime;
- };
-
-#endif // C_APPMNGR2INFOBASE_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2infoiterator.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2infoiterator.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements MCUIInfoIterator API for CCUIDetailsDialog
-*
-*/
-
-
-#ifndef C_APPMNGR2INFOITERATOR_H
-#define C_APPMNGR2INFOITERATOR_H
-
-#include // SwiUI::CommonUI::MCUIInfoIterator
-
-class CAppMngr2InfoBase;
-class CDesC8Array;
-
-enum TAppMngr2InfoType
- {
- EAppMngr2StatusInstalled,
- EAppMngr2StatusNotInstalled
- };
-
-
-/**
- * CAppMngr2InfoIterator is the base class for plug-in specific data collecting
- * iterators. CAppMngr2InfoIterator derived iterators can be used to get the data
- * shown in details dialog (CCUIDetailsDialog). Details dialog shows application
- * details and certificate info.
- *
- * @lib appmngr2pluginapi.lib
- * @since S60 v5.1
- */
-class CAppMngr2InfoIterator : public CBase, public SwiUI::CommonUI::MCUIInfoIterator
- {
-public: // constructors and destructor
- /**
- * Constructs new info iterator to show details dialog.
- *
- * @param aInfo Reference to application or package info object
- * @param aInfoType Type info (installed application or not installed package)
- */
- IMPORT_C CAppMngr2InfoIterator( CAppMngr2InfoBase& aInfo, TAppMngr2InfoType aInfoType );
-
- /**
- * Allocates memory for CDesCArrays.
- *
- * BaseConstructL() must be called from derived ConstructL() before any other
- * leaving functions. BaseConstructL() calls SetAllFieldsL() to get all the
- * displayable details.
- */
- IMPORT_C void BaseConstructL();
-
- /**
- * Destructor, deletes allocated memory.
- */
- IMPORT_C ~CAppMngr2InfoIterator();
-
-public: // from MCUIInfoIterator
- IMPORT_C TBool HasNext() const;
- IMPORT_C void Next( TPtrC& aKey, TPtrC& aValue );
- IMPORT_C void Reset();
-
-protected: // new functions
- /**
- * Sets field to given value.
- *
- * Uses StringLoader to load aResourceId and adds it to MCUIInfoIterator
- * as a new key having value aValue.
- *
- * @param aResourceId Resource id for MCUIInfoIterator key
- * @param aValue Value for the key
- */
- IMPORT_C void SetFieldL( TInt aResourceId, const TDesC& aValue );
-
- /**
- * Sets all default fields, can be overridden in derived classes.
- *
- * Default implementation sets name (from CAppMngr2InfoBase::Name()),
- * status (either installed or not installed), location drive (from
- * CAppMngr2InfoBase::Location()), and application/file size (from
- * CAppMngr2InfoBase::Details()). Status and location fields are set
- * using SetStatusL() and SetLocationL() functions, so that they can
- * be overridden separately. Finally calls SetOtherFieldsL() to set
- * other fields, if derived class has some additional fields that
- * are not covered here.
- */
- IMPORT_C virtual void SetAllFieldsL();
-
- /**
- * Sets status (installed or not installed) based on aInfoType
- * defined in constructor. This function can be overridden in
- * derived classes.
- */
- IMPORT_C virtual void SetStatusL();
-
- /**
- * Sets location drive based on CAppMngr2InfoBase::Location().
- * This function can be overridden in derived classes.
- */
- IMPORT_C virtual void SetLocationL();
-
- /**
- * Sets other possble fields, default implemenation is empty.
- * This function can be overridden in derived classes.
- */
- IMPORT_C virtual void SetOtherFieldsL();
-
-protected: // data
- CAppMngr2InfoBase& iInfo;
- TAppMngr2InfoType iInfoType;
- TInt iCurrentIndex;
- CDesCArray* iKeys;
- CDesCArray* iValues;
- };
-
-#endif // C_APPMNGR2INFOITERATOR_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2packageinfo.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2packageinfo.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: PackageInfo represents installable package (sisx, jad, jar, ...)
-*
-*/
-
-
-#ifndef C_APPMNGR2PACKAGEINFO_H
-#define C_APPMNGR2PACKAGEINFO_H
-
-#include // CAppMngr2InfoBase
-
-class RFs;
-
-/**
- * CAppMngr2PackageInfo represents installation package (installation file).
- *
- * Runtime plug-in must define it's own CAppMngr2PackageInfo derived class
- * to provide the actual functionality for abstract functions defined in
- * CAppMngr2InfoBase class.
- *
- * @lib appmngr2pluginapi.lib
- * @since S60 v5.1
- */
-class CAppMngr2PackageInfo : public CAppMngr2InfoBase
- {
-public: // constructor and destructor
- IMPORT_C void ConstructL();
- IMPORT_C ~CAppMngr2PackageInfo();
-
-protected: // new functions
- IMPORT_C CAppMngr2PackageInfo( CAppMngr2Runtime& aRuntime, RFs& aFsSession );
-
- /**
- * Utility function to show R_APPMNGR2_YES_NO_CONFIRMATION_QUERY
- * confirmation query with R_AM_DELETEQUERY string and item name.
- *
- * @return TBool ETrue, if user accepted the query
- */
- IMPORT_C TBool ShowDeleteConfirmationQueryL();
- };
-
-#endif // C_APPMNGR2PACKAGEINFO_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2recognizedfile.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2recognizedfile.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Class that contains file name and it's MIME type
-*
-*/
-
-
-#ifndef C_APPMNGR2RECOGNIZEDFILE_H
-#define C_APPMNGR2RECOGNIZEDFILE_H
-
-#include // CBase
-
-class TDataType;
-
-/**
- * File and it's MIME type.
- *
- * @lib appmngr2pluginapi.lib
- * @since S60 v5.1
- */
-class CAppMngr2RecognizedFile : public CBase
- {
-public: // constructor and destructor
- /**
- * Creates new CAppMngr2RecognizedFile.
- *
- * File name and data type are copied into the new CAppMngr2RecognizedFile object.
- *
- * @param aFileName File name
- * @param aDataType Data (MIME) type
- * @returns new CAppMngr2RecognizedFile object
- */
- IMPORT_C static CAppMngr2RecognizedFile* NewL( const TDesC& aFileName,
- const TDataType& aDataType );
-
- /**
- * Creates new CAppMngr2RecognizedFile by taking ownership of given parameters.
- *
- * Note the construction order - the caller must take care of deleting the given
- * parameters if this function leaves.
- *
- * @param aFileName File name
- * @param aMimeType MIME type
- * @returns new CAppMngr2RecognizedFile object
- */
- IMPORT_C static CAppMngr2RecognizedFile* NewL( HBufC* aFileName, HBufC* aMimeType );
-
- /**
- * Destructor.
- */
- IMPORT_C ~CAppMngr2RecognizedFile();
-
-public: // new functions
- /**
- * Returns file name.
- * @return const TDesC& File name
- */
- IMPORT_C const TDesC& FileName();
-
- /**
- * Returns data (MIME) type as TDataType.
- * @return const TDataType& Data type.
- */
- IMPORT_C const TDataType& DataType();
-
-private: // new functions
- CAppMngr2RecognizedFile();
-
-private: // data
- HBufC* iFileName;
- TDataType* iDataType;
- };
-
-#endif // C_APPMNGR2RECOGNIZEDFILE_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2runtime.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2runtime.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,288 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base class for AppMngr2 plug-ins that define runtime types
-*
-*/
-
-
-#ifndef C_APPMNGR2RUNTIME_H
-#define C_APPMNGR2RUNTIME_H
-
-#include // CBase
-#include // CDataTypeArray
-
-class CAppMngr2AppInfo;
-class CAppMngr2PackageInfo;
-class CAppMngr2RecognizedFile;
-class MAppMngr2RuntimeObserver;
-class CAknIconArray;
-class CEikonEnv;
-
-
-/**
- * ECom interface UID for AppMngr2 Runtime plugins
- */
-const TUid KAppMngr2PluginInterface = { 0x20016BF4 };
-
-
-/**
- * Base class for Application Manager Runtime plug-ins.
- *
- * CAppMngr2Runtime class represents one Runtime plug-in. As it is abstract
- * class plug-in must provide the actual implementation using derived class.
- *
- * Application Manager lists ECom plug-ins implementing KAppMngr2PluginInterface
- * and creates new CAppMngr2Runtime objects. Creating new CAppMngr2Runtime object
- * loads the Runtime plug-in's DLL and instantiates it.
- *
- * After all Runtime plug-ins are loaded, Application Manager calls LoadIconsL()
- * to load plug-in specific icons, GetSupportedDataTypesL() to identify installation
- * files that this plug-in support, and GetAdditionalDirsToScanL() to get plug-in
- * specific directories that may contain installation files. Then Application Manager
- * scans directories and recognizes files in them, and proceeds to get installed
- * applications and installation packages. Installed applications are prompted from
- * each plug-in via GetInstalledAppsL() method. Each plug-in creates CAppMngr2AppInfo
- * derived objects to represent currently installed applications. Installation packages
- * are based on recognized files in scanned directories. Application Manager provides
- * list of files that match the supported data types via GetInstallationFilesL()
- * method, and the plug-in creates CAppMngr2PackageInfo objects representing
- * installation packages.
- *
- * Application Manager monitors changes in scanned directories and known application
- * registeries. When a change is notified, Application Manager gets the latest data
- * using GetInstalledAppsL() and GetInstallationFilesL() methods again. If Application
- * Manager does not listen some specific registry, plug-in can notify change using
- * MAppMngr2RuntimeObserver interface.
- *
- * @lib appmngr2pluginapi.lib
- * @since S60 v5.1
- */
-class CAppMngr2Runtime : public CBase
- {
-public: // constructor and destructor
-
- /**
- * ECom object instantiation.
- *
- * Loads the ECom plug-in DLL and instantiates new Runtime plug-in object.
- *
- * @param aUid Specifices the concrete implementation
- * @param aObserver Observer implementing MAppMngr2RuntimeObserver functions
- * @return CAppMngr2Runtime New Runtime plug-in object
- */
- IMPORT_C static CAppMngr2Runtime* NewL( TUid aImplementationUid,
- MAppMngr2RuntimeObserver &aObserver );
-
- /**
- * Destructs the ECom object and unloads the plug-in DLL.
- */
- IMPORT_C ~CAppMngr2Runtime();
-
-
-public: // new functions
-
- /**
- * Runtime plug-in UID.
- *
- * Returns UID that identifies the runtime plug-in
- *
- * $return TUid Runtime plug-in UID
- */
- IMPORT_C const TUid RuntimeUid() const;
-
- /**
- * Utility function to open resource file.
- *
- * Adds nearest localized resource file to the list maintained by CCoeEnv.
- * Uses DriveInfo::EDefaultRom drive and KDC_RESOURCE_FILES_DIR directory
- * by default, if not defined in aFileName. Nearest extension language code
- * is obtained from BaflUtils::NearestLanguageFile(). Added resource files
- * must be deleted using CCoeEnv::DeleteResourceFile() function.
- *
- * @param aFileName Resource file name
- * @return TInt Offset value for this resource file
- */
- IMPORT_C TInt AddNearestResourceFileL( const TDesC& aFileName );
-
- /**
- * Utility function to construct full bitmap file name.
- *
- * Constructs the file name using DriveInfo::EDefaultRom drive,
- * KDC_APP_BITMAP_DIR directory, and given MBM/MIF file name.
- *
- * The caller of this method is responsible to delete the retuned string.
- *
- * @param aBitmapFile MBM or MIF file name
- * @return HBufC* Full file name for aBitmapFile
- */
- IMPORT_C HBufC* FullBitmapFileNameLC( const TDesC& aBitmapFile );
-
- /**
- * Utility function to return cached CEikonEnv reference.
- *
- * @return CEikonEnv& Reference to cached CEikonEnv::Static() instance
- */
- IMPORT_C CEikonEnv& EikonEnv();
-
- /**
- * Runtime observer.
- *
- * Returns reference to object implementing MAppMngr2RuntimeObserver
- * interface. See appmngr2runtimeobserver.h for more info.
- *
- * @return MAppMngr2RuntimeObserver& Reference to observer
- */
- IMPORT_C MAppMngr2RuntimeObserver& Observer();
-
-public: // new pure virtual functions
-
- /**
- * Load icons for this plug-in.
- *
- * Plug-in specific icons are used when CAppMngr2InfoBase::IconIndex()
- * or CAppMngr2InfoBase::IndicatorIconIndex() return indexes to the
- * returned aIconArray.
- *
- * There are no default icons, so each plug-in must provide implementation
- * for LoadIconsL() method.
- *
- * @param aIconArray Array where to append the loaded icons
- */
- virtual void LoadIconsL( CAknIconArray& aIconArray ) = 0;
-
- /**
- * Supported data types for this plug-in.
- *
- * Return MIME types that this Runtime plug-in supports for creating
- * installation packages (CAppMngr2PackageInfo objects). Application
- * Manager scans installation files and recognizes file types. Files
- * that match to the supported MIME types are provided to the plug-in
- * via GetInstallationFilesL() method.
- *
- * Scanning and recognizing is implemented in Application Manager for
- * performance reasons. Plug-ins should not scan or recognize files as
- * Application Manager has done it already once and it provides list
- * of files and their MIME types to the plug-ins.
- *
- * @param aDataTypeArray Array where to append supported data types
- */
- virtual void GetSupportedDataTypesL( CDataTypeArray& aDataTypeArray ) = 0;
-
- /**
- * Define additional directories for installation file scanning.
- *
- * By default all PathInfo::EInstallsPath directories in all non-remote
- * drives are scanned. Also KSWInstallerPackageFolder directory defined
- * in CenRep is scanned. Use this function to add more directories for
- * scanning. All directory names are checked with RFs::IsValidName() and
- * invalid names are ignored. Wild-cards (like '*') are not allowed in
- * directory names.
- *
- * @param aFsSession File server session
- * @param aDirs Array where to append additional directories to scan
- */
- IMPORT_C virtual void GetAdditionalDirsToScanL( RFs& aFsSession,
- RPointerArray& aDirs );
-
- /**
- * Create package info objects.
- *
- * Package info objects represent installation files in "Installation
- * Files" view. Each package info object is displayed as a separate item.
- * Package info objects should be based on recognized installation files,
- * provided in aFileList array.
- *
- * GetInstallationFilesL() may be called several times. It is called once
- * for each scanned directory that contains recognized files for this Runtime
- * plugin.
- *
- * This asynchronous request must be completed properly using the method
- * User::RequestComplete() even if the GetInstallationFilesL() itself has
- * been implemented in synchronous manner. Outstanding request may be
- * cancelled by calling CancelGetInstallationFiles().
- *
- * @param aPackageInfos Array where to append package info objects
- * @param aFileList List of file names and corresponding MIME types
- * @param aFsSession File server session
- * @param aStatus Request status for the asynchronous request
- */
- virtual void GetInstallationFilesL(
- RPointerArray& aPackageInfos,
- const RPointerArray& aFileList,
- RFs& aFsSession,
- TRequestStatus& aStatus ) = 0;
-
- /**
- * Cancel pending asynchronous GetInstallationFilesL() request.
- */
- virtual void CancelGetInstallationFiles() = 0;
-
- /**
- * Create application info objects.
- *
- * Application info objects represent installed applications in "Installed"
- * view. Each application info object is displayed as a separate item.
- *
- * This asynchronous request must be completed properly using the method
- * User::RequestComplete() even if the GetInstalledAppsL() itself has
- * been implemented in synchronous manner. Outstanding request may be
- * cancelled by calling CancelGetInstalledApps().
- *
- * @param aApps Array where to add application info objects
- * @param aFsSession File server session
- * @param aStatus Request status for the asynchronous request
- */
- virtual void GetInstalledAppsL(
- RPointerArray& aApps,
- RFs& aFsSession,
- TRequestStatus& aStatus ) = 0;
-
- /**
- * Cancel pending asynchronous GetInstalledAppsL() request.
- */
- virtual void CancelGetInstalledApps() = 0;
-
-protected: // new functions
- /**
- * Protected constructor exported for derived classes.
- */
- IMPORT_C CAppMngr2Runtime( MAppMngr2RuntimeObserver &aObserver );
-
-private: // new functions
- void ConstructL( TUid aImplementationUid );
-
-private: // data
- /**
- * ECom instance identifier key.
- */
- TUid iDtorIDKey;
-
- /**
- * Implementation UID that identifies the plugin.
- */
- TUid iRuntimeUid;
-
- /**
- * Application implementing observer interface.
- */
- MAppMngr2RuntimeObserver& iObserver;
-
- /**
- * CEikonEnv pointer, cached from CEikonEnv::Static().
- */
- CEikonEnv* iCachedEikonEnv; // not owned
- };
-
-#endif // C_APPMNGR2RUNTIME_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/inc/appmngr2runtimeobserver.h
--- a/appinstall_plat/appmngr2runtimeapi/inc/appmngr2runtimeobserver.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 Runtime plugin observer interface
-*
-*/
-
-
-#ifndef C_APPMNGR2RUNTIMEOBSERVER_H
-#define C_APPMNGR2RUNTIMEOBSERVER_H
-
-/**
- * Application Manager's change notification interface.
- *
- * Application Manager monitors changes in application list and scanned
- * directories. There may be some plug-in specific changes that are not
- * visible in monitored interfaces, and that require refreshing displayed
- * installed application (or installation packages) list. Runtime plug-in
- * can notify the Application Manager via this interface when needed.
- *
- * @lib appmngr2pluginapi.lib
- * @since S60 v5.1
- */
-class MAppMngr2RuntimeObserver
- {
-public:
- /**
- * Runtime plugin can use RefreshInstalledApps() function to
- * refresh the installed applications list. Refreshing the list
- * makes AppMngr2 to refetch all installed application data.
- * Note that AppMngr2 listens EAppListChanged events via
- * MApaAppListServObserver, so plugins should use this
- * function only if AppMngr2 is not notified otherwise.
- */
- virtual void RefreshInstalledApps() = 0;
-
- /**
- * Runtime plugin can use RefreshInstallationFiles() function
- * to refresh the installation files list. Refreshing the list
- * makes AppMngr2 to rescan install directories and refetch
- * all installation package data. Note that AppMngr2 listens
- * RFs::NotifyChange() events to handle file additions and
- * deletions in defined install directories. Hence, plugins
- * should use this function only if AppMngr2 is not notified
- * otherwise.
- */
- virtual void RefreshInstallationFiles() = 0;
- };
-
-#endif // C_APPMNGR2RUNTIMEOBSERVER_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/rom/appmngr2runtime.iby
--- a/appinstall_plat/appmngr2runtimeapi/rom/appmngr2runtime.iby Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Image description file for project AppMngr2
-*
-*/
-
-
-#ifndef APPMNGR2RUNTIME_IBY
-#define APPMNGR2RUNTIME_IBY
-
-file=ABI_DIR\BUILD_DIR\appmngr2pluginapi.dll SHARED_LIB_DIR\appmngr2pluginapi.dll
-
-#endif // APPMNGR2RUNTIME_IBY
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/src/appmngr2appinfo.cpp
--- a/appinstall_plat/appmngr2runtimeapi/src/appmngr2appinfo.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppInfo implementation
-*
-*/
-
-
-#include "appmngr2appinfo.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAppMngr2AppInfo::ConstructL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2AppInfo::ConstructL()
- {
- CAppMngr2InfoBase::ConstructL();
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2AppInfo::~CAppMngr2AppInfo()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2AppInfo::~CAppMngr2AppInfo()
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2AppInfo::CAppMngr2AppInfo()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2AppInfo::CAppMngr2AppInfo( CAppMngr2Runtime& aRuntime,
- RFs& aFsSession ) : CAppMngr2InfoBase( aRuntime, aFsSession )
- {
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/src/appmngr2driveutils.cpp
--- a/appinstall_plat/appmngr2runtimeapi/src/appmngr2driveutils.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility functions for drive and file handling
-*
-*/
-
-
-#include "appmngr2driveutils.h" // TAppMngr2DriveUtils
-#include "appmngr2debugutils.h" // FLOG macros
-#include // DriveInfo
-#include // BaflUtils
-#include // KDC_* constant strings
-
-_LIT( KDriveFormat, "%c:" );
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// TAppMngr2DriveUtils::LocationFromFileName()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TAppMngr2Location TAppMngr2DriveUtils::LocationFromFileNameL(
- const TDesC& aFileName, RFs& aFs )
- {
- TParsePtrC fileNameParser( aFileName );
- const TChar driveLetter( fileNameParser.Drive()[ 0 ] );
- TInt driveNumber;
- User::LeaveIfError( aFs.CharToDrive( driveLetter, driveNumber ) );
- return LocationFromDriveL( driveNumber, aFs );
- }
-
-// ---------------------------------------------------------------------------
-// TAppMngr2DriveUtils::LocationFromDrive()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TAppMngr2Location TAppMngr2DriveUtils::LocationFromDriveL(
- TInt aDrive, RFs& aFs )
- {
- TUint driveStatus = 0;
- User::LeaveIfError( DriveInfo::GetDriveStatus( aFs, aDrive, driveStatus ) );
- if( driveStatus & DriveInfo::EDriveRemovable )
- {
- return EAppMngr2LocationMemoryCard;
- }
- if( driveStatus & DriveInfo::EDriveExternallyMountable )
- {
- return EAppMngr2LocationMassStorage;
- }
- return EAppMngr2LocationPhone;
- }
-
-// ---------------------------------------------------------------------------
-// TAppMngr2DriveUtils::NearestResourceFileLC()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TFileName* TAppMngr2DriveUtils::NearestResourceFileLC(
- const TDesC& aFileName, RFs& aFs )
- {
- FLOG( "NearestResourceFileLC( %S )", &aFileName );
-
- TInt romDriveNumber = KErrNotFound;
- DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRom, romDriveNumber );
- TChar romDriveLetter;
- User::LeaveIfError( aFs.DriveToChar( romDriveNumber, romDriveLetter ) );
-
- TFileName* fullName = new (ELeave) TFileName;
- CleanupStack::PushL( fullName );
-
- fullName->Format( KDriveFormat, static_cast( romDriveLetter ) );
- fullName->Append( KDC_RESOURCE_FILES_DIR );
- fullName->Append( aFileName );
-
- BaflUtils::NearestLanguageFile( aFs, *fullName );
- FLOG( "NearestResourceFileLC, returns %S", fullName );
- return fullName;
- }
-
-// ---------------------------------------------------------------------------
-// TAppMngr2DriveUtils::FullBitmapFileNameLC()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* TAppMngr2DriveUtils::FullBitmapFileNameLC(
- const TDesC& aBitmapFile, RFs& aFs )
- {
- FLOG( "FullBitmapFileNameLC( %S )", &aBitmapFile );
- TInt romDriveNumber = KErrNotFound;
- DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRom, romDriveNumber );
- TChar romDriveLetter;
- User::LeaveIfError( aFs.DriveToChar( romDriveNumber, romDriveLetter ) );
-
- HBufC* fullName = HBufC::NewLC( KMaxFileName );
- TPtr fullNameDes = fullName->Des();
-
- fullNameDes.Format( KDriveFormat, static_cast( romDriveLetter ) );
- fullNameDes.Append( KDC_APP_BITMAP_DIR );
- fullNameDes.Append( aBitmapFile );
-
- FLOG( "FullBitmapFileNameLC, returns %S", fullName );
- return fullName;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/src/appmngr2drmutils.cpp
--- a/appinstall_plat/appmngr2runtimeapi/src/appmngr2drmutils.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility functions for DRM file handling
-*
-*/
-
-
-#include "appmngr2drmutils.h" // TAppMngr2DRMUtils
-#include "appmngr2debugutils.h" // FLOG macros
-#include // ContentAccess::CContent
-#include // CDRMHelper
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// TAppMngr2DRMUtils::IsDRMProtected()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool TAppMngr2DRMUtils::IsDRMProtected( const TDesC& aFileName )
- {
- FLOG( "TAppMngr2DRMUtils::IsDRMProtected( %S )", &aFileName );
- TInt isProtected = EFalse;
-
- ContentAccess::CContent* content = NULL;
- TRAPD( err, content = ContentAccess::CContent::NewL( aFileName ) );
- FLOG( "TAppMngr2DRMUtils::IsDRMProtected(), CAF err %d", err );
- if( err == KErrNone )
- {
- content->GetAttribute( ContentAccess::EIsProtected, isProtected );
- delete content;
- }
-
- FLOG( "TAppMngr2DRMUtils::IsDRMProtected() returns %d", isProtected );
- return isProtected;
- }
-
-// ---------------------------------------------------------------------------
-// TAppMngr2DRMUtils::IsDRMForwardable()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool TAppMngr2DRMUtils::IsDRMForwardable( const TDesC& aFileName )
- {
- FLOG( "TAppMngr2DRMUtils::IsDRMForwardable( %S )", &aFileName );
- TInt isForwardable = ETrue;
-
- ContentAccess::CContent* content = NULL;
- TRAPD( err, content = ContentAccess::CContent::NewL( aFileName ) );
- FLOG( "TAppMngr2DRMUtils::IsDRMForwardable(), CAF err %d", err );
- if( err == KErrNone )
- {
- content->GetAttribute( ContentAccess::EIsForwardable, isForwardable );
- delete content;
- }
-
- FLOG( "TAppMngr2DRMUtils::IsDRMForwardable() returns %d", isForwardable );
- return isForwardable;
- }
-
-// ---------------------------------------------------------------------------
-// TAppMngr2DRMUtils::IsDRMRightsObjectExpiredOrMissingL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool TAppMngr2DRMUtils::IsDRMRightsObjectExpiredOrMissingL( const TDesC& aFileName )
- {
- FLOG( "TAppMngr2DRMUtils::IsDRMRightsObjectExpiredOrMissingL( %S )", &aFileName );
- TInt err = KErrNone;
-
- ContentAccess::CContent* content = ContentAccess::CContent::NewLC( aFileName );
- content->GetAttribute( ContentAccess::ECanExecute, err );
- CleanupStack::PopAndDestroy( content );
-
- TBool isRightsObjectExpiredOrMissing = EFalse;
- if( err == KErrCANoRights || err == KErrCANoPermission )
- {
- isRightsObjectExpiredOrMissing = ETrue;
- }
- FLOG( "TAppMngr2DRMUtils::IsDRMRightsObjectExpiredOrMissingL() returns %d",
- isRightsObjectExpiredOrMissing );
- return isRightsObjectExpiredOrMissing;
- }
-
-// ---------------------------------------------------------------------------
-// TAppMngr2DRMUtils::IsDRMRightsObjectMissingL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool TAppMngr2DRMUtils::IsDRMRightsObjectMissingL( const TDesC& aFileName )
- {
- FLOG( "TAppMngr2DRMUtils::IsDRMRightsObjectMissingL( %S )", &aFileName );
- TUint32 intent = 0;
- TBool isExpired = EFalse;
- TBool isSendingAllowed = EFalse;
-
- CDRMHelperRightsConstraints* rightsPlay = NULL;
- CDRMHelperRightsConstraints* rightsDisplay = NULL;
- CDRMHelperRightsConstraints* rightsExecute = NULL;
- CDRMHelperRightsConstraints* rightsPrint = NULL;
-
- CDRMHelper* drm = CDRMHelper::NewLC( *CCoeEnv::Static() );
- TRAPD( err, drm->GetRightsDetailsL( aFileName, intent, isExpired, isSendingAllowed,
- rightsPlay, rightsDisplay, rightsExecute, rightsPrint ));
- FLOG( "TAppMngr2DRMUtils::IsDRMRightsObjectMissingL(), GetRightsDetailsL err %d", err );
- CleanupStack::PopAndDestroy( drm );
-
- delete rightsPlay;
- delete rightsDisplay;
- delete rightsExecute;
- delete rightsPrint;
-
- TBool isRightsObjectMissing = EFalse;
- if( err == KErrCANoRights )
- {
- isRightsObjectMissing = ETrue;
- }
- FLOG( "TAppMngr2DRMUtils::IsDRMRightsObjectMissingL() returns %d", isRightsObjectMissing );
- return isRightsObjectMissing;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/src/appmngr2infobase.cpp
--- a/appinstall_plat/appmngr2runtimeapi/src/appmngr2infobase.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,243 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base class implementation for items displayed in AppMngr2
-*
-*/
-
-
-#include "appmngr2infobase.h" // CAppMngr2InfoBase
-#include "appmngr2runtime.h" // CAppMngr2Runtime
-#include "appmngr2common.hrh" // Default icon indexes
-//#include // Resource IDs
-#include // DisplayTextLanguageSpecificNumberConversion
-#include // StringLoader
-#include // TResourceReader
-#include // Math::Round
-
-const TUint KKiloByte = KKilo;
-const TUint KMegaByte = KKilo*KKiloByte;
-const TUint KGigaByte = KKilo*KMegaByte;
-const TInt KDecimalPlaces = 0;
-
-
-// ======== LOCAL FUNCTIONS =========
-
-// ---------------------------------------------------------------------------
-// DivideAndReturnRoundedInt()
-// ---------------------------------------------------------------------------
-//
-TInt DivideAndReturnRoundedInt( TInt64 aDivident, TUint aDivisor )
- {
- // Ignored possible math errors returned by Math::Round() and Math::Int().
- TReal rounded = 0;
- Math::Round( rounded, I64REAL( aDivident ) / aDivisor, KDecimalPlaces );
- if( rounded < 1 )
- {
- rounded = 1;
- }
- TInt32 final = 0;
- Math::Int( final, rounded );
- return final;
- }
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2InfoBase::ConstructL()
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::~CAppMngr2InfoBase()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2InfoBase::~CAppMngr2InfoBase()
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::Runtime()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2Runtime& CAppMngr2InfoBase::Runtime() const
- {
- return iRuntime;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::SpecificIconL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CGulIcon* CAppMngr2InfoBase::SpecificIconL() const
- {
- User::Leave( KErrNotSupported ); // should not get here
- return NULL;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::IndicatorIconIndex()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CAppMngr2InfoBase::IndicatorIconIndex() const
- {
- if( iLocation == EAppMngr2LocationMemoryCard )
- {
- return EAppMngr2IconQgnIndiAmInstMmcAdd;
- }
- if( iLocation == EAppMngr2LocationMassStorage )
- {
- return EAppMngr2IconQgnIndiFmgrMsAdd;
- }
- return EAppMngr2NoIndicatorIcon;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::SpecificIndicatorIconL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CGulIcon* CAppMngr2InfoBase::SpecificIndicatorIconL() const
- {
- User::Leave( KErrNotSupported ); // should not get here
- return NULL;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::IsShowOnTop()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CAppMngr2InfoBase::IsShowOnTop() const
- {
- return iShowOnTop;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::GetMenuItemsL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoBase::GetMenuItemsL(
- RPointerArray& /*aMenuCmds*/ )
- {
- // no item specific menu items by default
- }
-
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::SupportsGenericCmd()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CAppMngr2InfoBase::SupportsGenericCommand( TInt /*aCmdId*/ )
- {
- return EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::GetMiddleSoftkeyCommandL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoBase::GetMiddleSoftkeyCommandL(
- TInt& /*aResourceId*/, TInt& /*aCommandId*/ )
- {
- // no item specific middle softkey command by default
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::SizeStringWithUnitsL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CAppMngr2InfoBase::SizeStringWithUnitsL( TInt64 aSizeInBytes )
- {
- HBufC* dispString = NULL;
- if( aSizeInBytes <= KMegaByte )
- {
- TInt kiloBytes = DivideAndReturnRoundedInt( aSizeInBytes, KKiloByte );
- // Temporary fix until appmngr2pluginapi is removed
- // dispString = StringLoader::LoadLC( R_SWINS_UNIT_KILOBYTE, kiloBytes );
- _LIT( KKiloByte, "%N kB" );
- dispString = KKiloByte().AllocLC();
- }
- else if( aSizeInBytes <= KGigaByte )
- {
- TInt megaBytes = DivideAndReturnRoundedInt( aSizeInBytes, KMegaByte );
- // Temporary fix until appmngr2pluginapi is removed
- // dispString = StringLoader::LoadLC( R_SWINS_UNIT_MEGABYTE, megaBytes );
- _LIT( KMegaByte, "%N MB" );
- dispString = KMegaByte().AllocLC();
- }
- else // aSizeInBytes > KGigaByte
- {
- TInt gigaBytes = DivideAndReturnRoundedInt( aSizeInBytes, KGigaByte );
- // Temporary fix until appmngr2pluginapi is removed
- // dispString = StringLoader::LoadLC( R_SWINS_UNIT_GIGABYTE, gigaBytes );
- _LIT( KGigaByte, "%N GB" );
- dispString = KGigaByte().AllocLC();
- }
-
- TPtr ptr = dispString->Des();
- AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr );
-
- CleanupStack::Pop( dispString );
- return dispString;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::ReadMenuItemDataFromResourceL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoBase::ReadMenuItemDataFromResourceL(
- TInt aResourceId, CEikMenuPaneItem::SData& aMenuItemData )
- {
- TResourceReader reader;
- iRuntime.EikonEnv().CreateResourceReaderLC( reader, aResourceId );
-
- aMenuItemData.iCommandId = reader.ReadInt32();
- aMenuItemData.iCascadeId = reader.ReadInt32();
- aMenuItemData.iFlags = reader.ReadInt32();
- aMenuItemData.iText.Copy( reader.ReadTPtrC() );
- aMenuItemData.iExtraText = reader.ReadTPtrC();
- // bmpfile, bmpid, bmpmask, and extension ignored
-
- CleanupStack::PopAndDestroy(); // resource reader
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::Location()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TAppMngr2Location CAppMngr2InfoBase::Location() const
- {
- return iLocation;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::LocationDrive()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TDriveUnit CAppMngr2InfoBase::LocationDrive() const
- {
- return iLocationDrive;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoBase::CAppMngr2InfoBase()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2InfoBase::CAppMngr2InfoBase( CAppMngr2Runtime& aRuntime,
- RFs& aFsSession ) : iFs( aFsSession ), iRuntime( aRuntime )
- {
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/src/appmngr2infoiterator.cpp
--- a/appinstall_plat/appmngr2runtimeapi/src/appmngr2infoiterator.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements MCUIInfoIterator API for CCUIDetailsDialog
-*
-*/
-
-
-#include "appmngr2infoiterator.h" // CAppMngr2InfoIterator
-#include "appmngr2infobase.h" // CAppMngr2InfoBase
-#include // CDesC8Array
-#include // StringLoader
-#include // Resource IDs
-
-const TInt KGranularity = 8;
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::CAppMngr2InfoIterator()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2InfoIterator::CAppMngr2InfoIterator( CAppMngr2InfoBase& aInfo,
- TAppMngr2InfoType aInfoType ) : iInfo( aInfo ), iInfoType( aInfoType )
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::BaseConstructL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoIterator::BaseConstructL()
- {
- iKeys = new ( ELeave ) CDesCArrayFlat( KGranularity );
- iValues = new ( ELeave ) CDesCArrayFlat( KGranularity );
- SetAllFieldsL();
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::~CAppMngr2InfoIterator()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2InfoIterator::~CAppMngr2InfoIterator()
- {
- if( iKeys )
- {
- iKeys->Reset();
- delete iKeys;
- }
- if( iValues )
- {
- iValues->Reset();
- delete iValues;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::HasNext()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CAppMngr2InfoIterator::HasNext() const
- {
- TInt keysCount = iKeys->Count();
- return ( keysCount > 0 && keysCount > iCurrentIndex );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::Next()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoIterator::Next( TPtrC& aKey, TPtrC& aValue )
- {
- aKey.Set( ( *iKeys )[ iCurrentIndex ] );
- aValue.Set( ( *iValues )[ iCurrentIndex ] );
- iCurrentIndex++;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::Reset()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoIterator::Reset()
- {
- iCurrentIndex = 0;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::SetFieldL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoIterator::SetFieldL( TInt aResourceId, const TDesC& aValue )
- {
- HBufC* fieldName = StringLoader::LoadLC( aResourceId );
- iKeys->AppendL( fieldName->Des() );
- CleanupStack::PopAndDestroy( fieldName );
- iValues->AppendL( aValue );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::SetAllFieldsL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoIterator::SetAllFieldsL()
- {
- SetFieldL( R_SWCOMMON_DETAIL_NAME, iInfo.Name() );
- SetStatusL();
- SetLocationL();
- SetFieldL( R_SWCOMMON_DETAIL_APPSIZE, iInfo.Details() );
- SetOtherFieldsL();
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::SetStatusL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoIterator::SetStatusL()
- {
- HBufC* status = NULL;
- if( iInfoType == EAppMngr2StatusInstalled )
- {
- status = StringLoader::LoadLC( R_SWCOMMON_DETAIL_VALUE_INSTALLED );
- }
- else // iInfoType is EAppMngr2StatusNotInstalled
- {
- status = StringLoader::LoadLC( R_SWCOMMON_DETAIL_VALUE_NOT_INSTALLED );
- }
- SetFieldL( R_SWCOMMON_DETAIL_STATUS, *status );
- CleanupStack::PopAndDestroy( status );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::SetLocationL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoIterator::SetLocationL()
- {
- TChar driveChar;
- RFs::DriveToChar( iInfo.LocationDrive(), driveChar );
- const TInt KSingleLetter = 1;
- TBuf driveLetter;
- driveLetter.Append( driveChar );
-
- HBufC* memory = NULL;
- if( iInfo.Location() == EAppMngr2LocationMemoryCard )
- {
- memory = StringLoader::LoadLC( R_SWCOMMON_DETAIL_VALUE_MMC, driveLetter );
- }
- else if( iInfo.Location() == EAppMngr2LocationMassStorage )
- {
- memory = StringLoader::LoadLC( R_SWCOMMON_DETAIL_VALUE_MASS_STORAGE, driveLetter );
- }
- else
- {
- memory = StringLoader::LoadLC( R_SWCOMMON_DETAIL_VALUE_DEVICE, driveLetter );
- }
- SetFieldL( R_SWCOMMON_DETAIL_LOCATION, *memory );
- CleanupStack::PopAndDestroy( memory );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2InfoIterator::SetOtherFieldsL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2InfoIterator::SetOtherFieldsL()
- {
- // empty default implementation
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/src/appmngr2packageinfo.cpp
--- a/appinstall_plat/appmngr2runtimeapi/src/appmngr2packageinfo.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: PackageInfo implementation
-*
-*/
-
-
-#include "appmngr2packageinfo.h"
-#include // StringLoader
-#include // CAknQueryDialog
-//#include // Resource IDs
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAppMngr2PackageInfo::ConstructL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2PackageInfo::ConstructL()
- {
- CAppMngr2InfoBase::ConstructL(); // base class
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2PackageInfo::~CAppMngr2PackageInfo()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2PackageInfo::~CAppMngr2PackageInfo()
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2PackageInfo::CAppMngr2PackageInfo()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2PackageInfo::CAppMngr2PackageInfo( CAppMngr2Runtime& aRuntime,
- RFs& aFsSession ) : CAppMngr2InfoBase( aRuntime, aFsSession )
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2PackageInfo::ShowDeleteConfirmationQueryL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CAppMngr2PackageInfo::ShowDeleteConfirmationQueryL()
- {
- /* Temporary fix until appmngr2pluginapi is removed
-
- HBufC* deleteQuery = StringLoader::LoadLC( R_AM_DELETEQUERY, Name() );
-
- CAknQueryDialog* dlg = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone );
- TBool okToDelete = dlg->ExecuteLD( R_APPMNGR2_YES_NO_CONFIRMATION_QUERY, *deleteQuery );
- CleanupStack::PopAndDestroy( deleteQuery );
-
- return okToDelete;
- */
- return ETrue;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/src/appmngr2recognizedfile.cpp
--- a/appinstall_plat/appmngr2runtimeapi/src/appmngr2recognizedfile.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Class that contains file name and it's MIME type
-*
-*/
-
-
-#include "appmngr2recognizedfile.h" // CAppMngr2RecognizedFile
-#include // TDataType
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAppMngr2RecognizedFile::NewL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2RecognizedFile* CAppMngr2RecognizedFile::NewL(
- const TDesC& aFileName, const TDataType& aDataType )
- {
- CAppMngr2RecognizedFile* self = new (ELeave) CAppMngr2RecognizedFile;
- CleanupStack::PushL( self );
- self->iFileName = aFileName.AllocL();
- self->iDataType = new (ELeave) TDataType( aDataType );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2RecognizedFile::NewL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2RecognizedFile* CAppMngr2RecognizedFile::NewL(
- HBufC* aFileName, HBufC* aMimeType )
- {
- CAppMngr2RecognizedFile* self = new (ELeave) CAppMngr2RecognizedFile;
- CleanupStack::PushL( self );
-
- TBuf8 dataType;
- dataType.Copy( *aMimeType );
- self->iDataType = new (ELeave) TDataType( dataType );
-
- // takes ownership of the parameters, may not leave after this
- self->iFileName = aFileName;
- delete aMimeType;
-
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2RecognizedFile::FileName()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TDesC& CAppMngr2RecognizedFile::FileName()
- {
- return *iFileName;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2RecognizedFile::
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TDataType& CAppMngr2RecognizedFile::DataType()
- {
- return *iDataType;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2RecognizedFile::~CAppMngr2RecognizedFile()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2RecognizedFile::~CAppMngr2RecognizedFile()
- {
- delete iFileName;
- delete iDataType;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2RecognizedFile::CAppMngr2RecognizedFile()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2RecognizedFile::CAppMngr2RecognizedFile()
- {
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/src/appmngr2runtime.cpp
--- a/appinstall_plat/appmngr2runtimeapi/src/appmngr2runtime.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Base class implementation for AppMngr2 plug-ins
-*
-*/
-
-
-#include "appmngr2runtime.h" // CAppMngr2Runtime
-#include "appmngr2driveutils.h" // TAppMngr2DriveUtils
-#include "appmngr2debugutils.h" // FLOG macros
-#include // REComSession
-#include // CEikonEnv
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAppMngr2Runtime::NewL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2Runtime* CAppMngr2Runtime::NewL( TUid aImplementationUid,
- MAppMngr2RuntimeObserver &aObserver )
- {
- FLOG( "CAppMngr2Runtime::NewL( 0x%08x )", aImplementationUid.iUid );
- TUid destructorIDKey;
- TAny* ptr = REComSession::CreateImplementationL( aImplementationUid,
- destructorIDKey, &aObserver );
- CAppMngr2Runtime* self = reinterpret_cast( ptr );
- if( self )
- {
- CleanupStack::PushL( self );
- self->iDtorIDKey = destructorIDKey;
- self->ConstructL( aImplementationUid );
- CleanupStack::Pop( self );
- }
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2Runtime::~CAppMngr2Runtime()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2Runtime::~CAppMngr2Runtime()
- {
- FLOG( "CAppMngr2Runtime::~CAppMngr2Runtime( 0x%08x )", iRuntimeUid.iUid );
- REComSession::DestroyedImplementation( iDtorIDKey );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2Runtime::RuntimeUid()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TUid CAppMngr2Runtime::RuntimeUid() const
- {
- return iRuntimeUid;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2Runtime::AddNearestResourceFileL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CAppMngr2Runtime::AddNearestResourceFileL( const TDesC& aFileName )
- {
- TFileName* fullName = TAppMngr2DriveUtils::NearestResourceFileLC( aFileName,
- EikonEnv().FsSession() );
- TInt resourceId = EikonEnv().AddResourceFileL( *fullName );
- CleanupStack::PopAndDestroy( fullName );
- return resourceId;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2Runtime::FullBitmapFileNameLC()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C HBufC* CAppMngr2Runtime::FullBitmapFileNameLC( const TDesC& aBitmapFile )
- {
- HBufC* fullName = TAppMngr2DriveUtils::FullBitmapFileNameLC( aBitmapFile,
- EikonEnv().FsSession() );
- return fullName;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2Runtime::EikonEnv()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CEikonEnv& CAppMngr2Runtime::EikonEnv()
- {
- if( !iCachedEikonEnv )
- {
- iCachedEikonEnv = CEikonEnv::Static();
- }
- return *iCachedEikonEnv;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2Runtime::Observer()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C MAppMngr2RuntimeObserver& CAppMngr2Runtime::Observer()
- {
- return iObserver;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2Runtime::GetAdditionalDirsToScanL()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CAppMngr2Runtime::GetAdditionalDirsToScanL( RFs& /*aFsSession*/,
- RPointerArray& /*aDirs*/ )
- {
- // no additional directories by default
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2Runtime::CAppMngr2Runtime()
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CAppMngr2Runtime::CAppMngr2Runtime( MAppMngr2RuntimeObserver &aObserver )
- : iObserver( aObserver )
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2Runtime::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2Runtime::ConstructL( TUid aImplementationUid )
- {
- iRuntimeUid = aImplementationUid;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/bwins/appmngr2runtimeapitestu.def
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/bwins/appmngr2runtimeapitestu.def Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/conf/ui_appmngr2runtimeapitest.cfg
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/conf/ui_appmngr2runtimeapitest.cfg Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-//
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description: AppMngr2 STIF test configuration file
-//
-
-
-// Common definitions to all test cases
-[Define]
-KNumberToRepeatOOMTest 50
-KSisxPluginUid 20016BF6
-KMidletPluginUid 20016BF8
-KWidgetPluginUid 20016BFA
-[Enddefine]
-
-
-// All tests combined into one test case as subroutines for ATS3.
-// This is to make sure that tests are run sequentially. Tests will
-// fail if they are run in parallel (at most one installer instance
-// can be active at a time).
-[Test]
-title AppMngr2 Runtime API Tests
-callsub AppMngr2_OOM_Test
-bringtoforeground
-callsub AppMngr2_SISX_Test
-callsub AppMngr2_Widget_Test
-sendtobackground
-[Endtest]
-
-
-[Sub AppMngr2_OOM_Test]
-print AppMngr2_OOM_Test
-create appmngr2runtimeapitest test
-
-oomignorefailure ON
-loop KNumberToRepeatOOMTest
-oomheapfailnext LOOP_COUNTER
-test LoadAllPlugins
-endloop
-oomignorefailure OFF
-oomheaptonormal
-
-delete test
-[EndSub]
-
-
-[Sub AppMngr2_SISX_Test]
-print AppMngr2_SISX_Test
-create appmngr2runtimeapitest test
-
-test CheckFilesExist e:\testing\data\ sistest.sisx
-
-test LoadPlugin KSisxPluginUid
-test CheckPluginsLoaded KSisxPluginUid
-test LoadIcons
-test GetAdditionalDirsToScan
-
-test GetInstallationFiles e:\testing\data\
-test CheckInstallationFiles sistest.sisx
-
-// Commented out because Details dialog does not get presskey events
-//test ShowInstallationFileDetails sistest.sisx
-//pause 2000
-//presskey global EKeyDevice0 // Ok to close details dialog
-//pause 2000
-//presskey global EKeyDevice0 // Additional press (if the above missed)
-//waittestclass test
-//test CheckShowDetailsEnded
-
-test StartInstallFile sistest.sisx
-pause 2000
-presskey global EKeyDevice0 // Confirm install
-pause 2000
-presskey global EKeyDevice0 // Accept untrusted
-pause 2000
-presskey global EKeyDevice0 // Owerwrite existing (if present)
-pause 2000
-presskey global EKeyDevice0 // Additional press (if some of the above missed)
-waittestclass test
-test CheckInstallEnded
-
-test GetInstalledApps
-test CheckAppInstalled sistest
-
-// Commented out because Details dialog does not get presskey events
-//test ShowInstalledDetails sistest
-//pause 2000
-//presskey global EKeyDevice0 // Ok to close details dialog
-//pause 2000
-//presskey global EKeyDevice0 // Additional press (if the above missed)
-//waittestclass test
-//test CheckShowDetailsEnded
-
-test StartUninstallApp sistest
-pause 2000
-presskey global EKeyDevice0 // Accept uninstall
-pause 2000
-presskey global EKeyDevice0 // Additional press (if the above missed)
-waittestclass test
-test CheckUninstallEnded
-
-delete test
-[EndSub]
-
-
-[Sub AppMngr2_Widget_Test]
-print AppMngr2_Widget_Test
-create appmngr2runtimeapitest test
-
-test CheckFilesExist e:\testing\data\ widgettest.wgz
-
-test LoadPlugin KWidgetPluginUid
-test CheckPluginsLoaded KWidgetPluginUid
-test LoadIcons
-test GetAdditionalDirsToScan
-
-test GetInstallationFiles e:\testing\data\
-test CheckInstallationFiles widgettest.wgz
-
-// Commented out because Details dialog does not get presskey events
-//test ShowInstallationFileDetails widgettest.wgz
-//pause 2000
-//presskey global EKeyDevice0 // Ok to close details dialog
-//pause 2000
-//presskey global EKeyDevice0 // Additional press (if the above missed)
-//waittestclass test
-//test CheckShowDetailsEnded
-
-test StartInstallFile widgettest.wgz
-pause 2000
-presskey global EKeyDevice0 // Confirm install (and overwrite existing if present)
-pause 2000
-presskey global EKeyDevice0 // Select internal memory
-pause 2000
-presskey global EKeyDevice0 // Additional press (if some of the above missed)
-waittestclass test
-test CheckInstallEnded
-
-test GetInstalledApps
-test CheckAppInstalled widgettest
-
-// Commented out because Details dialog does not get presskey events
-//test ShowInstalledDetails widgettest
-//pause 2000
-//presskey global EKeyDevice0 // Ok to close details dialog
-//pause 2000
-//presskey global EKeyDevice0 // Additional press (if the above missed)
-//waittestclass test
-//test CheckShowDetailsEnded
-
-test StartUninstallApp widgettest
-pause 2000
-presskey global EKeyDevice0 // Accept uninstall
-pause 2000
-presskey global EKeyDevice0 // Additional press (if the above missed)
-waittestclass test
-test CheckUninstallEnded
-
-delete test
-[EndSub]
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/conf/ui_appmngr2runtimeapitest_winscw.cfg
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/conf/ui_appmngr2runtimeapitest_winscw.cfg Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-//
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description: AppMngr2 STIF test configuration file for WINSCW emulator
-//
-
-
-// Common definitions to all test cases
-[Define]
-KNumberToRepeatOOMTest 50
-KSisxPluginUid 20016BF6
-KMidletPluginUid 20016BF8
-KWidgetPluginUid 20016BFA
-[Enddefine]
-
-
-// All tests combined into one test case as subroutines for ATS3.
-// This is to make sure that tests are run sequentially. Tests will
-// fail if they are run in parallel (at most one installer instance
-// can be active at a time).
-[Test]
-title AppMngr2 Runtime API Tests
-callsub AppMngr2_OOM_Test
-bringtoforeground
-callsub AppMngr2_SISX_Test
-callsub AppMngr2_Widget_Test
-sendtobackground
-[Endtest]
-
-
-[Sub AppMngr2_OOM_Test]
-print AppMngr2_OOM_Test
-create appmngr2runtimeapitest test
-
-oomignorefailure ON
-loop KNumberToRepeatOOMTest
-oomheapfailnext LOOP_COUNTER
-test LoadAllPlugins
-endloop
-oomignorefailure OFF
-oomheaptonormal
-
-delete test
-[EndSub]
-
-
-[Sub AppMngr2_SISX_Test]
-print AppMngr2_SISX_Test
-create appmngr2runtimeapitest test
-
-test CheckFilesExist e:\testing\data\ sistest_winscw.sisx
-
-test LoadPlugin KSisxPluginUid
-test CheckPluginsLoaded KSisxPluginUid
-test LoadIcons
-test GetAdditionalDirsToScan
-
-test GetInstallationFiles e:\testing\data\
-test CheckInstallationFiles sistest_winscw.sisx
-
-// Commented out because Details dialog does not get presskey events
-//test ShowInstallationFileDetails sistest_winscw.sisx
-//pause 2000
-//presskey global EKeyDevice0 // Ok to close details dialog
-//pause 2000
-//presskey global EKeyDevice0 // Additional press (if the above missed)
-//waittestclass test
-//test CheckShowDetailsEnded
-
-test StartInstallFile sistest_winscw.sisx
-pause 2000
-presskey global EKeyDevice0 // Confirm install
-pause 2000
-presskey global EKeyDevice0 // Accept untrusted
-pause 2000
-presskey global EKeyDevice0 // Owerwrite existing (if present)
-pause 2000
-presskey global EKeyDevice0 // Additional press (if some of the above missed)
-waittestclass test
-test CheckInstallEnded
-
-test GetInstalledApps
-test CheckAppInstalled sistest
-
-// Commented out because Details dialog does not get presskey events
-//test ShowInstalledDetails sistest
-//pause 2000
-//presskey global EKeyDevice0 // Ok to close details dialog
-//pause 2000
-//presskey global EKeyDevice0 // Additional press (if the above missed)
-//waittestclass test
-//test CheckShowDetailsEnded
-
-test StartUninstallApp sistest
-pause 2000
-presskey global EKeyDevice0 // Accept uninstall
-pause 2000
-presskey global EKeyDevice0 // Additional press (if the above missed)
-waittestclass test
-test CheckUninstallEnded
-
-delete test
-[EndSub]
-
-
-[Sub AppMngr2_Widget_Test]
-print AppMngr2_Widget_Test
-create appmngr2runtimeapitest test
-
-test CheckFilesExist e:\testing\data\ widgettest.wgz
-
-test LoadPlugin KWidgetPluginUid
-test CheckPluginsLoaded KWidgetPluginUid
-test LoadIcons
-test GetAdditionalDirsToScan
-
-test GetInstallationFiles e:\testing\data\
-test CheckInstallationFiles widgettest.wgz
-
-// Commented out because Details dialog does not get presskey events
-//test ShowInstallationFileDetails widgettest.wgz
-//pause 2000
-//presskey global EKeyDevice0 // Ok to close details dialog
-//pause 2000
-//presskey global EKeyDevice0 // Additional press (if the above missed)
-//waittestclass test
-//test CheckShowDetailsEnded
-
-test StartInstallFile widgettest.wgz
-pause 2000
-presskey global EKeyDevice0 // Confirm install (and overwrite existing if present)
-pause 2000
-presskey global EKeyDevice0 // Select internal memory
-pause 2000
-presskey global EKeyDevice0 // Additional press (if some of the above missed)
-waittestclass test
-test CheckInstallEnded
-
-test GetInstalledApps
-test CheckAppInstalled widgettest
-
-// Commented out because Details dialog does not get presskey events
-//test ShowInstalledDetails widgettest
-//pause 2000
-//presskey global EKeyDevice0 // Ok to close details dialog
-//pause 2000
-//presskey global EKeyDevice0 // Additional press (if the above missed)
-//waittestclass test
-//test CheckShowDetailsEnded
-
-test StartUninstallApp widgettest
-pause 2000
-presskey global EKeyDevice0 // Accept uninstall
-pause 2000
-presskey global EKeyDevice0 // Additional press (if the above missed)
-waittestclass test
-test CheckUninstallEnded
-
-delete test
-[EndSub]
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data/mmc/sistest.sisx
Binary file appinstall_plat/appmngr2runtimeapi/tsrc/data/mmc/sistest.sisx has changed
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data/mmc/sistest_winscw.sisx
Binary file appinstall_plat/appmngr2runtimeapi/tsrc/data/mmc/sistest_winscw.sisx has changed
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data/mmc/widgettest.wgz
Binary file appinstall_plat/appmngr2runtimeapi/tsrc/data/mmc/widgettest.wgz has changed
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/make_all.bat
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/make_all.bat Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: Utility script to create test installation files
-@rem
-
-
-
-cd sistest
-call make_sistest_sisx.bat
-cd ..\widgettest
-call make_widgettest_wgz.bat
-cd ..
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/bld.inf
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/bld.inf Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for sistest
-*
-*/
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
-sistest.mmp
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/make_sistest_sisx.bat
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/make_sistest_sisx.bat Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: Utility script to create test sisx files
-@rem
-
-
-call bldmake bldfiles
-call abld build armv5 urel
-call abld build winscw udeb
-makesis sistest.pkg
-makesis sistest_winscw.pkg
-signsis sistest.sis sistest.sisx selfsign.cer selfsign.key
-signsis sistest_winscw.sis sistest_winscw.sisx selfsign.cer selfsign.key
-del /F/Q ..\..\data\mmc\sistest.sisx
-move sistest.sisx ..\..\data\mmc\.
-del /F/Q ..\..\data\mmc\sistest_winscw.sisx
-move sistest_winscw.sisx ..\..\data\mmc\.
-del sistest.sis
-del sistest_winscw.sis
-call abld reallyclean
-call bldmake clean
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/selfsign.cer
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/selfsign.cer Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEOzCCA/ugAwIBAgIBATAJBgcqhkjOOAQDMEMxDTALBgNVBAMTBFRlc3QxFTAT
-BgNVBAsTDFM2MCBTZWN1cml0eTEOMAwGA1UEChMFTm9raWExCzAJBgNVBAYTAkZJ
-MB4XDTA4MTAwODEzMDY0MFoXDTE4MTAwNjEzMDY0MFowQzENMAsGA1UEAxMEVGVz
-dDEVMBMGA1UECxMMUzYwIFNlY3VyaXR5MQ4wDAYDVQQKEwVOb2tpYTELMAkGA1UE
-BhMCRkkwggM6MIICLQYHKoZIzjgEATCCAiACggEBANeyGEpY5ifjJHot7yVoQ3sw
-Yz0EOM+M8kVmy1N3IEBqMFedXcq9DRKnGOXcZuTglsBk1qPiqsC3tsfWtnXphqcr
-eaOuFO2+z9P1bZ0Bm1k9qIrLAn+CtCBQqtDvoolu590swbZzdhACWGY+dtqyOfDZ
-bsja+4fi8VmwRPFlmk5EtsCoYSZrM1yXeRiDyALCpHhVfKI6PtIfrRiuJtlMsVG3
-eOLciEuNGK7TuVnLxRrevqXA5YUM+MwQVvQhGp/7VcSM/sqd9e+RDp8bcwNEOCQg
-I8CW7oNnG4yJCTgC6Zbrxg/LUOibSSYfDByRjtTS+NLiLlyVGf7VFsk3GhF4yX8C
-FQCPR3MImAja9ycDhMOa8JdA7rMVcQKCAQAzB7Lcc4Zq4IEwR4zg/UeguuphJfI+
-WHPL4eiYXg1Xw2LviIAdQi2BdnPgB80SR8Rx21J2LmRz3hu33O+pJZl2ctkFxo9c
-UjeCyUfX07E2g2Jdlyq0hT0LSAW2LmZMtcxxbBl77wUrvdsa3OECsNh42rW7xDcZ
-R5AslyoGVZN1N53ygYEUv1159ZMsqQUpVyLQbFpicgdLp5B5DOlZp1k05auzTMdZ
-ywaZJy+oUwBfyvzyC07OVkdGMh/rQhmwcWuREMhXE8B5IMQg/o4qmSQ6spZoIMn2
-vckroWw/IfWu9/uK8IBP6oruApafPJMMYa3ndhfQoosQxaI6DmEB7Qs+A4IBBQAC
-ggEAD94sGJsW9hBGT0zEs7KdopF/rZr4OCTYLQwmT6D8j5u7VZZFePtkjveM7Ejx
-TXzA6L9+gGzCYWaBtaqelNCA4wOBCmKbgna39xwkXRuRVM47JbdUFfQeOzuQlXEk
-R/0fdbuYz8CkPan5qxRqjknixeMPWAQY7hJNcKgZ8TpzpIhRU1k4vlVADbwG32qj
-ZlbRcEbCb6xQNVuMx278NhdabWDgR5PoFowIt8X7cxuD1IcrZyybbymitlhDicUo
-mSVjSU8aAnYNqUvjD/+oxSZth1IwXfZiU/I+/h+bzdg93Y9nNcokr0z1y5Xwh7wm
-rr13hozzWlqi4pnaP6R2pcZRtjAJBgcqhkjOOAQDAy8AMCwCFFXTpn4dVyy/nokP
-x1Sp3NQ/tQxsAhQsnyBB/d0nET/eTAPyiAi/1uswkA==
------END CERTIFICATE-----
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/selfsign.key
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/selfsign.key Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
------BEGIN DSA PRIVATE KEY-----
-MIIDPQIBAAKCAQEA17IYSljmJ+Mkei3vJWhDezBjPQQ4z4zyRWbLU3cgQGowV51d
-yr0NEqcY5dxm5OCWwGTWo+KqwLe2x9a2demGpyt5o64U7b7P0/VtnQGbWT2oissC
-f4K0IFCq0O+iiW7n3SzBtnN2EAJYZj522rI58NluyNr7h+LxWbBE8WWaTkS2wKhh
-JmszXJd5GIPIAsKkeFV8ojo+0h+tGK4m2UyxUbd44tyIS40YrtO5WcvFGt6+pcDl
-hQz4zBBW9CEan/tVxIz+yp3175EOnxtzA0Q4JCAjwJbug2cbjIkJOALpluvGD8tQ
-6JtJJh8MHJGO1NL40uIuXJUZ/tUWyTcaEXjJfwIVAI9HcwiYCNr3JwOEw5rwl0Du
-sxVxAoIBADMHstxzhmrggTBHjOD9R6C66mEl8j5Yc8vh6JheDVfDYu+IgB1CLYF2
-c+AHzRJHxHHbUnYuZHPeG7fc76klmXZy2QXGj1xSN4LJR9fTsTaDYl2XKrSFPQtI
-BbYuZky1zHFsGXvvBSu92xrc4QKw2HjatbvENxlHkCyXKgZVk3U3nfKBgRS/XXn1
-kyypBSlXItBsWmJyB0unkHkM6VmnWTTlq7NMx1nLBpknL6hTAF/K/PILTs5WR0Yy
-H+tCGbBxa5EQyFcTwHkgxCD+jiqZJDqylmggyfa9ySuhbD8h9a73+4rwgE/qiu4C
-lp88kwxhred2F9CiixDFojoOYQHtCz4CggEAD94sGJsW9hBGT0zEs7KdopF/rZr4
-OCTYLQwmT6D8j5u7VZZFePtkjveM7EjxTXzA6L9+gGzCYWaBtaqelNCA4wOBCmKb
-gna39xwkXRuRVM47JbdUFfQeOzuQlXEkR/0fdbuYz8CkPan5qxRqjknixeMPWAQY
-7hJNcKgZ8TpzpIhRU1k4vlVADbwG32qjZlbRcEbCb6xQNVuMx278NhdabWDgR5Po
-FowIt8X7cxuD1IcrZyybbymitlhDicUomSVjSU8aAnYNqUvjD/+oxSZth1IwXfZi
-U/I+/h+bzdg93Y9nNcokr0z1y5Xwh7wmrr13hozzWlqi4pnaP6R2pcZRtgIUAv4J
-AwXM+xLc/vFN22iRKI11evw=
------END DSA PRIVATE KEY-----
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/sistest.cpp
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/sistest.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Basic console application for installation testing
-*
-*/
-
-
-#include "sistest.h"
-#include
-#include
-#include // Console
-
-_LIT( KTextConsoleTitle, "Console" );
-_LIT( KTextFailed, " failed, leave code = %d" );
-_LIT( KTextPressAnyKey, " [press any key]\n" );
-
-LOCAL_D CConsoleBase* console;
-
-LOCAL_C void MainL()
- {
- console->Write(_L("Hello, world!\n"));
- }
-
-LOCAL_C void DoStartL()
- {
- CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
- CleanupStack::PushL(scheduler);
- CActiveScheduler::Install(scheduler);
-
- MainL();
-
- CleanupStack::PopAndDestroy(scheduler);
- }
-
-GLDEF_C TInt E32Main()
- {
- __UHEAP_MARK;
- CTrapCleanup* cleanup = CTrapCleanup::New();
-
- TRAPD( createError, console = Console::NewL( KTextConsoleTitle,
- TSize( KConsFullScreen,KConsFullScreen ) ) );
- if( createError )
- {
- return createError;
- }
-
- TRAPD( mainError, DoStartL() );
- if( mainError )
- {
- console->Printf(KTextFailed, mainError);
- }
- console->Printf(KTextPressAnyKey);
- console->Getch();
-
- delete console;
- delete cleanup;
- __UHEAP_MARKEND;
- return KErrNone;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/sistest.h
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/sistest.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Basic console application for installation testing
-*
-*/
-
-
-#ifndef __SISTEST_H__
-#define __SISTEST_H__
-
-#include
-
-GLDEF_C TInt E32Main();
-
-#endif // __SISTEST_H__
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/sistest.mmp
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/sistest.mmp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for sistest
-*
-*/
-
-
-#include
-
-TARGET sistest.exe
-TARGETTYPE exe
-UID 0 0xE4F8641B
-
-USERINCLUDE .
-APP_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH .
-SOURCE sistest.cpp
-
-LIBRARY euser.lib
-
-SMPSAFE
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/sistest.pkg
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/sistest.pkg Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-;
-; Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: Installation package file for sistest
-;
-
-
-; UID is the exe's UID
-#{"sistest"},(0xE4F8641B),1,0,0
-
-; S60 platform dependencies for S60 3.0 and 5.0
-[0x101F7961],0,0,0,{"Series60ProductID"}
-[0x1028315F],0,0,0,{"Series60ProductID"}
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Files
-"\epoc32\release\armv5\urel\sistest.exe" - "c:\sys\bin\sistest.exe"
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/sistest_winscw.pkg
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/sistest/sistest_winscw.pkg Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-;
-; Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: Installation package file for sistest for WINSCW emulator
-;
-
-
-; UID is the exe's UID
-#{"sistest"},(0xE4F8641B),1,0,0
-
-; S60 platform dependencies for S60 3.0 and 5.0
-[0x101F7961],0,0,0,{"Series60ProductID"}
-[0x1028315F],0,0,0,{"Series60ProductID"}
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Files
-"\epoc32\release\winscw\udeb\sistest.exe" - "c:\sys\bin\sistest.exe"
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/widgettest/Info.plist
Binary file appinstall_plat/appmngr2runtimeapi/tsrc/data_src/widgettest/Info.plist has changed
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/widgettest/make_widgettest_wgz.bat
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/widgettest/make_widgettest_wgz.bat Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-@rem
-@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description: Utility script to create test widget file
-@rem
-
-
-cd ..
-zip widgettest.zip widgettest\Info.plist widgettest\widgettest.html widgettest\widgettest.css widgettest\widgettest.js
-ren widgettest.zip widgettest.wgz
-del /F/Q ..\data\mmc\widgettest.wgz
-move widgettest.wgz ..\data\mmc\.
-cd widgettest
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/widgettest/widgettest.css
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/widgettest/widgettest.css Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#mainView {
- font-size: 14px;
- color: blue;
-}
-
-h2 {
- text-align: center;
- color: black;
-}
-
-.button {
- font-size: 14px;
- color: blue;
- background-color: grey;
- margin: 20px 0px 0px 150px;
-}
-
-#resultView {
- text-align: center;
- color: blue;
- font-size: 16pt;
- font-weight: bold;
- display: none;
-}
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/widgettest/widgettest.html
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/widgettest/widgettest.html Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
WidgetTest
-
-
-
-
-
-
-
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/data_src/widgettest/widgettest.js
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/data_src/widgettest/widgettest.js Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Basic widget for installation testing
-*
-*/
-
-
-function showHelloView()
-{
- // hide the main view and show the result view
- document.getElementById("mainView").style.display = "none";
- document.getElementById("resultView").style.display = "block";
-
- // detect if the output
tag has a child
- var child = document.getElementById('output').firstChild;
- // remove the child if exists
- if( child != null )
- document.getElementById('output').removeChild(child);
-
- // create a new text node
- var newText = document.createTextNode( "Hello, World!" );
- // append to the output
tag
- document.getElementById('output').appendChild(newText);
-
- // change the right softkey label and assign a custom callback function
- window.menu.setRightSoftKeyLabel('Back', showMainView);
-}
-
-
-function showMainView()
-{
- // hide the result view and show the main view
- document.getElementById("resultView").style.display = "none";
- document.getElementById("mainView").style.display = "block";
-
- // restore the right softkey
- window.menu.setRightSoftKeyLabel('', null);
-}
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/eabi/appmngr2runtimeapitestu.def
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/eabi/appmngr2runtimeapitestu.def Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
- _ZTI20CAppMngr2TestCommand @ 2 NONAME ; ##
- _ZTV20CAppMngr2TestCommand @ 3 NONAME ; ##
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/group/appmngr2runtimeapitest.mmp
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/group/appmngr2runtimeapitest.mmp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for AppMngr2 Runtime API STIF tests
-*
-*/
-
-
-#include
-
-TARGET appmngr2runtimeapitest.dll
-TARGETTYPE dll
-UID 0x1000008D 0x101FB3E3
-
-VENDORID VID_DEFAULT
-CAPABILITY ALL -TCB
-
-USERINCLUDE ../inc
-MW_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH ../src
-SOURCE appmngr2runtimeapitest.cpp
-SOURCE appmngr2runtimeapitestmain.cpp
-SOURCE appmngr2testcommand.cpp
-
-LIBRARY euser.lib // Base
-LIBRARY StifTestInterface.lib // STIF Framework
-LIBRARY StifTestEngine.lib // STIF Framework
-LIBRARY appmngr2pluginapi.lib // AppMngr2 Runtime API
-LIBRARY ecom.lib // ECom
-LIBRARY avkon.lib // CAknIconArray
-LIBRARY efsrv.lib // File Server
-LIBRARY caf.lib // Content Access Framework
-LIBRARY apmime.lib // TDataType
-LIBRARY cone.lib // CCoeEnv
-LIBRARY bafl.lib // BaflUtils
-LIBRARY ws32.lib // RWsSession
-
-SMPSAFE
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/group/appmngr2runtimeapitest.pkg
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/group/appmngr2runtimeapitest.pkg Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-;
-; Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: Package file for AppMngr2 Runtime API STIF test
-;
-
-
-; Languages
-&EN
-
-; Standard SIS file header
-#{"AppMngr2 Runtime API STIF Test Module"},(0x101FB3E3),1,1,0,TYPE=SA
-
-; Dependencies to S60 3.0 and 5.0 releases
-[0x101F7961],0,0,0,{"Series60ProductID"}
-[0x1028315F],0,0,0,{"Series60ProductID"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Install files
-"\epoc32\release\armv5\urel\appmngr2runtimeapitest.dll"-"c:\sys\bin\appmngr2runtimeapitest.dll"
-"..\conf\ui_appmngr2runtimeapitest.cfg"-"c:\testframework\ui_appmngr2runtimeapitest.cfg"
-"..\init\TestFramework.ini"-"c:\testframework\TestFramework.ini"
-"..\data\mmc\sistest.sisx"-"e:\testing\data\sistest.sisx"
-"..\data\mmc\widgettest.wgz"-"e:\testing\data\widgettest.wgz"
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/group/appmngr2runtimeapitest_nrm.mmp
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/group/appmngr2runtimeapitest_nrm.mmp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for AppMngr2 Runtime API STIF tests
-*
-*/
-
-
-// Same MMP file is used for both "BUILD" and "TEST BUILD" ABLD commands
-#include "appmngr2runtimeapitest.mmp"
-
-SMPSAFE
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/group/bld.inf
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/group/bld.inf Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for AppMngr2 Runtime API STIF tests
-*
-*/
-
-
-#include
-
-PRJ_PLATFORMS
-DEFAULT
-
-
-PRJ_TESTEXPORTS
-// no exported files needed for automated testing
-
-
-PRJ_EXPORTS
-// for emulator testing
-../conf/ui_appmngr2runtimeapitest_winscw.cfg /epoc32/winscw/c/testframework/ui_appmngr2runtimeapitest_winscw.cfg
-../init/TestFramework_winscw.ini /epoc32/winscw/c/testframework/TestFramework.ini
-
-// for ROM image creation
-../rom/appmngr2runtimeapitest.iby CORE_MW_LAYER_IBY_EXPORT_PATH( appmngr2runtimeapitest.iby )
-../conf/ui_appmngr2runtimeapitest.cfg /epoc32/data/z/testframework/ui_appmngr2runtimeapitest.cfg
-../init/TestFramework.ini /epoc32/data/z/system/data/TestFramework.ini
-
-// Note: data files needs to be copied manually from ../data/mmc to memory card e:/testing/data/
-
-
-PRJ_TESTMMPFILES
-appmngr2runtimeapitest.mmp
-
-
-PRJ_MMPFILES
-appmngr2runtimeapitest_nrm.mmp
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/inc/appmngr2runtimeapitest.h
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/inc/appmngr2runtimeapitest.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 Runtime API STIF test module
-*
-*/
-
-
-#ifndef C_APPMNGR2RUNTIMEAPITEST_H
-#define C_APPMNGR2RUNTIMEAPITEST_H
-
-#include // CScriptBase
-#include // MAppMngr2RuntimeObserver
-#include "appmngr2testcommandobserver.h" // MAppMngr2TestCommandObserver
-#include // RFs
-
-class CAppMngr2Runtime;
-class CAppMngr2InfoBase;
-class CAppMngr2AppInfo;
-class CAppMngr2PackageInfo;
-class CAppMngr2TestCommand;
-
-#define TEST_CLASS_VERSION_MAJOR 0
-#define TEST_CLASS_VERSION_MINOR 0
-#define TEST_CLASS_VERSION_BUILD 0
-
-_LIT( KAppMngr2RuntimeApiTestModuleName, "appmngr2runtimeapitest.dll" );
-_LIT( KAppMngr2RuntimeApiTestLogPath, "\\logs\\testframework\\appmngr2runtimeapitest\\" );
-_LIT( KAppMngr2RuntimeApiTestLogFile, "appmngr2runtimeapitest.txt" );
-_LIT( KAppMngr2RuntimeApiTestLogFileWithTitle, "appmngr2runtimeapitest_[%S].txt" );
-
-
-NONSHARABLE_CLASS(CAppMngr2RuntimeApiTest) : public CScriptBase,
- public MAppMngr2RuntimeObserver, public MAppMngr2TestCommandObserver
- {
-public: // constructor and destructor
- static CAppMngr2RuntimeApiTest* NewL( CTestModuleIf& aTestModuleIf );
- ~CAppMngr2RuntimeApiTest();
-
-public: // from CScriptBase
- TInt RunMethodL( CStifItemParser& aItem );
-
-public: // from MAppMngr2RuntimeObserver
- void RefreshInstalledApps();
- void RefreshInstallationFiles();
-
-public: // from MAppMngr2TestCommandObserver
- void CommandResult( CAppMngr2TestCommand& aCommand, TInt aCompletionCode );
-
-private: // new functions
- CAppMngr2RuntimeApiTest( CTestModuleIf& aTestModuleIf );
- void ConstructL();
- void SendTestClassVersion();
- void Print( TRefByValue aFmt, ... );
- void GetUidFromStringL( const TDesC& aString, TUid& aUid );
- CAppMngr2PackageInfo* FindInstallationPackage( const TDesC& aName );
- CAppMngr2AppInfo* FindInstalledApp( const TDesC& aName );
- void CallInfoBaseFunctionsL( CAppMngr2InfoBase& aInfo, const TDesC& aTestName );
-
- // test functions
- TInt CheckFilesExistL( CStifItemParser& aItem );
- TInt LoadAllPluginsL( CStifItemParser& aItem );
- TInt LoadPluginL( CStifItemParser& aItem );
- TInt CheckPluginsLoadedL( CStifItemParser& aItem );
- TInt LoadIconsL( CStifItemParser& aItem );
- TInt GetAdditionalDirsToScanL( CStifItemParser& aItem );
- TInt GetInstallationFilesL( CStifItemParser& aItem );
- TInt CheckInstallationFilesL( CStifItemParser& aItem );
- TInt ShowInstallationFileDetailsL( CStifItemParser& aItem );
- TInt CheckShowDetailsEndedL( CStifItemParser& aItem );
- TInt CheckNoInstallationFilesL( CStifItemParser& aItem );
- TInt StartInstallFileL( CStifItemParser& aItem );
- TInt CheckInstallEndedL( CStifItemParser& aItem );
- TInt GetInstalledAppsL( CStifItemParser& aItem );
- TInt CheckAppInstalledL( CStifItemParser& aItem );
- TInt ShowInstalledDetailsL( CStifItemParser& aItem );
- TInt CheckNoAppsInstalledL( CStifItemParser& aItem );
- TInt StartUninstallAppL( CStifItemParser& aItem );
- TInt CheckUninstallEndedL( CStifItemParser& aItem );
-
-private: // data
- RPointerArray iPlugins;
- RPointerArray iInstalledApps;
- RPointerArray iInstallationPackages;
- CAppMngr2TestCommand* iInstallCommand;
- CAppMngr2TestCommand* iUninstallCommand;
- CAppMngr2TestCommand* iShowDetailsCommand;
- TInt iSWInstCommonResourceFileOffset;
- TInt iAppMngr2ResourceFileOffset;
- RFs iFs;
- };
-
-#endif // C_APPMNGR2RUNTIMEAPITEST_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/inc/appmngr2testcommand.h
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/inc/appmngr2testcommand.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Async command handling for AppMngr2 Runtime API STIF tests
-*
-*/
-
-
-#ifndef C_APPMNGR2TESTCOMMAND_H
-#define C_APPMNGR2TESTCOMMAND_H
-
-#include // CActive
-
-class CAppMngr2InfoBase;
-class MAppMngr2TestCommandObserver;
-
-class CAppMngr2TestCommand : public CActive
- {
-public: // constructor and destructor
- static CAppMngr2TestCommand* NewL( CAppMngr2InfoBase& aInfo,
- MAppMngr2TestCommandObserver& aObs );
- ~CAppMngr2TestCommand();
-
-public: // from CActive
- void DoCancel();
- void RunL();
- TInt RunError( TInt aError );
-
-public: // new functions
- void HandleCommandL( TInt aCommand );
-
-private: // new functions
- CAppMngr2TestCommand( CAppMngr2InfoBase& aInfo,
- MAppMngr2TestCommandObserver& aObs );
-
-private: // data
- CAppMngr2InfoBase& iInfo;
- MAppMngr2TestCommandObserver& iObs;
- };
-
-#endif // C_APPMNGR2TESTCOMMAND_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/inc/appmngr2testcommandobserver.h
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/inc/appmngr2testcommandobserver.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#ifndef C_APPMNGR2TESTCOMMANDOBSERVER_H
-#define C_APPMNGR2TESTCOMMANDOBSERVER_H
-
-class CAppMngr2TestCommand;
-
-class MAppMngr2TestCommandObserver
- {
-public:
- virtual void CommandResult( CAppMngr2TestCommand& aCommand, TInt aCompletionCode ) = 0;
- };
-
-#endif // C_APPMNGR2TESTCOMMANDOBSERVER_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/init/TestFramework.ini
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/init/TestFramework.ini Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-#
-# Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: AppMngr2 STIF test engine initialization file
-#
-#
-
-[Engine_Defaults]
-TestReportMode= FullReport
-CreateTestReport= YES
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= TestReport
-TestReportFormat= TXT
-TestReportOutput= FILE
-TestReportFileCreationMode= OVERWRITE
-DeviceResetDllName= StifResetForNokia.dll
-DisableMeasurement= stifmeasurementdisablenone
-Timeout= 0
-UITestingSupport= YES
-SeparateProcesses= NO
-[End_Defaults]
-
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= c:\testframework\ui_appmngr2runtimeapitest.cfg
-[End_Module]
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/init/TestFramework_winscw.ini
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/init/TestFramework_winscw.ini Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-#
-# Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: AppMngr2 STIF test engine initialization file for emulator
-#
-#
-
-[Engine_Defaults]
-TestReportMode= FullReport
-CreateTestReport= YES
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= TestReport
-TestReportFormat= TXT
-TestReportOutput= FILE
-TestReportFileCreationMode= OVERWRITE
-DeviceResetDllName= StifResetForNokia.dll
-DisableMeasurement= stifmeasurementdisablenone
-Timeout= 0
-UITestingSupport= YES
-SeparateProcesses= NO
-[End_Defaults]
-
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= c:\testframework\ui_appmngr2runtimeapitest_winscw.cfg
-[End_Module]
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/rom/appmngr2runtimeapitest.iby
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/rom/appmngr2runtimeapitest.iby Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Image description file for AppMngr2 Runtime API STIF test
-*
-*/
-
-
-#ifndef APPMNGR2RUNTIMEAPITEST_IBY
-#define APPMNGR2RUNTIMEAPITEST_IBY
-
-data=\epoc32\release\armv5\urel\appmngr2runtimeapitest.dll \sys\bin\appmngr2runtimeapitest.dll
-
-#endif // APPMNGR2RUNTIMEAPITEST_IBY
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/src/appmngr2runtimeapitest.cpp
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/src/appmngr2runtimeapitest.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1174 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 Runtime API STIF test module
-*
-*/
-
-
-#include "appmngr2runtimeapitest.h" // CRuntimeApiTest
-#include "appmngr2testcommand.h" // CAppMngr2TestCommand
-#include // CStifLogger
-#include // RSettingServer
-#include // REComSession
-#include // AppMngr2 Runtime API
-#include // AppMngr2 Runtime API
-#include // AppMngr2 Runtime API
-#include // AppMngr2 Runtime API
-#include // AppMngr2 Runtime API
-#include // AppMngr2 Runtime API
-#include // CleanupResetAndDestroyPushL
-#include // TDataType
-#include // ContentAccess
-#include // BaflUtils
-#include // CAknIconArray
-#include // CGulIcon
-#include // KDC_APP_RESOURCE_DIR
-
-const TInt KMaxLineLength = 256;
-const TInt KGranularity = 8;
-
-_LIT( KSWInstCommonUIResourceFileName, "SWInstCommonUI.rsc" );
-_LIT( KAppMngr2UIResourceFileName, "appmngr2.rsc" );
-_LIT( KAppRscFormat, "z:%S%S" );
-
-_LIT( KAppMngr2Tag, "AppMngr2" );
-_LIT( KTestStartFormat, "%S: start" );
-_LIT( KTestDoneFormat, "%S: done (error %d)" );
-_LIT( KResultFormat, "%S: %S, result %d" );
-_LIT( KNotFoundFormat, "%S: %S not found" );
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::NewL()
-// -----------------------------------------------------------------------------
-//
-CAppMngr2RuntimeApiTest* CAppMngr2RuntimeApiTest::NewL( CTestModuleIf& aTestModuleIf )
- {
- CAppMngr2RuntimeApiTest* self = new (ELeave) CAppMngr2RuntimeApiTest( aTestModuleIf );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::~CAppMngr2RuntimeApiTest()
-// -----------------------------------------------------------------------------
-//
-CAppMngr2RuntimeApiTest::~CAppMngr2RuntimeApiTest()
- {
- delete iInstallCommand;
- delete iUninstallCommand;
- delete iShowDetailsCommand;
- iInstalledApps.ResetAndDestroy();
- iInstallationPackages.ResetAndDestroy();
- iPlugins.ResetAndDestroy();
-
- CCoeEnv* coeEnv = CCoeEnv::Static();
- if( coeEnv )
- {
- if( iSWInstCommonResourceFileOffset )
- {
- coeEnv->DeleteResourceFile( iSWInstCommonResourceFileOffset );
- }
- if( iAppMngr2ResourceFileOffset )
- {
- coeEnv->DeleteResourceFile( iAppMngr2ResourceFileOffset );
- }
- }
-
- delete iLog;
- iFs.Close();
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::RunMethodL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::RunMethodL( CStifItemParser& aItem )
- {
- static TStifFunctionInfo const KFunctions[] =
- {
- ENTRY( "CheckFilesExist", CAppMngr2RuntimeApiTest::CheckFilesExistL ),
- ENTRY( "LoadAllPlugins", CAppMngr2RuntimeApiTest::LoadAllPluginsL ),
- ENTRY( "LoadPlugin", CAppMngr2RuntimeApiTest::LoadPluginL ),
- ENTRY( "CheckPluginsLoaded", CAppMngr2RuntimeApiTest::CheckPluginsLoadedL ),
- ENTRY( "LoadIcons", CAppMngr2RuntimeApiTest::LoadIconsL ),
- ENTRY( "GetAdditionalDirsToScan", CAppMngr2RuntimeApiTest::GetAdditionalDirsToScanL ),
- ENTRY( "GetInstallationFiles", CAppMngr2RuntimeApiTest::GetInstallationFilesL ),
- ENTRY( "CheckInstallationFiles", CAppMngr2RuntimeApiTest::CheckInstallationFilesL ),
- ENTRY( "ShowInstallationFileDetails", CAppMngr2RuntimeApiTest::ShowInstallationFileDetailsL ),
- ENTRY( "CheckShowDetailsEnded", CAppMngr2RuntimeApiTest::CheckShowDetailsEndedL ),
- ENTRY( "CheckNoInstallationFiles", CAppMngr2RuntimeApiTest::CheckNoInstallationFilesL ),
- ENTRY( "StartInstallFile", CAppMngr2RuntimeApiTest::StartInstallFileL ),
- ENTRY( "CheckInstallEnded", CAppMngr2RuntimeApiTest::CheckInstallEndedL ),
- ENTRY( "GetInstalledApps", CAppMngr2RuntimeApiTest::GetInstalledAppsL ),
- ENTRY( "CheckAppInstalled", CAppMngr2RuntimeApiTest::CheckAppInstalledL ),
- ENTRY( "ShowInstalledDetails", CAppMngr2RuntimeApiTest::ShowInstalledDetailsL ),
- ENTRY( "CheckNoAppsInstalled", CAppMngr2RuntimeApiTest::CheckNoAppsInstalledL ),
- ENTRY( "StartUninstallApp", CAppMngr2RuntimeApiTest::StartUninstallAppL ),
- ENTRY( "CheckUninstallEnded", CAppMngr2RuntimeApiTest::CheckUninstallEndedL )
- };
-
- const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo );
- return RunInternalL( KFunctions, count, aItem );
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::RefreshInstalledApps()
-// -----------------------------------------------------------------------------
-//
-void CAppMngr2RuntimeApiTest::RefreshInstalledApps()
- {
- _LIT( KFunctionName, "RefreshInstalledApps()" );
- Print( KFunctionName );
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::RefreshInstallationFiles()
-// -----------------------------------------------------------------------------
-//
-void CAppMngr2RuntimeApiTest::RefreshInstallationFiles()
- {
- _LIT( KFunctionName, "RefreshInstallationFiles()" );
- Print( KFunctionName );
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CommandResult()
-// -----------------------------------------------------------------------------
-//
-void CAppMngr2RuntimeApiTest::CommandResult( CAppMngr2TestCommand& aCommand,
- TInt aCompletionCode )
- {
- _LIT( KCommandResultFormat, "async command completed (%S), result %d" );
- if( &aCommand == iInstallCommand )
- {
- _LIT( KCommandName, "install" );
- Print( KCommandResultFormat, &KCommandName, aCompletionCode );
- }
- else if( &aCommand == iUninstallCommand )
- {
- _LIT( KCommandName, "uninstall" );
- Print( KCommandResultFormat, &KCommandName, aCompletionCode );
- }
- else
- {
- _LIT( KCommandName, "UNKNOWN" );
- Print( KCommandResultFormat, &KCommandName, aCompletionCode );
- }
- Signal(); // releases "waittestclass" command in cfg file
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CAppMngr2RuntimeApiTest()
-// -----------------------------------------------------------------------------
-//
-CAppMngr2RuntimeApiTest::CAppMngr2RuntimeApiTest( CTestModuleIf& aTestModuleIf )
- : CScriptBase( aTestModuleIf )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::ConstructL()
-// -----------------------------------------------------------------------------
-//
-void CAppMngr2RuntimeApiTest::ConstructL()
- {
- // Logger settings define if test case name must be appended to log file name
- RSettingServer settingServer;
- User::LeaveIfError( settingServer.Connect() );
- CleanupClosePushL( settingServer );
- TLoggerSettings loggerSettings;
- User::LeaveIfError( settingServer.GetLoggerSettings( loggerSettings ) );
- CleanupStack::PopAndDestroy( &settingServer );
-
- User::LeaveIfError( iFs.Connect() );
-
- TFileName logFileName;
- if( loggerSettings.iAddTestCaseTitle )
- {
- TName title;
- TestModuleIf().GetTestCaseTitleL( title );
- logFileName.Format( KAppMngr2RuntimeApiTestLogFileWithTitle, &title );
- }
- else
- {
- logFileName.Copy( KAppMngr2RuntimeApiTestLogFile );
- }
-
- iLog = CStifLogger::NewL( KAppMngr2RuntimeApiTestLogPath, logFileName,
- CStifLogger::ETxt, CStifLogger::EFile, EFalse );
-
- SendTestClassVersion();
-
- _LIT( KRuntimeApiTest, "CAppMngr2RuntimeApiTest::ConstructL()" );
- Print( KTestStartFormat, &KRuntimeApiTest );
-
- // Ensure that CCoeEnv exists, RuntimeAPI needs it
- CCoeEnv* coeEnv = CCoeEnv::Static();
- _LIT( KRuntimeApiTestCoeEnvFormat, "%S: coeEnv = 0x%08x");
- Print( KRuntimeApiTestCoeEnvFormat, &KRuntimeApiTest, coeEnv );
- User::LeaveIfNull( coeEnv );
-
- // Load resource files used by AppMngr2 Runtime API and plug-ins
- TFileName* fullName = TAppMngr2DriveUtils::NearestResourceFileLC(
- KSWInstCommonUIResourceFileName, iFs );
- _LIT( KRuntimeApiTestResourceFileFormat, "%S: resource file %S");
- Print( KRuntimeApiTestResourceFileFormat, &KRuntimeApiTest, fullName );
- iSWInstCommonResourceFileOffset = coeEnv->AddResourceFileL( *fullName );
- CleanupStack::PopAndDestroy( fullName );
-
- fullName = new (ELeave) TFileName;
- CleanupStack::PushL( fullName );
- fullName->Format( KAppRscFormat, &KDC_APP_RESOURCE_DIR, &KAppMngr2UIResourceFileName );
- BaflUtils::NearestLanguageFile( iFs, *fullName );
- Print( KRuntimeApiTestResourceFileFormat, &KRuntimeApiTest, fullName );
- iAppMngr2ResourceFileOffset = coeEnv->AddResourceFileL( *fullName );
- CleanupStack::PopAndDestroy( fullName );
-
- _LIT( KCompleteFormat, "%S: complete");
- Print( KCompleteFormat, &KRuntimeApiTest );
- }
-
-//-----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::SendTestClassVersion()
-//-----------------------------------------------------------------------------
-//
-void CAppMngr2RuntimeApiTest::SendTestClassVersion()
- {
- TVersion moduleVersion;
- moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
- moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
- moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
-
- TFileName moduleName;
- moduleName = KAppMngr2RuntimeApiTestModuleName;
-
- TBool newVersionOfMethod = ETrue;
- TestModuleIf().SendTestModuleVersion( moduleVersion, moduleName, newVersionOfMethod );
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::Print()
-// -----------------------------------------------------------------------------
-//
-void CAppMngr2RuntimeApiTest::Print( TRefByValue aFmt, ... )
- {
- VA_LIST list;
- VA_START( list, aFmt );
- TBuf buf;
- buf.FormatList( aFmt, list );
- TestModuleIf().Printf( 0, KAppMngr2Tag, buf );
- iLog->Log( buf );
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::GetUidFromStringL()
-// -----------------------------------------------------------------------------
-//
-void CAppMngr2RuntimeApiTest::GetUidFromStringL( const TDesC& aString, TUid& aUid )
- {
- TUint32 uidValue;
- TLex lex( aString );
- User::LeaveIfError( lex.Val( uidValue, EHex ) );
- aUid.iUid = uidValue;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::FindInstallationPackage()
-// -----------------------------------------------------------------------------
-//
-CAppMngr2PackageInfo* CAppMngr2RuntimeApiTest::FindInstallationPackage(
- const TDesC& aName )
- {
- TInt count = iInstallationPackages.Count();
- for( TInt index = 0; index < count; index++ )
- {
- if( iInstallationPackages[ index ]->Name().CompareC( aName ) == 0 )
- {
- return iInstallationPackages[ index ];
- }
- }
- return NULL;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::FindInstalledApp()
-// -----------------------------------------------------------------------------
-//
-CAppMngr2AppInfo* CAppMngr2RuntimeApiTest::FindInstalledApp(
- const TDesC& aName )
- {
- TInt count = iInstalledApps.Count();
- for( TInt index = 0; index < count; index++ )
- {
- if( iInstalledApps[ index ]->Name().CompareC( aName ) == 0 )
- {
- return iInstalledApps[ index ];
- }
- }
- return NULL;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CallInfoBaseFunctionsL()
-// -----------------------------------------------------------------------------
-//
-void CAppMngr2RuntimeApiTest::CallInfoBaseFunctionsL( CAppMngr2InfoBase& aInfo,
- const TDesC& aTestName )
- {
- // Call CAppMngr2InfoBase and CAppMngr2Runtime members to get better code coverage.
- CAppMngr2Runtime& runtime( aInfo.Runtime() );
- MAppMngr2RuntimeObserver& runtimeObserver( runtime.Observer() );
- TInt testResult = KErrNone;
-
- RPointerArray menuPaneData;
- CleanupResetAndDestroyPushL( menuPaneData );
- TRAP( testResult, aInfo.GetMenuItemsL( menuPaneData ) );
- _LIT( KGetMenuItemsFormat, "%S: GetMenuItemsL, count %d, result %d" );
- Print( KGetMenuItemsFormat, &aTestName, menuPaneData.Count(), testResult );
- User::LeaveIfError( testResult );
- CleanupStack::PopAndDestroy( &menuPaneData );
-
- TBool isDetailsSupported = aInfo.SupportsGenericCommand( EAppMngr2CmdViewDetails );
- _LIT( KIsDetailsSupportedFormat, "%S: SupportsGenericCommand returned %d" );
- Print( KIsDetailsSupportedFormat, &aTestName, isDetailsSupported );
-
- TInt resourceId;
- TInt commandId;
- TRAP( testResult, aInfo.GetMiddleSoftkeyCommandL( resourceId, commandId ) );
- _LIT( KGetMiddleSoftkeyCmdFormat, "%S: GetMiddleSoftkeyCommandL, result %d" );
- Print( KGetMiddleSoftkeyCmdFormat, &aTestName, testResult );
- User::LeaveIfError( testResult );
-
- TBool isShowOnTop = aInfo.IsShowOnTop();
- _LIT( KIsShowOnTopFormat, "%S: IsShowOnTop returned %d" );
- Print( KIsShowOnTopFormat, &aTestName, isShowOnTop );
-
- TInt iconIndex = aInfo.IconIndex();
- _LIT( KIconIndexFormat, "%S: IconIndex returned %d" );
- Print( KIconIndexFormat, &aTestName, iconIndex );
-
- CGulIcon* icon = NULL;
- TRAP( testResult, icon = aInfo.SpecificIconL() );
- delete icon;
- icon = NULL;
- _LIT( KSpecificIconFormat, "%S: SpecificIcon, result %d" );
- Print( KSpecificIconFormat, &aTestName, testResult );
- if( testResult != KErrNone && testResult != KErrNotSupported )
- {
- User::Leave( testResult );
- }
-
- TInt indIconIndex = aInfo.IndicatorIconIndex();
- _LIT( KIndIconIndexFormat, "%S: IndicatorIconIndex returned %d" );
- Print( KIndIconIndexFormat, &aTestName, indIconIndex );
-
- TRAP( testResult, icon = aInfo.SpecificIndicatorIconL() );
- delete icon;
- icon = NULL;
- _LIT( KSpecificIndIconFormat, "%S: SpecificIndicatorIcon, result %d" );
- Print( KSpecificIndIconFormat, &aTestName, testResult );
- if( testResult != KErrNone && testResult != KErrNotSupported )
- {
- User::Leave( testResult );
- }
-
- TAppMngr2Location location = aInfo.Location();
- _LIT( KLocationFormat, "%S: Location returned %d" );
- Print( KLocationFormat, &aTestName, location );
-
- TDriveUnit driveUnit = aInfo.LocationDrive();
- _LIT( KLocationDriveFormat, "%S: LocationDrive returned %S" );
- TDriveName driveName( driveUnit.Name() );
- Print( KLocationDriveFormat, &aTestName, &driveName );
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CheckFilesExistL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::CheckFilesExistL( CStifItemParser& aItem )
- {
- _LIT( KTestName, "CheckFilesExist" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- TPtrC dirName;
- User::LeaveIfError( aItem.GetNextString( dirName ) );
-
- TPtrC fileName;
- while( aItem.GetNextString( fileName ) == KErrNone )
- {
- TParse parse;
- User::LeaveIfError( parse.SetNoWild( fileName, &dirName, NULL ) );
- TPtrC fullName = parse.FullName();
- TEntry entry;
- testResult = iFs.Entry( fullName, entry );
- Print( KResultFormat, &KTestName, &fileName, testResult );
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::LoadAllPluginsL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::LoadAllPluginsL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KTestName, "LoadAllPlugins" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
- iPlugins.ResetAndDestroy();
-
- RImplInfoPtrArray implInfoArray;
- CleanupResetAndDestroyPushL( implInfoArray );
- REComSession::ListImplementationsL( KAppMngr2PluginInterface, implInfoArray );
-
- TInt count = implInfoArray.Count();
- _LIT( KPluginCountFormat, "%S: %d plugins found" );
- Print( KPluginCountFormat, &KTestName, count );
-
- for( TInt index = 0; index < count; index++ )
- {
- CImplementationInformation* implInfo = implInfoArray[ index ];
- CAppMngr2Runtime* plugin = NULL;
- TPtrC pluginName = implInfo->DisplayName();
- TUid pluginUid = implInfo->ImplementationUid();
- TRAP( testResult, plugin = CAppMngr2Runtime::NewL( pluginUid, *this ) );
- _LIT( KLoadingFormat, "%S: index %d, loading %S (0x%08x), result %d" );
- Print( KLoadingFormat, &KTestName, index, &pluginName, pluginUid.iUid, testResult );
- if( testResult == KErrNone )
- {
- CleanupStack::PushL( plugin );
- iPlugins.AppendL( plugin );
- CleanupStack::Pop( plugin );
- }
- }
-
- CleanupStack::PopAndDestroy( &implInfoArray );
- REComSession::FinalClose();
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::LoadPluginL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::LoadPluginL( CStifItemParser& aItem )
- {
- _LIT( KTestName, "LoadPlugin" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- TPtrC string;
- User::LeaveIfError( aItem.GetNextString ( string ) );
- TUid uid;
- GetUidFromStringL( string, uid );
- _LIT( KPluginCountFormat, "%S: plugin UID 0x%08x" );
- Print( KPluginCountFormat, &KTestName, uid.iUid );
-
- RImplInfoPtrArray implInfoArray;
- CleanupResetAndDestroyPushL( implInfoArray );
- REComSession::ListImplementationsL( KAppMngr2PluginInterface, implInfoArray );
-
- CImplementationInformation* implInfo;
- TInt count = implInfoArray.Count();
- TBool found = EFalse;
- for( TInt index = 0; index < count && !found; index++ )
- {
- implInfo = implInfoArray[ index ];
- if( implInfo->ImplementationUid() == uid )
- {
- CAppMngr2Runtime* plugin = NULL;
- found = ETrue;
-
- _LIT( KLoadingFormat, "%S: loading %S" );
- Print( KLoadingFormat, &KTestName, &( implInfo->DisplayName() ) );
- TRAP( testResult, plugin = CAppMngr2Runtime::NewL(
- implInfo->ImplementationUid(), *this ) );
- if( testResult == KErrNone )
- {
- CleanupStack::PushL( plugin );
- iPlugins.AppendL( plugin );
- CleanupStack::Pop( plugin );
- }
- }
- }
- if( !found )
- {
- _LIT( KPluginNotFound, "%S: plugin not found" );
- Print( KPluginNotFound, &KTestName );
- testResult = KErrNotFound;
- }
-
- CleanupStack::PopAndDestroy( &implInfoArray );
- REComSession::FinalClose();
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CheckPluginsLoadedL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::CheckPluginsLoadedL( CStifItemParser& aItem )
- {
- _LIT( KTestName, "CheckPluginsLoaded" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- TPtrC pluginUidString;
- while( aItem.GetNextString( pluginUidString ) == KErrNone )
- {
- TUid uid;
- GetUidFromStringL( pluginUidString, uid );
-
- TBool found = EFalse;
- for( TInt index = 0; index < iPlugins.Count() && !found; index++ )
- {
- found = ( iPlugins[ index ]->RuntimeUid() == uid );
- }
-
- _LIT( KCheckPluginsLoadedFormat, "%S: 0x%08x, result %d" );
- Print( KCheckPluginsLoadedFormat, &KTestName, uid.iUid, found );
- if( !found )
- {
- testResult = KErrNotFound;
- }
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::LoadIconsL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::LoadIconsL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KTestName, "LoadIcons" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- for( TInt pluginIndex = 0; pluginIndex < iPlugins.Count(); pluginIndex++ )
- {
- CAppMngr2Runtime* plugin = iPlugins[ pluginIndex ];
- TInt pluginId = plugin->RuntimeUid().iUid;
-
- CAknIconArray* iconArray = new (ELeave) CAknIconArray( KGranularity );
- CleanupStack::PushL( iconArray );
- TRAP( testResult, plugin->LoadIconsL( *iconArray ) );
- _LIT( KLoadIconsFormat, "%S: plugin 0x%08x, icons count %d, error %d" );
- Print( KLoadIconsFormat, &KTestName, pluginId, iconArray->Count(), testResult );
- CleanupStack::PopAndDestroy( iconArray );
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::GetAdditionalDirsToScanL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::GetAdditionalDirsToScanL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KTestName, "GetAdditionalDirsToScan" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- for( TInt pluginIndex = 0; pluginIndex < iPlugins.Count(); pluginIndex++ )
- {
- CAppMngr2Runtime* plugin = iPlugins[ pluginIndex ];
- TInt pluginId = plugin->RuntimeUid().iUid;
-
- RPointerArray dirs;
- CleanupResetAndDestroyPushL( dirs );
- TRAP( testResult, plugin->GetAdditionalDirsToScanL( iFs, dirs ) );
- _LIT( KDirsToScanFormat, "%S: plugin 0x%08x, additional dirs, count %d, error %d" );
- Print( KDirsToScanFormat, &KTestName, pluginId, dirs.Count(), testResult );
- if( testResult == KErrNone )
- {
- for( TInt dirIndex = 0; dirIndex < dirs.Count(); dirIndex++ )
- {
- _LIT( KScanDirFormat, "%S: plugin 0x%08x, dir %S" );
- Print( KScanDirFormat, &KTestName, pluginId, dirs[ dirIndex ] );
- }
- }
- CleanupStack::PopAndDestroy( &dirs );
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::GetInstallationFilesL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::GetInstallationFilesL( CStifItemParser& aItem )
- {
- _LIT( KTestName, "GetInstallationFiles" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
- iInstallationPackages.ResetAndDestroy();
-
- TPtrC dirName;
- User::LeaveIfError( aItem.GetNextString( dirName ) );
- _LIT( KParameterFormat, "%S: dir %S" );
- Print( KParameterFormat, &KTestName, &dirName );
-
- RPointerArray fileArray;
- CleanupResetAndDestroyPushL( fileArray );
-
- // recognize files in given directory
- CDir* dir = NULL;
- User::LeaveIfError( iFs.GetDir( dirName, KEntryAttNormal, ESortNone, dir ) );
- CleanupStack::PushL( dir );
- TInt dirCount = dir->Count();
- for( TInt dirIndex = 0; dirIndex < dirCount; dirIndex++ )
- {
- const TChar KBackslash = '\\';
- const TInt KBackslashLen = 1;
-
- const TEntry& file = ( *dir )[ dirIndex ];
-
- // full file name
- HBufC* fullName = HBufC::NewLC( dirName.Length() + KBackslashLen + file.iName.Length() );
- TPtr namePtr( fullName->Des() );
- namePtr.Copy( dirName );
- if( dirName.LocateReverse( KBackslash ) != ( dirName.Length() - 1 ) )
- {
- namePtr.Append( KBackslash );
- }
- namePtr.Append( file.iName );
-
- // data type
- HBufC* mimeType = HBufC::NewLC( KMaxDataTypeLength );
- ContentAccess::CContent* content = ContentAccess::CContent::NewLC( *fullName,
- ContentAccess::EContentShareReadWrite );
- TPtr mimePtr( mimeType->Des() );
- content->GetStringAttribute( ContentAccess::EMimeType, mimePtr );
-
- _LIT( KFileTypeFormat, "%S: file %S, type %S" );
- Print( KFileTypeFormat, &KTestName, fullName, mimeType );
-
- // create new recognized file
- CAppMngr2RecognizedFile* recFile = CAppMngr2RecognizedFile::NewL( fullName, mimeType );
- CleanupStack::PopAndDestroy( content );
- CleanupStack::Pop( 2, fullName ); // mimeType and fullName now owned by recFile
-
- // append it into array
- CleanupStack::PushL( recFile );
- fileArray.AppendL( recFile );
- CleanupStack::Pop( recFile );
- }
- CleanupStack::PopAndDestroy( dir );
- dir = NULL;
-
- for( TInt pluginIndex = 0; pluginIndex < iPlugins.Count(); pluginIndex++ )
- {
- CAppMngr2Runtime* plugin = iPlugins[ pluginIndex ];
- TInt pluginId = plugin->RuntimeUid().iUid;
-
- CDataTypeArray* dataTypeArray = new (ELeave) CDataTypeArray( KGranularity );
- CleanupStack::PushL( dataTypeArray );
- TRAP( testResult, plugin->GetSupportedDataTypesL( *dataTypeArray ) );
- _LIT( KSuppDataTypeFormat, "%S: plugin 0x%08x, data type count %d, error %d" );
- Print( KSuppDataTypeFormat, &KTestName, pluginId, dataTypeArray->Count(), testResult );
- if( testResult == KErrNone )
- {
- // copy those recognized files that matches plugin data types in pluginFiles
- RPointerArray pluginFiles;
- CleanupResetAndDestroyPushL( pluginFiles );
- for( TInt dataTypeIndex = 0; dataTypeIndex < dataTypeArray->Count(); dataTypeIndex++ )
- {
- for( TInt fileIndex = 0; fileIndex < fileArray.Count(); fileIndex++ )
- {
- if( fileArray[ fileIndex ]->DataType() == (*dataTypeArray)[ dataTypeIndex ] )
- {
- _LIT( KPluginGetsFileFormat, "%S: plugin 0x%08x, matching file %S" );
- Print( KPluginGetsFileFormat, &KTestName, pluginId,
- &( fileArray[ fileIndex ]->FileName() ) );
-
- CAppMngr2RecognizedFile* recFile = CAppMngr2RecognizedFile::NewL(
- fileArray[ fileIndex ]->FileName(),
- fileArray[ fileIndex ]->DataType() );
- CleanupStack::PushL( recFile );
- pluginFiles.Append( recFile );
- CleanupStack::Pop( recFile );
- }
- }
- }
- _LIT( KPluginFilesFormat, "%S: plugin 0x%08x, total %d files" );
- Print( KPluginFilesFormat, &KTestName, pluginId, pluginFiles.Count() );
-
- // get installation files from plugin
- RPointerArray packageArray;
- CleanupResetAndDestroyPushL( packageArray );
- TRequestStatus status;
- TRAP( testResult, plugin->GetInstallationFilesL( packageArray, pluginFiles, iFs, status ) );
- _LIT( KInstFilesReqFormat, "%S: plugin 0x%08x, inst files req, error %d, status %d" );
- Print( KInstFilesReqFormat, &KTestName, pluginId, testResult, status.Int() );
- if( testResult == KErrNone )
- {
- User::WaitForRequest( status );
- _LIT( KInstFilesCompleteFormat, "%S: plugin 0x%08x, package count %d, status %d" );
- Print( KInstFilesCompleteFormat, &KTestName, pluginId, packageArray.Count(),
- status.Int() );
-
- // move items to iInstallationPackages array
- for( TInt i = packageArray.Count() - 1; i >= 0; i-- )
- {
- CAppMngr2PackageInfo* packageInfo = packageArray[ i ];
- packageArray.Remove( i );
- CleanupStack::PushL( packageInfo );
- iInstallationPackages.AppendL( packageInfo );
- CleanupStack::Pop( packageInfo );
- }
- _LIT( KTotalInstFileCountFormat, "%S: total package count %d" );
- Print( KTotalInstFileCountFormat, &KTestName, iInstallationPackages.Count() );
-
- if( status.Int() )
- {
- testResult = status.Int();
- }
- }
-
- CleanupStack::PopAndDestroy( &packageArray );
- CleanupStack::PopAndDestroy( &pluginFiles );
- }
-
- CleanupStack::PopAndDestroy( dataTypeArray );
- }
-
- CleanupStack::PopAndDestroy( &fileArray );
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CheckInstallationFilesL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::CheckInstallationFilesL( CStifItemParser& aItem )
- {
- _LIT( KTestName, "CheckInstallationFiles" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- TPtrC nameString;
- while( aItem.GetNextString( nameString ) == KErrNone )
- {
- CAppMngr2PackageInfo* info = FindInstallationPackage( nameString );
- TBool found = ( info != NULL );
-
- _LIT( KCheckInstFileFormat, "%S: file %S, result %d" );
- Print( KCheckInstFileFormat, &KTestName, &nameString, found );
- if( found )
- {
- CallInfoBaseFunctionsL( *info, KTestName );
- }
- else
- {
- Print( KNotFoundFormat, &KTestName, &nameString );
- testResult = KErrNotFound;
- }
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::ShowInstallationFileDetailsL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::ShowInstallationFileDetailsL( CStifItemParser& aItem )
- {
- _LIT( KTestName, "ShowInstallationFileDetails" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- if( iShowDetailsCommand )
- {
- User::Leave( KErrInUse );
- }
-
- TPtrC nameString;
- while( aItem.GetNextString( nameString ) == KErrNone )
- {
- CAppMngr2PackageInfo* info = FindInstallationPackage( nameString );
- if( info )
- {
- iShowDetailsCommand = CAppMngr2TestCommand::NewL( *info, *this );
- TRAP( testResult, iShowDetailsCommand->HandleCommandL( EAppMngr2CmdViewDetails ) );
- _LIT( KShowInstFileDetailsFormat, "%S: show details request %S, result %d" );
- Print( KShowInstFileDetailsFormat, &KTestName, &nameString, testResult );
- }
- else
- {
- Print( KNotFoundFormat, &KTestName, &nameString );
- testResult = KErrNotFound;
- }
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CheckShowDetailsEndedL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::CheckShowDetailsEndedL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KTestName, "CheckShowDetailsEnded" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- if( !iShowDetailsCommand )
- {
- User::Leave( KErrNotFound );
- }
-
- if( iShowDetailsCommand->IsActive() )
- {
- User::Leave( KErrNotReady );
- }
- testResult = iShowDetailsCommand->iStatus.Int();
- _LIT( KCheckShowDetailsEndedFormat, "%S: show details completed, status %d" );
- Print( KCheckShowDetailsEndedFormat, &KTestName, testResult );
-
- delete iShowDetailsCommand;
- iShowDetailsCommand = NULL;
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CheckNoInstallationFilesL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::CheckNoInstallationFilesL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KTestName, "CheckNoInstallationFiles" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- TInt count = iInstallationPackages.Count();
- if( count != 0 )
- {
- testResult = KErrTooBig;
- }
- _LIT( KInstallationFilesEmptyFormat, "%S: file count %d" );
- Print( KInstallationFilesEmptyFormat, &KTestName, count );
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::StartInstallFileL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::StartInstallFileL( CStifItemParser& aItem )
- {
- _LIT( KTestName, "StartInstallFile" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- if( iInstallCommand )
- {
- User::Leave( KErrInUse );
- }
-
- TPtrC nameString;
- while( aItem.GetNextString( nameString ) == KErrNone )
- {
- CAppMngr2PackageInfo* info = FindInstallationPackage( nameString );
- if( info )
- {
- iInstallCommand = CAppMngr2TestCommand::NewL( *info, *this );
- TRAP( testResult, iInstallCommand->HandleCommandL( EAppMngr2CmdInstall ) );
- _LIT( KInstallFileFormat, "%S: install request %S, result %d" );
- Print( KInstallFileFormat, &KTestName, &nameString, testResult );
- }
- else
- {
- Print( KNotFoundFormat, &KTestName, &nameString );
- testResult = KErrNotFound;
- }
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CheckInstallEndedL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::CheckInstallEndedL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KTestName, "CheckInstallEnded" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- if( !iInstallCommand )
- {
- User::Leave( KErrNotFound );
- }
-
- if( iInstallCommand->IsActive() )
- {
- User::Leave( KErrNotReady );
- }
- testResult = iInstallCommand->iStatus.Int();
- _LIT( KCheckInstallEndedFormat, "%S: install completed, status %d" );
- Print( KCheckInstallEndedFormat, &KTestName, testResult );
-
- delete iInstallCommand;
- iInstallCommand = NULL;
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::GetInstalledAppsL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::GetInstalledAppsL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KTestName, "GetInstalledApps" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
- iInstalledApps.ResetAndDestroy();
-
- TInt count = iPlugins.Count();
- for( TInt index = 0; index < count; index++ )
- {
- CAppMngr2Runtime* plugin = iPlugins[ index ];
- TInt pluginId = plugin->RuntimeUid().iUid;
-
- RPointerArray appArray;
- CleanupResetAndDestroyPushL( appArray );
-
- TRequestStatus status;
- TRAP( testResult, plugin->GetInstalledAppsL( appArray, iFs, status ) );
- _LIT( KRequestedFormat, "%S: plugin 0x%08x, apps requested, error %d, status %d" );
- Print( KRequestedFormat, &KTestName, pluginId, testResult, status.Int() );
- if( testResult == KErrNone )
- {
- User::WaitForRequest( status );
- _LIT( KLoadedFormat, "%S: plugin 0x%08x, apps count %d, status %d" );
- TInt count = appArray.Count();
- Print( KLoadedFormat, &KTestName, pluginId, count, status.Int() );
-
- // move items to iInstalledApps array
- for( TInt i = count - 1; i >= 0; i-- )
- {
- CAppMngr2AppInfo* appInfo = appArray[ i ];
- appArray.Remove( i );
- CleanupStack::PushL( appInfo );
- iInstalledApps.AppendL( appInfo );
- CleanupStack::Pop( appInfo );
- }
- _LIT( KTotalInstAppCountFormat, "%S: total installed apps count %d" );
- Print( KTotalInstAppCountFormat, &KTestName, iInstalledApps.Count() );
-
- if( status.Int() )
- {
- testResult = status.Int();
- }
- }
-
- CleanupStack::PopAndDestroy( &appArray );
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CheckAppInstalledL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::CheckAppInstalledL( CStifItemParser& aItem )
- {
- _LIT( KTestName, "CheckAppInstalled" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- TPtrC nameString;
- while( aItem.GetNextString( nameString ) == KErrNone )
- {
- CAppMngr2AppInfo* info = FindInstalledApp( nameString );
- TBool found = ( info != NULL );
-
- Print( KResultFormat, &KTestName, &nameString, found );
- if( found )
- {
- CallInfoBaseFunctionsL( *info, KTestName );
- }
- else
- {
- Print( KNotFoundFormat, &KTestName, &nameString );
- testResult = KErrNotFound;
- }
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::ShowInstalledDetailsL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::ShowInstalledDetailsL( CStifItemParser& aItem )
- {
- _LIT( KTestName, "ShowInstalledDetails" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- if( iShowDetailsCommand )
- {
- User::Leave( KErrInUse );
- }
-
- TPtrC nameString;
- while( aItem.GetNextString( nameString ) == KErrNone )
- {
- CAppMngr2AppInfo* info = FindInstalledApp( nameString );
- if( info )
- {
- iShowDetailsCommand = CAppMngr2TestCommand::NewL( *info, *this );
- TRAP( testResult, iShowDetailsCommand->HandleCommandL( EAppMngr2CmdViewDetails ) );
- _LIT( KShowInstalledDetailsFormat, "%S: show details request %S, result %d" );
- Print( KShowInstalledDetailsFormat, &KTestName, &nameString, testResult );
- }
- else
- {
- Print( KNotFoundFormat, &KTestName, &nameString );
- testResult = KErrNotFound;
- }
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CheckNoAppsInstalledL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::CheckNoAppsInstalledL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KTestName, "CheckNoAppsInstalled" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- TInt count = iInstalledApps.Count();
- if( count != 0 )
- {
- testResult = KErrTooBig;
- }
- _LIT( KInstalledAppsEmptyFormat, "%S: app count %d" );
- Print( KInstalledAppsEmptyFormat, &KTestName, count );
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::StartUninstallAppL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::StartUninstallAppL( CStifItemParser& aItem )
- {
- _LIT( KTestName, "StartUninstallApp" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- if( iUninstallCommand )
- {
- User::Leave( KErrInUse );
- }
-
- TPtrC nameString;
- while( aItem.GetNextString( nameString ) == KErrNone )
- {
- CAppMngr2AppInfo* info = FindInstalledApp( nameString );
- if( info )
- {
- iUninstallCommand = CAppMngr2TestCommand::NewL( *info, *this );
- TRAP( testResult, iUninstallCommand->HandleCommandL( EAppMngr2CmdUninstall ) );
- _LIT( KUninstallAppFormat, "%S: uninstall request %S, result %d" );
- Print( KUninstallAppFormat, &KTestName, &nameString, testResult );
- }
- else
- {
- Print( KNotFoundFormat, &KTestName, &nameString );
- testResult = KErrNotFound;
- }
- }
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2RuntimeApiTest::CheckUninstallEndedL()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2RuntimeApiTest::CheckUninstallEndedL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KTestName, "CheckUninstallEnded" );
- Print( KTestStartFormat, &KTestName );
- TInt testResult = KErrNone;
-
- if( !iUninstallCommand )
- {
- User::Leave( KErrNotFound );
- }
-
- if( iUninstallCommand->IsActive() )
- {
- User::Leave( KErrNotReady );
- }
- testResult = iUninstallCommand->iStatus.Int();
- _LIT( KCheckUninstallEndedFormat, "%S: uninstall completed, status %d" );
- Print( KCheckUninstallEndedFormat, &KTestName, testResult );
-
- delete iUninstallCommand;
- iUninstallCommand = NULL;
-
- Print( KTestDoneFormat, &KTestName, testResult );
- return testResult;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/src/appmngr2runtimeapitestmain.cpp
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/src/appmngr2runtimeapitestmain.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 Runtime API STIF test module
-*
-*/
-
-
-#include "appmngr2runtimeapitest.h" // CRuntimeApiTest
-
-
-// ======== GLOBAL FUNCTIONS ========
-
-// -----------------------------------------------------------------------------
-// LibEntryL()
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL( CTestModuleIf& aTestModuleIf )
- {
- return static_cast( CAppMngr2RuntimeApiTest::NewL( aTestModuleIf ) );
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/appmngr2runtimeapi/tsrc/src/appmngr2testcommand.cpp
--- a/appinstall_plat/appmngr2runtimeapi/tsrc/src/appmngr2testcommand.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Async command handling for AppMngr2 Runtime API STIF tests
-*
-*/
-
-
-#include "appmngr2testcommand.h" // CAppMngr2TestCommand
-#include "appmngr2testcommandobserver.h" // MAppMngr2TestCommandObserver
-#include // CAppMngr2InfoBase
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// -----------------------------------------------------------------------------
-// CAppMngr2TestCommand::NewL()
-// -----------------------------------------------------------------------------
-//
-CAppMngr2TestCommand* CAppMngr2TestCommand::NewL( CAppMngr2InfoBase& aInfo,
- MAppMngr2TestCommandObserver& aObs )
- {
- CAppMngr2TestCommand* self = new (ELeave) CAppMngr2TestCommand( aInfo, aObs );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2TestCommand::~CAppMngr2TestCommand()
-// -----------------------------------------------------------------------------
-//
-CAppMngr2TestCommand::~CAppMngr2TestCommand()
- {
- Cancel();
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2TestCommand::DoCancel()
-// -----------------------------------------------------------------------------
-//
-void CAppMngr2TestCommand::DoCancel()
- {
- iInfo.CancelCommand();
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2TestCommand::RunL()
-// -----------------------------------------------------------------------------
-//
-void CAppMngr2TestCommand::RunL()
- {
- // no need to trap, as RunError calls CommandResult if RunL leaves
- iInfo.HandleCommandResultL( iStatus.Int() );
- iObs.CommandResult( *this, iStatus.Int() );
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2TestCommand::RunError()
-// -----------------------------------------------------------------------------
-//
-TInt CAppMngr2TestCommand::RunError( TInt aError )
- {
- iObs.CommandResult( *this, aError );
- return aError;
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2TestCommand::HandleCommandL()
-// -----------------------------------------------------------------------------
-//
-void CAppMngr2TestCommand::HandleCommandL( TInt aCommand )
- {
- if( IsActive() )
- {
- User::Leave( KErrInUse );
- }
- iInfo.HandleCommandL( aCommand, iStatus );
- SetActive();
- }
-
-// -----------------------------------------------------------------------------
-// CAppMngr2TestCommand::CAppMngr2TestOperation()
-// -----------------------------------------------------------------------------
-//
-CAppMngr2TestCommand::CAppMngr2TestCommand( CAppMngr2InfoBase& aInfo,
- MAppMngr2TestCommandObserver& aObs ) :
- CActive( CActive::EPriorityStandard ), iInfo( aInfo ), iObs( aObs )
- {
- CActiveScheduler::Add( this );
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstall_plat/group/bld.inf
--- a/appinstall_plat/group/bld.inf Thu Oct 14 14:11:30 2010 +0300
+++ b/appinstall_plat/group/bld.inf Wed Oct 20 14:52:56 2010 +0300
@@ -11,19 +11,22 @@
*
* Contributors:
*
-* Description: Includes all the Domain API specific bld.inf files, which
-* export files.
+* Description: Build info file for application install UI domain APIs
*
*/
#include "../iaupdate_api/group/bld.inf"
-#include "../task_plugin_api/group/bld.inf"
-#include "../sw_installer_common_ui_api/group/bld.inf"
-#include "../sw_installer_launcher_api/group/bld.inf"
-#include "../task_management_api/group/bld.inf"
-#include "../sw_installer_ui_plugin_api/group/bld.inf"
-#include "../sw_installer_cr_keys/group/bld.inf"
+#include "../sw_installer_cr_keys/group/bld.inf" // TODO: remove too?
#include "../sw_installer_ps_keys/group/bld.inf"
#include "../sifui_api/group/bld.inf"
+
+// TODO: deprecated, remove when not used any more
+#include "../task_plugin_api/group/bld.inf"
+#include "../task_management_api/group/bld.inf"
+#include "../sw_installer_common_ui_api/group/bld.inf"
+#include "../sw_installer_launcher_api/group/bld.inf"
+#include "../sw_installer_ui_plugin_api/group/bld.inf"
+
+
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSInstFilesPlugin/data/10282d8c.rss
--- a/appinstaller/AppMngr2/GSInstFilesPlugin/data/10282d8c.rss Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 1028 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECOM resource file for AppMngr2 Installation Files GS plugin
-*
-*/
-
-
-#include // REGISTRY_INFO
-
-RESOURCE REGISTRY_INFO theInfo
- {
- dll_uid = 0x10282D8C;
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x10207236; // KGSPluginInterfaceUid
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x10282D8D;
- version_no = 1;
- display_name = "AppMngr2 Installation Files";
- default_data = "0x10283321"; // parent plugin
- opaque_data = "20"; // order number
- }
- };
- }
- };
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSInstFilesPlugin/data/appmngr2gsinstfilespluginrsc.rss
--- a/appinstaller/AppMngr2/GSInstFilesPlugin/data/appmngr2gsinstfilespluginrsc.rss Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource definitions for AppMngr2 GS Installation Files plugin
-*
-*/
-
-
-NAME AMIF
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF r_cp_folder_not_installed
- {
- buf = qtn_cp_folder_not_installed;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSInstFilesPlugin/inc/appmngr2gsinstfilesplugin.h
--- a/appinstaller/AppMngr2/GSInstFilesPlugin/inc/appmngr2gsinstfilesplugin.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 GS Installation Files plugin implementation
-*
-*/
-
-
-#ifndef C_APPMNGR2GSINSTFILESPLUGIN_H
-#define C_APPMNGR2GSINSTFILESPLUGIN_H
-
-#include // CGSPluginInterface
-#include // MAknServerAppExitObserver
-#include // RConeResourceLoader
-#include
-
-class CAknNullService;
-
-const TInt KAppMngr2InstFilesUidValue = 0x10282D8D;
-const TUid KAppMngr2InstFilesPluginUid = { KAppMngr2InstFilesUidValue };
-
-
-/**
- * CAppMngrInstFilesPlugin launches embedded AppMngr2 application to show
- * Installation Files view. It is an EGSItemTypeSettingDialog type GS plug-in
- * and hence the GS framework calls HandleSelection() instead of DoActivate().
- * CAknView functionality is not supported although the base class is derived
- * from CAknView via CGSPluginInterface.
- */
-class CAppMngr2GsInstFilesPlugin : public CGSPluginInterface,
- public MAknServerAppExitObserver
- {
-public: // constructors and destructor
- static CAppMngr2GsInstFilesPlugin* NewL( TAny* aInitParams );
- ~CAppMngr2GsInstFilesPlugin();
-
-public: // from CGSPluginInterface
- void GetCaptionL( TDes& aCaption ) const;
- void HandleSelection( const TGSSelectionTypes aSelectionType );
- TGSListboxItemTypes ItemType();
- CGulIcon* CreateIconL( const TUid aIconType );
- TInt PluginProviderCategory() const;
-
-public: // from CAknView, via CGSPluginInterface
- TUid Id() const;
-
-protected: // from CAknView, via CGSPluginInterface
- void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
- void DoDeactivate();
-
-private: // new functions
- CAppMngr2GsInstFilesPlugin();
- void ConstructL();
- void OpenLocalizedResourceFileL( const TDesC& aResourceFileName,
- RConeResourceLoader& aResourceLoader );
- void LaunchAppManagerL();
- void EmbedAppL( const TUid& aAppUid );
-
-protected: // data
- RConeResourceLoader iResources;
- CAknNullService* iNullService;
- CApaDocument* iEmbedded;
- };
-
-#endif // C_APPMNGR2GSINSTFILESPLUGIN_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSInstFilesPlugin/src/appmngr2gsinstfilesplugin.cpp
--- a/appinstaller/AppMngr2/GSInstFilesPlugin/src/appmngr2gsinstfilesplugin.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,242 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 GS Installation Files plugin implementation
-*
-*/
-
-
-#include "appmngr2gsinstfilesplugin.h" // CAppMngr2GsInstFilesPlugin
-#include "appmngr2internalpskeys.h" // KAppManagerApplicationMode
-#include "appmngr2.hrh" // KAppMngr2AppUidValue
-#include // CAknNullService
-#include // RProperty
-#include // StringLoader
-#include // BaflUtils
-#include // KGSPluginProviderInternal
-#include // FLOG macros
-#include // Resource IDs
-#include // Bitmap IDs
-
-_LIT( KAppMngr2InstFilesResourceFileName, "z:appmngr2gsinstfilespluginrsc.rsc" );
-_LIT( KAppMngrIconFileNameMif, "appmngr2.mif" );
-_LIT( KDriveZ, "z:" );
-const TUid KAppMngr2AppUid = { KAppMngr2AppUidValue };
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::NewL()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GsInstFilesPlugin* CAppMngr2GsInstFilesPlugin::NewL( TAny* /*aInitParams*/ )
- {
- CAppMngr2GsInstFilesPlugin* self = new( ELeave ) CAppMngr2GsInstFilesPlugin();
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(self);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::~CAppMngr2GsInstFilesPlugin()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GsInstFilesPlugin::~CAppMngr2GsInstFilesPlugin()
- {
- FLOG( "CAppMngr2GsInstFilesPlugin::~CAppMngr2GsInstFilesPlugin" );
- iResources.Close();
- delete iNullService;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::GetCaptionL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstFilesPlugin::GetCaptionL( TDes& aCaption ) const
- {
- HBufC* result = StringLoader::LoadL( R_CP_FOLDER_NOT_INSTALLED );
- aCaption.Copy( *result );
- delete result;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::HandleSelection()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstFilesPlugin::HandleSelection( const TGSSelectionTypes /*aSelectionType*/ )
- {
- TRAP_IGNORE( LaunchAppManagerL() );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::ItemType()
-// ---------------------------------------------------------------------------
-//
-TGSListboxItemTypes CAppMngr2GsInstFilesPlugin::ItemType()
- {
- return EGSItemTypeSettingDialog;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::CreateIconL()
-// ---------------------------------------------------------------------------
-//
-CGulIcon* CAppMngr2GsInstFilesPlugin::CreateIconL( const TUid aIconType )
- {
- HBufC* iconFilePath = HBufC::NewLC( KDriveZ().Length() +
- KDC_APP_BITMAP_DIR().Length() + KAppMngrIconFileNameMif().Length() );
- TPtr ptr = iconFilePath->Des();
- ptr.Append( KDriveZ );
- ptr.Append( KDC_APP_BITMAP_DIR );
- ptr.Append( KAppMngrIconFileNameMif );
-
- CGulIcon* icon;
- if( aIconType == KGSIconTypeLbxItem )
- {
- icon = AknsUtils::CreateGulIconL( AknsUtils::SkinInstance(),
- KAknsIIDQgnPropCpInstFiles, *iconFilePath,
- EMbmAppmngr2Qgn_prop_cp_inst_files,
- EMbmAppmngr2Qgn_prop_cp_inst_files_mask );
- }
- else
- {
- icon = CGSPluginInterface::CreateIconL( aIconType );
- }
-
- CleanupStack::PopAndDestroy( iconFilePath );
- return icon;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::PluginProviderCategory()
-// ---------------------------------------------------------------------------
-//
-TInt CAppMngr2GsInstFilesPlugin::PluginProviderCategory() const
- {
- return KGSPluginProviderInternal;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::Id()
-// ---------------------------------------------------------------------------
-//
-TUid CAppMngr2GsInstFilesPlugin::Id() const
- {
- return KAppMngr2InstFilesPluginUid;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::DoActivateL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstFilesPlugin::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
- TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/ )
- {
- FLOG( "CAppMngr2GsInstFilesPlugin::DoActivateL" ); // not called
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::DoDeactivate()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstFilesPlugin::DoDeactivate()
- {
- FLOG( "CAppMngr2GsInstFilesPlugin::DoDeactivate" ); // not called
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::CAppMngr2GsInstFilesPlugin()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GsInstFilesPlugin::CAppMngr2GsInstFilesPlugin() : iResources( *iCoeEnv )
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstFilesPlugin::ConstructL()
- {
- FLOG( "CAppMngr2GsInstFilesPlugin::ConstructL" );
- OpenLocalizedResourceFileL( KAppMngr2InstFilesResourceFileName, iResources );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::OpenLocalizedResourceFileL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstFilesPlugin::OpenLocalizedResourceFileL(
- const TDesC& aResourceFileName, RConeResourceLoader& aResourceLoader )
- {
- TParse parse;
- parse.Set( aResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL );
- TFileName fileName( parse.FullName() );
- BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName );
- aResourceLoader.OpenL( fileName );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::LaunchAppManagerL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstFilesPlugin::LaunchAppManagerL()
- {
- FLOG( "CAppMngr2GsInstFilesPlugin::LaunchAppManagerL" );
-
- _LIT_SECURITY_POLICY_PASS( KPropReadPolicy );
- _LIT_SECURITY_POLICY_C1( KPropWritePolicy, ECapabilityWriteDeviceData );
- TInt err = RProperty::Define( KPSUidAppManagerNotification,
- KAppManagerApplicationMode, RProperty::EInt,
- KPropReadPolicy, KPropWritePolicy );
- if( err != KErrNone && err != KErrAlreadyExists )
- {
- User::Leave( err );
- }
- User::LeaveIfError( RProperty::Set( KPSUidAppManagerNotification,
- KAppManagerApplicationMode, EAppMngr2InstallationFilesView ) );
-
- RWsSession ws;
- User::LeaveIfError( ws.Connect() );
- CleanupClosePushL( ws );
- TApaTaskList taskList( ws );
- TApaTask task = taskList.FindApp( KAppMngr2AppUid );
-
- if( task.Exists() )
- {
- task.BringToForeground();
- }
- else
- {
- EmbedAppL( KAppMngr2AppUid );
- }
-
- CleanupStack::PopAndDestroy( &ws );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstFilesPlugin::EmbedAppL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstFilesPlugin::EmbedAppL( const TUid& aAppUid )
- {
- if( iNullService )
- {
- delete iNullService;
- iNullService = NULL;
- }
- iNullService = CAknNullService::NewL( aAppUid, this );
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSInstFilesPlugin/src/appmngr2gsinstfilespluginmain.cpp
--- a/appinstaller/AppMngr2/GSInstFilesPlugin/src/appmngr2gsinstfilespluginmain.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECOM proxy table for AppMngr2 GS (General Settigns)
-* Installation Files plug-in
-*
-*/
-
-
-#include "appmngr2gsinstfilesplugin.h" // CAppMngr2GsInstFilesPlugin
-#include // TImplementationProxy
-
-// ---------------------------------------------------------------------------
-// Local array that maps the ECom implementation UIDs to factory functions
-// ---------------------------------------------------------------------------
-//
-const TImplementationProxy ImplementationTable[] =
- {
- IMPLEMENTATION_PROXY_ENTRY( KAppMngr2InstFilesUidValue, CAppMngr2GsInstFilesPlugin::NewL )
- };
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
- {
- aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
- return ImplementationTable;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSInstalledPlugin/data/10282d8e.rss
--- a/appinstaller/AppMngr2/GSInstalledPlugin/data/10282d8e.rss Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 1028 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECOM resource file for AppMngr2 "Installed" GS plugin
-*
-*/
-
-
-#include // REGISTRY_INFO
-
-RESOURCE REGISTRY_INFO theInfo
- {
- dll_uid = 0x10282D8E;
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x10207236; // KGSPluginInterfaceUid
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x10282D8F;
- version_no = 1;
- display_name = "AppMngr2 Installed";
- default_data = "0x10283321"; // parent plugin
- opaque_data = "10"; // order number
- }
- };
- }
- };
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSInstalledPlugin/data/appmngr2gsinstalledpluginrsc.rss
--- a/appinstaller/AppMngr2/GSInstalledPlugin/data/appmngr2gsinstalledpluginrsc.rss Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource definitions for AppMngr2 GS Installed plugin
-*
-*/
-
-
-NAME AMIN
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF r_cp_folder_installed
- {
- buf = qtn_cp_folder_installed;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSInstalledPlugin/inc/appmngr2gsinstalledplugin.h
--- a/appinstaller/AppMngr2/GSInstalledPlugin/inc/appmngr2gsinstalledplugin.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 GS Installed plugin implementation
-*
-*/
-
-
-#ifndef C_APPMNGR2GSINSTALLEDPLUGIN_H
-#define C_APPMNGR2GSINSTALLEDPLUGIN_H
-
-#include // CGSPluginInterface
-#include // MAknServerAppExitObserver
-#include // RConeResourceLoader
-#include
-
-class CAknNullService;
-
-const TInt KAppMngr2InstalledUidValue = 0x10282D8F;
-const TUid KAppMngr2InstalledPluginUid = { KAppMngr2InstalledUidValue };
-
-
-/**
- * CAppMngrInstalledPlugin launches embedded AppMngr2 application to show
- * Installed Applications view. It is an EGSItemTypeSettingDialog type GS plug-in
- * and hence the GS framework calls HandleSelection() instead of DoActivate().
- * CAknView functionality is not supported although the base class is derived
- * from CAknView via CGSPluginInterface.
- */
-class CAppMngr2GsInstalledPlugin : public CGSPluginInterface,
- public MAknServerAppExitObserver
- {
-public: // constructors and destructor
- static CAppMngr2GsInstalledPlugin* NewL( TAny* aInitParams );
- ~CAppMngr2GsInstalledPlugin();
-
-public: // from CGSPluginInterface
- void GetCaptionL( TDes& aCaption ) const;
- void HandleSelection( const TGSSelectionTypes aSelectionType );
- TGSListboxItemTypes ItemType();
- CGulIcon* CreateIconL( const TUid aIconType );
- TInt PluginProviderCategory() const;
-
-public: // from CAknView, via CGSPluginInterface
- TUid Id() const;
-
-protected: // from CAknView, via CGSPluginInterface
- void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
- void DoDeactivate();
-
-private: // new functions
- CAppMngr2GsInstalledPlugin();
- void ConstructL();
- void OpenLocalizedResourceFileL( const TDesC& aResourceFileName,
- RConeResourceLoader& aResourceLoader );
- void LaunchAppManagerL();
- void EmbedAppL( const TUid& aAppUid );
-
-protected: // data
- RConeResourceLoader iResources;
- CAknNullService* iNullService;
- CApaDocument* iEmbedded;
- };
-
-#endif // C_APPMNGR2GSINSTALLEDPLUGIN_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSInstalledPlugin/src/appmngr2gsinstalledplugin.cpp
--- a/appinstaller/AppMngr2/GSInstalledPlugin/src/appmngr2gsinstalledplugin.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,245 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 GS Installed plugin implementation
-*
-*/
-
-
-#include "appmngr2gsinstalledplugin.h" // CAppMngr2GsInstalledPlugin
-#include "appmngr2internalpskeys.h" // KAppManagerApplicationMode
-#include "appmngr2.hrh" // KAppMngr2AppUidValue
-#include // CAknNullService
-#include // RProperty
-#include // StringLoader
-#include // BaflUtils
-#include // KGSPluginProviderInternal
-#include // FLOG macros
-#include // Resource IDs
-#include // Bitmap IDs
-
-_LIT( KAppMngr2InstalledResourceFileName, "z:appmngr2gsinstalledpluginrsc.rsc" );
-_LIT( KAppMngrIconFileNameMif, "appmngr2.mif" );
-_LIT( KDriveZ, "z:" );
-
-const TUid KAppMngr2AppUid = { KAppMngr2AppUidValue };
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::NewL()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GsInstalledPlugin* CAppMngr2GsInstalledPlugin::NewL( TAny* /*aInitParams*/ )
- {
- CAppMngr2GsInstalledPlugin* self = new( ELeave ) CAppMngr2GsInstalledPlugin();
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(self);
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::~CAppMngr2GsInstalledPlugin()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GsInstalledPlugin::~CAppMngr2GsInstalledPlugin()
- {
- FLOG( "CAppMngr2GsInstalledPlugin::~CAppMngr2GsInstalledPlugin" );
- iResources.Close();
- delete iNullService;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::GetCaptionL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstalledPlugin::GetCaptionL( TDes& aCaption ) const
- {
- HBufC* result = StringLoader::LoadL( R_CP_FOLDER_INSTALLED );
- aCaption.Copy( *result );
- delete result;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::ItemType()
-// ---------------------------------------------------------------------------
-//
-TGSListboxItemTypes CAppMngr2GsInstalledPlugin::ItemType()
- {
- return EGSItemTypeSettingDialog;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::CreateIconL()
-// ---------------------------------------------------------------------------
-//
-CGulIcon* CAppMngr2GsInstalledPlugin::CreateIconL( const TUid aIconType )
- {
- HBufC* iconFilePath = HBufC::NewLC( KDriveZ().Length() +
- KDC_APP_BITMAP_DIR().Length() + KAppMngrIconFileNameMif().Length() );
- TPtr ptr = iconFilePath->Des();
- ptr.Append( KDriveZ );
- ptr.Append( KDC_APP_BITMAP_DIR );
- ptr.Append( KAppMngrIconFileNameMif );
-
- CGulIcon* icon;
- if( aIconType == KGSIconTypeLbxItem )
- {
- icon = AknsUtils::CreateGulIconL( AknsUtils::SkinInstance(),
- KAknsIIDQgnPropCpInstInstalls, *iconFilePath,
- EMbmAppmngr2Qgn_prop_cp_inst_installs,
- EMbmAppmngr2Qgn_prop_cp_inst_installs_mask );
- }
- else
- {
- icon = CGSPluginInterface::CreateIconL( aIconType );
- }
-
- CleanupStack::PopAndDestroy( iconFilePath );
- return icon;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::PluginProviderCategory()
-// ---------------------------------------------------------------------------
-//
-TInt CAppMngr2GsInstalledPlugin::PluginProviderCategory() const
- {
- return KGSPluginProviderInternal;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::Id()
-// ---------------------------------------------------------------------------
-//
-TUid CAppMngr2GsInstalledPlugin::Id() const
- {
- return KAppMngr2InstalledPluginUid;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::DoActivateL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstalledPlugin::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
- TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/ )
- {
- FLOG( "CAppMngr2GsInstalledPlugin::DoActivateL" ); // not called
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::DoDeactivate()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstalledPlugin::DoDeactivate()
- {
- FLOG( "CAppMngr2GsInstalledPlugin::DoDeactivate" ); // not called
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::CAppMngr2GsInstalledPlugin()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GsInstalledPlugin::CAppMngr2GsInstalledPlugin() : iResources( *iCoeEnv )
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstalledPlugin::ConstructL()
- {
- FLOG( "CAppMngr2GsInstalledPlugin::ConstructL" );
- OpenLocalizedResourceFileL( KAppMngr2InstalledResourceFileName, iResources );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::HandleSelection()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstalledPlugin::HandleSelection(
- const TGSSelectionTypes /*aSelectionType*/ )
- {
- TRAP_IGNORE( LaunchAppManagerL() );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::OpenLocalizedResourceFileL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstalledPlugin::OpenLocalizedResourceFileL(
- const TDesC& aResourceFileName,
- RConeResourceLoader& aResourceLoader )
- {
- TParse parse;
- parse.Set( aResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL );
- TFileName fileName( parse.FullName() );
- BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName );
- aResourceLoader.OpenL( fileName );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::LaunchAppManagerL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstalledPlugin::LaunchAppManagerL()
- {
- FLOG( "CAppMngr2GsInstalledPlugin::LaunchAppManagerL" );
-
- _LIT_SECURITY_POLICY_PASS( KPropReadPolicy );
- _LIT_SECURITY_POLICY_C1( KPropWritePolicy, ECapabilityWriteDeviceData );
- TInt err = RProperty::Define( KPSUidAppManagerNotification,
- KAppManagerApplicationMode, RProperty::EInt,
- KPropReadPolicy, KPropWritePolicy );
- if( err != KErrNone && err != KErrAlreadyExists )
- {
- User::Leave( err );
- }
- User::LeaveIfError( RProperty::Set( KPSUidAppManagerNotification,
- KAppManagerApplicationMode, EAppMngr2InstalledView ) );
-
- RWsSession ws;
- User::LeaveIfError( ws.Connect() );
- CleanupClosePushL( ws );
- TApaTaskList taskList( ws );
- TApaTask task = taskList.FindApp( KAppMngr2AppUid );
-
- if( task.Exists() )
- {
- task.BringToForeground();
- }
- else
- {
- EmbedAppL( KAppMngr2AppUid );
- }
-
- CleanupStack::PopAndDestroy( &ws );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GsInstalledPlugin::EmbedAppL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GsInstalledPlugin::EmbedAppL( const TUid& aAppUid )
- {
- if( iNullService )
- {
- delete iNullService;
- iNullService = NULL;
- }
- iNullService = CAknNullService::NewL( aAppUid, this );
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSInstalledPlugin/src/appmngr2gsinstalledpluginmain.cpp
--- a/appinstaller/AppMngr2/GSInstalledPlugin/src/appmngr2gsinstalledpluginmain.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECOM proxy table for AppMngr2 GS (General Settigns) Installed plug-in
-*
-*/
-
-
-#include "appmngr2gsinstalledplugin.h" // CAppMngr2GsInstalledPlugin
-#include // TImplementationProxy
-
-// ---------------------------------------------------------------------------
-// Local array that maps the ECom implementation UIDs to factory functions
-// ---------------------------------------------------------------------------
-//
-const TImplementationProxy ImplementationTable[] =
- {
- IMPLEMENTATION_PROXY_ENTRY( KAppMngr2InstalledUidValue, CAppMngr2GsInstalledPlugin::NewL )
- };
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
- {
- aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
- return ImplementationTable;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSSettingsPlugin/data/101f9a10.rss
--- a/appinstaller/AppMngr2/GSSettingsPlugin/data/101f9a10.rss Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECOM resource file for AppMngr2 "Settings" GS plug-in
-*
-*/
-
-
-#include // REGISTRY_INFO
-
-RESOURCE REGISTRY_INFO theInfo
- {
- dll_uid = 0x101F9A10;
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x10207236; // KGSPluginInterfaceUid
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x101F9A11;
- version_no = 1;
- display_name = "AppMngr2 Settings";
- default_data = "0x10283321"; // parent plugin
- opaque_data = "30"; // order number
- }
- };
- }
- };
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSSettingsPlugin/data/appmngr2gssettingspluginrsc.rss
--- a/appinstaller/AppMngr2/GSSettingsPlugin/data/appmngr2gssettingspluginrsc.rss Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource definitions for AppMngr2 GS Settings plugin
-*
-*/
-
-
-NAME AMGS
-
-#include
-#include
-#include
-#include
-#include
-#include "appmngr2.hrh" // Command IDs
-#include // UI strings
-#include // UI strings
-#include
-
-RESOURCE RSS_SIGNATURE { }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_SETTINGS_VIEW
-// ---------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appmngr2_settings_view
- {
- menubar = r_appmngr2_settigs_menubar;
- cba = r_appmngr2_cba_options_back_change;
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_SETTIGS_MENUBAR
-// ---------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appmngr2_settigs_menubar
- {
- titles =
- {
- MENU_TITLE { menu_pane = r_appmngr2_settings_menu; }
- };
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_SETTINGS_MENU
-// ---------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appmngr2_settings_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = EAppMngr2CmdChange;
- txt = qtn_options_change;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = EAknCmdHelp;
- txt = qtn_options_help;
- },
- MENU_ITEM
- {
- command = EAknCmdExit;
- txt = qtn_options_exit;
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_CBA_OPTIONS_BACK_CHANGE
-// ---------------------------------------------------------------------------
-//
-RESOURCE CBA r_appmngr2_cba_options_back_change
- {
- buttons =
- {
- CBA_BUTTON
- {
- id = EAknSoftkeyOptions;
- txt = text_softkey_option;
- },
- CBA_BUTTON
- {
- id = EAknSoftkeyBack;
- txt = text_softkey_back;
- },
- CBA_BUTTON
- {
- id = EAknSoftkeyChange;
- txt = qtn_msk_change;
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_SETTING_ARRAY
-// ---------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_appmngr2_setting_array
- {
- items =
- {
- LBUF { txt = " \t"qtn_am_setting_sw_install"\t\t"; },
- LBUF { txt = " \t"qtn_am_setting_ocsp"\t\t"; },
- LBUF { txt = " \t"qtn_am_setting_ocsp_url"\t\t"; }
- };
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_ALLOW_UNTRUSTED_VALUE_ARRAY
-// ---------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_appmngr2_allow_untrusted_value_array
- {
- items =
- {
- LBUF { txt = qtn_am_set_sw_install_signed; },
- LBUF { txt = qtn_am_set_sw_install_all; }
- };
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_SET_PAGE_ALLOW_UNTRUSTED
-// ---------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_appmngr2_set_page_allow_untrusted
- {
- label = qtn_am_setting_sw_install;
- softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
- type = EAknSetListBox;
- editor_resource_id = r_appmngr2_ocsp_editor;
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_OCSP_CHECK_VALUE_ARRAY
-// ---------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_appmngr2_ocsp_check_value_array
- {
- items =
- {
- LBUF { txt = qtn_am_set_ocsp_must_pass; },
- LBUF { txt = qtn_am_set_ocsp_on; },
- LBUF { txt = qtn_am_set_ocsp_off; }
- };
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_OCSP_CHECK_PAGE
-// ---------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_appmngr2_ocsp_check_page
- {
- label = qtn_am_setting_ocsp;
- softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
- type = EAknSetListBox;
- editor_resource_id = r_appmngr2_ocsp_editor;
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_OCSP_EDITOR
-// ---------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_appmngr2_ocsp_editor
- {
- flags = EEikListBoxMultipleSelection;
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_OCSP_URL_SETTING_PAGE
-// ---------------------------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_appmngr2_ocsp_url_setting_page
- {
- number = EAknSettingPageNoOrdinalDisplayed;
- label = qtn_am_setting_ocsp_url;
- softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
- type = EEikCtEdwin;
- editor_resource_id = r_appmngr2_url_editor;
- }
-
-// ---------------------------------------------------------------------------
-// R_APPMNGR2_URL_EDITOR
-// ---------------------------------------------------------------------------
-//
-RESOURCE EDWIN r_appmngr2_url_editor
- {
- width = KAppMngr2OcspUrlControlWidth;
- lines = KAppMngr2OcspUrlControlLines;
- maxlength = KAppMngr2MaxOcspUrlLength;
- numeric_keymap = EAknEditorCalculatorNumberModeKeymap;
- allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode;
- default_input_mode = EAknEditorTextInputMode;
- special_character_table = R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG;
- default_case = EAknEditorLowerCase;
- flags = EEikEdwinAutoSelection | EAknEditorLowerCase | EEikEdwinNoLineOrParaBreaks;
- avkon_flags = EAknEditorFlagNoT9 | EAknEditorFlagLatinInputModesOnly;
- }
-
-// ---------------------------------------------------------------------------
-// TBUF resources
-// ---------------------------------------------------------------------------
-//
-RESOURCE TBUF r_set_folder_application_manager
- {
- buf = qtn_cp_folder_installation_settings;
- }
-
-RESOURCE TBUF r_am_installation_settings_title
- {
- buf = qtn_am_installation_settings_title;
- }
-
-RESOURCE TBUF r_am_note_locked_settigs
- {
- buf = qtn_am_note_locked_settings;
- }
-
-RESOURCE TBUF r_am_set_ocsp_none
- {
- buf = qtn_selec_sett_val_field_none;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSSettingsPlugin/inc/appmngr2gssettingscontainer.h
--- a/appinstaller/AppMngr2/GSSettingsPlugin/inc/appmngr2gssettingscontainer.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 GS (General Settings) Settings plug-in Container
-*
-*/
-
-
-#ifndef C_APPMNGR2GSSETTINGSCONTAINER_H
-#define C_APPMNGR2GSSETTINGSCONTAINER_H
-
-#include // CCoeControl
-#include // CDesCArray
-#include "appmngr2.hrh" // KAppMngr2AppUidValue
-
-class CEikTextListBox;
-class CAknSettingStyleListBox;
-
-const TUid KAppMngr2AppUid = { KAppMngr2AppUidValue };
-
-// Items in R_APPMNGR2_SETTING_ARRAY resource array
-enum KAppMngr2SettingArrayItems
- {
- EAppMngr2SettingSwInstall = 0,
- EAppMngr2SettingOcsp = 1,
- EAppMngr2SettingOcspUrl = 2
- };
-
-// Items in R_APPMNGR2_OCSP_CHECK_VALUE_ARRAY resource array
-enum KAppMngr2OcspCheckValueArrayItems
- {
- EAppMngr2OcspCheckValueArrayMustPass = 0,
- EAppMngr2OcspCheckValueArrayOn = 1,
- EAppMngr2OcspCheckValueArrayOff = 2
- };
-
-
-class CAppMngr2GSSettingsContainer : public CCoeControl
- {
-public: // constructors and destructor
- static CAppMngr2GSSettingsContainer* NewL( const TRect& aRect );
- ~CAppMngr2GSSettingsContainer();
-
-public: // new functions
- CAknSettingStyleListBox* ListBox() const;
- void UpdateListBoxContentL();
-
-public: // from CCoeControl
- TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
-
-private: // new functions
- CAppMngr2GSSettingsContainer();
- void ConstructL( const TRect& aRect );
- void LoadIconsL();
-
-private: // from CCoeControl
- void SizeChanged();
- void FocusChanged( TDrawNow aDrawNow );
- TInt CountComponentControls() const;
- CCoeControl* ComponentControl( TInt aIndex ) const;
- void GetHelpContext( TCoeHelpContext& aContext ) const;
- void HandleResourceChange( TInt aType );
-
-private: // data
- CDesCArray* iItems;
- CDesCArray* iOcspCheckValueArray;
- CDesCArray* iAllowUntrustedValueArray;
- CAknSettingStyleListBox* iListbox;
- };
-
-
-#endif // C_APPMNGR2GSSETTINGSCONTAINER_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSSettingsPlugin/inc/appmngr2gssettingsplugin.h
--- a/appinstaller/AppMngr2/GSSettingsPlugin/inc/appmngr2gssettingsplugin.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 Settings plug-in for GS (General Settings)
-*
-*/
-
-
-#ifndef C_APPMNGR2GSSETTINGSPLUGIN_H
-#define C_APPMNGR2GSSETTINGSPLUGIN_H
-
-#include // CGSPluginInterface
-#include // MEikListBoxObserver
-#include // RConeResourceLoader
-
-class CAppMngr2GSSettingsContainer;
-
-const TInt KAppMngr2GSSettingsUidValue = 0x101F9A11;
-const TUid KAppMngr2GSSettingsUid = { KAppMngr2GSSettingsUidValue };
-
-
-class CAppMngr2GSSettingsPlugin : public CGSPluginInterface, public MEikListBoxObserver
- {
-public: // constructors and destructor
- static CAppMngr2GSSettingsPlugin* NewL( TAny* aInitParams );
- ~CAppMngr2GSSettingsPlugin();
-
-public: // from CGSPluginInterface
- void GetCaptionL( TDes& aCaption ) const;
- CGulIcon* CreateIconL( const TUid aIconType );
- TInt PluginProviderCategory() const;
-
-public: // from CAknView, via CGSPluginInterface
- TUid Id() const;
- void HandleCommandL( TInt aCommand );
- void HandleViewRectChange();
- void DynInitMenuPaneL( TInt aResourceId,CEikMenuPane* aMenuPane );
-
-public: // from MEikListBoxObserver
- void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
-
-protected: // from CAknView, via CGSPluginInterface
- void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
- void DoDeactivate();
- void HandleForegroundEventL( TBool aForeground );
-
-private: // new functions
- CAppMngr2GSSettingsPlugin();
- void ConstructL();
-
- void HandleListBoxSelectionL();
- void ShowSettingPageL( TInt aSettingIndex );
- void SetPermissionL( TInt aSettingIndex, TInt aNewValueIndex, TPtrC16 aUrlText );
- TInt MapOCSPIndex( TInt aValue );
-
-private: // data
- CAppMngr2GSSettingsContainer* iContainer;
- RConeResourceLoader iResources;
- TVwsViewId iPrevViewId;
- };
-
-#endif // C_APPMNGR2GSSETTINGSPLUGIN_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSSettingsPlugin/src/appmngr2gssettingscontainer.cpp
--- a/appinstaller/AppMngr2/GSSettingsPlugin/src/appmngr2gssettingscontainer.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,356 +0,0 @@
-/*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 GS (General Settings) Settings plug-in Container
-*
-*/
-
-
-#include "appmngr2gssettingscontainer.h" // CAppMngr2GSSettingsContainer
-#include // CAknSettingStyleListBox
-#include // CRepository
-#include // CAknIconArray
-#include // FeatureManager
-#include // KCRUidSWInstallerSettings
-#include // KDC_RESOURCE_FILES_DIR
-#include // Resource IDs
-#include // Bitmap IDs
-#include // Help IDs
-
-const TInt KNumStrSize = 1; // Buffer size for string which has one number
-const TInt KGranularity = 1;
-const TInt KMaxSettingsItemLength = 128 + NCentralRepositoryConstants::KMaxUnicodeStringLength;
-
-_LIT( KAppMngrTab, "\t");
-_LIT( KAppMngr2IconFileNameMif, "appmngr2.mif" );
-_LIT( KDriveZ, "z:" );
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::NewL()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GSSettingsContainer* CAppMngr2GSSettingsContainer::NewL( const TRect& aRect )
- {
- CAppMngr2GSSettingsContainer* self = new ( ELeave ) CAppMngr2GSSettingsContainer();
- CleanupStack::PushL( self );
- self->ConstructL( aRect );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::~CAppMngr2GSSettingsContainer()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GSSettingsContainer::~CAppMngr2GSSettingsContainer()
- {
- delete iListbox;
- delete iItems;
- delete iOcspCheckValueArray;
- delete iAllowUntrustedValueArray;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::ListBox()
-// ---------------------------------------------------------------------------
-//
-CAknSettingStyleListBox* CAppMngr2GSSettingsContainer::ListBox() const
- {
- return iListbox;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::UpdateListBoxContentL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsContainer::UpdateListBoxContentL()
- {
- TInt ocsp_check_value = 0;
- HBufC* ocsp_url = HBufC::NewLC( NCentralRepositoryConstants::KMaxUnicodeStringLength );
- TPtr ocsp_url_value( ocsp_url->Des() );
- ocsp_url_value.Zero();
- TInt allowUntrustedValue( 0 );
-
- // Must save listbox indexes because content will be deleted
- TInt lastListBoxPos = iListbox->CurrentItemIndex();
- TInt lastListBoxTopPos = iListbox->TopItemIndex();
-
- MDesCArray* itemList = iListbox->Model()->ItemTextArray();
- CDesCArray* itemArray = static_cast( itemList );
- itemArray->Reset();
-
- // Get data from Central repository
- CRepository* repDB = CRepository::NewLC( KCRUidSWInstallerSettings );
- repDB->Get( KSWInstallerOcspProcedure, ocsp_check_value );
- repDB->Get( KSWInstallerOcspDefaultURL, ocsp_url_value );
- if( ocsp_url_value.Length() == 0 )
- {
- // If OCSP URL is empty string add the default text "none"
- iCoeEnv->ReadResourceAsDes16L( ocsp_url_value, R_AM_SET_OCSP_NONE );
- }
- repDB->Get( KSWInstallerAllowUntrusted, allowUntrustedValue );
- if( allowUntrustedValue )
- {
- allowUntrustedValue = 1;
- }
- CleanupStack::PopAndDestroy( repDB );
-
- switch( ocsp_check_value )
- {
- case ESWInstallerOcspProcedureOff:
- ocsp_check_value = EAppMngr2OcspCheckValueArrayOff;
- break;
- case ESWInstallerOcspProcedureOn:
- ocsp_check_value = EAppMngr2OcspCheckValueArrayOn;
- break;
- case ESWInstallerOcspProcedureMust:
- ocsp_check_value = EAppMngr2OcspCheckValueArrayMustPass;
- break;
- default:
- break;
- }
-
- HBufC* itemValue = HBufC::NewLC( KMaxSettingsItemLength );
- TPtr itemPtr = itemValue->Des();
- itemPtr = ( *iItems )[ EAppMngr2SettingSwInstall ];
-
- // Check variation
- TInt hideAllowUntrusted( 1 );
- CRepository* variationDB = CRepository::NewLC( KCRUidSWInstallerLV );
- variationDB->Get( KSWInstallerHideUntrustedIns, hideAllowUntrusted );
- CleanupStack::PopAndDestroy( variationDB );
-
- if( !hideAllowUntrusted )
- {
- itemPtr.Zero();
- itemPtr = ( *iItems )[ EAppMngr2SettingSwInstall ];
- itemPtr += ( *iAllowUntrustedValueArray )[ allowUntrustedValue ];
- itemArray->AppendL( itemPtr );
- }
-
- if( !FeatureManager::FeatureSupported( KFeatureIdOCSP ) )
- {
- // If OCSP feature is not supported, OCSP settings can not be changed
- // --> lock icon is added
- TBuf strNum;
- strNum.Num( 0 );
-
- // If lock icon is wanted to be shown, the string format must be:
- // " \tSetting label\t\tSetting value\t\t\t0"
-
- itemPtr.Zero();
- itemPtr = ( *iItems )[ EAppMngr2SettingOcsp ];
- itemPtr += ( *iOcspCheckValueArray )[ ocsp_check_value ];
- itemPtr += KAppMngrTab;
- itemPtr += KAppMngrTab;
- itemPtr += KAppMngrTab;
- itemPtr.Append( strNum );
- itemArray->AppendL( itemPtr );
-
- itemPtr.Zero();
- itemPtr = ( *iItems )[ EAppMngr2SettingOcspUrl ];
- itemPtr += ocsp_url_value;
- itemPtr += KAppMngrTab;
- itemPtr += KAppMngrTab;
- itemPtr += KAppMngrTab;
- itemPtr.Append( strNum );
- itemArray->AppendL( itemPtr );
- }
- else
- {
- itemPtr.Zero();
- itemPtr = ( *iItems )[ EAppMngr2SettingOcsp ];
- itemPtr += ( *iOcspCheckValueArray )[ ocsp_check_value ];
- itemArray->AppendL( itemPtr );
-
- itemPtr.Zero();
- itemPtr = ( *iItems )[ EAppMngr2SettingOcspUrl ];
- itemPtr += ocsp_url_value;
- itemArray->AppendL( itemPtr );
- }
-
- CleanupStack::PopAndDestroy( itemValue );
- // Handle content changes
- iListbox->Reset();
- // Listbox might not have index
- if( lastListBoxPos != -1 )
- {
- iListbox->SetCurrentItemIndex( lastListBoxPos );
- iListbox->SetTopItemIndex( lastListBoxTopPos );
- }
-
- CleanupStack::PopAndDestroy( ocsp_url );
-
- // Call after addition to ensure that the list dialog is updated correctly.
- iListbox->HandleItemAdditionL();
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::OfferKeyEventL()
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CAppMngr2GSSettingsContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType )
- {
- return iListbox->OfferKeyEventL(aKeyEvent, aType);
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::CAppMngr2GSSettingsContainer()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GSSettingsContainer::CAppMngr2GSSettingsContainer()
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsContainer::ConstructL( const TRect& aRect )
- {
- CreateWindowL();
-
- iListbox = new( ELeave ) CAknSettingStyleListBox;
-
- iListbox->SetContainerWindowL( *this );
- iListbox->ConstructL( this, EAknListBoxSelectionList );
-
- // Read the setting items array (contains first lines of the setting items)
- iItems = iCoeEnv->ReadDesC16ArrayResourceL( R_APPMNGR2_SETTING_ARRAY );
- iOcspCheckValueArray = iCoeEnv->ReadDesC16ArrayResourceL(
- R_APPMNGR2_OCSP_CHECK_VALUE_ARRAY );
- iAllowUntrustedValueArray = iCoeEnv->ReadDesC16ArrayResourceL(
- R_APPMNGR2_ALLOW_UNTRUSTED_VALUE_ARRAY );
-
- iListbox->CreateScrollBarFrameL( ETrue );
- iListbox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOn,
- CEikScrollBarFrame::EAuto );
- iListbox->SetRect( aRect.Size() );
- iListbox->ActivateL();
- SetRect( aRect );
- ActivateL();
-
- iListbox->SetCurrentItemIndex( EAppMngr2SettingSwInstall );
- if( !FeatureManager::FeatureSupported( KFeatureIdOCSP ) )
- {
- LoadIconsL();
- }
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::LoadIconsL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsContainer::LoadIconsL()
- {
- HBufC* iconFilePath = HBufC::NewL( KDriveZ().Length() +
- KDC_APP_BITMAP_DIR().Length() + KAppMngr2IconFileNameMif().Length() );
- CleanupStack::PushL( iconFilePath );
-
- TPtr ptr = iconFilePath->Des();
- ptr.Append( KDriveZ );
- ptr.Append( KDC_APP_BITMAP_DIR );
- ptr.Append( KAppMngr2IconFileNameMif );
-
- CArrayPtr* icons = new ( ELeave ) CAknIconArray( KGranularity );
- CleanupStack::PushL( icons );
-
- MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
- CGulIcon* icon = AknsUtils::CreateGulIconL( skinInstance,
- KAknsIIDQgnIndiSettProtectedAdd, *iconFilePath,
- EMbmAppmngr2Qgn_indi_sett_protected_add,
- EMbmAppmngr2Qgn_indi_sett_protected_add_mask );
- CleanupStack::PushL( icon );
- icons->AppendL( icon );
-
- iListbox->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
-
- CleanupStack::Pop( icon );
- CleanupStack::Pop( icons );
- CleanupStack::PopAndDestroy( iconFilePath );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::SizeChanged()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsContainer::SizeChanged()
- {
- iListbox->SetRect( Rect() );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::FocusChanged()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsContainer::FocusChanged( TDrawNow aDrawNow )
- {
- if( iListbox )
- {
- iListbox->SetFocus( IsFocused(), aDrawNow );
- }
- }
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::CountComponentControls()
-// ---------------------------------------------------------------------------
-//
-TInt CAppMngr2GSSettingsContainer::CountComponentControls() const
- {
- return iListbox ? 1 : 0;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::ComponentControl()
-// ---------------------------------------------------------------------------
-//
-CCoeControl* CAppMngr2GSSettingsContainer::ComponentControl( TInt aIndex ) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListbox;
- default:
- return NULL;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::GetHelpContext()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsContainer::GetHelpContext( TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = KAppMngr2AppUid;
- aContext.iContext = KAM_HLP_GENERAL_SETTINGS;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsContainer::HandleResourceChange()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsContainer::HandleResourceChange( TInt aType )
- {
- CCoeControl::HandleResourceChange( aType );
-
- if( aType == KEikDynamicLayoutVariantSwitch ) //Handle change in layout orientation
- {
- TRect mainPaneRect;
- AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
- SetRect( mainPaneRect );
- DrawNow();
- }
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSSettingsPlugin/src/appmngr2gssettingsplugin.cpp
--- a/appinstaller/AppMngr2/GSSettingsPlugin/src/appmngr2gssettingsplugin.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,490 +0,0 @@
-/*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: AppMngr2 Settings plug-in for GS (General Settings)
-*
-*/
-
-
-#include "appmngr2gssettingsplugin.h" // CAppMngrGSSettingsPlugin
-#include "appmngr2gssettingscontainer.h" // CAppMngr2GSSettingsContainer
-#include "appmngr2.hrh" // KAppMngr2AppUidValue
-#include // KGSPluginProviderInternal
-#include // FLOG macros
-#include // TAppMngr2DriveUtils
-#include // CAknRadioButtonSettingPage
-#include // CAknTextSettingPage
-#include // KCRUidSWInstallerSettings
-#include // CRepository
-#include // StringLoader
-#include // CAknTitlePane
-#include // CAknInformationNote
-#include // HlpLauncher
-#include // FeatureManager
-#include // Help IDs
-#include // Resource IDs
-#include // Bitmap IDs
-
-_LIT( KAppMngr2GsSettingsPluginResourceFileName, "appmngr2gssettingspluginrsc.rsc" );
-_LIT( KAppMngr2IconFileNameMif, "appmngr2.mif" );
-_LIT( KDriveZ, "z:" );
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::NewL()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GSSettingsPlugin* CAppMngr2GSSettingsPlugin::NewL( TAny* /*aInitParams*/ )
- {
- CAppMngr2GSSettingsPlugin* self = new( ELeave ) CAppMngr2GSSettingsPlugin;
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::~CAppMngr2GSSettingsPlugin()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GSSettingsPlugin::~CAppMngr2GSSettingsPlugin()
- {
- if( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- iResources.Close();
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::GetCaptionL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::GetCaptionL( TDes& aCaption ) const
- {
- // the resource file is already opened.
- HBufC* result = StringLoader::LoadL( R_SET_FOLDER_APPLICATION_MANAGER );
- aCaption.Copy( *result );
- delete result;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::CreateIconL()
-// ---------------------------------------------------------------------------
-//
-CGulIcon* CAppMngr2GSSettingsPlugin::CreateIconL( const TUid aIconType )
- {
- HBufC* iconFilePath = HBufC::NewLC( KDriveZ().Length() +
- KDC_APP_BITMAP_DIR().Length() + KAppMngr2IconFileNameMif().Length() );
- TPtr ptr = iconFilePath->Des();
- ptr.Append( KDriveZ );
- ptr.Append( KDC_APP_BITMAP_DIR );
- ptr.Append( KAppMngr2IconFileNameMif );
-
- CGulIcon* icon;
- TInt iconId = EMbmAppmngr2Qgn_prop_cp_inst_settings;
- TInt maskId = EMbmAppmngr2Qgn_prop_cp_inst_settings_mask;
- if( aIconType == KGSIconTypeLbxItem )
- {
- icon = AknsUtils::CreateGulIconL( AknsUtils::SkinInstance(),
- KAknsIIDQgnPropCpInstSettings, *iconFilePath,
- iconId, maskId );
- }
- else
- {
- icon = CGSPluginInterface::CreateIconL( aIconType );
- }
-
- CleanupStack::PopAndDestroy( iconFilePath );
- return icon;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::PluginProviderCategory()
-// ---------------------------------------------------------------------------
-//
-TInt CAppMngr2GSSettingsPlugin::PluginProviderCategory() const
- {
- return KGSPluginProviderInternal;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::Id()
-// ---------------------------------------------------------------------------
-//
-TUid CAppMngr2GSSettingsPlugin::Id() const
- {
- return KAppMngr2GSSettingsUid;
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::HandleCommandL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::HandleCommandL( TInt aCommand )
- {
- switch ( aCommand )
- {
- case EAppMngr2CmdChange:
- case EAknSoftkeyChange:
- {
- HandleListBoxSelectionL();
- break;
- }
- case EAknSoftkeyBack:
- {
- AppUi()->ActivateLocalViewL( iPrevViewId.iViewUid );
- break;
- }
- case EAknSoftkeyExit:
- {
- static_cast( AppUi() )->ProcessCommandL( EAknCmdExit );
- break;
- }
- case EAknCmdHelp:
- case EEikCmdHelpContents:
- {
- if( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
- {
- CArrayFix* contexts =
- new( ELeave ) CArrayFixFlat( 1 );
- CleanupStack::PushL( contexts );
- TCoeHelpContext context;
- context.iMajor = KAppMngr2AppUid;
- context.iContext = KAM_HLP_GENERAL_SETTINGS;
- contexts->AppendL( context );
- CleanupStack::Pop( contexts );
- HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(), contexts );
- }
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::HandleViewRectChange()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::HandleViewRectChange()
- {
- if( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::DynInitMenuPaneL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
- {
- switch( aResourceId )
- {
- case R_APPMNGR2_SETTINGS_MENU:
- if( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
- {
- aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
- }
- break;
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::HandleListBoxEventL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::HandleListBoxEventL( CEikListBox* /*aListBox*/,
- TListBoxEvent aEventType )
- {
- switch ( aEventType )
- {
- case EEventEnterKeyPressed:
- case EEventItemSingleClicked:
- HandleListBoxSelectionL();
- break;
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::DoActivateL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::DoActivateL( const TVwsViewId& aPrevViewId,
- TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/ )
- {
- iPrevViewId = aPrevViewId;
- if( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- HBufC* jamSetTitle = StringLoader::LoadLC( R_AM_INSTALLATION_SETTINGS_TITLE );
- CEikStatusPane* statusPane = StatusPane();
- CAknTitlePane* titlePane;
- titlePane = ( CAknTitlePane* ) statusPane->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) );
- titlePane->SetTextL( jamSetTitle->Des() );
- CleanupStack::PopAndDestroy( jamSetTitle );
- jamSetTitle = NULL;
-
- iContainer = CAppMngr2GSSettingsContainer::NewL( ClientRect() );
- iContainer->SetMopParent( this );
- iContainer->MakeVisible( ETrue );
- iContainer->SetRect( ClientRect() );
- iContainer->ActivateL();
- AppUi()->AddToStackL( *this, iContainer );
- iContainer->ListBox()->SetListBoxObserver( this );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::DoDeactivate()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::DoDeactivate()
- {
- if( iContainer )
- {
- iContainer->MakeVisible( EFalse );
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::HandleForegroundEventL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::HandleForegroundEventL( TBool aForeground )
- {
- if( aForeground )
- {
- iContainer->UpdateListBoxContentL();
- }
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::CAppMngr2GSSettingsPlugin()
-// ---------------------------------------------------------------------------
-//
-CAppMngr2GSSettingsPlugin::CAppMngr2GSSettingsPlugin() : iResources( *CCoeEnv::Static() )
- {
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::ConstructL()
- {
- TFileName* fileName = TAppMngr2DriveUtils::NearestResourceFileLC(
- KAppMngr2GsSettingsPluginResourceFileName, iCoeEnv->FsSession() );
-
- iResources.OpenL( *fileName );
- BaseConstructL( R_APPMNGR2_SETTINGS_VIEW );
-
- CleanupStack::PopAndDestroy( fileName );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::HandleListBoxSelectionL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::HandleListBoxSelectionL()
- {
- TInt currentIndex = iContainer->ListBox()->CurrentItemIndex();
- ShowSettingPageL( currentIndex );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::ShowSettingPageL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::ShowSettingPageL( TInt aSettingIndex )
- {
- FLOG( "CAppMngr2GSSettingsPlugin: ShowSettingPageL( %d )", aSettingIndex );
-
- // Variation flag may be used to hide "allow untrusted" option
- TInt hideAllowUntrusted = 1;
- CRepository* variationDB = CRepository::NewLC( KCRUidSWInstallerLV );
- variationDB->Get( KSWInstallerHideUntrustedIns, hideAllowUntrusted );
- CleanupStack::PopAndDestroy( variationDB );
- if( hideAllowUntrusted )
- {
- // Increase the setting index so that allow untrusted is not taken into account
- aSettingIndex++;
- }
-
- if( aSettingIndex == EAppMngr2SettingOcsp || aSettingIndex == EAppMngr2SettingOcspUrl )
- {
- if( !FeatureManager::FeatureSupported( KFeatureIdOCSP ) )
- {
- // If OCSP feature is not supported, it's not allowed to change values
- HBufC* p = StringLoader::LoadLC( R_AM_NOTE_LOCKED_SETTIGS );
- CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue );
- note->ExecuteLD( p->Des() );
- CleanupStack::PopAndDestroy( p );
- return;
- }
- }
-
- HBufC* urlTextStr = HBufC::NewLC( NCentralRepositoryConstants::KMaxUnicodeStringLength );
- TPtr urlText( urlTextStr->Des() );
- urlText.Zero();
- TInt newIndex = 0;
-
- if( aSettingIndex == EAppMngr2SettingSwInstall || aSettingIndex == EAppMngr2SettingOcsp )
- {
- CRepository* repDB = CRepository::NewLC( KCRUidSWInstallerSettings );
- CAknSettingPage* dlg = NULL;
- CDesCArrayFlat* itemArray = NULL;
-
- if( aSettingIndex == EAppMngr2SettingSwInstall )
- {
- // Install software
- itemArray = iCoeEnv->ReadDesC16ArrayResourceL(
- R_APPMNGR2_ALLOW_UNTRUSTED_VALUE_ARRAY );
- repDB->Get( KSWInstallerAllowUntrusted, newIndex );
- if( newIndex )
- {
- newIndex = 1;
- }
- dlg = new ( ELeave ) CAknRadioButtonSettingPage(
- R_APPMNGR2_SET_PAGE_ALLOW_UNTRUSTED,
- newIndex, itemArray );
- }
- else
- {
- // OCSP check
- repDB->Get( KSWInstallerOcspProcedure, newIndex );
- newIndex = MapOCSPIndex( newIndex );
- itemArray = iCoeEnv->ReadDesC16ArrayResourceL(
- R_APPMNGR2_OCSP_CHECK_VALUE_ARRAY );
- dlg = new ( ELeave ) CAknRadioButtonSettingPage(
- R_APPMNGR2_OCSP_CHECK_PAGE, newIndex, itemArray );
- }
- CleanupStack::PopAndDestroy( repDB );
- CleanupStack::PushL( itemArray );
-
- if( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
- {
- SetPermissionL( aSettingIndex, newIndex, urlText );
- }
- CleanupStack::PopAndDestroy( itemArray );
- }
- else if( aSettingIndex == EAppMngr2SettingOcspUrl )
- {
- CRepository* repDB = CRepository::NewLC( KCRUidSWInstallerSettings );
- repDB->Get( KSWInstallerOcspDefaultURL, urlText );
- CAknTextSettingPage* textDlg = new ( ELeave ) CAknTextSettingPage(
- R_APPMNGR2_OCSP_URL_SETTING_PAGE, urlText,
- CAknTextSettingPage::EZeroLengthAllowed );
- CleanupStack::PushL( textDlg );
- textDlg->ConstructL();
- textDlg->TextControl()->SetTextLimit( KAppMngr2MaxOcspUrlLength );
-
- CleanupStack::Pop( textDlg );
- CleanupStack::PopAndDestroy( repDB );
-
- if( textDlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
- {
- // Remove spaces from URL text
- for( TInt pos = urlText.Length() - 1; pos >= 0; --pos ) {
- if( TChar( urlText[pos] ).IsSpace() ) {
- urlText.Delete( pos, 1 );
- }
- }
- SetPermissionL( aSettingIndex, newIndex, urlText );
- }
- }
- else
- {
- ASSERT( EFalse );
- }
-
- CleanupStack::PopAndDestroy( urlTextStr );
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::SetPermissionL()
-// ---------------------------------------------------------------------------
-//
-void CAppMngr2GSSettingsPlugin::SetPermissionL( TInt aSettingIndex,
- TInt aNewValueIndex,
- TPtrC16 aUrlText )
- {
- FLOG( "CAppMngr2GSSettingsPlugin::SetPermissionL( %d, %d, %S )",
- aSettingIndex, aNewValueIndex, &aUrlText );
-
- // Write the setting value to Central repository
- CRepository* repDB = CRepository::NewLC( KCRUidSWInstallerSettings );
- switch( aSettingIndex )
- {
- case EAppMngr2SettingSwInstall:
- repDB->Set( KSWInstallerAllowUntrusted, aNewValueIndex );
- break;
- case EAppMngr2SettingOcsp:
- aNewValueIndex = MapOCSPIndex( aNewValueIndex );
- repDB->Set( KSWInstallerOcspProcedure, aNewValueIndex );
- break;
- case EAppMngr2SettingOcspUrl:
- repDB->Set( KSWInstallerOcspDefaultURL, aUrlText );
- break;
- default:
- ASSERT( EFalse );
- break;
- }
- CleanupStack::PopAndDestroy( repDB );
-
- iContainer->UpdateListBoxContentL();
- }
-
-// ---------------------------------------------------------------------------
-// CAppMngr2GSSettingsPlugin::MapOCSPIndex()
-// ---------------------------------------------------------------------------
-//
-TInt CAppMngr2GSSettingsPlugin::MapOCSPIndex( TInt aValue )
- {
- TInt result = 0;
-
- switch( aValue )
- {
- case ESWInstallerOcspProcedureOff:
- result = EAppMngr2OcspCheckValueArrayOff;
- break;
- case ESWInstallerOcspProcedureOn:
- result = EAppMngr2OcspCheckValueArrayOn;
- break;
- case ESWInstallerOcspProcedureMust:
- result = EAppMngr2OcspCheckValueArrayMustPass;
- break;
- default:
- break;
- }
-
- return result;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/GSSettingsPlugin/src/appmngr2gssettingspluginmain.cpp
--- a/appinstaller/AppMngr2/GSSettingsPlugin/src/appmngr2gssettingspluginmain.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECOM proxy table for AppMngr2 GS (General Settigns) Settings plug-in
-*
-*/
-
-
-#include "appmngr2gssettingsplugin.h" // CAppMngr2GSSettingsPlugin
-#include // TImplementationProxy
-
-
-// ---------------------------------------------------------------------------
-// Local array that maps the ECom implementation UIDs to factory functions
-// ---------------------------------------------------------------------------
-//
-const TImplementationProxy ImplementationTable[] =
- {
- IMPLEMENTATION_PROXY_ENTRY( KAppMngr2GSSettingsUidValue, CAppMngr2GSSettingsPlugin::NewL )
- };
-
-// ---------------------------------------------------------------------------
-// ImplementationGroupProxy
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
- {
- aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
- return ImplementationTable;
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/SWInstAdapter/data/swinstadapter.rss
--- a/appinstaller/AppMngr2/SWInstAdapter/data/swinstadapter.rss Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Registery info for the SW Installer DM Adapter.
-*
-*/
-
-
-#include // REGISTRY_INFO
-#include "../inc/swinstadapteruids.hrh"
-
-RESOURCE REGISTRY_INFO theRegistryInfo
- {
- dll_uid = KSWInstAdapterDllUid3; // The DLL's 3rd UID.
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x102018B4; // KSmlDMInterfaceUid
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = KSWInstAdapterImplUid;
- version_no = 1;
- display_name = "SW Installer DM Adapter";
- default_data = "";
- opaque_data = "";
- }
- };
- }
- };
- }
-
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/SWInstAdapter/inc/cswinstadapter.h
--- a/appinstaller/AppMngr2/SWInstAdapter/inc/cswinstadapter.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,417 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: OMA DM adapter for SW Installer configuration
-*
-*/
-
-
-#ifndef C_CSWINSTADAPTER_H
-#define C_CSWINSTADAPTER_H
-
-#include
-#include
-#include
-
-/**
-* SW Installer DM Adapter
-* This adapter implements remote configuration for SW Installer settings.
-* @since S60 v3.2
-*/
-class CSWInstAdapter : public CSmlDmAdapter
- {
- public: // Constructors, destructor
- /**
- * Create instance of CSWInstAdapter
- * @param aDmCallBack
- * @return Instance of CSWInstAdapter
- */
- static CSWInstAdapter* NewL( MSmlDmCallback* aDmCallback );
-
- /**
- * Create instance of CSWInstAdapter
- * @param aDmCallBack
- * @return Instance of CSWInstAdapter
- */
- static CSWInstAdapter* NewLC( MSmlDmCallback* aDmCallback );
-
- /**
- * C++ Destructor
- */
- virtual ~CSWInstAdapter();
-
- public:
- /**
- * The function returns current version of the DDF.
- * By asking current DDF versions from adapters DM Module can control
- * possible changes in the data structure and send the changed DDF
- * description to a management server.
- * This function is always called after DDFStructureL.
- * @param aVersion DDF version of the adapter. (filled by the adapter)
- * @publishedPartner
- * @prototype
- */
- void DDFVersionL( CBufBase& aVersion );
-
- /**
- * The function for filling the DDF structure of the adapter
- * This function is only called once, immediately after the adapter is created.
- * @param aDDFObject Reference to root object. A DM adapter starts filling
- the data structure by calling AddChildObjectL to the root object and
- so describes the DDF of the adapter.
- * @publishedPartner
- * @prototype
- */
- void DDFStructureL( MSmlDmDDFObject& aDDF );
-
- /**
- * The function creates new leaf objects, or replaces data in existing leaf
- * objects. The information about the success of the command should be
- * returned by calling SetStatusL function of MSmlDmCallback callback
- * interface. This makes it possible to buffer the commands. However, all
- * the status codes for buffered commands must be returned at the latest when
- * the adapter's CompleteOutstandingCmdsL() is called.
- * @param aURI URI of the object
- * @param aLUID LUID of the object (if the adapter has earlier returned a
- LUID to the DM Module). For new objects, this is the LUID
- inherited through the parent node.
- * @param aObject Data of the object.
- * @param aType MIME type of the object
- * @param aStatus Ref Reference to correct command, i.e. this reference
- must be used when calling the SetStatusL of this command
- * @publishedPartner
- * @prototype
- */
- void UpdateLeafObjectL( const TDesC8& aURI,
- const TDesC8& aLUID,
- const TDesC8& aObject,
- const TDesC8& aType,
- TInt aStatusRef
- );
-
- /**
- * The function creates new leaf objects, or replaces data in existing leaf
- * objects, in the case where data is large enough to be streamed. The
- * information about the success of the command should be returned by calling
- * SetStatusL function of MSmlDmCallback callback interface. This makes it
- * possible to buffer the commands. However, all the status codes for buffered
- * commands must be returned at the latest when the CompleteOutstandingCmdsL()
- * of adapter is called.
- * @param aURI URI of the object
- * @param aLUID LUID of the object (if the adapter has earlier returned a
- LUID to the DM Module). For new objects, this is the LUID
- inherited through the parent node.
- * @param aStream Data of the object. Adapter should create write stream
- and return, when data is written to stream by DM agent,
- StreamCommittedL() is called by DM engine
- * @param aType MIME type of the object
- * @param aStatusRef Reference to correct command, i.e. this reference
- must be used when calling the SetStatusL of this
- command.
- * @publishedPartner
- * @prototype
- */
- void UpdateLeafObjectL( const TDesC8& aURI,
- const TDesC8& aLUID,
- RWriteStream*& aStream,
- const TDesC8& aType,
- TInt aStatusRef
- );
-
- /**
- * The function deletes an object and its child objects. The SetStatusL
- * should be used as described in UpdateLeafObjectL()
- * @param aURI URI of the object
- * @param aLUID LUID of the object (if the adapter have earlier returned
- LUID to the DM Module).
- * @param aStatusRef Reference to correct command, i.e. this reference must
- be used when calling the SetStatusL of this command.
- * @publishedPartner
- * @prototype
- */
- void DeleteObjectL( const TDesC8& aURI,
- const TDesC8& aLUID,
- TInt aStatusRef
- );
-
- /**
- * The function fetches data of a leaf object. The SetStatusL should be used
- * as described in UpdateLeafObjectL(). The data is returned by using the
- * SetResultsL function of MSmlCallback callback interface, and may be streamed.
- * @param aURI URI of the object
- * @param aLUID LUID of the object (if the adapter have earlier
- returned LUID to the DM Module).
- * @param aType MIME type of the object
- * @param aResultsRef Reference to correct results, i.e. this reference
- must be used when returning the result by calling
- the SetResultsL.
- * @param aStatusRef Reference to correct command, i.e. this reference
- must be used when calling the SetStatusL of this
- command.
- * @publishedPartner
- * @prototype
- */
- void FetchLeafObjectL( const TDesC8& aURI,
- const TDesC8& aLUID,
- const TDesC8& aType,
- TInt aResultsRef,
- TInt aStatusRef
- );
-
- /**
- * The function fetches the size of the data of a leaf object. The size is
- * in bytes, and must reflect the number of bytes that will be transferred
- * when the framework calls FetchLeafObjectL. The SetStatusL should be used
- * as described in FetchLeafObjectL(). The size value is returned by using
- * the SetResultsL function of MSmlCallback callback interface, and must be
- * a decimal integer expressed as a string, eg. "1234".
- * Results from this call MUST NOT be streamed.
- * @param aURI URI of the object
- * @param aLUID LUID of the object (if the adapter have earlier
- returned LUID to the DM Module).
- * @param aType MIME type of the object
- * @param aResultsRef Reference to correct results, i.e. this reference
- must be used when returning the result by calling
- the SetResultsL.
- * @param aStatusRef Reference to correct command, i.e. this reference
- must be used when calling the SetStatusL of this
- command.
- * @publishedPartner
- * @prototype
- */
- void FetchLeafObjectSizeL( const TDesC8& aURI,
- const TDesC8& aLUID,
- const TDesC8& aType,
- TInt aResultsRef,
- TInt aStatusRef
- );
- /**
- * The function fetches URI list. An adapter returns the list of URI segments
- * under the given URI be separated by slash ("/"). The URI segment names for
- * new objects must be given by the adapter.
- * The list is returned by calling the SetResultsL function of MSmlCallback
- * callback interface. Results from this call MUST NOT be streamed.
- * @param aParentURI URI of the parent object
- * @param aParentLUID LUID of the parent object (if the
- adapter have earlier returned LUID to
- the DM Module).
- * @param aPreviousURISegmentList URI list with mapping LUID information,
- which is known by DM engine. An adapter
- can use this information when verifying
- if old objects still exists. An adapter
- also knows what objects are new to DM
- engine and can provide LUID mapping for
- them. aPreviousURISegmentList parameter
- (see above) helps to recognise new
- objects.
- * @param aResultsRef Reference to correct results, i.e. this
- reference must be used when returning
- the result by calling the SetResultsL.
- * @param aStatusRef Reference to correct command, i.e. this
- reference must be used when calling the
- SetStatusL of this command.
- * @publishedPartner
- * @prototype
- */
- void ChildURIListL( const TDesC8& aURI,
- const TDesC8& aLUID,
- const CArrayFix& aPreviousURISegmentList,
- TInt aResultsRef,
- TInt aStatusRef
- );
-
- /**
- * The function adds node object. In some cases an implementation of the
- * function may be empty function, if the node object does not need concrete
- * database update. Still this function may be helpful to an adapter, i.e. in
- * passing mapping LUID of the node to DM Module. The SetStatusL should be
- * used as described in UpdateLeafObjectL()
- * @param aURI URI of the object
- * @param aParentLUID LUID of the parent object (if the adapter have
- earlier returned LUID to the DM Module).
- * @param aStatusRef Reference to correct command, i.e. this reference
- must be used when calling the SetStatusL of this
- command.
- * @publishedPartner
- * @prototype
- */
- void AddNodeObjectL( const TDesC8& aURI,
- const TDesC8& aParentLUID,
- TInt aStatusRef
- );
-
- /**
- * The function implements execute command. The information about the success
- * of the command should be returned by calling SetStatusL function of
- * MSmlDmCallback callback interface. This makes it possible to buffer the
- * commands.
- * However, all the status codes for buffered commands must be returned at
- * the latest when the CompleteOutstandingCmdsL() of adapter is called.
- * @param aURI URI of the command
- * @param aLUID LUID of the object (if the adapter have earlier
- returned LUID to the DM Module).
- * @param aArgument Argument for the command
- * @param aType MIME type of the object
- * @param aStatusRef Reference to correct command, i.e. this reference
- must be used when calling the SetStatusL of this
- command.
- * @publishedPartner
- * @prototype
- */
- void ExecuteCommandL( const TDesC8& aURI,
- const TDesC8& aLUID,
- const TDesC8& aArgument,
- const TDesC8& aType,
- TInt aStatusRef
- );
-
- /**
- * The function implements execute command. The information about the
- * success of the command should be returned by calling SetStatusL function
- * of MSmlDmCallback callback interface. This makes it possible to buffer the
- * commands.
- * However, all the status codes for buffered commands must be returned at
- * the latest when the CompleteOutstandingCmdsL() of adapter is called.
- * @param aURI URI of the command
- * @param aLUID LUID of the object (if the adapter have earlier
- returned LUID to the DM Module).
- * @param aStream Argument for the command. Adapter should create
- write stream and return, when data is written to
- stream by DM agent, StreamCommittedL() is called by
- DM engine
- * @param aType MIME type of the object
- * @param aStatusRef Reference to correct command, i.e. this reference
- must be used when calling the SetStatusL of this
- command.
- * @publishedPartner
- * @prototype
- */
- void ExecuteCommandL( const TDesC8& aURI,
- const TDesC8& aLUID,
- RWriteStream*& aStream,
- const TDesC8& aType,
- TInt aStatusRef
- );
-
- /**
- * The function implements copy command. The information about the success of
- * the command should be returned by calling SetStatusL function of
- * MSmlDmCallback callback interface. This makes it possible to buffer the
- * commands.
- * However, all the status codes for buffered commands must be returned at
- * the latest when the CompleteOutstandingCmdsL() of adapter is called.
- * @param aTargetURI Target URI for the command
- * @param aSourceLUID LUID of the target object (if one exists, and if the adapter
- has earlier returned a LUID to the DM Module).
- * @param aSourceURI Source URI for the command
- * @param aSourceLUID LUID of the source object (if the adapter has
- earlier returned a LUID to the DM Module).
- * @param aType MIME type of the objects
- * @param aStatusRef Reference to correct command, i.e. this reference
- must be used when calling the SetStatusL of this
- command.
- * @publishedPartner
- * @prototype
- */
- void CopyCommandL( const TDesC8& aTargetURI,
- const TDesC8& aTargetLUID,
- const TDesC8& aSourceURI,
- const TDesC8& aSourceLUID,
- const TDesC8& aType,
- TInt aStatusRef
- );
-
- /**
- * The function indicates start of Atomic command.
- * @publishedPartner
- * @prototype
- */
- void StartAtomicL();
-
- /**
- * The function indicates successful end of Atomic command. The adapter
- * should commit all changes issued between StartAtomicL() and
- * CommitAtomicL()
- * @publishedPartner
- * @prototype
- */
- void CommitAtomicL();
-
- /**
- * The function indicates unsuccessful end of Atomic command. The adapter
- * should rollback all changes issued between StartAtomicL() and
- * RollbackAtomicL(). If rollback fails for a command, adapter should use
- * SetStatusL() to indicate it.
- * @publishedPartner
- * @prototype
- */
- void RollbackAtomicL();
-
- /**
- * Returns ETrue if adapter supports streaming otherwise EFalse.
- * @param aItemSize size limit for stream usage
- * @return TBool ETrue for streaming support
- * @publishedPartner
- * @prototype
- */
- TBool StreamingSupport( TInt& aItemSize );
-
- /**
- * Called when stream returned from UpdateLeafObjectL or ExecuteCommandL has
- * been written to and committed. Not called when fetching item.
- * @publishedPartner
- * @prototype
- */
- void StreamCommittedL();
-
- /**
- * The function tells the adapter that all the commands of the message that
- * can be passed to the adapter have now been passed. This indicates that
- * the adapter must supply status codes and results to any buffered commands.
- * This must be done at latest by the time this function returns.
- * This function is used at the end of SyncML messages, and during processing
- * of Atomic. In the case of Atomic processing, the function will be
- * followed by a call to CommitAtomicL or RollbackAtomicL.
- * @publishedPartner
- * @prototype
- */
- void CompleteOutstandingCmdsL();
-
- private: // New methods
- void CSWInstAdapter::FillNodeInfoL( MSmlDmDDFObject& aDDFObject,
- TSmlDmAccessTypes& aAccessTypes,
- MSmlDmDDFObject::TScope aScope,
- MSmlDmDDFObject::TDFFormat aFormat,
- MSmlDmDDFObject::TOccurence aOccurence,
- const TDesC8& aDescription,
- const TDesC8& aMIMEType );
- private: // Constructor
- /**
- * Symbian 2nd phase constructor
- */
- void ConstructL();
-
- /**
- * C++ Constructor
- */
- CSWInstAdapter( TAny* aEcomArguments );
-
- private: // Data
- CRepository* iSettingsCenRep;
- CRepository* iLocalVarCenRep;
- };
-
-#endif // C_CSWINSTADAPTER_H
-
-// End Of File
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/SWInstAdapter/inc/swinstadapteruids.hrh
--- a/appinstaller/AppMngr2/SWInstAdapter/inc/swinstadapteruids.hrh Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource headers for SW Installer DM Adapter
-*
-*/
-
-
-#ifndef SWINSTADAPTERUIDS_HRH
-#define SWINSTADAPTERUIDS_HRH
-
-#define KSWInstAdapterDllUid3 0x20002537
-#define KSWInstAdapterImplUid 0x20002538
-
-#endif // SWINSTADAPTERUIDS_HRH
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/SWInstAdapter/src/swinstadapter.cpp
--- a/appinstaller/AppMngr2/SWInstAdapter/src/swinstadapter.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,491 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of OMA DM adapter, allows to configure SW Installer
-*
-*/
-
-
-#include
-#include
-#include
-#include
-#include "cswinstadapter.h"
-
-_LIT8( KIntType, "int" ); // Leaf inputs
-_LIT8( KTextType, "text/plain" ); // Leaf inputs
-_LIT8( KSWInstDMAdapterVersion, "1.0" ); // Adapter version
-_LIT8( KSWInstRootNode, "SWInstaller" ); // root URI
-_LIT8( KSWInstRootURI, "SWInstaller" );
-_LIT8( KAllowUnsignedNode, "AllowUnsigned" ); // URI postfix
-_LIT8( KAllowUnsignedURI, "SWInstaller/AllowUnsigned" );
-_LIT8( KAllowUnsignedDescription, "This node tells whether unsigned \
- applications are allowed to be installed" ); // Description
-static const TUint32 KSizeOfSettingId = 0x8; // Contanst size declaration
-
-
-// ============================= LOCAL FUNCTIONS =============================
-
-#ifdef _DEBUG
-#define DEBUG( x ) x
-#else
-#define DEBUG( x )
-#endif
-
-
-// ============================= MEMBER FUNCTIONS =============================
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::NewL
-// Symbian 1st phase contructor
-// ----------------------------------------------------------------------------
-//
-CSWInstAdapter* CSWInstAdapter::NewL( MSmlDmCallback* aCallback )
- {
- CSWInstAdapter* self = NewLC( aCallback );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::NewLC
-// Symbian 1st phase contructor. Push object to cleanup-stack
-// ----------------------------------------------------------------------------
-//
-CSWInstAdapter* CSWInstAdapter::NewLC( MSmlDmCallback* aCallback )
- {
- CSWInstAdapter* self = new ( ELeave ) CSWInstAdapter( aCallback );
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::CSWInstAdapter()
-// C++ Constructor
-// ----------------------------------------------------------------------------
-CSWInstAdapter::CSWInstAdapter( TAny* aEcomArguments )
- : CSmlDmAdapter::CSmlDmAdapter( aEcomArguments )
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter Constructor" ) ) );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::ConstructL
-// 2nd phase contructor
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::ConstructL()
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::ConstructL" ) ) );
- iSettingsCenRep = CRepository::NewL( KCRUidSWInstallerSettings );
- iLocalVarCenRep = CRepository::NewL( KCRUidSWInstallerLV );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::~CSWInstAdapter()
-// C++ Destructor
-// ----------------------------------------------------------------------------
-//
-CSWInstAdapter::~CSWInstAdapter()
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter Destructor" ) ) );
- delete iSettingsCenRep;
- delete iLocalVarCenRep;
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::DDFVersionL
-// Return DM plug-in version
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::DDFVersionL( CBufBase& aDDFVersion )
- {
- // Insert version information
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::DDFVersionL" ) ) );
- aDDFVersion.InsertL( 0, KSWInstDMAdapterVersion );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::DDFStructureL
-// Return DM plug-in structure
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::DDFStructureL( MSmlDmDDFObject& aDDF )
- {
- // Declare accesses
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::DDFStructureL" ) ) );
- TSmlDmAccessTypes accessTypes;
- accessTypes.SetGet();
-
- // Create root node
- MSmlDmDDFObject& root = aDDF.AddChildObjectL( KSWInstRootNode );
- FillNodeInfoL( root,
- accessTypes,
- MSmlDmDDFObject::EPermanent,
- MSmlDmDDFObject::ENode,
- MSmlDmDDFObject::EOne,
- KNullDesC8(),
- KTextType );
-
- accessTypes.SetReplace();
-
- MSmlDmDDFObject& allowUnsignedNode = root.AddChildObjectL( KAllowUnsignedNode );
- FillNodeInfoL( allowUnsignedNode,
- accessTypes,
- MSmlDmDDFObject::EPermanent,
- MSmlDmDDFObject::EChr,
- MSmlDmDDFObject::EOne,
- KAllowUnsignedDescription,
- KTextType );
-
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::DDFStructureL done" ) ) );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::StreamingSupport
-// Return streaming support status, set supported item size
-// ----------------------------------------------------------------------------
-//
-TBool CSWInstAdapter::StreamingSupport( TInt& /* aItemSize */ )
- {
- // Not supported
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::StreamingSupport" ) ) );
- return EFalse;
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::StreamCommittedL
-// Commit stream buffer
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::StreamCommittedL()
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::StreamCommitted" ) ) );
- // Intentionally left empty
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::CompleteOutstandingCmdsL
-// Complete outstanding commands
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::CompleteOutstandingCmdsL()
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::CompleteOutstandingCmdsL" ) ) );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::FillNodeInfoL
-// Fill node info
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::FillNodeInfoL( MSmlDmDDFObject& aDDFObject,
- TSmlDmAccessTypes& aAccessTypes,
- MSmlDmDDFObject::TScope aScope,
- MSmlDmDDFObject::TDFFormat aFormat,
- MSmlDmDDFObject::TOccurence aOccurence,
- const TDesC8& aDescription,
- const TDesC8& aMIMEType )
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::FillNodeInfoL" ) ) );
- aDDFObject.SetAccessTypesL( aAccessTypes );
- aDDFObject.SetScopeL( aScope );
- aDDFObject.SetOccurenceL( aOccurence );
- aDDFObject.SetDFFormatL( aFormat );
- aDDFObject.SetDescriptionL( aDescription );
- if ( aFormat != MSmlDmDDFObject::ENode )
- {
- aDDFObject.AddDFTypeMimeTypeL( aMIMEType );
- }
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::FillNodeInfoL done" ) ) );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::CopyCommandL
-// Copy object
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::CopyCommandL( const TDesC8& /*aTargetURI*/,
- const TDesC8& /*aTargetLUID*/,
- const TDesC8& /*aSourceURI*/,
- const TDesC8& /*aSourceLUID*/,
- const TDesC8& /*aType*/,
- TInt aStatusRef )
- {
- // Not supported
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::CopyCommandL" ) ) );
- Callback().SetStatusL( aStatusRef, CSmlDmAdapter::EError );
- }
-
-// ----------------------------------------------------------------------------
-// DeleteObjectL
-// Delete object
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::DeleteObjectL( const TDesC8& /* aURI */,
- const TDesC8& /* aLUID */,
- TInt aStatusRef )
-
- {
- // Not supported
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::DeleteObjectL" ) ) );
- Callback().SetStatusL( aStatusRef, CSmlDmAdapter::EError );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::FetchLeafObjectL
-// Fetch leaf
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::FetchLeafObjectL( const TDesC8& aURI,
- const TDesC8& /* aLUID */,
- const TDesC8& aType,
- TInt aResultsRef,
- TInt aStatusRef )
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::FetchLeafObjectL" ) ) );
- MSmlDmAdapter::TError retValue = CSmlDmAdapter::EOk;
-
- if ( aURI.Compare( KAllowUnsignedURI ) == 0 )
- {
- TInt cenRepValue;
- TInt ret = iLocalVarCenRep->Get( KSWInstallerHideUntrustedIns, cenRepValue );
- DEBUG( RDebug::Print( _L("CSWInstAdapter: CenRep ret = %d, val = %d" ), ret, !cenRepValue ) );
- if ( ret == KErrNone )
- {
- TBuf8 buf;
- buf.AppendNum( !cenRepValue );
- CBufBase* bufBase = CBufFlat::NewL( 1 );
- CleanupStack::PushL( bufBase );
- bufBase->InsertL( 0, buf );
- Callback().SetResultsL( aResultsRef, *bufBase, aType );
- CleanupStack::PopAndDestroy( bufBase );
- }
- else
- {
- retValue = CSmlDmAdapter::EError;
- }
- }
- else
- {
- retValue = CSmlDmAdapter::EError;
- }
- // Respond
- Callback().SetStatusL( aStatusRef, retValue );
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::FetchLeafObjectL done" ) ) );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::FetchLeafObjectSizeL
-// Calculate leaf object size
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::FetchLeafObjectSizeL( const TDesC8& aURI,
- const TDesC8& /* aLUID */,
- const TDesC8& /* aType */,
- TInt aResultsRef,
- TInt aStatusRef )
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::FetchLeafObjectSizeL" ) ) );
- MSmlDmAdapter::TError retValue = CSmlDmAdapter::EOk;
-
- if ( aURI.Compare( KAllowUnsignedURI ) == 0 )
- {
- TBuf8 buf;
- CBufBase* bufBase = CBufFlat::NewL( KSizeOfSettingId );
- CleanupStack::PushL( bufBase );
- buf.AppendNum( sizeof(TInt) );
- bufBase->InsertL( 0, buf );
- Callback().SetResultsL( aResultsRef, *bufBase, KIntType );
- CleanupStack::PopAndDestroy( bufBase );
- }
- else
- {
- retValue = CSmlDmAdapter::ENotFound;
- }
- // Respond
- Callback().SetStatusL( aStatusRef, retValue );
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::FetchLeafObjectSizeL done" ) ) );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::ChildURIListL
-// Create child URI list
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::ChildURIListL( const TDesC8& aURI,
- const TDesC8& /* aLUID */,
- const CArrayFix& /* aPreviousURISegmentList */,
- TInt aResultsRef,
- TInt aStatusRef )
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::ChildURIListL" ) ) );
- MSmlDmAdapter::TError retValue = CSmlDmAdapter::EOk;
-
- if ( aURI.Compare( KSWInstRootURI ) == 0)
- {
- CBufBase* buf = CBufFlat::NewL( 1 );
- CleanupStack::PushL( buf );
- buf->InsertL( 0, KAllowUnsignedNode );
- Callback().SetResultsL( aResultsRef, *buf, KNullDesC8 );
- CleanupStack::PopAndDestroy( buf );
- }
- else
- {
- retValue = CSmlDmAdapter::ENotFound;
- }
-
- // Respond
- Callback().SetStatusL( aStatusRef, retValue );
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::ChildURIListL done" ) ) );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::AddNodeObjectL
-// Add node
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::AddNodeObjectL( const TDesC8& /* aURI */,
- const TDesC8& /* aParentLUID */,
- TInt aStatusRef )
- {
- // Not supported
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::AddNodeObjectL" ) ) );
- Callback().SetStatusL( aStatusRef, CSmlDmAdapter::EError );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::ExecuteCommandL
-// Execute command
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::ExecuteCommandL( const TDesC8& /* aURI */,
- const TDesC8& /* aLUID */,
- const TDesC8& /* aArgument */,
- const TDesC8& /* aType */,
- TInt aStatusRef )
- {
- // Not supported
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::ExecuteCommandL" ) ) );
- Callback().SetStatusL( aStatusRef, CSmlDmAdapter::EError );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::ExecuteCommandL
-// Execute command, streaming enabled
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::ExecuteCommandL( const TDesC8& /* aURI */,
- const TDesC8& /* aLUID */,
- RWriteStream*& /* aStream */,
- const TDesC8& /* aType */,
- TInt aStatusRef )
- {
- // Not supported
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::ExecuteCommandL (streaming)" ) ) );
- Callback().SetStatusL( aStatusRef, CSmlDmAdapter::EError );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::UpdateLeafObjectL
-// Update leaf object
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::UpdateLeafObjectL( const TDesC8& aURI,
- const TDesC8& /* aLUID */,
- const TDesC8& aObject,
- const TDesC8& /* aType */,
- TInt aStatusRef )
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::UpdateLeafObjectL" ) ) );
- MSmlDmAdapter::TError retValue = CSmlDmAdapter::EOk;
-
- if ( aURI.Compare( KAllowUnsignedURI ) == 0 )
- {
- TLex8 lex( aObject );
- TInt value;
- TInt ret;
- if ( lex.Val( value ) != KErrNone )
- {
- DEBUG( RDebug::Print( _L( "CSWInstAdapter: lex.Val failed" ) ) );
- retValue = CSmlDmAdapter::EInvalidObject;
- }
- else
- {
- TInt allow = !!value; // make sure it's 0 or 1
- TInt hide = !value;
- ret = iSettingsCenRep->Set( KSWInstallerAllowUntrusted, allow );
- DEBUG( RDebug::Print( _L( "CSWInstAdapter: KSWInstallerAllowUntrusted set to %d, ret %d" ), allow, ret ) );
- ret |= iLocalVarCenRep->Set( KSWInstallerHideUntrustedIns, hide );
- DEBUG( RDebug::Print( _L( "CSWInstAdapter: KSWInstallerHideUntrustedIns set to %d, ret %d" ), hide, ret ) );
- if ( ret != KErrNone )
- {
- retValue = CSmlDmAdapter::EError;
- }
- }
- }
- else
- {
- retValue = CSmlDmAdapter::ENotFound;
- }
- // Respond
- Callback().SetStatusL( aStatusRef, retValue );
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::UpdateLeafObjectL done" ) ) );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::UpdateLeafObjectL
-// Update leaf object, streaming enabled
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::UpdateLeafObjectL( const TDesC8& /* aURI */,
- const TDesC8& /* aLUID */,
- RWriteStream*& /* aStream */,
- const TDesC8& /* aType */,
- TInt aStatusRef
- )
- {
- // Not supported
- DEBUG( RDebug::Print( _L( "CSWInstAdapter::UpdateLeafObjectL (streaming)" ) ) );
- Callback().SetStatusL( aStatusRef, CSmlDmAdapter::EError );
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::StartAtomicL
-// Start atomic
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::StartAtomicL()
- {
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::CommitAtomicL
-// Commit atomic commands
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::CommitAtomicL()
- {
- }
-
-// ----------------------------------------------------------------------------
-// CSWInstAdapter::RollbackAtomicL
-// Lose all modifications after 'StartAtomicL' command
-// ----------------------------------------------------------------------------
-//
-void CSWInstAdapter::RollbackAtomicL()
- {
- }
-
-// End of File
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/SWInstAdapter/src/swinstadaptermain.cpp
--- a/appinstaller/AppMngr2/SWInstAdapter/src/swinstadaptermain.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECom interface implementation
-*
-*/
-
-
-#include "cswinstadapter.h" // CSWInstAdapter
-#include "swinstadapteruids.hrh" // KSWInstAdapterImplUid
-#include // TImplementationProxy
-
-// ----------------------------------------------------------------------------
-// ImplementationTable
-// Ecom plug-in implementation table
-// ----------------------------------------------------------------------------
-//
-const TImplementationProxy ImplementationTable[] =
- {
-#ifdef __EABI__
- IMPLEMENTATION_PROXY_ENTRY( KSWInstAdapterImplUid, CSWInstAdapter::NewL )
-#else // __EABI__
- { { KSWInstAdapterImplUid }, CSWInstAdapter::NewL }
-#endif // __EABI__
- };
-
-// ----------------------------------------------------------------------------
-// ImplementationGroupProxy
-// Instance of implementation proxy
-// ----------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
- {
- aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
-
- return ImplementationTable;
- }
-
-// End Of File
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/data/20016bf5.rss
--- a/appinstaller/AppMngr2/Sisx/data/20016bf5.rss Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2001 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ECom registrition file for Sisx Runtime plugin
-*
-*/
-
-
-#include // REGISTRY_INFO
-
-RESOURCE REGISTRY_INFO theInfo
- {
- dll_uid = 0x20016BF5;
- interfaces =
- {
- INTERFACE_INFO
- {
- interface_uid = 0x20016BF4;
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = 0x20016BF6;
- version_no = 1;
- display_name = "Sisx plugin";
- default_data = "";
- opaque_data = "";
- }
- };
- }
- };
- }
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/group/appmngr2sisxruntime.mmp
--- a/appinstaller/AppMngr2/Sisx/group/appmngr2sisxruntime.mmp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Sisx Runtime plugin for AppMngr2
-*
-*/
-
-
-#include
-#include
-
-TARGET appmngr2sisxplugin.dll
-TARGETTYPE PLUGIN
-UID 0x10009d8d 0x20016BF5
-
-CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE appmngr2sisxmain.cpp
-SOURCE appmngr2sisxruntime.cpp
-SOURCE appmngr2sisxappinfo.cpp
-SOURCE appmngr2sisxpackageinfo.cpp
-SOURCE appmngr2sisxinfoiterator.cpp
-SOURCE appmngr2sisxunknownlist.cpp
-SOURCE appmngr2sisxswimonitor.cpp
-
-START RESOURCE ../data/20016bf5.rss
-TARGET appmngr2sisxplugin.rsc
-END
-
-USERINCLUDE ../inc
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib // Base
-LIBRARY appmngr2pluginapi.lib // CAppMngr2Runtime
-LIBRARY sisregistryclient.lib // RSisRegistryEntry
-LIBRARY swinstcli.lib // SwiUI::RSWInstLauncher
-LIBRARY pkgremover.lib // Swi::UninstalledSisPackages
-LIBRARY swinstcommonui.lib // CUIDetailsDialog
-LIBRARY aknskins.lib // AknsUtils
-LIBRARY cone.lib // CCoeEnv
-LIBRARY eikcore.lib // CEikonEnv
-LIBRARY bafl.lib // CDesCArray
-LIBRARY commonengine.lib // StringLoader
-LIBRARY efsrv.lib // RFs
-LIBRARY platformenv.lib // DriveInfo
-LIBRARY apmime.lib // TDataType
-LIBRARY avkon.lib // AknTextUtils
-LIBRARY x509.lib // CX509Certificate
-LIBRARY egul.lib // CGulIcon
-
-DEBUGLIBRARY flogger.lib // RFileLogger
-
-SMPSAFE
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/group/bld.inf
--- a/appinstaller/AppMngr2/Sisx/group/bld.inf Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for AppMngr2 Sisx Runtime Plugin
-*
-*/
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
- OPTION TARGETFILE appmngr2sisx.mif
- OPTION HEADERFILE appmngr2sisx.mbg
- OPTION SOURCES \
- -c8,1 qgn_menu_am_sis -c8,8 qgn_prop_drm_exp_large -c8,1 qgn_indi_am_inst_no_add
-END
-
-PRJ_MMPFILES
-appmngr2sisxruntime.mmp
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/inc/appmngr2sisx.hrh
--- a/appinstaller/AppMngr2/Sisx/inc/appmngr2sisx.hrh Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource headers for SISX plugin in AppMngr2 project
-*
-*/
-
-
-#ifndef APPMNGR2SISX_HRH
-#define APPMNGR2SISX_HRH
-
-#include // KAppMngr2FirstFreePluginSpecificCmd
-
-// Note that icon loading order in CAppMngr2SisxRuntime::LoadIconsL() must be
-// the same in which SISX icons are defined in TAppMngr2SisxIcons enum below.
-enum TAppMngr2SisxIcons
- {
- EQgnMenuAmSis,
- EQgnPropDrmExpLarge,
- EQgnIndiAmInstNoAdd
- };
-
-enum {
- KFirstTestCmdId = KAppMngr2FirstFreePluginSpecificCmd,
- KSecondTestCmdId,
- KThirdTestCmdId
- };
-
-#endif // APPMNGR2SISX_HRH
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/inc/appmngr2sisxappinfo.h
--- a/appinstaller/AppMngr2/Sisx/inc/appmngr2sisxappinfo.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: SisxAppInfo represents installed native/SISX applications
-*
-*/
-
-
-#ifndef C_APPMNGR2SISXAPPINFO_H
-#define C_APPMNGR2SISXAPPINFO_H
-
-#include // CAppMngr2AppInfo
-#include // RSisRegistryEntry
-#include // SwiUI::RSWInstLauncher
-#include // SwiUI::CommonUI::CCUICertificateInfo
-#include // TDriveUnit
-
-
-class CAppMngr2SisxAppInfo : public CAppMngr2AppInfo
- {
-public: // constructor and destructor
- static CAppMngr2SisxAppInfo* NewL( CAppMngr2Runtime& aRuntime,
- Swi::RSisRegistryEntry& aEntry, RFs& aFsSession );
- ~CAppMngr2SisxAppInfo();
-
-public: // from CAppMngr2InfoBase
- TInt IconIndex() const;
- const TDesC& Name() const;
- const TDesC& Details() const;
- TBool SupportsGenericCommand( TInt aCmdId );
- void HandleCommandL( TInt aCommandId, TRequestStatus& aStatus );
- void HandleCommandResultL( TInt aStatus );
- void CancelCommand();
-
-public: // new functions
- TVersion Version() const;
- const TDesC& Vendor() const;
- TBool IsTrusted() const;
-
-protected: // new functions
- CAppMngr2SisxAppInfo( CAppMngr2Runtime& aRuntime, RFs& aFsSession );
- void ConstructL( Swi::RSisRegistryEntry& aEntry );
-
-private: // new functions
- void ShowDetailsL();
- void ReadCertificatesL();
- void HandleUninstallL( TRequestStatus& aStatus );
-
-private: // data
- TUid iAppUid;
- HBufC* iName;
- HBufC* iDetails;
- TVersion iVersion;
- HBufC* iVendor;
- TBool iIsAugmentation;
- TInt iAugmentationIndex;
- TBool iIsTrusted;
- TBool iIsDRMProtected;
- TBool iIsRightsObjectMissingOrExpired;
- HBufC* iProtectedFile;
- SwiUI::RSWInstLauncher* iSWInstLauncher;
- HBufC8* iSWInstLauncherCustomUninstallParams;
- RPointerArray iCertificates;
- TBool iCertsRead;
- TInt iCommandId;
- };
-
-#endif // C_APPMNGR2SISXAPPINFO_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/inc/appmngr2sisxinfoiterator.h
--- a/appinstaller/AppMngr2/Sisx/inc/appmngr2sisxinfoiterator.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements MCUIInfoIterator for SISX to use CCUIDetailsDialog
-*
-*/
-
-
-#ifndef C_APPMNGR2SISXINFOITERATOR_H
-#define C_APPMNGR2SISXINFOITERATOR_H
-
-#include // CAppMngr2InfoIterator
-
-
-class CAppMngr2SisxInfoIterator : public CAppMngr2InfoIterator
- {
-public: // constructors and destructor
- static CAppMngr2SisxInfoIterator* NewL( CAppMngr2InfoBase& aSisx,
- TAppMngr2InfoType aInfoType );
- ~CAppMngr2SisxInfoIterator();
-
-protected: // new functions
- void ConstructL();
- void SetAllFieldsL();
- void SetVersionL();
- void SetSupplierL();
- void SetTypeL();
-
-private: // new functions
- CAppMngr2SisxInfoIterator( CAppMngr2InfoBase& aSisx,
- TAppMngr2InfoType aInfoType );
- };
-
-#endif // C_APPMNGR2SISXINFOITERATOR_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/inc/appmngr2sisxpackageinfo.h
--- a/appinstaller/AppMngr2/Sisx/inc/appmngr2sisxpackageinfo.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Sisx PackageInfo represents installable SISX file
-*
-*/
-
-
-#ifndef C_APPMNGR2SISXPACKAGEINFO_H
-#define C_APPMNGR2SISXPACKAGEINFO_H
-
-#include // CAppMngr2PackageInfo
-#include // SwiUI::RSWInstLauncher
-
-
-class CAppMngr2SisxPackageInfo : public CAppMngr2PackageInfo
- {
-public: // constructor and destructor
- static CAppMngr2SisxPackageInfo* NewL( CAppMngr2Runtime& aRuntime,
- const TDesC& aFileName, RFs& aFs );
- ~CAppMngr2SisxPackageInfo();
-
-public: // from CAppMngr2InfoBase
- TInt IconIndex() const;
- const TDesC& Name() const;
- const TDesC& Details() const;
- TInt IndicatorIconIndex() const;
- TBool SupportsGenericCommand( TInt aCmdId );
- void HandleCommandL( TInt aCommandId, TRequestStatus& aStatus );
- void HandleCommandResultL( TInt aStatus );
- void CancelCommand();
-
-private: // new functions
- CAppMngr2SisxPackageInfo( CAppMngr2Runtime& aRuntime, RFs& aFs );
- void ConstructL( const TDesC& aFileName );
- void HandleDeleteL();
- void ShowDetailsL();
-
-private: // data
- HBufC* iName;
- HBufC* iDetails;
- HBufC* iFileName;
- SwiUI::RSWInstLauncher* iSWInstLauncher;
- };
-
-#endif // C_APPMNGR2SISXPACKAGEINFO_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/inc/appmngr2sisxruntime.h
--- a/appinstaller/AppMngr2/Sisx/inc/appmngr2sisxruntime.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Native SISX runtime type for AppMngr2
-*
-*/
-
-
-#ifndef C_APPMNGR2SISXRUNTIME_H
-#define C_APPMNGR2SISXRUNTIME_H
-
-#include // CAppMngr2Runtime
-#include // RSisRegistrySession
-
-class MAppMngr2RuntimeObserver;
-class CAppMngr2PackageInfo;
-class CAppMngr2SisxSwiMonitor;
-class CAknIconArray;
-
-const TInt KAppMngr2SisxUidValue = 0x20016BF6;
-const TUid KAppMngr2SisxUid = { KAppMngr2SisxUidValue };
-
-// Private folder of installer daemon, contains SIS files for untrusted apps
-_LIT( KAppMngr2DaemonPrivateFolder, "\\private\\10202dce\\" );
-
-
-class CAppMngr2SisxRuntime : public CAppMngr2Runtime
- {
-public: // constructor and destructor
- static CAppMngr2SisxRuntime* NewL( MAppMngr2RuntimeObserver& aObserver );
- ~CAppMngr2SisxRuntime();
-
-public: // from CAppMngr2Runtime
- void LoadIconsL( CAknIconArray& aIconArray );
- void GetSupportedDataTypesL( CDataTypeArray& aDataTypeArray );
- void GetAdditionalDirsToScanL( RFs& aFsSession, RPointerArray& aDirs );
- void GetInstallationFilesL( RPointerArray& aPackageInfos,
- const RPointerArray& aFileList,
- RFs& aFsSession, TRequestStatus& aStatus );
- void CancelGetInstallationFiles();
- void GetInstalledAppsL( RPointerArray& aApps,
- RFs& aFsSession, TRequestStatus& aStatus );
- void CancelGetInstalledApps();
-
-private: // new functions
- CAppMngr2SisxRuntime( MAppMngr2RuntimeObserver& aObserver );
- void ConstructL( MAppMngr2RuntimeObserver& aObserver );
- void CreateNewPackageL( const TDesC& aFileName,
- RPointerArray& aPackageInfos, RFs& aFs );
-
-private: // data
- Swi::RSisRegistrySession iSisRegistrySession;
- CAppMngr2SisxSwiMonitor* iSwiMonitor;
- };
-
-#endif // C_APPMNGR2SISXRUNTIME_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/inc/appmngr2sisxswimonitor.h
--- a/appinstaller/AppMngr2/Sisx/inc/appmngr2sisxswimonitor.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility class to listen SWI operations.
-*
-*/
-
-
-#ifndef C_APPMNGR2SISXSWIMONITOR_H
-#define C_APPMNGR2SISXSWIMONITOR_H
-
-#include // CActive
-#include // RProperty
-#include // MAppMngr2RuntimeObserver
-
-
-/**
- * Class for listening SWI operations. When a software install operation
- * (installation, uninstallation or backup restore) completes successfully,
- * this class calls MAppMngr2RuntimeObserver::RefreshInstalledApps() to
- * refresh the displayed list of installed applications.
- */
-class CAppMngr2SisxSwiMonitor : public CActive
- {
-public: // constructors and destructor
- static CAppMngr2SisxSwiMonitor* NewL( MAppMngr2RuntimeObserver& aObs );
- ~CAppMngr2SisxSwiMonitor();
-
-protected: // from CActive
- void DoCancel();
- void RunL();
-
-private: // new functions
- CAppMngr2SisxSwiMonitor( MAppMngr2RuntimeObserver& aObs );
- void ConstructL();
-
-private: // data
- MAppMngr2RuntimeObserver& iObs;
- RProperty iSwInstallKey;
- };
-
-#endif // C_APPMNGR2SISXSWIMONITOR_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/inc/appmngr2sisxunknownlist.h
--- a/appinstaller/AppMngr2/Sisx/inc/appmngr2sisxunknownlist.h Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Utility class to list and remove unknown (not installed)
-* sisx packages from removable media.
-*
-*/
-
-
-#ifndef C_APPMNGR2SISXUNKNOWNLIST_H
-#define C_APPMNGR2SISXUNKNOWNLIST_H
-
-#include // CBase
-#include // Swi::CUninstalledPackageEntry
-
-// Private folder path containing pre-installed applications
-_LIT( KAppMngr2PreInstalledPath, ":\\private\\10202dce\\" );
-
-
-/**
- * Class for listing and removing uninstalled PA and PP type sisx packages
- * from removable media. Unknown (not installed) sisx packages are read using
- * Swi::UninstalledSisPackages::ListL() funtion. Basically this is just a
- * container class for unknown package list array.
- */
-class CAppMngr2SisxUnknownList : public CBase
- {
-public: // constructors and destructor
- static CAppMngr2SisxUnknownList* NewL( TInt aDriveNumber );
- static CAppMngr2SisxUnknownList* NewLC( TInt aDriveNumber );
- ~CAppMngr2SisxUnknownList();
-
-public: // new functions
- TInt PkgCount() const;
- Swi::CUninstalledPackageEntry& PkgEntry( TInt aIndex );
- TInt FindPkgWithUID( const TUid& aUid );
- TInt FindPkgWithUIDName( const TDesC& aUIDName ); // aUIDName can be e.g. "20001234.SISX"
- void RemovePkgL( TInt aIndex );
-
-private: // new functions
- void ConstructL( TInt aDriveNumber );
-
-private: // data
- RPointerArray iUnknownPackages;
- };
-
-#endif // C_APPMNGR2SISXUNKNOWNLIST_H
-
diff -r d1838696558c -r 9dcba1ee99f7 appinstaller/AppMngr2/Sisx/src/appmngr2sisxappinfo.cpp
--- a/appinstaller/AppMngr2/Sisx/src/appmngr2sisxappinfo.cpp Thu Oct 14 14:11:30 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,455 +0,0 @@
-/*
-* Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: SisxAppInfo implementation
-*
-*/
-
-
-#include "appmngr2sisxappinfo.h" // CAppMngr2SisxAppInfo
-#include "appmngr2sisxruntime.h" // KAppMngr2SisxUid
-#include "appmngr2sisxinfoiterator.h" // CAppMngr2SisxInfoIterator
-#include "appmngr2sisx.hrh" // SISX command IDs
-#include // CEikMenuPaneItem
-#include // RefreshInstalledApps
-#include // TAppMngr2DriveUtils
-#include