common/tools/ats/smoketest/localisation/apparchitecture/inc/APGICNFL.H
changeset 793 0c32c669a39d
child 872 17498133d9ad
equal deleted inserted replaced
792:893b85cda81b 793:0c32c669a39d
       
     1 // Copyright (c) 1997-2009 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 the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __APGICNFL_H__
       
    17 #define __APGICNFL_H__
       
    18 
       
    19 #include <apadef.h>
       
    20 #include <apaid.h>
       
    21 #include <bitdev.h>
       
    22 #include <apmstd.h>
       
    23 #include <badesca.h>
       
    24 
       
    25 class CFbsBitmap;
       
    26 class CPersistentStore;
       
    27 class RReadStream;
       
    28 class RWriteStream;
       
    29 
       
    30 class CApaMaskedBitmap : public CFbsBitmap
       
    31 /** An application icon.
       
    32 
       
    33 This is a bitmap and a mask, managed by the Font and Bitmap server.
       
    34 
       
    35 An object of this type is passed to RApaLsSession::GetAppIcon() to fetch a 
       
    36 suitable application icon.
       
    37 
       
    38 @publishedAll
       
    39 @released
       
    40 @see RApaLsSession::GetAppIcon() */
       
    41 	{
       
    42 public:
       
    43 	IMPORT_C static CApaMaskedBitmap* NewLC();
       
    44 	IMPORT_C static CApaMaskedBitmap* NewL(const CApaMaskedBitmap* aSourceIcon);
       
    45 	//
       
    46 	IMPORT_C CFbsBitmap* Mask() const;
       
    47 	IMPORT_C void InternalizeL(RReadStream& aStream); 		//lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation
       
    48 	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;//lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation
       
    49 	//
       
    50 	IMPORT_C ~CApaMaskedBitmap();
       
    51 	void SetRomBitmapL(TUint8* aRomPointer);				//lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation
       
    52 	IMPORT_C void SetMaskBitmap(CFbsBitmap* aMask);
       
    53 private:
       
    54 	CApaMaskedBitmap();
       
    55 	void ConstructL();
       
    56 private:
       
    57 	CFbsBitmap* iMask;
       
    58 	};
       
    59 
       
    60 /**
       
    61 @internalComponent
       
    62 */
       
    63 class CApaResourceFileWriterBase : public CBase
       
    64 	{
       
    65 protected:
       
    66 	class RBufferSink;
       
    67 	class MDataSink
       
    68 		{
       
    69 	public:
       
    70 		void WriteBufferL(const TDesC8& aBuffer);
       
    71 		void WriteCompressedUnicodeRunL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aTextAsCompressedUnicode);
       
    72 		void WriteInCompressedUnicodeFormatL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aData, TBool aInCompressedUnicodeRun);
       
    73 		TInt NumberOfBytesWhenUncompressed() const;
       
    74 		inline TBool CompressedUnicodeFormat() const {return (iBufferSinkForCompressedUnicodeFormat!=NULL);}
       
    75 	protected:
       
    76 		MDataSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat);
       
    77 		void FlushL(TBool aFinalFlush);
       
    78 		void Reset(TInt& aNumberOfBytesWhenUncompressed);
       
    79 	private:
       
    80 		void WriteRunLengthL(TInt aRunLength);
       
    81 	private:
       
    82 		enum
       
    83 			{
       
    84 			EFlag_InCompressedUnicodeRun	=0x00000001
       
    85 			};
       
    86 	private:
       
    87 		// new virtual functions
       
    88 		virtual void DoWriteBufferL(const TDesC8& aBuffer)=0;
       
    89 	private:
       
    90 		TInt iNumberOfBytesWhenUncompressed;
       
    91 		TUint iFlags;
       
    92 		RBufferSink* iBufferSinkForCompressedUnicodeFormat; // does not own what it points to
       
    93 		};
       
    94 	class RBufferSink : public MDataSink
       
    95 		{
       
    96 	public:
       
    97 		RBufferSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat);
       
    98 		void ConstructLC();
       
    99 		void Close();
       
   100 		void FlushAndGetAndResetL(TInt& aNumberOfBytesWhenUncompressed, RBuf8& aBuffer);
       
   101 	private:
       
   102 		// from MDataSink
       
   103 		virtual void DoWriteBufferL(const TDesC8& aBuffer);
       
   104 	private:
       
   105 		RBuf8 iBuffer;
       
   106 		};
       
   107 protected:
       
   108 	CApaResourceFileWriterBase();
       
   109 	void DoGenerateFileContentsL(RBuf8& aBuffer, TUid aUid2, TUid aUid3) const;
       
   110 	void WriteUidTypeL(MDataSink& aDataSink, TUid aUid2, TUid aUid3) const;
       
   111 	void WriteTextL(MDataSink& aDataSink, const TDesC& aText) const;
       
   112 	void WriteText8L(MDataSink& aDataSink, const TDesC8& aText8) const;
       
   113 	void WriteUint8L(MDataSink& aDataSink, TUint aUint8) const;
       
   114 	void WriteLittleEndianUint16L(MDataSink& aDataSink, TUint aUint16) const;
       
   115 	void WriteLittleEndianUint32L(MDataSink& aDataSink, TUint aUint32) const;
       
   116 	void WriteBufferL(MDataSink& aDataSink, const TDesC8& aBuffer) const;
       
   117 private:
       
   118 	static HBufC8* AsCompressedUnicodeLC(const TDesC& aUncompressedUnicode);
       
   119 	void MainResourceInCompiledFormatLC(TInt& aMainResourceSizeInBytesWhenUncompressed, RBuf8& aBuffer, TBool aCompressedUnicodeFormat) const;
       
   120 private:
       
   121 	// new virtual functions
       
   122 	virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const=0;
       
   123 	virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const=0;
       
   124 	};
       
   125 
       
   126 /**
       
   127 Used to support the registration of non-native applications.
       
   128 
       
   129 The task of this class is to generate the resource files expected by the Apparc server. Applications 
       
   130 that register other applications can use functions of this class to customise the generated resource files.
       
   131 
       
   132 @publishedPartner
       
   133 @released
       
   134 */
       
   135 class CApaRegistrationResourceFileWriter : public CApaResourceFileWriterBase
       
   136 	{
       
   137 public:
       
   138 	IMPORT_C static CApaRegistrationResourceFileWriter* NewL(TUid aAppUid, const TDesC& aAppFile, TUint aAttributes);
       
   139 	IMPORT_C virtual ~CApaRegistrationResourceFileWriter();
       
   140 	TUid AppUid() const;
       
   141 	void GenerateFileContentsL(RBuf8& aBuffer) const;
       
   142 	void SetLocalisableResourceFileL(const TDesC& aLocalisableResourceFile);
       
   143 	IMPORT_C void SetAppIsHiddenL(TBool aAppIsHidden);
       
   144 	IMPORT_C void SetEmbeddabilityL(TApaAppCapability::TEmbeddability aEmbeddability);
       
   145 	IMPORT_C void SetSupportsNewFileL(TBool aSupportsNewFile);
       
   146 	IMPORT_C void SetLaunchInBackgroundL(TBool aLaunchInBackground);
       
   147 	IMPORT_C void SetGroupNameL(const TDesC& aGroupName);
       
   148 	IMPORT_C void SetDefaultScreenNumberL(TInt aDefaultScreenNumber);
       
   149 	IMPORT_C void SetOpaqueDataL(const TDesC8& aOpaqueData);
       
   150 	IMPORT_C void AddDataTypeL(TInt aPriority, const TDesC8& aType);
       
   151 	IMPORT_C void AddFileOwnershipInfoL(const TDesC& aFileName);
       
   152 // Not needing to be supported for the foreseeable future:
       
   153 //	IMPORT_C void AddServiceInfoL(TUid aServiceUid, const TDesC8* aOpaqueData);
       
   154 //	IMPORT_C void AddServiceInfoDataTypeL(TUid aServiceUid, TInt aPriority, const TDesC8& aType);
       
   155 private:
       
   156 	struct SDataType // DATATYPE
       
   157 		{
       
   158 		TInt iPriority;
       
   159 		HBufC8* iType;
       
   160 		};
       
   161 	struct SFileOwnershipInfo // FILE_OWNERSHIP_INFO
       
   162 		{
       
   163 		HBufC* iFileName;
       
   164 		};
       
   165 private:
       
   166 	CApaRegistrationResourceFileWriter(TUid aAppUid, TUint aAttributes);
       
   167 	void ConstructL(const TDesC& aAppFile);
       
   168 	void WriteDataTypeL(MDataSink& aDataSink, const SDataType& aDataType) const;
       
   169 	void WriteFileOwnershipInfoL(MDataSink& aDataSink, const SFileOwnershipInfo& aFileOwnershipInfo) const;
       
   170 	// from CApaResourceFileWriterBase
       
   171 	virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const;
       
   172 	virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const;
       
   173 private:
       
   174 	TUid iAppUid;
       
   175 	HBufC* iAppFile;
       
   176 	TUint iAttributes;
       
   177 	HBufC* iLocalisableResourceFile;
       
   178 	TBool iAppIsHidden;
       
   179 	TApaAppCapability::TEmbeddability iEmbeddability;
       
   180 	TBool iSupportsNewFile;
       
   181 	TBool iLaunchInBackground;
       
   182 	HBufC* iGroupName;
       
   183 	TInt iDefaultScreenNumber;
       
   184 	HBufC8* iOpaqueData;
       
   185 	RArray<SDataType> iDataTypeList;
       
   186 	RArray<SFileOwnershipInfo> iFileOwnershipList;
       
   187 	};
       
   188 
       
   189 /**
       
   190 @internalAll
       
   191 */
       
   192 class CApaLocalisableResourceFileWriter : public CApaResourceFileWriterBase
       
   193 	{
       
   194 public:
       
   195 	IMPORT_C static CApaLocalisableResourceFileWriter* NewL(const TDesC& aShortCaption, const TDesC& aCaption, TInt aNumberOfIcons, const TDesC& aGroupName);
       
   196 	IMPORT_C virtual ~CApaLocalisableResourceFileWriter();
       
   197 	void GenerateFileContentsL(RBuf8& aBuffer) const;
       
   198 	void SetIconFileL(const TDesC& aIconFile);
       
   199 // Not needing to be supported for the foreseeable future:
       
   200 //	IMPORT_C void AddViewDataL(TUid aViewUid, TInt aScreenMode, const TDesC& aCaption, TInt aNumberOfIcons, const TDesC& aIconFile);
       
   201 private:
       
   202 	struct SCaptionAndIconInfo // CAPTION_AND_ICON_INFO
       
   203 		{
       
   204 		HBufC* iCaption;
       
   205 		TInt iNumberOfIcons;
       
   206 		HBufC* iIconFile;
       
   207 		};
       
   208 private:
       
   209 	CApaLocalisableResourceFileWriter(TInt aNumberOfIcons);
       
   210 	void ConstructL(const TDesC& aShortCaption, const TDesC& aCaption, const TDesC& aGroupName);
       
   211 	void WriteCaptionAndIconInfoL(MDataSink& aDataSink, const SCaptionAndIconInfo& aCaptionAndIcon) const;
       
   212 	// from CApaResourceFileWriterBase
       
   213 	virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const;
       
   214 	virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const;
       
   215 private:
       
   216 	HBufC* iShortCaption;
       
   217 	SCaptionAndIconInfo iCaptionAndIcon;
       
   218 	HBufC* iGroupName;
       
   219 	};
       
   220 
       
   221 #if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
       
   222 
       
   223 class CApaAppInfoFileWriter;
       
   224 
       
   225 /**
       
   226 @internalAll
       
   227 */
       
   228 const TUid KUidInterimFormatFileForJavaMIDletInstaller={0x10208182};
       
   229 
       
   230 /**
       
   231 @internalAll
       
   232 */
       
   233 class ForJavaMIDletInstaller
       
   234 	{
       
   235 public:
       
   236 	IMPORT_C static void CheckInterimFormatFileNotCorruptL(RFile& aInterimFormatFile);
       
   237 	IMPORT_C static void GetJavaMIDletInfoL(RFs& aFs, const TDesC& aFileName,TUint32& aJavaMIDletInfo_AmsAuthId,TUint32& aJavaMIDletInfo_MIDlet);
       
   238 	IMPORT_C static CApaAppInfoFileWriter* NewInterimFormatFileWriterLC(RFs& aFs,const TDesC& aFileName,TUid aApplicationUid,TUint32 aJavaMIDletInfo_AmsAuthId,TInt aJavaMIDletInfo_MIDlet);
       
   239 	};
       
   240 
       
   241 #endif // UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER
       
   242 
       
   243 #if (((defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1)) || defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER))
       
   244 
       
   245 #if !defined(IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER)
       
   246 // we're compiling a source file that doesn't define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER, so give it it's default "value" of "IMPORT_C"
       
   247 #define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER IMPORT_C
       
   248 #endif
       
   249 
       
   250 /**
       
   251 @publishedAll
       
   252 @deprecated
       
   253 */
       
   254 #ifdef _UNICODE
       
   255 #define KUidAppInfoFile KUidAppInfoFile16
       
   256 #else
       
   257 #define KUidAppInfoFile KUidAppInfoFile8
       
   258 #endif
       
   259 
       
   260 /**
       
   261 @publishedAll
       
   262 @deprecated
       
   263 */
       
   264 const TUid KUidAppInfoFile8={268435562};
       
   265 
       
   266 /**
       
   267 @publishedAll
       
   268 @deprecated
       
   269 */
       
   270 const TUid KUidAppInfoFile16={0x10003A38};
       
   271 
       
   272 /**
       
   273 @internalComponent
       
   274 */
       
   275 const TUid KUidAppInfoFileVersion2={0x101fb032};
       
   276 
       
   277 /**
       
   278 @internalComponent
       
   279 */
       
   280 enum TAifVersion
       
   281 // The order here is important, only ever APPEND to the list
       
   282 	{
       
   283 	EAifVersionOriginal,
       
   284 	EAifVersionAddsDataType,
       
   285 	EAifVersionAddsViewData,
       
   286 	EAifVersionAddsFileOwnershipInfo
       
   287 #if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
       
   288 	,EAifVersionAddsJavaMIDletInfo
       
   289 #endif
       
   290 	};
       
   291 
       
   292 class CApaAIFCaption : public CBase
       
   293 //
       
   294 // Represents a caption in an AIF during reading and writing of the file.
       
   295 /**
       
   296 @internalComponent
       
   297 */
       
   298 	{
       
   299 public:
       
   300 	~CApaAIFCaption();
       
   301 	CApaAIFCaption();
       
   302 	void ConstructL(TLanguage aLanguage,const TDesC& aCaption);
       
   303 	static CApaAIFCaption* NewLC(TLanguage aLanguage,const TDesC& aCaption);
       
   304 	void InternalizeL(RReadStream& aStream);
       
   305 	void ExternalizeL(RWriteStream& aStream) const;
       
   306 	TLanguage Language() const;
       
   307 	TApaAppCaption Caption() const;
       
   308 public:
       
   309 	HBufC* iCaption;
       
   310 	TLanguage iLanguage;
       
   311 	};
       
   312 
       
   313 class CApaAIFViewData : public CBase
       
   314 //
       
   315 // Represents the data associated with an application view described in an AIF
       
   316 // during reading and writing of the file.
       
   317 // implementation class
       
   318 /**
       
   319 @internalComponent
       
   320 */
       
   321 	{
       
   322 public:
       
   323 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage) const;
       
   324 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* IconByIndexL(TInt aIndex) const;
       
   325 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfIcons() const;
       
   326 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TUid ViewUid() const;
       
   327 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt ScreenMode() const;
       
   328 public:
       
   329 	~CApaAIFViewData();
       
   330 	static CApaAIFViewData* NewLC();
       
   331 	static CApaAIFViewData* NewLC(const CApaAIFViewData& aSourceData);
       
   332 	void InternalizeL(RReadStream& aStream);		
       
   333 	void ExternalizeL(RWriteStream& aStream) const;
       
   334 	void SetScreenMode(TInt aScreenMode);
       
   335 	void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption);
       
   336 	void AddIconL(CApaMaskedBitmap& aIcon);
       
   337 	void AddIconIndexL(TInt aIndex);
       
   338 	void SetViewUid(TUid aUid);
       
   339 	void LoadIconsL(const TDesC& aFileName, TUint aMbmOffset);
       
   340 private:
       
   341 	CApaAIFViewData();
       
   342 	void ConstructL();
       
   343 	void ConstructL(const CApaAIFViewData& aSourceData);
       
   344 private:
       
   345 	TInt iScreenMode;
       
   346 	CArrayPtr<CApaMaskedBitmap>* iIconArray;
       
   347 	CArrayPtr<CApaAIFCaption>* iCaptionArray;
       
   348 	TUid iViewUid;
       
   349 	CArrayFixFlat<TInt>* iIconIndexArray;		// used for AIF version 2 format
       
   350 	};
       
   351 
       
   352 class CApaAppInfoFile : public CBase
       
   353 /**
       
   354 @internalComponent
       
   355 */
       
   356 	{
       
   357 #if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
       
   358 	friend class ForJavaMIDletInstaller;
       
   359 #endif
       
   360 public:
       
   361 	~CApaAppInfoFile();
       
   362 	//
       
   363 protected:
       
   364 	CApaAppInfoFile(RFs& aFs);
       
   365 	void ConstructL();
       
   366 protected:
       
   367 
       
   368 	class TCaptionHeader
       
   369 		{
       
   370 	public:
       
   371 		void InternalizeL(RReadStream& aStream);			// internalizes the header info only
       
   372 		void ExternalizeL(RWriteStream& aStream) const;		// externalizes the header info only
       
   373 	public:
       
   374 		TSwizzle<HBufC> iCaption;
       
   375 		TLanguage iLanguage;
       
   376 		};
       
   377 	class TIconHeader
       
   378 		{
       
   379 	public:
       
   380 		void InternalizeL(RReadStream& aStream);			// internalizes the header info only
       
   381 		void ExternalizeL(RWriteStream& aStream) const;		// externalizes the header info only
       
   382 	public:
       
   383 		TSwizzle<CApaMaskedBitmap> iIcon;	// Used for old AIF format Internalize
       
   384 		TInt iIconSideInPixels;
       
   385 		TSwizzle<CFbsBitmap> iIconMain;		// Used for new AIF format
       
   386 		TSwizzle<CFbsBitmap> iIconMask;		// Used for new AIF format
       
   387 		};
       
   388 	class TDataTypeHeader
       
   389 		{
       
   390 	public:
       
   391 		// header info only
       
   392 		void InternalizeL(RReadStream& aStream); 			// internalizes the header info only
       
   393 		void ExternalizeL(RWriteStream& aStream) const;		// externalizes the header info only
       
   394 	public:
       
   395 		TSwizzle<TDataType> iDataType;
       
   396 		TDataTypePriority iPriority;
       
   397 		};
       
   398 	class TViewDataHeader
       
   399 		{
       
   400 	public:
       
   401 		void InternalizeL(RReadStream& aStream);			// internalizes the header info only
       
   402 		void ExternalizeL(RWriteStream& aStream) const;		// externalizes the header info only
       
   403 	public:
       
   404 		TSwizzle<CApaAIFViewData> iViewData;
       
   405 		};
       
   406 	class TFileOwnershipInfoHeader
       
   407 		{
       
   408 	public:
       
   409 		void InternalizeL(RReadStream& aStream);			// internalizes the header info only
       
   410 		void ExternalizeL(RWriteStream& aStream) const;		// externalizes the header info only
       
   411 	public:
       
   412 		TSwizzle<HBufC> iOwnedFileName;
       
   413 		};
       
   414 protected:
       
   415 	RFs& iFs;
       
   416 	CPersistentStore* iStore;
       
   417 	CArrayFix<TCaptionHeader>* iCaptionHeaderArray;
       
   418 	CArrayFix<TIconHeader>* iIconHeaderArray;
       
   419 	CArrayFix<TDataTypeHeader>* iDataTypeHeaderArray;
       
   420 	CArrayFix<TViewDataHeader>* iViewDataHeaderArray;
       
   421 	CArrayFix<TFileOwnershipInfoHeader>* iFileOwnershipInfoHeaderArray;
       
   422 	TApaAppCapability iCapability;
       
   423 	};
       
   424 
       
   425 class CApaAppInfoFileReader : public CApaAppInfoFile
       
   426 /** Aif file reader.
       
   427 
       
   428 Aif files contain information about an application, including its icons and 
       
   429 captions.
       
   430 
       
   431 An application can get a reader for its own aif file by calling CEikApplication::OpenAppInfoFileLC(). 
       
   432 
       
   433 @publishedAll
       
   434 @deprecated */
       
   435 	{
       
   436 #if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
       
   437 	friend class ForJavaMIDletInstaller;
       
   438 #endif
       
   439 public:
       
   440 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid);
       
   441 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewL(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid);
       
   442 	//
       
   443 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void Capability(TDes8& aInfo) const;
       
   444 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage);
       
   445 	
       
   446 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* CreateMaskedBitmapL(TInt aIconSideInPixels); // If there are no bitmaps in the file this method leaves with KErrNotFound
       
   447 	// Not available until ER6
       
   448 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* CreateMaskedBitmapByIndexLC(TInt aIndex); // If there are no bitmaps in the file this method leaves with KErrNotFound
       
   449 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfBitmaps() const;
       
   450 
       
   451 	// Not available till ER5
       
   452 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void DataTypesSupportedL(CArrayFix<TDataTypeWithPriority>& aTypeList) const;
       
   453 	//
       
   454 
       
   455 	// Not available till ER6.1
       
   456 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetViewsL(CArrayPtr<CApaAIFViewData>& aViewList) const;
       
   457 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetOwnedFilesL(CDesCArray& aOwnedFilesList) const;
       
   458 	//	
       
   459 
       
   460 	// utility function
       
   461 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void StretchDrawL(CFbsBitmap* aSource,CFbsBitmap* aTarget,TSize aSizeInPixels);
       
   462 	//
       
   463 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER ~CApaAppInfoFileReader();
       
   464 public:
       
   465 	static void GetAifFileNameL(const TDesC& aFullName,TDes& aAifName);
       
   466 private:
       
   467 	CApaAppInfoFileReader(RFs& aFs);
       
   468 	void InternalizeL(RReadStream& aStream);
       
   469 	void ConstructL(const TDesC& aFileName,TUid aUid);
       
   470 	void LoadAifFileVersionTwoL(const TDesC& aFileName, TUid aMostDerivedUid);
       
   471 	void AddIconHeadersL(const TDesC& aFileName, TInt32 aFileOffset, TInt aNumIcons);
       
   472 private:
       
   473 	HBufC* iDefaultCaption;
       
   474 	TUint8* iRomPointer;
       
   475 	TInt iMbmOffset;
       
   476 	HBufC* iAifFileName;
       
   477 #if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
       
   478 	TUint32 iJavaMIDletInfo_AmsAuthId;
       
   479 	TInt iJavaMIDletInfo_MIDlet;
       
   480 #endif
       
   481 	};
       
   482 
       
   483 class CApaAppInfoFileWriter : public CApaAppInfoFile
       
   484 /**
       
   485 Aif file writer.
       
   486 
       
   487 This class writes application information, including icons and captions into the aif file.
       
   488 
       
   489 @publishedAll
       
   490 @deprecated */
       
   491 	{
       
   492 #if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
       
   493 	friend class ForJavaMIDletInstaller;
       
   494 #endif
       
   495 public:
       
   496 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileWriter* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid);
       
   497 	//
       
   498 	IMPORT_C TInt SetCapability(const TDesC8& aInfo);
       
   499 	IMPORT_C void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption);
       
   500 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddIconL(const TDesC& aIconFileName);
       
   501 	IMPORT_C void AddIconL(CApaMaskedBitmap& aIcon);
       
   502 	
       
   503 	// Not available till ER5
       
   504 	IMPORT_C void AddDataTypeL(const TDataTypeWithPriority& aTypePriority);
       
   505 	//
       
   506 
       
   507 	// Not available till ER6.1
       
   508 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid);
       
   509 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid,TInt aScreenMode);
       
   510 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewCaptionL(TLanguage aLanguage,const TDesC& aCaption,TUid aViewUid);
       
   511 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewIconL(CApaMaskedBitmap& aIcon,TUid aViewUid);
       
   512 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void StoreViewL(TUid aViewId);
       
   513 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddOwnedFileL(const TDesC& aOwnedFileName);
       
   514 	//
       
   515 	
       
   516 	IMPORT_C void StoreL();
       
   517 	//
       
   518 	IMPORT_C ~CApaAppInfoFileWriter();
       
   519 private:
       
   520 	CApaAppInfoFileWriter(RFs& aFs);
       
   521 	void ExternalizeL(RWriteStream& aStream) const;
       
   522 	void ConstructL(const TDesC& aFileName,TUid aUid
       
   523 #if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
       
   524 					,TUid aMiddleUid=KUidAppInfoFile,TUint32 aJavaMIDletInfo_AmsAuthId=0,TInt aJavaMIDletInfo_MIDlet=0
       
   525 #endif
       
   526 					);
       
   527 private:
       
   528 	CStoreMap* iMap;
       
   529 #if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
       
   530 	TUint32 iJavaMIDletInfo_AmsAuthId;
       
   531 	TInt iJavaMIDletInfo_MIDlet;
       
   532 #endif
       
   533 	};
       
   534 
       
   535 class CApaAppCaptionFileReader : public CBase
       
   536 /**
       
   537 @internalComponent
       
   538 */
       
   539 	{
       
   540 public:
       
   541 	CApaAppCaptionFileReader(RFs& aFs,const TDesC& iAppFileName);
       
   542 	void GetCaptionsL(TApaAppCaption& aCaption,TApaAppCaption& aShortCaption);
       
   543 private:	
       
   544 	RFs& iFs;
       
   545 	TFileName iCaptionFileName;
       
   546 	};
       
   547 
       
   548 class AppInfoFileUtils
       
   549 // Internal utilities providing helper functions for non-ROM localisation
       
   550 /**
       
   551 @internalComponent
       
   552 */
       
   553 	{
       
   554 public: // For internal use only
       
   555 	IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void GetAifFileName(const RFs& aFs,TDes& aAifName);
       
   556 public:
       
   557 	static void GetAifFileNameL(const RFs& aFs,const TDesC& aFullName,TDes& aAifName);
       
   558 	};
       
   559 #endif // #if (defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1)
       
   560 
       
   561 #endif