secureswitools/swisistools/source/rscparser/aplappinforeader.h
branchRCL_3
changeset 25 7333d7932ef7
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
       
     1 // Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // aplappinforeader.h
       
    15 //
       
    16 /** 
       
    17 * @file aplappinforeader.h
       
    18 *
       
    19 * @internalComponent
       
    20 * @released
       
    21 */
       
    22 #ifndef __APLAPPINFOREADER_H__
       
    23 #define __APLAPPINFOREADER_H__
       
    24 
       
    25 
       
    26 #include "apaid.h"
       
    27 #include <vector>
       
    28 #include "apmstd.h"
       
    29 #include "barsc2.h"
       
    30 #include "barsread2.h"
       
    31 #include "e32lang.h"
       
    32 #include "aplapplistitem.h"
       
    33 #include "filedescription.h"
       
    34 
       
    35 using namespace std;
       
    36 
       
    37 /**
       
    38 Reads application information from a combination of registration file,
       
    39 optional localisable resource file and optional icon file.
       
    40 
       
    41 @internalComponent
       
    42 */
       
    43 class CAppInfoReader
       
    44 	{
       
    45 public:
       
    46 	static CAppInfoReader* NewL(const std::string& aRegistrationFileName, TUid aAppUid, const std::string& aLocalizeFilePath);
       
    47 	TBool ReadL();
       
    48 	TBool ReadL(const std::vector<FileDescription*>& aFileDescription, std::string& aRomPath, int aInRom);
       
    49 	~CAppInfoReader();
       
    50 public:
       
    51 	Ptr16* AppBinaryFullName();
       
    52 	TUidType AppBinaryUidType() const;
       
    53 	TUid AppUid() const;
       
    54 	void Capability(TAppCapability& aCapabilityBuf) const;
       
    55 	TUint DefaultScreenNumber() const;
       
    56 	std::vector<CAppViewData*>* Views();
       
    57 	std::vector<CAppLocalizableInfo*> LocalizableInfo();
       
    58 	std::vector<CAppLocalOpaqueDataInfo*> GetOpaqueDataArray();
       
    59 	std::vector<Ptr16*>* OwnedFiles();
       
    60 	
       
    61 	Ptr16* Caption();
       
    62 	Ptr16* ShortCaption();
       
    63 	TInt NumOfAppIcons() const;
       
    64 	Ptr16* IconFileName();
       
    65 	TBool NonMbmIconFile() const;
       
    66 	
       
    67 	Ptr16* LocalisableResourceFileName();
       
    68 	TLanguage AppLanguage() const;
       
    69 	std::vector<TAppServiceInfo*>* ServiceArray(TInt& aIndexOfFirstOpenService);
       
    70 	Ptr16* CreateFullIconFileNameL(const PtrC16* aIconFileName) const;
       
    71 	
       
    72 private:
       
    73 	CAppInfoReader(const std::string& aRegistrationFileName, TUid aAppUid, const std::string& aLocalizeFilePath);
       
    74 	void ReadMimeTypesSupportedL(RResourceReader& aResourceReader, std::vector<TDataTypeWithPriority*>& aMimeTypesSupported);
       
    75 	void ReadMandatoryInfoL(RResourceReader& aResourceReader);
       
    76 	TInt ReadNonLocalisableInfoL(RResourceReader& aResourceReader, TUint& aLocalisableResourceId);
       
    77 	TInt ReadNonLocalisableOptionalInfoL(RResourceReader& aResourceReader, CResourceFile* aRegistrationFile);
       
    78 	TInt ReadLocalisableInfoLoopL(CResourceFile& aResourceFile, TUint aResourceId, TBool& aUseDefaultIcons, TInt& iLocale);
       
    79 	void ReadOpaqueDataL(TUint aResourceId, CResourceFile* aRegistrationFile, TUint32 aServiceUid);
       
    80 	void ReadAppSecurityInfo();
       
    81 		
       
    82 private:
       
    83 	TUid iAppUid;
       
    84 	Ptr16* iAppBinaryFullName;
       
    85 	TUidType iAppBinaryUidType;
       
    86 	TAppCapability iCapability;
       
    87 	TUint iDefaultScreenNumber;
       
    88 	Ptr16* iCaption;
       
    89 	Ptr16* iShortCaption;
       
    90 	TInt iNumOfAppIcons;
       
    91 	std::vector<CAppViewData*>* iViewDataArray;
       
    92 	std::vector<Ptr16*>* iOwnedFileArray;
       
    93 	Ptr16* iIconFileName;
       
    94 	TBool iNonMbmIconFile; // ETrue if icon filename is not an MBM file, however, EFalse does not necessarily mean it is an MBM file
       
    95 	Ptr16* iLocalisableResourceFileName;
       
    96 	TLanguage iApplicationLanguage;
       
    97 	std::vector<TAppServiceInfo*>* iServiceArray;
       
    98 	TInt iIndexOfFirstOpenService;
       
    99 	TBool iOpenServiceIsLegacy;
       
   100 	std::vector<CAppLocalOpaqueDataInfo*> iOpaqueDataArray;
       
   101 private:
       
   102 	const std::string& iRegistrationFileName;
       
   103 	const std::string& iDrivePath;
       
   104 	std::vector<CAppLocalizableInfo*> iAppLocalizableInfo;
       
   105 	TBool iHasWriteDeviceDataCap;
       
   106     TBool iIsSidTrusted;
       
   107     // This flag is used to determine if app security info was allready read
       
   108     TBool iSecurityInfoHasBeenRead;
       
   109 	};
       
   110 
       
   111 #endif	// __APLAPPINFOREADER_H__