1 /* |
1 /* |
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
136 TBool& aLanOrWlan, |
107 TBool& aLanOrWlan, |
137 const RAvailableIAPList& aAvailableIAPList, |
108 const RAvailableIAPList& aAvailableIAPList, |
138 CMPMServerSession& aSession ); |
109 CMPMServerSession& aSession ); |
139 |
110 |
140 /** |
111 /** |
141 * Checks if given IAP is Easy WLan. |
|
142 * @since 3.1 |
|
143 * @param aIapId IAP Id to be checked |
|
144 * @return ETrue if IAP Id is Easy WLan, otherwise EFalse. |
|
145 */ |
|
146 TBool CheckEasyWLanL( TUint32 aIapId ) const; |
|
147 |
|
148 /** |
|
149 * Find all snap ids |
112 * Find all snap ids |
150 * |
113 * |
151 * @since 3.2 |
114 * @since 3.2 |
152 * @param aSnapIds Array which will be set to |
115 * @param aSnapIds Array which will be set to |
153 * contain the snap ids |
116 * contain the snap ids |
193 * @since 3.2 |
156 * @since 3.2 |
194 * @param Handle to session class. |
157 * @param Handle to session class. |
195 */ |
158 */ |
196 void CheckWLANIapL(CMPMServerSession& aSession); |
159 void CheckWLANIapL(CMPMServerSession& aSession); |
197 |
160 |
198 /** |
|
199 * Checks whether there is a wlan iap which matches the |
|
200 * parameter settings. |
|
201 * |
|
202 * @since 3.2 |
|
203 * @param aSsid Wlan iap ssid |
|
204 * @param aSecMode Wlan iap security mode |
|
205 * @param aConnMode Wlan iap connection mode |
|
206 */ |
|
207 TUint32 CheckWLANIapWithSsidL( TWlanSsid& aSsid, |
|
208 TUint32 aSecMode, |
|
209 TWlanNetMode aConnMode ); |
|
210 |
|
211 /** |
|
212 * Stores easy wlan settings into commsdat. |
|
213 * |
|
214 * @since 3.2 |
|
215 * @param aSsid Wlan iap ssid, stored in used ssid field |
|
216 * @param aSecMode Wlan iap security mode |
|
217 * @param aConnMode Wlan iap connection mode |
|
218 * @param aWepData WEP key data |
|
219 * @param aEnableWpaPsk Wlan iap enable psk mode |
|
220 * @param aWpaPsk Wlan iap wpa psk |
|
221 * @param aWpaKeyLen Wlan iap wpa key length |
|
222 */ |
|
223 void SetEasyWlanDataL( const TWlanSsid& aSsid, |
|
224 TUint aSecMode, |
|
225 TWlanNetMode aConnMode, |
|
226 TWepKeyData aWepData, |
|
227 TUint aEnableWpaPsk, |
|
228 const TDesC8& aWpaPsk, |
|
229 TUint aWpaKeyLen ); |
|
230 |
|
231 /** |
|
232 * Returns Easy wlan service record id. |
|
233 * @since 3.2 |
|
234 * @param aDb DB session |
|
235 * return Easy wlan service record id |
|
236 */ |
|
237 TUint32 FindEasyWlanServiceIdL( CMDBSession* aDb ); |
|
238 |
|
239 /** |
161 /** |
240 * Checks if the HiddenAgent metadata is set for this IAP. |
162 * Checks if the HiddenAgent metadata is set for this IAP. |
241 * @since 3.2 |
163 * @since 3.2 |
242 * @param aIapId Given Iap Id |
164 * @param aIapId Given Iap Id |
243 * return ETrue if HiddenAgent metadata is set, otherwise EFalse. |
165 * return ETrue if HiddenAgent metadata is set, otherwise EFalse. |
289 void SearchDNEntriesWithEmbeddedL( TUint32 aSnap, |
211 void SearchDNEntriesWithEmbeddedL( TUint32 aSnap, |
290 RArray<TNetIap>& aDestNetIaps, |
212 RArray<TNetIap>& aDestNetIaps, |
291 RArray<TNetIap>& aEmbeddedIaps ); |
213 RArray<TNetIap>& aEmbeddedIaps ); |
292 |
214 |
293 /** |
215 /** |
294 * Checks if given IAP is WLAN and whether it is EasyWLAN IAP. |
216 * Checks if given IAP is WLAN. |
295 * @since 3.2 |
217 * @since 3.2 |
296 * @param aIapId IAP Id to be checked |
218 * @param aIapId IAP Id to be checked |
297 * @return One of TWlanIapType values depending on |
219 * @return One of TWlanIapType values |
298 * whether IAP is WLAN or Easy WLAN |
|
299 */ |
220 */ |
300 TWlanIapType CheckWlanL( TUint32 aIapId ) const; |
221 TWlanIapType CheckWlanL( TUint32 aIapId ) const; |
301 |
222 |
302 /** |
223 /** |
303 * Removes categorised IAPs from the list of available IAPs. |
224 * Removes categorised IAPs from the list of available IAPs. |
341 * @param aSnapId Snap id |
262 * @param aSnapId Snap id |
342 * @return True or false depending on destination type. |
263 * @return True or false depending on destination type. |
343 */ |
264 */ |
344 TBool IsInternetSnapL( TUint32 aIapId, TUint32 aSnapId ); |
265 TBool IsInternetSnapL( TUint32 aIapId, TUint32 aSnapId ); |
345 |
266 |
346 /** |
267 /** |
|
268 * Returns true if destination is intranet. |
|
269 * @param aSnapId Snap id |
|
270 * @return True or false depending on destination type. |
|
271 */ |
|
272 TBool IsIntranetSnapL( TUint32 aSnapId ); |
|
273 |
|
274 /** |
347 * Used to get bearer type of the iap. |
275 * Used to get bearer type of the iap. |
348 * |
276 * |
349 * @since 5.0 |
277 * @since 5.0 |
350 * @param aIapId Iap id of the connection. |
278 * @param aIapId Iap id of the connection. |
351 * @return Type of the bearer. |
279 * @return Type of the bearer. |
352 */ |
280 */ |
353 TMPMBearerType GetBearerTypeL( TUint32 aIapId ); |
281 TMPMBearerType GetBearerTypeL( TUint32 aIapId ); |
354 |
|
355 /** |
|
356 * Check if all active connections are in same snap. |
|
357 * |
|
358 * @since 5.0 |
|
359 * @param aActiveBMConns Array of active connections. |
|
360 * @param aSnapId Destination where connections are located is returned |
|
361 * to this parameter. |
|
362 * @param aServer Handle to server class. |
|
363 * @return ETrue if all active connections are in same snap. |
|
364 */ |
|
365 TBool AreActiveIapsInSameSnapL ( RArray<TActiveBMConn>& aActiveBMConns, |
|
366 TUint32& aSnapId, |
|
367 CMPMServer& aServer ); |
|
368 |
|
369 /** |
|
370 * Select active connection according to snap priorities. |
|
371 * |
|
372 * @since 5.0 |
|
373 * @param aSnapId Snap id of the connection. |
|
374 * @param aActiveBMConns Array of active connections. |
|
375 * @param aActiveIapId Iap id of the selected active connection. |
|
376 * @param aActiveSnapId Snap id of the selected active connection. |
|
377 * @param aActiveBearerType Bearer type of the selected active connection. |
|
378 * @param aSession Handle to session class. |
|
379 */ |
|
380 void SelectActiveConnectionL ( const TUint32 aSnapId, |
|
381 RArray<TActiveBMConn>& aActiveBMConns, |
|
382 TUint32& aActiveIapId, |
|
383 TUint32& aActiveSnapId, |
|
384 TMPMBearerType& aActiveBearerType, |
|
385 CMPMServerSession& aSession ); |
|
386 |
282 |
387 /** |
283 /** |
388 * Check if snap is empty. |
284 * Check if snap is empty. |
389 * |
285 * |
390 * @since 5.0 |
286 * @since 5.0 |
467 * Returns Snap id of destination requested in Snap purpose. |
363 * Returns Snap id of destination requested in Snap purpose. |
468 * @since 5.2 |
364 * @since 5.2 |
469 * @return Snap id. |
365 * @return Snap id. |
470 */ |
366 */ |
471 TUint32 DestinationIdL( CMManager::TSnapPurpose aSnapPurpose ); |
367 TUint32 DestinationIdL( CMManager::TSnapPurpose aSnapPurpose ); |
|
368 |
|
369 /** |
|
370 * Returns the default connection values |
|
371 * @since symbian^4 |
|
372 * @param aType The type of the id |
|
373 * @param aId The id of the snap or the iap |
|
374 */ |
|
375 void GetDefaultConnectionL( TCmDefConnType& aType, TUint32& aId ); |
472 |
376 |
473 /** |
377 /** |
474 * Finds the real IAP behind the virtual IAP. |
378 * Finds the real IAP behind the virtual IAP. |
475 * @since 3.1 |
379 * @since 3.1 |
476 * @param aVirtualIapId Given virtual Iap Id |
380 * @param aVirtualIapId Given virtual Iap Id |
521 * @return Pointer to allocated record structure. |
425 * @return Pointer to allocated record structure. |
522 */ |
426 */ |
523 CCDRecordBase* LoadLinkedRecordL( CMDBSession& aSession, |
427 CCDRecordBase* LoadLinkedRecordL( CMDBSession& aSession, |
524 TMDBElementId aElementId ); |
428 TMDBElementId aElementId ); |
525 |
429 |
526 /** |
|
527 * Sets WEP key data for WLAN service record |
|
528 * @since 9.1 |
|
529 * @param aFormatId Id of the field where WEP format is stored |
|
530 * @param aKeyId Id of the field where WEP key is stored |
|
531 * @param aWepData WEP key value |
|
532 * @param aWepFormat WEP key format value |
|
533 * @param aRecord WLAN service record where data is stored |
|
534 */ |
|
535 void SetWepKeyL( TMDBElementId aFormatId, |
|
536 TMDBElementId aKeyId, |
|
537 TWlanWepKey aWepData, |
|
538 TUint aWepFormat, |
|
539 CMDBGenericRecord* aRecord ); |
|
540 |
|
541 /** |
|
542 * Converts ascii data to hex |
|
543 * @since 3.2 |
|
544 * @param aSource Ascii data |
|
545 * @param aDest hex data to be filled in |
|
546 */ |
|
547 void ConvertAsciiToHex( const TDesC8& aSource, |
|
548 HBufC8* aDest ); |
|
549 |
|
550 /** |
430 /** |
551 * Returns true if destination is internet. |
431 * Returns true if destination is internet. |
552 * @since 5.1 |
432 * @since 5.1 |
553 * @param aDb Handle to database session. |
433 * @param aDb Handle to database session. |
554 * @param aSnapId Destination id |
434 * @param aSnapId Destination id |
572 * @since 5.0 |
452 * @since 5.0 |
573 * @param aDb Handle to database session |
453 * @param aDb Handle to database session |
574 * @param aWlanArray Array of wlan bearers |
454 * @param aWlanArray Array of wlan bearers |
575 */ |
455 */ |
576 void BuildWlanArrayL(CMDBSession& aDb, RArray<TUint32>& aWlanArray); |
456 void BuildWlanArrayL(CMDBSession& aDb, RArray<TUint32>& aWlanArray); |
577 |
|
578 /** |
|
579 * Get snap id for the iap |
|
580 * |
|
581 * @since 5.0 |
|
582 * @param aIapId Id of the iap |
|
583 * @return Id of the snap |
|
584 */ |
|
585 TUint32 GetSnapIdL( TUint32 aIapId ); |
|
586 |
457 |
587 /** |
458 /** |
588 * C++ default constructor. |
459 * C++ default constructor. |
589 */ |
460 */ |
590 CMPMCommsDatAccess(); |
461 CMPMCommsDatAccess(); |