|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Common definitions for IMPSSAPSettingsStore. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef IMPSSAPSETTINGSSTOREDEFINITIONS_H |
|
20 #define IMPSSAPSETTINGSSTOREDEFINITIONS_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 // DATATYPES |
|
26 |
|
27 // Settings that have fixed identifier. |
|
28 enum TFixedSAPSetting |
|
29 { |
|
30 ESAPAddress = 0, |
|
31 ESAPName, |
|
32 ESAPPort, |
|
33 ESAPUserId, |
|
34 ESAPUserPassword, |
|
35 EHTTPProxyAddress, |
|
36 EHTTPProxyPort, |
|
37 EHTTPProxyUserId, |
|
38 EHTTPProxyUserPassword, |
|
39 EProtection, |
|
40 EAccessPoint, |
|
41 EClientId, |
|
42 EHighLevelServices, |
|
43 EServerAuthenticationName, |
|
44 EServerAuthenticationPassword, |
|
45 EServerAcceptedContentType, |
|
46 EAuthorizationMode |
|
47 }; |
|
48 |
|
49 // Key-Value pairs |
|
50 enum TKeyValuePairs |
|
51 { |
|
52 EKeyValuePairBase = 256 |
|
53 }; |
|
54 |
|
55 // CONSTS |
|
56 |
|
57 // The actual encryption key for passwords comes when |
|
58 // we XOR the IMEI with key defined in headers. |
|
59 // This is the defined key, and must be 24 bytes long! |
|
60 // As secure as any other string that could be defined here. |
|
61 _LIT8( KSAPPwdDefinedKey, "SSS_20&%qwerty!+mbnzxcvb" ); |
|
62 |
|
63 // Fake IMEI for the cases we're unable to get the |
|
64 // real serial number from the device. |
|
65 _LIT( KSAPFakeIMEI, "012345678912345" ); |
|
66 |
|
67 // Base Id ranges for settings |
|
68 const TUint32 KSAPSettingsPECBaseId = 0x30; // PEC SAP settings base id |
|
69 //bits: 11110 0000000000 0000000000000000 |
|
70 const TUint32 KSAPSettingsIMBaseId = 0x31; // IM SAP settings base id |
|
71 //bits: 11111 0000000000 0000000000000000 |
|
72 |
|
73 // Offsets for bitwise operations |
|
74 const TUint32 KBaseOffset = 26; //Base offset |
|
75 const TUint32 KSAPOffset = 16; //SAP offset |
|
76 |
|
77 // Masks for bitwise operations |
|
78 // |
|
79 //Mask for finding Key-value pairs |
|
80 //bits: 111111 1111111111 1111111100000000 |
|
81 const TUint32 KSAPPairsMask = 0xFFFFFF00; |
|
82 |
|
83 //Mask for finding SAP Uids |
|
84 //bits: 000000 1111111111 0000000000000000 |
|
85 const TUint32 KSAPUidMask = 0x03FF0000; |
|
86 |
|
87 //Mask for finding SAP type |
|
88 //bits: 000000 0011111111 1111111111111111 |
|
89 const TUint32 KSAPTypeMask = 0x00FFFFFF; |
|
90 |
|
91 //Mask for getting SAP type |
|
92 //bits: 111111 0000000000 0000000000000000 |
|
93 const TUint32 KSAPBaseMask = 0xFC000000; |
|
94 |
|
95 //Mask for populating either IM or PEC SAPs |
|
96 //bits: 111111 0000000000 1111111111111111 |
|
97 const TUint32 KSAPPopulateGroupMask = 0xFC00FFFF; |
|
98 |
|
99 //Mask for populating all SAPs |
|
100 //bits: 000000 0000000000 1111111111111111 |
|
101 const TUint32 KSAPPopulateAllMask = 0x0000FFFF; |
|
102 |
|
103 //Mask for checking SAP existence |
|
104 const TUint32 KSAPExistsMask = 0xFFFFFFFF; |
|
105 |
|
106 // Id of the default PEC SAP setting. |
|
107 //bits: 110000 0000000000 0000000000001110 |
|
108 const TUint32 KDefaultPECSAPId = 0xC000000E; |
|
109 |
|
110 // Id of the default IM SAP setting. |
|
111 //bits: 110001 0000000000 0000000000001111 |
|
112 const TUint32 KDefaultIMSAPId = 0xC400000F; |
|
113 |
|
114 // Id for the highest SAP Uid |
|
115 //bits: 110010 0000000000 0000000000001111 |
|
116 const TUint32 KSAPHighestUid = 0xC800000F; |
|
117 |
|
118 // Id of the first storable SAP. |
|
119 const TUint32 KFirstSAPId = 0x00000001; |
|
120 // Id of the last storable SAP. (10 bits) |
|
121 const TUint32 KLastSAPId = 0x000003FF; |
|
122 |
|
123 |
|
124 //Id of the encryption key in key repository |
|
125 const TUint32 KEncryptionKeyId = 0x00000001; |
|
126 |
|
127 // Maximum length of the encryption key |
|
128 const TInt KSAPPwdKeyMaxLength = 50; |
|
129 |
|
130 // field separator for flat key-valuepair structure |
|
131 _LIT( KKeyValuePairFieldSeparator, "||" ); |
|
132 |
|
133 // Maximum length of TInt textual representation |
|
134 const TInt KTIntMaxLengthTextual = 10; |
|
135 |
|
136 #endif // IMPSSAPSETTINGSSTOREDEFINITIONS_H |
|
137 |