secureswitools/swisistools/source/interpretsislib/sisregistry.h
branchRCL_3
changeset 81 42552535c1ac
parent 73 79647526f98c
equal deleted inserted replaced
73:79647526f98c 81:42552535c1ac
     1 /*
     1 /*
     2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    79 	bool IsRomStubPackage(const TUint32 aUid);
    79 	bool IsRomStubPackage(const TUint32 aUid);
    80 	void GetStubFileEntries(const TUint32 aUid, std::list<std::wstring>& aFilesEntries);
    80 	void GetStubFileEntries(const TUint32 aUid, std::list<std::wstring>& aFilesEntries);
    81 	void GenerateStubRegistry();
    81 	void GenerateStubRegistry();
    82 	int GetAugmentationsNumber(TUint32 aUid);
    82 	int GetAugmentationsNumber(TUint32 aUid);
    83 	CSISController* GetStubController(const TUint32 aUid);
    83 	CSISController* GetStubController(const TUint32 aUid);
    84 	CSISController* GetStubControllerUid(const std::wstring& aTarget);
       
    85 	const std::wstring& GetRomStubFile() const;
       
    86 
    84 
    87 	static const int KSisRegistryMajorVersion;
    85 	static const int KSisRegistryMajorVersion;
    88 	static const int KSisRegistryMinorVersion;
    86 	static const int KSisRegistryMinorVersion;
    89 	static const std::string KRegistryV40string;
    87 	static const std::string KRegistryV40string;
    90 	static const std::string KRegistryV50string;
    88 	static const std::string KRegistryV50string;
    91 	static const std::string KRegistryV51string;
    89 	static const std::string KRegistryV51string;
    92 	static const std::string KRegistryV52string;
    90 	static const std::string KRegistryV52string;
    93 	static const std::string KRegistryV53string;
    91 	static const std::string KRegistryV53string;
    94 	static const std::string KRegistryV54string;
    92 	static const std::string KRegistryV54string;
    95 	typedef std::multimap<TUint32, SisRegistryObject*> EntryMap;
       
    96 
    93 
    97 private: // Internal methods
    94 private: // Internal methods
    98     void ReadStubs( const std::wstring& aDirectory );
    95     void ReadStubs( const std::wstring& aDirectory );
    99     void ReadRegistry( const std::wstring& aRegistryBasePath );
    96     void ReadRegistry( const std::wstring& aRegistryBasePath );
   100 	CSISController* GetStubControllerInDir( const std::wstring& aDirectory, const TUint32 aUid);
    97 	CSISController* GetStubControllerInDir( const std::wstring& aDirectory, const TUint32 aUid);
   101 	CSISController* GetStubControllerInDir( const std::wstring& aDirectory, const std::wstring& aTarget);
       
   102 	CSISController* ReadStubController( const wchar_t* aFilename );
    98 	CSISController* ReadStubController( const wchar_t* aFilename );
   103 	void GenerateRegistryEntry(SisRegistryObject& aObj, const SisFile& aSis);
    99 	void GenerateRegistryEntry(SisRegistryObject& aObj, const SisFile& aSis);
   104 	void ExtractRegistryFiles(const std::wstring& path);
   100 	void ExtractRegistryFiles(const std::wstring& path);
   105 	void RemoveInstalledFiles(const FileDescriptions& aFileDes, std::wstring& aLocalPath);
   101 	void RemoveInstalledFiles(const FileDescriptions& aFileDes, std::wstring& aLocalPath);
   106 	void GenerateStubRegistry(SisRegistryObject* aSisRegistryObject, CSISController* aSisController);
   102 	void GenerateStubRegistry(SisRegistryObject* aSisRegistryObject, CSISController* aSisController);
   107 	void SetNextIndex(SisRegistryObject& aObj) const;
   103 	void SetNextIndex(SisRegistryObject& aObj) const;
   108 	std::wstring GetRegistryDir( const std::wstring& aDrivePath, TUint32 aUid  ) const;
   104 	std::wstring GetRegistryDir( const std::wstring& aDrivePath, TUint32 aUid  ) const;
   109 	void GenerateRegFile(SisRegistryObject& aObj) const;
   105 	void GenerateRegFile(SisRegistryObject& aObj) const;
   110 	void GenerateCtlFile(SisRegistryObject& aObj, const SisFile& aSis) const;
   106 	void GenerateCtlFile(SisRegistryObject& aObj, const SisFile& aSis) const;
   111 	void SetRomStubFile(const std::wstring& aRomStubFile);
       
   112 
   107 
   113 public:
   108 public:
   114 	TUint32 GetUid(TUint32 aSid) const;
   109 	TUint32 GetUid(TUint32 aSid) const;
   115 	TUint32 GetUid(const std::wstring& aSidFile) const;
   110 	TUint32 GetUid(const std::wstring& aSidFile) const;
   116 	bool GetInRom(TUint32 aUid) const;
   111 	bool GetInRom(TUint32 aUid) const;
   117 	std::string GetDbPath();
       
   118 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   112 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   119 	const DbHelper* GetDbHelper() const;	
   113 	const DbHelper* GetDbHelper() const;	
   120 #endif
   114 #endif
   121 
   115 
   122 private: // Utility functions
   116 private: // Utility functions
   126 	TBool IsSisValid(const std::wstring& aStubPath);
   120 	TBool IsSisValid(const std::wstring& aStubPath);
   127 	bool IsFileWideCard(const std::wstring& aFileName);
   121 	bool IsFileWideCard(const std::wstring& aFileName);
   128 
   122 
   129 private: // Friends
   123 private: // Friends
   130 	friend struct Contains;
   124 	friend struct Contains;
       
   125 
       
   126 private: // Type definitions
       
   127 	typedef std::multimap<TUint32, SisRegistryObject*> EntryMap;
   131 
   128 
   132 private: // Constants
   129 private: // Constants
   133 	static const std::wstring KPathToRegistry;
   130 	static const std::wstring KPathToRegistry;
   134 	static const std::wstring KPathToRomStubs;
   131 	static const std::wstring KPathToRomStubs;
   135 	static const std::wstring KPathToRegistryVersionMarker;
   132 	static const std::wstring KPathToRegistryVersionMarker;
   146 
   143 
   147 private: // Data members
   144 private: // Data members
   148 	std::wstring	iCDrive;
   145 	std::wstring	iCDrive;
   149 	TInt			iSystemDrive;
   146 	TInt			iSystemDrive;
   150     CParameterList& iParamList;
   147     CParameterList& iParamList;
   151     RomManager& 	iRomManager;
   148     RomManager& iRomManager;
   152 	ConfigManager& 	iConfigManager;
   149 	ConfigManager& iConfigManager;
   153 	EntryMap 		iEntries;
   150 	EntryMap iEntries;
   154 	std::wstring	iRomStubFile;
   151 
   155 
   152 
   156 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   153 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   157 private:
   154 private:
   158 	// internal methods for accessing database
   155 	// internal methods for accessing database
   159 	void RemovePkgWithScr(TUint32 aUid, bool aSkipRomStub=false);
   156 	void RemovePkgWithScr(TUint32 aUid, bool aSkipRomStub=false);
   261 
   258 
   262 	void UpdateInstallationInformation(XmlDetails::TScrPreProvisionDetail aScrPreProvisionDetail);
   259 	void UpdateInstallationInformation(XmlDetails::TScrPreProvisionDetail aScrPreProvisionDetail);
   263 	
   260 	
   264 	void GenerateDbRegistryEntry(const SisRegistryObject& aSisRegistryObject, bool aOriginVerified);
   261 	void GenerateDbRegistryEntry(const SisRegistryObject& aSisRegistryObject, bool aOriginVerified);
   265 
   262 
       
   263 	std::string GetDbPath();
       
   264 
   266 	std::wstring GetGlobalId( TUint32 aUid , TInt aInstallType, std::wstring aPackageName);
   265 	std::wstring GetGlobalId( TUint32 aUid , TInt aInstallType, std::wstring aPackageName);
   267 
   266 
   268 	void SetOriginVerification(XmlDetails::TScrPreProvisionDetail::TComponent& aComponent, bool aOriginVerified);
   267 	void SetOriginVerification(XmlDetails::TScrPreProvisionDetail::TComponent& aComponent, bool aOriginVerified);
   269 private:
   268 private:
   270 	DbHelper* iDbHelper;
   269 	DbHelper* iDbHelper;