author | hgs |
Tue, 02 Nov 2010 15:42:21 +0000 | |
changeset 301 | 172f33f13d7d |
parent 119 | 6e99f362aa46 |
permissions | -rw-r--r-- |
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
36
diff
changeset
|
1 |
// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 2 |
// All rights reserved. |
3 |
// This component and the accompanying materials are made available |
|
4 |
// under the terms of the License "Eclipse Public License v1.0" |
|
5 |
// which accompanies this distribution, and is available |
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// Hardware Configuration Respoitory Platform Independent Layer (PIL) |
|
36
538db54a451d
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
15 |
// Contains the hardware abstraction interface implemented in the variant PSL |
538db54a451d
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
16 |
// HCR kernel extension project. |
0 | 17 |
// |
18 |
||
19 |
/** |
|
20 |
@file hcr_hai.h |
|
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
21 |
Kernel side definitions for the HCR Symbian Hardware Abstraction |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
22 |
Interface (SHAI) for variants to implement when creating a HCR.dll binary. |
0 | 23 |
|
24 |
@publishedPartner |
|
25 |
*/ |
|
26 |
||
27 |
#ifndef HCR_HAI_H |
|
28 |
#define HCR_HAI_H |
|
29 |
||
30 |
||
31 |
// -- INCLUDES ---------------------------------------------------------------- |
|
32 |
||
33 |
||
34 |
#include <e32def.h> |
|
35 |
#include <e32err.h> |
|
36 |
||
37 |
#include <drivers/hcr.h> |
|
38 |
||
39 |
||
40 |
// -- CLASSES ----------------------------------------------------------------- |
|
41 |
||
42 |
||
43 |
/** |
|
44 |
The HCR namespace contains all the types and classes that make up the |
|
45 |
Kernel side Hardware Configuration Repository (HCR). |
|
46 |
*/ |
|
47 |
namespace HCR |
|
48 |
{ |
|
49 |
/** Constant defined for the first HCR repository format. Used for both |
|
50 |
compiled and file repositories. |
|
51 |
@see SRepositoryBase::iFormatVersion |
|
52 |
*/ |
|
53 |
static const TInt KRepositoryFirstVersion = 0x0001; |
|
54 |
||
55 |
/** Interface class defining the methods variants must implement to provide |
|
56 |
a complete HCR component for the targeted variant. |
|
57 |
The HCR supports three repositories and it is recommended that as few of |
|
58 |
these are employed for a variant to minimise lookup overheads as setting |
|
59 |
override flexibility is provided at the expense of lookup performance. |
|
60 |
*/ |
|
61 |
class MVariant |
|
62 |
{ |
|
63 |
public: |
|
64 |
||
65 |
/** |
|
66 |
Perform platform specific initialisation of variant HCR object. Invoked |
|
67 |
during HCR kernel extension module initialisation. |
|
68 |
Note: an error code from this method will prevent device startup. |
|
69 |
||
70 |
@return KErrNone if successful, or any other system wide error code. |
|
71 |
*/ |
|
72 |
virtual TInt Initialise() = 0; |
|
73 |
||
74 |
||
75 |
/** |
|
301 | 76 |
This method returns the virtual address of the compile time setting |
77 |
repository built into the variant HCR.dll project/binary. This |
|
78 |
repository is optional and may be absent in which case 0 should be |
|
79 |
returned in aAddr. |
|
0 | 80 |
|
301 | 81 |
@param aAddr out: the virtual address of a HCR::SRepositoryCompiled |
0 | 82 |
@return KErrNone if successful, output parameters valid, |
83 |
KErrNotSupported if a compile time repository is not supported, |
|
84 |
Any other system wide error code. |
|
85 |
@see HCR::SRepositoryCompiled |
|
86 |
*/ |
|
87 |
virtual TInt GetCompiledRepositoryAddress(TAny* & aAddr) = 0; |
|
88 |
||
89 |
/** |
|
90 |
This method is called at kernel initialisation and allows the PSL to |
|
91 |
disable the initial lookup of the built-in Core Image file repository. |
|
92 |
The PSL should return ETrue if the device/BSP is not going to support |
|
93 |
this repository. |
|
94 |
||
95 |
@return ETrue if the PIL should not find the repository in the ROM |
|
96 |
EFalse if the core image repository is to be used/supported |
|
97 |
*/ |
|
98 |
virtual TBool IgnoreCoreImgRepository () = 0; |
|
99 |
||
100 |
/** |
|
301 | 101 |
This method returns the virtual address of the override repository that |
102 |
provides override read-only values for the variant. Typically this |
|
103 |
repository is held in local media and shadowed into physical RAM by |
|
104 |
the OS loader and later reserved by the OS bootstrap. |
|
105 |
The implementation will find the physical address of the reserved RAM |
|
106 |
containing the HCR payload in the SSmrBank entry of the SSuperPageBase |
|
107 |
object. It will need to map this RAM into a DChunk to return a valid |
|
108 |
virtual address pointer. |
|
109 |
This repository is optional and may be absent in which case 0 should |
|
110 |
be returned in aAddr. |
|
0 | 111 |
|
301 | 112 |
@param aAddr out: the virtual address of the HCR::SRepositoryFile |
113 |
object inside the DChunk. |
|
0 | 114 |
@return KErrNone if successful, output parameters valid, |
301 | 115 |
KErrNotSupported if a override repository is not supported, |
0 | 116 |
Any other system wide error code. |
117 |
@see HCR::SRepositoryFile |
|
301 | 118 |
@see SSuperPageBase |
119 |
@see SSmrBank |
|
0 | 120 |
*/ |
121 |
virtual TInt GetOverrideRepositoryAddress(TAny* & aAddr) = 0; |
|
122 |
||
123 |
}; |
|
124 |
||
125 |
||
126 |
/** Union that holds one of the supported word-sized setting values |
|
127 |
*/ |
|
128 |
union UValueWord |
|
129 |
{ |
|
130 |
TInt32 iInt32; |
|
131 |
TInt16 iInt16; |
|
132 |
TInt8 iInt8; |
|
133 |
TBool iBool; |
|
134 |
TUint32 iUInt32; |
|
135 |
TUint16 iUInt16; |
|
136 |
TUint8 iUInt8; |
|
137 |
TLinAddr iAddress; |
|
138 |
}; |
|
139 |
||
140 |
/** Union that holds a pointer to one of the supported large value types |
|
141 |
*/ |
|
142 |
union UValueLarge |
|
143 |
{ |
|
144 |
TUint8* iData; //!< Array of TUint8 values |
|
145 |
TText8* iString8; //!< Array of TText8 values |
|
146 |
TInt32* iArrayInt32; //!< Array of TInt32 values |
|
147 |
TUint32* iArrayUInt32; //!< Array of TUInt32 values |
|
148 |
TInt64* iInt64; //!< Single TInt64 value |
|
149 |
TUint64* iUInt64; //!< Single TUint64 value |
|
150 |
}; |
|
151 |
||
152 |
/** Type used to hold the offset to a large setting value */ |
|
153 |
typedef TInt TValueLargeOffset; |
|
154 |
||
155 |
/** Union type used to hold either the literal value or a C++ pointer to |
|
156 |
the value. Used in compile time settings. |
|
157 |
*/ |
|
158 |
union USettingValueC |
|
159 |
{ |
|
160 |
UValueWord iLit; |
|
161 |
UValueLarge iPtr; |
|
162 |
}; |
|
163 |
||
164 |
/** Union type used to hold either the literal value or an offset from the |
|
119 | 165 |
start of the setting repository to the setting value. Used in file and RAM |
0 | 166 |
mapped settings. |
167 |
*/ |
|
168 |
union USettingValueF |
|
169 |
{ |
|
170 |
UValueWord iLit; |
|
171 |
TValueLargeOffset iOffset; |
|
172 |
}; |
|
173 |
||
174 |
/** Metadata flags to describe properties of the settings. |
|
175 |
*/ |
|
176 |
enum TSettingProperties |
|
177 |
{ |
|
178 |
EPropUndefined = 0x0000, //!< Unknown/not set |
|
179 |
||
180 |
// Following properties are not yet supported: |
|
181 |
EPropUnintiailised = 0x0001, //!< Setting has no initial value |
|
182 |
EPropModifiable = 0x0002, //!< Setting is set/writable |
|
183 |
EPropPersistent = 0x0004, //!< Setting is non-volatile |
|
184 |
||
185 |
// Following properties are not yet supported but are envisaged to be |
|
186 |
// implemented to support setting breaks/migration where settings |
|
187 |
// evolve and/or replace each other. |
|
188 |
EPropDeprecated = 0x1000, //!< Setting supported but deprecate, accessed logged |
|
189 |
EPropReplaced = 0x2000, //!< HCR redirected to retrieve value from replacement setting, access logged |
|
190 |
EPropWithdrawn = 0x4000 //!< Setting withdrawn, log & panic if accessed |
|
191 |
}; |
|
192 |
||
193 |
/** Provides base class for setting records. All setting structures start |
|
194 |
with this structure providing common setting attributes such as the |
|
195 |
identifier, type etc. |
|
196 |
*/ |
|
197 |
struct SSettingBase |
|
198 |
{ |
|
199 |
SSettingId iId; // Always the first member! |
|
200 |
TInt32 iType; //!< @see TSettingType |
|
201 |
TUint16 iFlags; //!< @See TSettingProperties |
|
202 |
TUint16 iLen; //!< Only valid if setting is a large type |
|
203 |
}; |
|
204 |
||
205 |
/** This structure holds a setting defined at compile time within a compile |
|
206 |
time defined repository. |
|
207 |
@see SRepositoryCompiled |
|
208 |
*/ |
|
209 |
struct SSettingC // : public SSettingBase |
|
210 |
{ |
|
211 |
SSettingBase iName; // Always the first member! |
|
212 |
USettingValueC iValue; |
|
213 |
}; |
|
214 |
||
119 | 215 |
/** This structure holds a setting defined in a file or memory within a file |
0 | 216 |
based repository. |
217 |
@see SRepositoryFile |
|
218 |
*/ |
|
219 |
struct SSettingF // : public SSettingBase |
|
220 |
{ |
|
221 |
SSettingBase iName; // Always the first member! |
|
222 |
USettingValueF iValue; |
|
223 |
}; |
|
224 |
||
225 |
||
226 |
/** Metadata flags to describe the repository type/layout. |
|
227 |
*/ |
|
228 |
enum TRepositoryType |
|
229 |
{ |
|
230 |
EReposUndefined = 0x00, //!< Unknown |
|
231 |
||
232 |
EReposCompiled = 'c', //!< Repository is in Compiled layout |
|
233 |
EReposFile = 'f' //!< Repository is in File layout |
|
234 |
}; |
|
235 |
||
236 |
/** Metadata flags to describe repository properties. |
|
237 |
*/ |
|
238 |
enum TRepositoryProperties |
|
239 |
{ |
|
240 |
EReposClear = 0x0000, //!< Unknown |
|
241 |
EReposReadOnly = 0x0001, //!< Repository is read-only |
|
242 |
EReposNonVolatile = 0x0002 //!< Repository is writable, saved to flash |
|
243 |
}; |
|
244 |
||
245 |
/** Provides base class for setting repositories. All repository structures |
|
246 |
start with this structure providing common repository attributes such as the |
|
247 |
type , size etc. |
|
248 |
*/ |
|
249 |
struct SRepositoryBase |
|
250 |
{ |
|
251 |
TUint8 iFingerPrint[3]; //!< Fixed value {'H', 'C', 'R'} |
|
252 |
TUint8 iType; //!< @See TRepositoryType |
|
253 |
TInt16 iFormatVersion; //!< Format/layout version number |
|
254 |
TUint16 iFlags; //!< @see TRepositoryProperties |
|
255 |
TInt32 iNumSettings; //!< Number of settings in repository |
|
256 |
}; |
|
257 |
||
258 |
||
259 |
/** This class is the root object for a compile time defined settings |
|
260 |
repository and is used in the PSL HCR variant object to hold read-only |
|
261 |
compile time settings. This type of repository makes use of pointers to |
|
262 |
structures and arrays as it is compiled. |
|
263 |
*/ |
|
264 |
struct SRepositoryCompiled |
|
265 |
{ |
|
266 |
SRepositoryBase* iHdr; // Always the first member! |
|
267 |
SSettingC* iOrderedSettingList; |
|
268 |
}; |
|
269 |
||
270 |
||
271 |
/** Byte type for large setting value data |
|
272 |
*/ |
|
273 |
typedef TUint8 TSettingData; |
|
274 |
||
275 |
/** This class is the root object for a file or memory based settings |
|
276 |
repository. It assumes the repository has a flat contiguous layout and |
|
119 | 277 |
employes offsets to data rather then C++ pointers as in compiled |
0 | 278 |
setting repositories. |
279 |
All offsets are relative to the address of &iHdr member. |
|
280 |
The last two members are expected to be present in the file/memory as shown |
|
281 |
although there is no way at type definition time to know the size of these |
|
282 |
members, hence they are commented out and will be accessed in the code |
|
283 |
using memory/file address arithmetic. |
|
284 |
*/ |
|
285 |
struct SRepositoryFile |
|
286 |
{ |
|
287 |
SRepositoryBase iHdr; // Always the first member! |
|
288 |
TUint32 iLSDfirstByteOffset; |
|
289 |
TUint32 iLSDataSize; |
|
290 |
TUint32 iReserved[3]; |
|
291 |
// SSettingF iOrderedSettingList[iNumSettings]; |
|
292 |
// TSettingData iLargeSettingsData[iLSDataSize]; |
|
293 |
}; |
|
294 |
||
295 |
} |
|
296 |
||
297 |
||
298 |
// -- GLOBALS ----------------------------------------------------------------- |
|
299 |
||
300 |
||
301 |
/** |
|
302 |
Global entry point used by PIL to create the variant HCR object in the PSL |
|
303 |
code. |
|
304 |
||
305 |
@return Pointer to variant is successfully, 0 otherwise. |
|
306 |
@see HCR::MVariant |
|
307 |
*/ |
|
308 |
GLREF_C HCR::MVariant* CreateHCRVariant(); |
|
309 |
||
310 |
||
311 |
||
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
312 |
// -- MACROS ------------------------------------------------------------------ |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
313 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
314 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
315 |
/** |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
316 |
Global macro for use in defining the finger print field of a |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
317 |
SRepositoryCompiled.iHdr instance in the PSL compiled repository static data. |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
318 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
319 |
Macro used in PSL source as the value for the finger print field in a |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
320 |
compiled repository. |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
321 |
@see SRepositoryBase::iFingerPrint |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
322 |
*/ |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
323 |
#define HCR_FINGER_PRINT {'H', 'C', 'R'} |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
324 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
325 |
/** |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
326 |
Global macro for use in defining the finger print field of a |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
327 |
SRepositoryCompiled.iHdr instance in the PSL compiled repository static data. |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
328 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
329 |
Macro used in PSL source as the value for the finger print field in a |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
330 |
compiled repository. |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
331 |
@see SRepositoryBase::iFingerPrint |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
332 |
*/ |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
333 |
#define HCR_SETTING_COUNT(a) (sizeof(a)/sizeof(SSettingC)) |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
334 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
335 |
/** |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
336 |
Global macro for use in setting the flags attribute of a SSettingC |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
337 |
instance in the PSL compiled repository static data. |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
338 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
339 |
@see HCR::MVariant |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
340 |
@see HCR::SRepositoryCompiled |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
341 |
*/ |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
342 |
#define HCR_FLAGS_NONE HCR::EPropUndefined |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
343 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
344 |
/** |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
345 |
Global macro for use in setting the length attribute of a SSettingC |
90
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
36
diff
changeset
|
346 |
instance in the PSL compiled repository static data. Used when the setting is |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
36
diff
changeset
|
347 |
a word sized setting and the size field is Not Applicable. Not to be used |
947f0dc9f7a8
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
36
diff
changeset
|
348 |
for large data settings i.e. where size > 4bytes, i.e. type > 0xffff. |
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
349 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
350 |
@see HCR::MVariant |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
351 |
@see HCR::SRepositoryCompiled |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
352 |
*/ |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
353 |
#define HCR_LEN_NA 0x0000 |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
354 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
355 |
/** |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
356 |
Global macro for use in defining the actual integer (word) value of a SettingC |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
357 |
instance in the PSL compiled repository static data. This can be used to |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
358 |
simplify the setting table for settings with the type flag |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
359 |
set to one of 0x0000FFFF. |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
360 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
361 |
@see HCR::MVariant |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
362 |
@see HCR::SRepositoryCompiled |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
363 |
*/ |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
364 |
#define HCR_WVALUE(a) static_cast<TInt32>(a) |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
365 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
366 |
/** |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
367 |
Global macro for use in assigning the address of a large setting value to an |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
368 |
instance of a SettingC in the PSL compiled repository static data. This can be |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
369 |
used to simplify the setting table for settings with the type flag |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
370 |
set to one of 0xFFFF0000. |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
371 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
372 |
@see HCR::MVariant |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
373 |
@see HCR::SRepositoryCompiled |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
374 |
*/ |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
375 |
#define HCR_LVALUE(a) reinterpret_cast<TInt32>(a) |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
376 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
377 |
/** |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
378 |
Global macro used as last entry in a PSL compiled repository static data. |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
379 |
The main use of this is to avoid the "last entry needs no following comma" issue |
119 | 380 |
and to aid HCR initial thread testing. |
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
381 |
The Setting (0xffffffff, 0xffffffff) was choosen as it should never appear in |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
382 |
a real variant as this category UID can not be allocated offically. Testers |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
383 |
should also be aware of the special use of this setting so as not to use it in |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
384 |
a file repository. |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
385 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
386 |
@see HCR::MVariant |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
387 |
@see HCR::SRepositoryCompiled |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
388 |
*/ |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
389 |
#define HCR_LAST_SETTING { { { 0xFFFFFFFF, 0xFFFFFFFF}, ETypeUInt32, HCR_FLAGS_NONE, HCR_LEN_NA }, { { 0x4C415354 }}} |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
390 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
391 |
|
0 | 392 |
#endif // HCR_HAI_H |