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