14 // Hardware Configuration Respoitory Platform Independent Layer (PIL) |
14 // Hardware Configuration Respoitory Platform Independent Layer (PIL) |
15 // |
15 // |
16 |
16 |
17 /** |
17 /** |
18 @file hcr_hai.h |
18 @file hcr_hai.h |
19 Kernel side definitions for the HCR Hardware Abstraction Interface for variants |
19 Kernel side definitions for the HCR Symbian Hardware Abstraction |
20 to implement when creating a HCR.dll binary. |
20 Interface (SHAI) for variants to implement when creating a HCR.dll binary. |
21 |
|
22 |
|
23 =============================================================== |
|
24 ____ _ _ |
|
25 | _ \ _ __ ___ | |_ ___ | |_ _ _ _ __ ___ |
|
26 | |_) | '__/ _ \| __/ _ \| __| | | | '_ \ / _ \ |
|
27 | __/| | | (_) | || (_) | |_| |_| | |_) | __/ |
|
28 |_| |_| \___/ \__\___/ \__|\__, | .__/ \___| |
|
29 |___/|_| |
|
30 |
|
31 This API and component are in an early release form. As such |
|
32 this component, it's API/HAI interfaces and internal design |
|
33 are not fixed and may be updated/changed at any time before |
|
34 final release. |
|
35 |
|
36 =============================================================== |
|
37 |
|
38 |
21 |
39 @publishedPartner |
22 @publishedPartner |
40 @prototype |
23 @prototype |
41 */ |
24 */ |
42 |
25 |
187 /** Metadata flags to describe properties of the settings. |
164 /** Metadata flags to describe properties of the settings. |
188 */ |
165 */ |
189 enum TSettingProperties |
166 enum TSettingProperties |
190 { |
167 { |
191 EPropUndefined = 0x0000, //!< Unknown/not set |
168 EPropUndefined = 0x0000, //!< Unknown/not set |
192 |
|
193 |
169 |
194 // Following properties are not yet supported: |
170 // Following properties are not yet supported: |
195 EPropUnintiailised = 0x0001, //!< Setting has no initial value |
171 EPropUnintiailised = 0x0001, //!< Setting has no initial value |
196 EPropModifiable = 0x0002, //!< Setting is set/writable |
172 EPropModifiable = 0x0002, //!< Setting is set/writable |
197 EPropPersistent = 0x0004, //!< Setting is non-volatile |
173 EPropPersistent = 0x0004, //!< Setting is non-volatile |
321 */ |
297 */ |
322 GLREF_C HCR::MVariant* CreateHCRVariant(); |
298 GLREF_C HCR::MVariant* CreateHCRVariant(); |
323 |
299 |
324 |
300 |
325 |
301 |
|
302 // -- MACROS ------------------------------------------------------------------ |
|
303 |
|
304 |
|
305 /** |
|
306 Global macro for use in defining the finger print field of a |
|
307 SRepositoryCompiled.iHdr instance in the PSL compiled repository static data. |
|
308 |
|
309 Macro used in PSL source as the value for the finger print field in a |
|
310 compiled repository. |
|
311 @see SRepositoryBase::iFingerPrint |
|
312 */ |
|
313 #define HCR_FINGER_PRINT {'H', 'C', 'R'} |
|
314 |
|
315 /** |
|
316 Global macro for use in defining the finger print field of a |
|
317 SRepositoryCompiled.iHdr instance in the PSL compiled repository static data. |
|
318 |
|
319 Macro used in PSL source as the value for the finger print field in a |
|
320 compiled repository. |
|
321 @see SRepositoryBase::iFingerPrint |
|
322 */ |
|
323 #define HCR_SETTING_COUNT(a) (sizeof(a)/sizeof(SSettingC)) |
|
324 |
|
325 /** |
|
326 Global macro for use in setting the flags attribute of a SSettingC |
|
327 instance in the PSL compiled repository static data. |
|
328 |
|
329 @see HCR::MVariant |
|
330 @see HCR::SRepositoryCompiled |
|
331 */ |
|
332 #define HCR_FLAGS_NONE HCR::EPropUndefined |
|
333 |
|
334 /** |
|
335 Global macro for use in setting the length attribute of a SSettingC |
|
336 instance in the PSL compiled repository static data. |
|
337 |
|
338 @see HCR::MVariant |
|
339 @see HCR::SRepositoryCompiled |
|
340 */ |
|
341 #define HCR_LEN_NA 0x0000 |
|
342 |
|
343 /** |
|
344 Global macro for use in defining the actual integer (word) value of a SettingC |
|
345 instance in the PSL compiled repository static data. This can be used to |
|
346 simplify the setting table for settings with the type flag |
|
347 set to one of 0x0000FFFF. |
|
348 |
|
349 @see HCR::MVariant |
|
350 @see HCR::SRepositoryCompiled |
|
351 */ |
|
352 #define HCR_WVALUE(a) static_cast<TInt32>(a) |
|
353 |
|
354 /** |
|
355 Global macro for use in assigning the address of a large setting value to an |
|
356 instance of a SettingC in the PSL compiled repository static data. This can be |
|
357 used to simplify the setting table for settings with the type flag |
|
358 set to one of 0xFFFF0000. |
|
359 |
|
360 @see HCR::MVariant |
|
361 @see HCR::SRepositoryCompiled |
|
362 */ |
|
363 #define HCR_LVALUE(a) reinterpret_cast<TInt32>(a) |
|
364 |
|
365 /** |
|
366 Global macro used as last entry in a PSL compiled repository static data. |
|
367 The main use of this is to avoid the "last entry needs no following comma" issue |
|
368 and to aid HCR initial thead testing. |
|
369 The Setting (0xffffffff, 0xffffffff) was choosen as it should never appear in |
|
370 a real variant as this category UID can not be allocated offically. Testers |
|
371 should also be aware of the special use of this setting so as not to use it in |
|
372 a file repository. |
|
373 |
|
374 @see HCR::MVariant |
|
375 @see HCR::SRepositoryCompiled |
|
376 */ |
|
377 #define HCR_LAST_SETTING { { { 0xFFFFFFFF, 0xFFFFFFFF}, ETypeUInt32, HCR_FLAGS_NONE, HCR_LEN_NA }, { { 0x4C415354 }}} |
|
378 |
|
379 |
326 #endif // HCR_HAI_H |
380 #endif // HCR_HAI_H |