|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "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 // HALSettings header file |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef HALFILES_H |
|
24 #define HALFILES_H |
|
25 |
|
26 #include <hal.h> |
|
27 #include <f32file.h> |
|
28 #include <bautils.h> |
|
29 #include <bacline.h> |
|
30 |
|
31 /** HAL attributes data folder */ |
|
32 _LIT(KHalFilePath,"_:\\private\\102825B1\\"); |
|
33 /** HAL attributes data file name */ |
|
34 _LIT(KHalFileName,"HAL.DAT"); |
|
35 /** Buffer descriptor for holding complete HAL data file path and name. */ |
|
36 typedef TBuf<28> THalFileName; |
|
37 |
|
38 |
|
39 |
|
40 /**First 4 bytes in the HAL.DAT ('h' 'a' 'l' and version '0') |
|
41 */ |
|
42 const TUint32 typePrefix = 0x006C6168; |
|
43 |
|
44 /** |
|
45 HALSettings HAL.DAT header class |
|
46 This class is used to validate HAL.DAT file header |
|
47 */ |
|
48 class THalFileHeader |
|
49 { |
|
50 TUint32 iMachineUid; //Machine UID |
|
51 TUint32 iTypePrefix; //HAL.DAT first 4 bytes 'h' 'a' 'l' and version '0' |
|
52 public: |
|
53 THalFileHeader(TUint32 aMachineUid, TUint32 aTypePrefix); |
|
54 TInt ValidateHeader(); |
|
55 }; |
|
56 |
|
57 /** Function to manage command line |
|
58 */ |
|
59 TInt HALSettingsManager(); |
|
60 |
|
61 /** Function to Initialise HAL attribute |
|
62 */ |
|
63 TInt InitialiseHAL(); |
|
64 /** Function to Persist HAL attribute |
|
65 */ |
|
66 TInt PersistHAL(); |
|
67 |
|
68 |
|
69 #endif //HALFILES_H |