1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/apgicnfl.h Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,561 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __APGICNFL_H__
1.20 +#define __APGICNFL_H__
1.21 +
1.22 +#include <apadef.h>
1.23 +#include <apaid.h>
1.24 +#include <bitdev.h>
1.25 +#include <apmstd.h>
1.26 +#include <badesca.h>
1.27 +
1.28 +class CFbsBitmap;
1.29 +class CPersistentStore;
1.30 +class RReadStream;
1.31 +class RWriteStream;
1.32 +
1.33 +class CApaMaskedBitmap : public CFbsBitmap
1.34 +/** An application icon.
1.35 +
1.36 +This is a bitmap and a mask, managed by the Font and Bitmap server.
1.37 +
1.38 +An object of this type is passed to RApaLsSession::GetAppIcon() to fetch a
1.39 +suitable application icon.
1.40 +
1.41 +@publishedAll
1.42 +@released
1.43 +@see RApaLsSession::GetAppIcon() */
1.44 + {
1.45 +public:
1.46 + IMPORT_C static CApaMaskedBitmap* NewLC();
1.47 + IMPORT_C static CApaMaskedBitmap* NewL(const CApaMaskedBitmap* aSourceIcon);
1.48 + //
1.49 + IMPORT_C CFbsBitmap* Mask() const;
1.50 + IMPORT_C void InternalizeL(RReadStream& aStream); //lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation
1.51 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;//lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation
1.52 + //
1.53 + IMPORT_C ~CApaMaskedBitmap();
1.54 + void SetRomBitmapL(TUint8* aRomPointer); //lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation
1.55 + IMPORT_C void SetMaskBitmap(CFbsBitmap* aMask);
1.56 +private:
1.57 + CApaMaskedBitmap();
1.58 + void ConstructL();
1.59 +private:
1.60 + CFbsBitmap* iMask;
1.61 + };
1.62 +
1.63 +/**
1.64 +@internalComponent
1.65 +*/
1.66 +class CApaResourceFileWriterBase : public CBase
1.67 + {
1.68 +protected:
1.69 + class RBufferSink;
1.70 + class MDataSink
1.71 + {
1.72 + public:
1.73 + void WriteBufferL(const TDesC8& aBuffer);
1.74 + void WriteCompressedUnicodeRunL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aTextAsCompressedUnicode);
1.75 + void WriteInCompressedUnicodeFormatL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aData, TBool aInCompressedUnicodeRun);
1.76 + TInt NumberOfBytesWhenUncompressed() const;
1.77 + inline TBool CompressedUnicodeFormat() const {return (iBufferSinkForCompressedUnicodeFormat!=NULL);}
1.78 + protected:
1.79 + MDataSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat);
1.80 + void FlushL(TBool aFinalFlush);
1.81 + void Reset(TInt& aNumberOfBytesWhenUncompressed);
1.82 + private:
1.83 + void WriteRunLengthL(TInt aRunLength);
1.84 + private:
1.85 + enum
1.86 + {
1.87 + EFlag_InCompressedUnicodeRun =0x00000001
1.88 + };
1.89 + private:
1.90 + // new virtual functions
1.91 + virtual void DoWriteBufferL(const TDesC8& aBuffer)=0;
1.92 + private:
1.93 + TInt iNumberOfBytesWhenUncompressed;
1.94 + TUint iFlags;
1.95 + RBufferSink* iBufferSinkForCompressedUnicodeFormat; // does not own what it points to
1.96 + };
1.97 + class RBufferSink : public MDataSink
1.98 + {
1.99 + public:
1.100 + RBufferSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat);
1.101 + void ConstructLC();
1.102 + void Close();
1.103 + void FlushAndGetAndResetL(TInt& aNumberOfBytesWhenUncompressed, RBuf8& aBuffer);
1.104 + private:
1.105 + // from MDataSink
1.106 + virtual void DoWriteBufferL(const TDesC8& aBuffer);
1.107 + private:
1.108 + RBuf8 iBuffer;
1.109 + };
1.110 +protected:
1.111 + CApaResourceFileWriterBase();
1.112 + void DoGenerateFileContentsL(RBuf8& aBuffer, TUid aUid2, TUid aUid3) const;
1.113 + void WriteUidTypeL(MDataSink& aDataSink, TUid aUid2, TUid aUid3) const;
1.114 + void WriteTextL(MDataSink& aDataSink, const TDesC& aText) const;
1.115 + void WriteText8L(MDataSink& aDataSink, const TDesC8& aText8) const;
1.116 + void WriteUint8L(MDataSink& aDataSink, TUint aUint8) const;
1.117 + void WriteLittleEndianUint16L(MDataSink& aDataSink, TUint aUint16) const;
1.118 + void WriteLittleEndianUint32L(MDataSink& aDataSink, TUint aUint32) const;
1.119 + void WriteBufferL(MDataSink& aDataSink, const TDesC8& aBuffer) const;
1.120 +private:
1.121 + static HBufC8* AsCompressedUnicodeLC(const TDesC& aUncompressedUnicode);
1.122 + void MainResourceInCompiledFormatLC(TInt& aMainResourceSizeInBytesWhenUncompressed, RBuf8& aBuffer, TBool aCompressedUnicodeFormat) const;
1.123 +private:
1.124 + // new virtual functions
1.125 + virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const=0;
1.126 + virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const=0;
1.127 + };
1.128 +
1.129 +/**
1.130 +Used to support the registration of non-native applications.
1.131 +
1.132 +The task of this class is to generate the resource files expected by the Apparc server. Applications
1.133 +that register other applications can use functions of this class to customise the generated resource files.
1.134 +
1.135 +@publishedPartner
1.136 +@released
1.137 +*/
1.138 +class CApaRegistrationResourceFileWriter : public CApaResourceFileWriterBase
1.139 + {
1.140 +public:
1.141 + IMPORT_C static CApaRegistrationResourceFileWriter* NewL(TUid aAppUid, const TDesC& aAppFile, TUint aAttributes);
1.142 + IMPORT_C virtual ~CApaRegistrationResourceFileWriter();
1.143 + TUid AppUid() const;
1.144 + void GenerateFileContentsL(RBuf8& aBuffer) const;
1.145 + void SetLocalisableResourceFileL(const TDesC& aLocalisableResourceFile);
1.146 + IMPORT_C void SetAppIsHiddenL(TBool aAppIsHidden);
1.147 + IMPORT_C void SetEmbeddabilityL(TApaAppCapability::TEmbeddability aEmbeddability);
1.148 + IMPORT_C void SetSupportsNewFileL(TBool aSupportsNewFile);
1.149 + IMPORT_C void SetLaunchInBackgroundL(TBool aLaunchInBackground);
1.150 + IMPORT_C void SetGroupNameL(const TDesC& aGroupName);
1.151 + IMPORT_C void SetDefaultScreenNumberL(TInt aDefaultScreenNumber);
1.152 + IMPORT_C void SetOpaqueDataL(const TDesC8& aOpaqueData);
1.153 + IMPORT_C void AddDataTypeL(TInt aPriority, const TDesC8& aType);
1.154 + IMPORT_C void AddFileOwnershipInfoL(const TDesC& aFileName);
1.155 +// Not needing to be supported for the foreseeable future:
1.156 +// IMPORT_C void AddServiceInfoL(TUid aServiceUid, const TDesC8* aOpaqueData);
1.157 +// IMPORT_C void AddServiceInfoDataTypeL(TUid aServiceUid, TInt aPriority, const TDesC8& aType);
1.158 +private:
1.159 + struct SDataType // DATATYPE
1.160 + {
1.161 + TInt iPriority;
1.162 + HBufC8* iType;
1.163 + };
1.164 + struct SFileOwnershipInfo // FILE_OWNERSHIP_INFO
1.165 + {
1.166 + HBufC* iFileName;
1.167 + };
1.168 +private:
1.169 + CApaRegistrationResourceFileWriter(TUid aAppUid, TUint aAttributes);
1.170 + void ConstructL(const TDesC& aAppFile);
1.171 + void WriteDataTypeL(MDataSink& aDataSink, const SDataType& aDataType) const;
1.172 + void WriteFileOwnershipInfoL(MDataSink& aDataSink, const SFileOwnershipInfo& aFileOwnershipInfo) const;
1.173 + // from CApaResourceFileWriterBase
1.174 + virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const;
1.175 + virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const;
1.176 +private:
1.177 + TUid iAppUid;
1.178 + HBufC* iAppFile;
1.179 + TUint iAttributes;
1.180 + HBufC* iLocalisableResourceFile;
1.181 + TBool iAppIsHidden;
1.182 + TApaAppCapability::TEmbeddability iEmbeddability;
1.183 + TBool iSupportsNewFile;
1.184 + TBool iLaunchInBackground;
1.185 + HBufC* iGroupName;
1.186 + TInt iDefaultScreenNumber;
1.187 + HBufC8* iOpaqueData;
1.188 + RArray<SDataType> iDataTypeList;
1.189 + RArray<SFileOwnershipInfo> iFileOwnershipList;
1.190 + };
1.191 +
1.192 +/**
1.193 +@internalAll
1.194 +*/
1.195 +class CApaLocalisableResourceFileWriter : public CApaResourceFileWriterBase
1.196 + {
1.197 +public:
1.198 + IMPORT_C static CApaLocalisableResourceFileWriter* NewL(const TDesC& aShortCaption, const TDesC& aCaption, TInt aNumberOfIcons, const TDesC& aGroupName);
1.199 + IMPORT_C virtual ~CApaLocalisableResourceFileWriter();
1.200 + void GenerateFileContentsL(RBuf8& aBuffer) const;
1.201 + void SetIconFileL(const TDesC& aIconFile);
1.202 +// Not needing to be supported for the foreseeable future:
1.203 +// IMPORT_C void AddViewDataL(TUid aViewUid, TInt aScreenMode, const TDesC& aCaption, TInt aNumberOfIcons, const TDesC& aIconFile);
1.204 +private:
1.205 + struct SCaptionAndIconInfo // CAPTION_AND_ICON_INFO
1.206 + {
1.207 + HBufC* iCaption;
1.208 + TInt iNumberOfIcons;
1.209 + HBufC* iIconFile;
1.210 + };
1.211 +private:
1.212 + CApaLocalisableResourceFileWriter(TInt aNumberOfIcons);
1.213 + void ConstructL(const TDesC& aShortCaption, const TDesC& aCaption, const TDesC& aGroupName);
1.214 + void WriteCaptionAndIconInfoL(MDataSink& aDataSink, const SCaptionAndIconInfo& aCaptionAndIcon) const;
1.215 + // from CApaResourceFileWriterBase
1.216 + virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const;
1.217 + virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const;
1.218 +private:
1.219 + HBufC* iShortCaption;
1.220 + SCaptionAndIconInfo iCaptionAndIcon;
1.221 + HBufC* iGroupName;
1.222 + };
1.223 +
1.224 +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.225 +
1.226 +class CApaAppInfoFileWriter;
1.227 +
1.228 +/**
1.229 +@internalAll
1.230 +*/
1.231 +const TUid KUidInterimFormatFileForJavaMIDletInstaller={0x10208182};
1.232 +
1.233 +/**
1.234 +@internalAll
1.235 +*/
1.236 +class ForJavaMIDletInstaller
1.237 + {
1.238 +public:
1.239 + IMPORT_C static void CheckInterimFormatFileNotCorruptL(RFile& aInterimFormatFile);
1.240 + IMPORT_C static void GetJavaMIDletInfoL(RFs& aFs, const TDesC& aFileName,TUint32& aJavaMIDletInfo_AmsAuthId,TUint32& aJavaMIDletInfo_MIDlet);
1.241 + IMPORT_C static CApaAppInfoFileWriter* NewInterimFormatFileWriterLC(RFs& aFs,const TDesC& aFileName,TUid aApplicationUid,TUint32 aJavaMIDletInfo_AmsAuthId,TInt aJavaMIDletInfo_MIDlet);
1.242 + };
1.243 +
1.244 +#endif // UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER
1.245 +
1.246 +#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))
1.247 +
1.248 +#if !defined(IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER)
1.249 +// 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"
1.250 +#define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER IMPORT_C
1.251 +#endif
1.252 +
1.253 +/**
1.254 +@publishedAll
1.255 +@deprecated
1.256 +*/
1.257 +#ifdef _UNICODE
1.258 +#define KUidAppInfoFile KUidAppInfoFile16
1.259 +#else
1.260 +#define KUidAppInfoFile KUidAppInfoFile8
1.261 +#endif
1.262 +
1.263 +/**
1.264 +@publishedAll
1.265 +@deprecated
1.266 +*/
1.267 +const TUid KUidAppInfoFile8={268435562};
1.268 +
1.269 +/**
1.270 +@publishedAll
1.271 +@deprecated
1.272 +*/
1.273 +const TUid KUidAppInfoFile16={0x10003A38};
1.274 +
1.275 +/**
1.276 +@internalComponent
1.277 +*/
1.278 +const TUid KUidAppInfoFileVersion2={0x101fb032};
1.279 +
1.280 +/**
1.281 +@internalComponent
1.282 +*/
1.283 +enum TAifVersion
1.284 +// The order here is important, only ever APPEND to the list
1.285 + {
1.286 + EAifVersionOriginal,
1.287 + EAifVersionAddsDataType,
1.288 + EAifVersionAddsViewData,
1.289 + EAifVersionAddsFileOwnershipInfo
1.290 +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.291 + ,EAifVersionAddsJavaMIDletInfo
1.292 +#endif
1.293 + };
1.294 +
1.295 +class CApaAIFCaption : public CBase
1.296 +//
1.297 +// Represents a caption in an AIF during reading and writing of the file.
1.298 +/**
1.299 +@internalComponent
1.300 +*/
1.301 + {
1.302 +public:
1.303 + ~CApaAIFCaption();
1.304 + CApaAIFCaption();
1.305 + void ConstructL(TLanguage aLanguage,const TDesC& aCaption);
1.306 + static CApaAIFCaption* NewLC(TLanguage aLanguage,const TDesC& aCaption);
1.307 + void InternalizeL(RReadStream& aStream);
1.308 + void ExternalizeL(RWriteStream& aStream) const;
1.309 + TLanguage Language() const;
1.310 + TApaAppCaption Caption() const;
1.311 +public:
1.312 + HBufC* iCaption;
1.313 + TLanguage iLanguage;
1.314 + };
1.315 +
1.316 +class CApaAIFViewData : public CBase
1.317 +//
1.318 +// Represents the data associated with an application view described in an AIF
1.319 +// during reading and writing of the file.
1.320 +// implementation class
1.321 +/**
1.322 +@internalComponent
1.323 +*/
1.324 + {
1.325 +public:
1.326 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage) const;
1.327 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* IconByIndexL(TInt aIndex) const;
1.328 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfIcons() const;
1.329 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TUid ViewUid() const;
1.330 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt ScreenMode() const;
1.331 +public:
1.332 + ~CApaAIFViewData();
1.333 + static CApaAIFViewData* NewLC();
1.334 + static CApaAIFViewData* NewLC(const CApaAIFViewData& aSourceData);
1.335 + void InternalizeL(RReadStream& aStream);
1.336 + void ExternalizeL(RWriteStream& aStream) const;
1.337 + void SetScreenMode(TInt aScreenMode);
1.338 + void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption);
1.339 + void AddIconL(CApaMaskedBitmap& aIcon);
1.340 + void AddIconIndexL(TInt aIndex);
1.341 + void SetViewUid(TUid aUid);
1.342 + void LoadIconsL(const TDesC& aFileName, TUint aMbmOffset);
1.343 +private:
1.344 + CApaAIFViewData();
1.345 + void ConstructL();
1.346 + void ConstructL(const CApaAIFViewData& aSourceData);
1.347 +private:
1.348 + TInt iScreenMode;
1.349 + CArrayPtr<CApaMaskedBitmap>* iIconArray;
1.350 + CArrayPtr<CApaAIFCaption>* iCaptionArray;
1.351 + TUid iViewUid;
1.352 + CArrayFixFlat<TInt>* iIconIndexArray; // used for AIF version 2 format
1.353 + };
1.354 +
1.355 +class CApaAppInfoFile : public CBase
1.356 +/**
1.357 +@internalComponent
1.358 +*/
1.359 + {
1.360 +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.361 + friend class ForJavaMIDletInstaller;
1.362 +#endif
1.363 +public:
1.364 + ~CApaAppInfoFile();
1.365 + //
1.366 +protected:
1.367 + CApaAppInfoFile(RFs& aFs);
1.368 + void ConstructL();
1.369 +protected:
1.370 +
1.371 + class TCaptionHeader
1.372 + {
1.373 + public:
1.374 + void InternalizeL(RReadStream& aStream); // internalizes the header info only
1.375 + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only
1.376 + public:
1.377 + TSwizzle<HBufC> iCaption;
1.378 + TLanguage iLanguage;
1.379 + };
1.380 + class TIconHeader
1.381 + {
1.382 + public:
1.383 + void InternalizeL(RReadStream& aStream); // internalizes the header info only
1.384 + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only
1.385 + public:
1.386 + TSwizzle<CApaMaskedBitmap> iIcon; // Used for old AIF format Internalize
1.387 + TInt iIconSideInPixels;
1.388 + TSwizzle<CFbsBitmap> iIconMain; // Used for new AIF format
1.389 + TSwizzle<CFbsBitmap> iIconMask; // Used for new AIF format
1.390 + };
1.391 + class TDataTypeHeader
1.392 + {
1.393 + public:
1.394 + // header info only
1.395 + void InternalizeL(RReadStream& aStream); // internalizes the header info only
1.396 + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only
1.397 + public:
1.398 + TSwizzle<TDataType> iDataType;
1.399 + TDataTypePriority iPriority;
1.400 + };
1.401 + class TViewDataHeader
1.402 + {
1.403 + public:
1.404 + void InternalizeL(RReadStream& aStream); // internalizes the header info only
1.405 + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only
1.406 + public:
1.407 + TSwizzle<CApaAIFViewData> iViewData;
1.408 + };
1.409 + class TFileOwnershipInfoHeader
1.410 + {
1.411 + public:
1.412 + void InternalizeL(RReadStream& aStream); // internalizes the header info only
1.413 + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only
1.414 + public:
1.415 + TSwizzle<HBufC> iOwnedFileName;
1.416 + };
1.417 +protected:
1.418 + RFs& iFs;
1.419 + CPersistentStore* iStore;
1.420 + CArrayFix<TCaptionHeader>* iCaptionHeaderArray;
1.421 + CArrayFix<TIconHeader>* iIconHeaderArray;
1.422 + CArrayFix<TDataTypeHeader>* iDataTypeHeaderArray;
1.423 + CArrayFix<TViewDataHeader>* iViewDataHeaderArray;
1.424 + CArrayFix<TFileOwnershipInfoHeader>* iFileOwnershipInfoHeaderArray;
1.425 + TApaAppCapability iCapability;
1.426 + };
1.427 +
1.428 +class CApaAppInfoFileReader : public CApaAppInfoFile
1.429 +/** Aif file reader.
1.430 +
1.431 +Aif files contain information about an application, including its icons and
1.432 +captions.
1.433 +
1.434 +An application can get a reader for its own aif file by calling CEikApplication::OpenAppInfoFileLC().
1.435 +
1.436 +@publishedAll
1.437 +@deprecated */
1.438 + {
1.439 +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.440 + friend class ForJavaMIDletInstaller;
1.441 +#endif
1.442 +public:
1.443 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid);
1.444 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewL(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid);
1.445 + //
1.446 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void Capability(TDes8& aInfo) const;
1.447 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage);
1.448 +
1.449 + 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
1.450 + // Not available until ER6
1.451 + 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
1.452 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfBitmaps() const;
1.453 +
1.454 + // Not available till ER5
1.455 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void DataTypesSupportedL(CArrayFix<TDataTypeWithPriority>& aTypeList) const;
1.456 + //
1.457 +
1.458 + // Not available till ER6.1
1.459 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetViewsL(CArrayPtr<CApaAIFViewData>& aViewList) const;
1.460 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetOwnedFilesL(CDesCArray& aOwnedFilesList) const;
1.461 + //
1.462 +
1.463 + // utility function
1.464 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void StretchDrawL(CFbsBitmap* aSource,CFbsBitmap* aTarget,TSize aSizeInPixels);
1.465 + //
1.466 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER ~CApaAppInfoFileReader();
1.467 +public:
1.468 + static void GetAifFileNameL(const TDesC& aFullName,TDes& aAifName);
1.469 +private:
1.470 + CApaAppInfoFileReader(RFs& aFs);
1.471 + void InternalizeL(RReadStream& aStream);
1.472 + void ConstructL(const TDesC& aFileName,TUid aUid);
1.473 + void LoadAifFileVersionTwoL(const TDesC& aFileName, TUid aMostDerivedUid);
1.474 + void AddIconHeadersL(const TDesC& aFileName, TInt32 aFileOffset, TInt aNumIcons);
1.475 +private:
1.476 + HBufC* iDefaultCaption;
1.477 + TUint8* iRomPointer;
1.478 + TInt iMbmOffset;
1.479 + HBufC* iAifFileName;
1.480 +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.481 + TUint32 iJavaMIDletInfo_AmsAuthId;
1.482 + TInt iJavaMIDletInfo_MIDlet;
1.483 +#endif
1.484 + };
1.485 +
1.486 +class CApaAppInfoFileWriter : public CApaAppInfoFile
1.487 +/**
1.488 +Aif file writer.
1.489 +
1.490 +This class writes application information, including icons and captions into the aif file.
1.491 +
1.492 +@publishedAll
1.493 +@deprecated */
1.494 + {
1.495 +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.496 + friend class ForJavaMIDletInstaller;
1.497 +#endif
1.498 +public:
1.499 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileWriter* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid);
1.500 + //
1.501 + IMPORT_C TInt SetCapability(const TDesC8& aInfo);
1.502 + IMPORT_C void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption);
1.503 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddIconL(const TDesC& aIconFileName);
1.504 + IMPORT_C void AddIconL(CApaMaskedBitmap& aIcon);
1.505 +
1.506 + // Not available till ER5
1.507 + IMPORT_C void AddDataTypeL(const TDataTypeWithPriority& aTypePriority);
1.508 + //
1.509 +
1.510 + // Not available till ER6.1
1.511 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid);
1.512 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid,TInt aScreenMode);
1.513 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewCaptionL(TLanguage aLanguage,const TDesC& aCaption,TUid aViewUid);
1.514 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewIconL(CApaMaskedBitmap& aIcon,TUid aViewUid);
1.515 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void StoreViewL(TUid aViewId);
1.516 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddOwnedFileL(const TDesC& aOwnedFileName);
1.517 + //
1.518 +
1.519 + IMPORT_C void StoreL();
1.520 + //
1.521 + IMPORT_C ~CApaAppInfoFileWriter();
1.522 +private:
1.523 + CApaAppInfoFileWriter(RFs& aFs);
1.524 + void ExternalizeL(RWriteStream& aStream) const;
1.525 + void ConstructL(const TDesC& aFileName,TUid aUid
1.526 +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.527 + ,TUid aMiddleUid=KUidAppInfoFile,TUint32 aJavaMIDletInfo_AmsAuthId=0,TInt aJavaMIDletInfo_MIDlet=0
1.528 +#endif
1.529 + );
1.530 +private:
1.531 + CStoreMap* iMap;
1.532 +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.533 + TUint32 iJavaMIDletInfo_AmsAuthId;
1.534 + TInt iJavaMIDletInfo_MIDlet;
1.535 +#endif
1.536 + };
1.537 +
1.538 +class CApaAppCaptionFileReader : public CBase
1.539 +/**
1.540 +@internalComponent
1.541 +*/
1.542 + {
1.543 +public:
1.544 + CApaAppCaptionFileReader(RFs& aFs,const TDesC& iAppFileName);
1.545 + void GetCaptionsL(TApaAppCaption& aCaption,TApaAppCaption& aShortCaption);
1.546 +private:
1.547 + RFs& iFs;
1.548 + TFileName iCaptionFileName;
1.549 + };
1.550 +
1.551 +class AppInfoFileUtils
1.552 +// Internal utilities providing helper functions for non-ROM localisation
1.553 +/**
1.554 +@internalComponent
1.555 +*/
1.556 + {
1.557 +public: // For internal use only
1.558 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void GetAifFileName(const RFs& aFs,TDes& aAifName);
1.559 +public:
1.560 + static void GetAifFileNameL(const RFs& aFs,const TDesC& aFullName,TDes& aAifName);
1.561 + };
1.562 +#endif // #if (defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1)
1.563 +
1.564 +#endif