1.1 --- a/epoc32/include/mw/apgicnfl.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/mw/apgicnfl.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
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 +// under the terms of "Eclipse Public License v1.0"
1.9 // which accompanies this distribution, and is available
1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 //
1.13 // Initial Contributors:
1.14 // Nokia Corporation - initial contribution.
1.15 @@ -11,6 +11,7 @@
1.16 // Contributors:
1.17 //
1.18 // Description:
1.19 +// apgicnfl.h
1.20 //
1.21
1.22 #ifndef __APGICNFL_H__
1.23 @@ -27,7 +28,6 @@
1.24 class RReadStream;
1.25 class RWriteStream;
1.26
1.27 -class CApaMaskedBitmap : public CFbsBitmap
1.28 /** An application icon.
1.29
1.30 This is a bitmap and a mask, managed by the Font and Bitmap server.
1.31 @@ -38,6 +38,7 @@
1.32 @publishedAll
1.33 @released
1.34 @see RApaLsSession::GetAppIcon() */
1.35 +class CApaMaskedBitmap : public CFbsBitmap
1.36 {
1.37 public:
1.38 IMPORT_C static CApaMaskedBitmap* NewLC();
1.39 @@ -57,6 +58,7 @@
1.40 CFbsBitmap* iMask;
1.41 };
1.42
1.43 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1.44 /**
1.45 @internalComponent
1.46 */
1.47 @@ -218,344 +220,7 @@
1.48 HBufC* iGroupName;
1.49 };
1.50
1.51 -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.52 +#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
1.53
1.54 -class CApaAppInfoFileWriter;
1.55 -
1.56 -/**
1.57 -@internalAll
1.58 -*/
1.59 -const TUid KUidInterimFormatFileForJavaMIDletInstaller={0x10208182};
1.60 -
1.61 -/**
1.62 -@internalAll
1.63 -*/
1.64 -class ForJavaMIDletInstaller
1.65 - {
1.66 -public:
1.67 - IMPORT_C static void CheckInterimFormatFileNotCorruptL(RFile& aInterimFormatFile);
1.68 - IMPORT_C static void GetJavaMIDletInfoL(RFs& aFs, const TDesC& aFileName,TUint32& aJavaMIDletInfo_AmsAuthId,TUint32& aJavaMIDletInfo_MIDlet);
1.69 - IMPORT_C static CApaAppInfoFileWriter* NewInterimFormatFileWriterLC(RFs& aFs,const TDesC& aFileName,TUid aApplicationUid,TUint32 aJavaMIDletInfo_AmsAuthId,TInt aJavaMIDletInfo_MIDlet);
1.70 - };
1.71 -
1.72 -#endif // UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER
1.73 -
1.74 -#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.75 -
1.76 -#if !defined(IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER)
1.77 -// 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.78 -#define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER IMPORT_C
1.79 #endif
1.80
1.81 -/**
1.82 -@publishedAll
1.83 -@deprecated
1.84 -*/
1.85 -#ifdef _UNICODE
1.86 -#define KUidAppInfoFile KUidAppInfoFile16
1.87 -#else
1.88 -#define KUidAppInfoFile KUidAppInfoFile8
1.89 -#endif
1.90 -
1.91 -/**
1.92 -@publishedAll
1.93 -@deprecated
1.94 -*/
1.95 -const TUid KUidAppInfoFile8={268435562};
1.96 -
1.97 -/**
1.98 -@publishedAll
1.99 -@deprecated
1.100 -*/
1.101 -const TUid KUidAppInfoFile16={0x10003A38};
1.102 -
1.103 -/**
1.104 -@internalComponent
1.105 -*/
1.106 -const TUid KUidAppInfoFileVersion2={0x101fb032};
1.107 -
1.108 -/**
1.109 -@internalComponent
1.110 -*/
1.111 -enum TAifVersion
1.112 -// The order here is important, only ever APPEND to the list
1.113 - {
1.114 - EAifVersionOriginal,
1.115 - EAifVersionAddsDataType,
1.116 - EAifVersionAddsViewData,
1.117 - EAifVersionAddsFileOwnershipInfo
1.118 -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.119 - ,EAifVersionAddsJavaMIDletInfo
1.120 -#endif
1.121 - };
1.122 -
1.123 -class CApaAIFCaption : public CBase
1.124 -//
1.125 -// Represents a caption in an AIF during reading and writing of the file.
1.126 -/**
1.127 -@internalComponent
1.128 -*/
1.129 - {
1.130 -public:
1.131 - ~CApaAIFCaption();
1.132 - CApaAIFCaption();
1.133 - void ConstructL(TLanguage aLanguage,const TDesC& aCaption);
1.134 - static CApaAIFCaption* NewLC(TLanguage aLanguage,const TDesC& aCaption);
1.135 - void InternalizeL(RReadStream& aStream);
1.136 - void ExternalizeL(RWriteStream& aStream) const;
1.137 - TLanguage Language() const;
1.138 - TApaAppCaption Caption() const;
1.139 -public:
1.140 - HBufC* iCaption;
1.141 - TLanguage iLanguage;
1.142 - };
1.143 -
1.144 -class CApaAIFViewData : public CBase
1.145 -//
1.146 -// Represents the data associated with an application view described in an AIF
1.147 -// during reading and writing of the file.
1.148 -// implementation class
1.149 -/**
1.150 -@internalComponent
1.151 -*/
1.152 - {
1.153 -public:
1.154 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage) const;
1.155 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* IconByIndexL(TInt aIndex) const;
1.156 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfIcons() const;
1.157 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TUid ViewUid() const;
1.158 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt ScreenMode() const;
1.159 -public:
1.160 - ~CApaAIFViewData();
1.161 - static CApaAIFViewData* NewLC();
1.162 - static CApaAIFViewData* NewLC(const CApaAIFViewData& aSourceData);
1.163 - void InternalizeL(RReadStream& aStream);
1.164 - void ExternalizeL(RWriteStream& aStream) const;
1.165 - void SetScreenMode(TInt aScreenMode);
1.166 - void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption);
1.167 - void AddIconL(CApaMaskedBitmap& aIcon);
1.168 - void AddIconIndexL(TInt aIndex);
1.169 - void SetViewUid(TUid aUid);
1.170 - void LoadIconsL(const TDesC& aFileName, TUint aMbmOffset);
1.171 -private:
1.172 - CApaAIFViewData();
1.173 - void ConstructL();
1.174 - void ConstructL(const CApaAIFViewData& aSourceData);
1.175 -private:
1.176 - TInt iScreenMode;
1.177 - CArrayPtr<CApaMaskedBitmap>* iIconArray;
1.178 - CArrayPtr<CApaAIFCaption>* iCaptionArray;
1.179 - TUid iViewUid;
1.180 - CArrayFixFlat<TInt>* iIconIndexArray; // used for AIF version 2 format
1.181 - };
1.182 -
1.183 -class CApaAppInfoFile : public CBase
1.184 -/**
1.185 -@internalComponent
1.186 -*/
1.187 - {
1.188 -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.189 - friend class ForJavaMIDletInstaller;
1.190 -#endif
1.191 -public:
1.192 - ~CApaAppInfoFile();
1.193 - //
1.194 -protected:
1.195 - CApaAppInfoFile(RFs& aFs);
1.196 - void ConstructL();
1.197 -protected:
1.198 -
1.199 - class TCaptionHeader
1.200 - {
1.201 - public:
1.202 - void InternalizeL(RReadStream& aStream); // internalizes the header info only
1.203 - void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only
1.204 - public:
1.205 - TSwizzle<HBufC> iCaption;
1.206 - TLanguage iLanguage;
1.207 - };
1.208 - class TIconHeader
1.209 - {
1.210 - public:
1.211 - void InternalizeL(RReadStream& aStream); // internalizes the header info only
1.212 - void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only
1.213 - public:
1.214 - TSwizzle<CApaMaskedBitmap> iIcon; // Used for old AIF format Internalize
1.215 - TInt iIconSideInPixels;
1.216 - TSwizzle<CFbsBitmap> iIconMain; // Used for new AIF format
1.217 - TSwizzle<CFbsBitmap> iIconMask; // Used for new AIF format
1.218 - };
1.219 - class TDataTypeHeader
1.220 - {
1.221 - public:
1.222 - // header info only
1.223 - void InternalizeL(RReadStream& aStream); // internalizes the header info only
1.224 - void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only
1.225 - public:
1.226 - TSwizzle<TDataType> iDataType;
1.227 - TDataTypePriority iPriority;
1.228 - };
1.229 - class TViewDataHeader
1.230 - {
1.231 - public:
1.232 - void InternalizeL(RReadStream& aStream); // internalizes the header info only
1.233 - void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only
1.234 - public:
1.235 - TSwizzle<CApaAIFViewData> iViewData;
1.236 - };
1.237 - class TFileOwnershipInfoHeader
1.238 - {
1.239 - public:
1.240 - void InternalizeL(RReadStream& aStream); // internalizes the header info only
1.241 - void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only
1.242 - public:
1.243 - TSwizzle<HBufC> iOwnedFileName;
1.244 - };
1.245 -protected:
1.246 - RFs& iFs;
1.247 - CPersistentStore* iStore;
1.248 - CArrayFix<TCaptionHeader>* iCaptionHeaderArray;
1.249 - CArrayFix<TIconHeader>* iIconHeaderArray;
1.250 - CArrayFix<TDataTypeHeader>* iDataTypeHeaderArray;
1.251 - CArrayFix<TViewDataHeader>* iViewDataHeaderArray;
1.252 - CArrayFix<TFileOwnershipInfoHeader>* iFileOwnershipInfoHeaderArray;
1.253 - TApaAppCapability iCapability;
1.254 - };
1.255 -
1.256 -class CApaAppInfoFileReader : public CApaAppInfoFile
1.257 -/** Aif file reader.
1.258 -
1.259 -Aif files contain information about an application, including its icons and
1.260 -captions.
1.261 -
1.262 -An application can get a reader for its own aif file by calling CEikApplication::OpenAppInfoFileLC().
1.263 -
1.264 -@publishedAll
1.265 -@deprecated */
1.266 - {
1.267 -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.268 - friend class ForJavaMIDletInstaller;
1.269 -#endif
1.270 -public:
1.271 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid);
1.272 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewL(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid);
1.273 - //
1.274 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void Capability(TDes8& aInfo) const;
1.275 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage);
1.276 -
1.277 - 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.278 - // Not available until ER6
1.279 - 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.280 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfBitmaps() const;
1.281 -
1.282 - // Not available till ER5
1.283 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void DataTypesSupportedL(CArrayFix<TDataTypeWithPriority>& aTypeList) const;
1.284 - //
1.285 -
1.286 - // Not available till ER6.1
1.287 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetViewsL(CArrayPtr<CApaAIFViewData>& aViewList) const;
1.288 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetOwnedFilesL(CDesCArray& aOwnedFilesList) const;
1.289 - //
1.290 -
1.291 - // utility function
1.292 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void StretchDrawL(CFbsBitmap* aSource,CFbsBitmap* aTarget,TSize aSizeInPixels);
1.293 - //
1.294 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER ~CApaAppInfoFileReader();
1.295 -public:
1.296 - static void GetAifFileNameL(const TDesC& aFullName,TDes& aAifName);
1.297 -private:
1.298 - CApaAppInfoFileReader(RFs& aFs);
1.299 - void InternalizeL(RReadStream& aStream);
1.300 - void ConstructL(const TDesC& aFileName,TUid aUid);
1.301 - void LoadAifFileVersionTwoL(const TDesC& aFileName, TUid aMostDerivedUid);
1.302 - void AddIconHeadersL(const TDesC& aFileName, TInt32 aFileOffset, TInt aNumIcons);
1.303 -private:
1.304 - HBufC* iDefaultCaption;
1.305 - TUint8* iRomPointer;
1.306 - TInt iMbmOffset;
1.307 - HBufC* iAifFileName;
1.308 -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.309 - TUint32 iJavaMIDletInfo_AmsAuthId;
1.310 - TInt iJavaMIDletInfo_MIDlet;
1.311 -#endif
1.312 - };
1.313 -
1.314 -class CApaAppInfoFileWriter : public CApaAppInfoFile
1.315 -/**
1.316 -Aif file writer.
1.317 -
1.318 -This class writes application information, including icons and captions into the aif file.
1.319 -
1.320 -@publishedAll
1.321 -@deprecated */
1.322 - {
1.323 -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.324 - friend class ForJavaMIDletInstaller;
1.325 -#endif
1.326 -public:
1.327 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileWriter* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid);
1.328 - //
1.329 - IMPORT_C TInt SetCapability(const TDesC8& aInfo);
1.330 - IMPORT_C void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption);
1.331 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddIconL(const TDesC& aIconFileName);
1.332 - IMPORT_C void AddIconL(CApaMaskedBitmap& aIcon);
1.333 -
1.334 - // Not available till ER5
1.335 - IMPORT_C void AddDataTypeL(const TDataTypeWithPriority& aTypePriority);
1.336 - //
1.337 -
1.338 - // Not available till ER6.1
1.339 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid);
1.340 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid,TInt aScreenMode);
1.341 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewCaptionL(TLanguage aLanguage,const TDesC& aCaption,TUid aViewUid);
1.342 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewIconL(CApaMaskedBitmap& aIcon,TUid aViewUid);
1.343 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void StoreViewL(TUid aViewId);
1.344 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddOwnedFileL(const TDesC& aOwnedFileName);
1.345 - //
1.346 -
1.347 - IMPORT_C void StoreL();
1.348 - //
1.349 - IMPORT_C ~CApaAppInfoFileWriter();
1.350 -private:
1.351 - CApaAppInfoFileWriter(RFs& aFs);
1.352 - void ExternalizeL(RWriteStream& aStream) const;
1.353 - void ConstructL(const TDesC& aFileName,TUid aUid
1.354 -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.355 - ,TUid aMiddleUid=KUidAppInfoFile,TUint32 aJavaMIDletInfo_AmsAuthId=0,TInt aJavaMIDletInfo_MIDlet=0
1.356 -#endif
1.357 - );
1.358 -private:
1.359 - CStoreMap* iMap;
1.360 -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)
1.361 - TUint32 iJavaMIDletInfo_AmsAuthId;
1.362 - TInt iJavaMIDletInfo_MIDlet;
1.363 -#endif
1.364 - };
1.365 -
1.366 -class CApaAppCaptionFileReader : public CBase
1.367 -/**
1.368 -@internalComponent
1.369 -*/
1.370 - {
1.371 -public:
1.372 - CApaAppCaptionFileReader(RFs& aFs,const TDesC& iAppFileName);
1.373 - void GetCaptionsL(TApaAppCaption& aCaption,TApaAppCaption& aShortCaption);
1.374 -private:
1.375 - RFs& iFs;
1.376 - TFileName iCaptionFileName;
1.377 - };
1.378 -
1.379 -class AppInfoFileUtils
1.380 -// Internal utilities providing helper functions for non-ROM localisation
1.381 -/**
1.382 -@internalComponent
1.383 -*/
1.384 - {
1.385 -public: // For internal use only
1.386 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void GetAifFileName(const RFs& aFs,TDes& aAifName);
1.387 -public:
1.388 - static void GetAifFileNameL(const RFs& aFs,const TDesC& aFullName,TDes& aAifName);
1.389 - };
1.390 -#endif // #if (defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1)
1.391 -
1.392 -#endif