|
1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * Defines for data types and attributes used in CmManagerShim interface. |
|
16 */ |
|
17 |
|
18 #ifndef CMMANAGERDEFINES_SHIM_H |
|
19 #define CMMANAGERDEFINES_SHIM_H |
|
20 |
|
21 // System includes |
|
22 |
|
23 #include <cmmanagerdef.h> |
|
24 #include <cmconnectionmethoddef.h> |
|
25 #include <cmpluginwlandef.h> |
|
26 #include <cmpluginpacketdatadef.h> |
|
27 |
|
28 // User includes |
|
29 |
|
30 // Macro for exporting Shim classes |
|
31 #ifdef BUILD_CONNECTIONSETTINGSSHIMDLL_DLL |
|
32 #define CONNECTIONSETTINGSSHIMDLL_EXPORT Q_DECL_EXPORT |
|
33 #else |
|
34 #define CONNECTIONSETTINGSSHIMDLL_EXPORT Q_DECL_IMPORT |
|
35 #endif |
|
36 |
|
37 /*! |
|
38 * Constants and data types used in CmManagerShim, CmDestinationShim, |
|
39 * and CmConnectionMethodShim interfaces. |
|
40 */ |
|
41 namespace CMManagerShim |
|
42 { |
|
43 //! Wlan bearer type |
|
44 const uint BearerTypeWlan = KUidWlanBearerType; |
|
45 //! Packet data bearer type |
|
46 const uint BearerTypePacketData = KUidPacketDataBearerType; |
|
47 |
|
48 /*! |
|
49 * Constants for maximum string lengths. |
|
50 */ |
|
51 //! Connection name length |
|
52 const uint CmNameLength = 30; |
|
53 //! Homepage address length |
|
54 const uint CmStartPageLength = 1024; |
|
55 //! IPv6 DNS address length |
|
56 const uint CmIP6NameServerLength = 50; |
|
57 //! Proxy server address length |
|
58 const uint CmProxyServerNameLength = 1024; |
|
59 //! Proxy server port number length |
|
60 const uint CmProxyPortNumberLength = 5; |
|
61 //! Packet data AP name length |
|
62 const uint PacketDataAPNameLength = 100; |
|
63 //! Packet data AP user name length |
|
64 const uint PacketDataIFAuthNameLength = 50; |
|
65 //! Packet data AP password length |
|
66 const uint PacketDataIFAuthPassLength = 50; |
|
67 //! WLAN SSID length |
|
68 const uint WlanSSIDLength = 32; |
|
69 |
|
70 /*! |
|
71 * Enumerations for connection method attributes. |
|
72 */ |
|
73 enum ConnectionMethodAttribute { |
|
74 // Common attributes |
|
75 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
76 CmBearerType = CMManager::ECmBearerType, |
|
77 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
78 CmName = CMManager::ECmName, |
|
79 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
80 CmIapId = CMManager::ECmIapId, |
|
81 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
82 CmHidden = CMManager::ECmHidden, |
|
83 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
84 CmProtected = CMManager::ECmProtected, |
|
85 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
86 CmNetworkId = CMManager::ECmNetworkId, |
|
87 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
88 CmId = CMManager::ECmId, |
|
89 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
90 CmStartPage = CMManager::ECmStartPage, |
|
91 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
92 CmIPv6Supported = CMManager::ECmIPv6Supported, |
|
93 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
94 CmIPDNSAddrFromServer = CMManager::ECmIPDNSAddrFromServer, |
|
95 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
96 CmIPAddress = CMManager::ECmIPAddress, |
|
97 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
98 CmIPNameServer1 = CMManager::ECmIPNameServer1, |
|
99 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
100 CmIPNameServer2 = CMManager::ECmIPNameServer2, |
|
101 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
102 CmIP6DNSAddrFromServer = CMManager::ECmIP6DNSAddrFromServer, |
|
103 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
104 CmIP6NameServer1 = CMManager::ECmIP6NameServer1, |
|
105 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
106 CmIP6NameServer2 = CMManager::ECmIP6NameServer2, |
|
107 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
108 CmProxyUsageEnabled = CMManager::ECmProxyUsageEnabled, |
|
109 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
110 CmProxyProtocolName = CMManager::ECmProxyProtocolName, |
|
111 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
112 CmProxyServerName = CMManager::ECmProxyServerName, |
|
113 //! From TConnectionMethodCommonAttributes in cmconnectionmethoddef.h |
|
114 CmProxyPortNumber = CMManager::ECmProxyPortNumber, |
|
115 |
|
116 // Packet data specific attributes |
|
117 /*! |
|
118 * From TConnectionMethodPacketDataSpecificAttributes in |
|
119 * cmpluginpacketdatadef.h |
|
120 */ |
|
121 PacketDataAPName = CMManager::EPacketDataAPName, |
|
122 /*! |
|
123 * From TConnectionMethodPacketDataSpecificAttributes in |
|
124 * cmpluginpacketdatadef.h |
|
125 */ |
|
126 PacketDataIFPromptForAuth = CMManager::EPacketDataIFPromptForAuth, |
|
127 /*! |
|
128 * From TConnectionMethodPacketDataSpecificAttributes in |
|
129 * cmpluginpacketdatadef.h |
|
130 */ |
|
131 PacketDataIFAuthName = CMManager::EPacketDataIFAuthName, |
|
132 /*! |
|
133 * From TConnectionMethodPacketDataSpecificAttributes in |
|
134 * cmpluginpacketdatadef.h |
|
135 */ |
|
136 PacketDataIFAuthPass = CMManager::EPacketDataIFAuthPass, |
|
137 /*! |
|
138 * From TConnectionMethodPacketDataSpecificAttributes in |
|
139 * cmpluginpacketdatadef.h |
|
140 */ |
|
141 PacketDataDisablePlainTextAuth = CMManager::EPacketDataDisablePlainTextAuth, |
|
142 |
|
143 // WLAN specific attributes |
|
144 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
145 WlanConnectionMode = CMManager::EWlanConnectionMode, |
|
146 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
147 WlanSSID = CMManager::EWlanSSID, |
|
148 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
149 WlanSecurityMode = CMManager::EWlanSecurityMode, |
|
150 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
151 WlanScanSSID = CMManager::EWlanScanSSID, |
|
152 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
153 WlanWepKey1InHex = CMManager::EWlanWepKey1InHex, |
|
154 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
155 WlanWepKey2InHex = CMManager::EWlanWepKey2InHex, |
|
156 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
157 WlanWepKey3InHex = CMManager::EWlanWepKey3InHex, |
|
158 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
159 WlanWepKey4InHex = CMManager::EWlanWepKey4InHex, |
|
160 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
161 WlanWepKey1InAscii = CMManager::EWlanWepKey1InAscii, |
|
162 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
163 WlanWepKey2InAscii = CMManager::EWlanWepKey2InAscii, |
|
164 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
165 WlanWepKey3InAscii = CMManager::EWlanWepKey3InAscii, |
|
166 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
167 WlanWepKey4InAscii = CMManager::EWlanWepKey4InAscii, |
|
168 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
169 WlanWepKeyIndex = CMManager::EWlanWepKeyIndex, |
|
170 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
171 WlanEnableWpaPsk = CMManager::EWlanEnableWpaPsk, |
|
172 //! From TConnectionMethodWlanSpecificAttributes in cmpluginwlandef.h |
|
173 WlanWpaPreSharedKey = CMManager::EWlanWpaPreSharedKey |
|
174 }; |
|
175 |
|
176 /*! |
|
177 * Enumerations for Wlan connection modes. Values come from |
|
178 * TWlanNetMode in cmpluginwlandef.h |
|
179 */ |
|
180 enum WlanConnMode { |
|
181 Adhoc = CMManager::EAdhoc, |
|
182 Infra = CMManager::EInfra |
|
183 }; |
|
184 |
|
185 /*! |
|
186 * Enumerations for Wlan security modes. Values come from |
|
187 * TWlanSecMode in cmpluginwlandef.h |
|
188 */ |
|
189 enum WlanSecMode { |
|
190 WlanSecModeOpen = CMManager::EWlanSecModeOpen, |
|
191 WlanSecModeWep = CMManager::EWlanSecModeWep, |
|
192 WlanSecMode802_1x = CMManager::EWlanSecMode802_1x, |
|
193 WlanSecModeWpa = CMManager::EWlanSecModeWpa, |
|
194 WlanSecModeWpa2 = CMManager::EWlanSecModeWpa2, |
|
195 WlanSecModeWapi = CMManager::EWlanSecModeWAPI |
|
196 }; |
|
197 |
|
198 /*! |
|
199 * Enumerations for Wlan WEP key index. Values come from |
|
200 * TWepKeyIndex in cmpluginwlandef.h |
|
201 */ |
|
202 enum WlanWepKeyIndex { |
|
203 WepKeyIndex1 = CMManager::EWepKeyIndex1, |
|
204 WepKeyIndex2 = CMManager::EWepKeyIndex2, |
|
205 WepKeyIndex3 = CMManager::EWepKeyIndex3, |
|
206 WepKeyIndex4 = CMManager::EWepKeyIndex4 |
|
207 }; |
|
208 |
|
209 /*! |
|
210 * Enumerations for SNAP metadata items. Values come from |
|
211 * TSnapMetadataField in cmmanagerdef.h |
|
212 */ |
|
213 enum SnapMetadataField { |
|
214 SnapMetadataInternet = CMManager::ESnapMetadataInternet, |
|
215 SnapMetadataHighlight = CMManager::ESnapMetadataHighlight, |
|
216 SnapMetadataHiddenAgent = CMManager::ESnapMetadataHiddenAgent, |
|
217 SnapMetadataDestinationIsLocalised = CMManager::ESnapMetadataDestinationIsLocalised, |
|
218 SnapMetadataPurpose = CMManager::ESnapMetadataPurpose |
|
219 }; |
|
220 |
|
221 /*! |
|
222 * Enumerations for SnapMetadataPurpose. Values come from |
|
223 * TSnapPurpose in cmmanagerdef.h |
|
224 */ |
|
225 enum SnapPurpose |
|
226 { |
|
227 SnapPurposeUnknown = CMManager::ESnapPurposeUnknown, |
|
228 SnapPurposeInternet = CMManager::ESnapPurposeInternet, |
|
229 SnapPurposeOperator = CMManager::ESnapPurposeOperator, |
|
230 SnapPurposeMMS = CMManager::ESnapPurposeMMS, |
|
231 SnapPurposeIntranet = CMManager::ESnapPurposeIntranet |
|
232 }; |
|
233 |
|
234 /*! |
|
235 * Enumerations for CM Manager protection levels. Values come from |
|
236 * TProtectionLevel in cmmanagerdef.h |
|
237 */ |
|
238 enum CmmProtectionLevel { |
|
239 ProtLevel0 = CMManager::EProtLevel0, |
|
240 ProtLevel1 = CMManager::EProtLevel1, |
|
241 ProtLevel2 = CMManager::EProtLevel2, |
|
242 ProtLevel3 = CMManager::EProtLevel3 |
|
243 }; |
|
244 } |
|
245 |
|
246 #endif // CMMANAGERDEFINES_SHIM_H |