19 |
19 |
20 |
20 |
21 #include <CoreApplicationUIsSDKCRKeys.h> |
21 #include <CoreApplicationUIsSDKCRKeys.h> |
22 #include <btengdomaincrkeys.h> |
22 #include <btengdomaincrkeys.h> |
23 #include <centralrepository.h> |
23 #include <centralrepository.h> |
|
24 #include <ApUtils.h> |
24 #include "nsmltransport.h" |
25 #include "nsmltransport.h" |
25 #include "nsmlhttp.h" |
26 #include "nsmlhttp.h" |
26 #include "NSmlObexClient.h" |
27 #include "NSmlObexClient.h" |
27 #include "nsmlobexserverbinding.h" |
28 #include "nsmlobexserverbinding.h" |
28 #include "nsmlerror.h" |
29 #include "nsmlerror.h" |
29 #include <featmgr.h> |
30 #include <featmgr.h> |
30 #include <cmconnectionmethoddef.h> |
|
31 #include <cmmanagerext.h> |
|
32 #include <cmpluginwlandef.h> |
|
33 |
|
34 |
31 |
35 //============================================================ |
32 //============================================================ |
36 // CNSmlTransport definition |
33 // CNSmlTransport definition |
37 //============================================================ |
34 //============================================================ |
38 EXPORT_C CNSmlTransport::CNSmlTransport() |
35 EXPORT_C CNSmlTransport::CNSmlTransport() |
249 // used, so it is ok to use first one in the list. |
246 // used, so it is ok to use first one in the list. |
250 if ( aIAPIdArray->At(0) != 0xffffffff && aIAPIdArray->At(0) != 0xfffffffe ) |
247 if ( aIAPIdArray->At(0) != 0xffffffff && aIAPIdArray->At(0) != 0xfffffffe ) |
251 // 0xffffffff is same as -1 (KErrNotFound) and -2 for Default connection |
248 // 0xffffffff is same as -1 (KErrNotFound) and -2 for Default connection |
252 { |
249 { |
253 TUint32 accesspointId = aIAPIdArray->At(0); |
250 TUint32 accesspointId = aIAPIdArray->At(0); |
254 RCmManagerExt cmmanagerExt; |
251 CCommsDatabase* commDb = CCommsDatabase::NewL(); |
255 cmmanagerExt.OpenL(); |
252 CleanupStack::PushL(commDb); |
256 CleanupClosePushL(cmmanagerExt); |
253 CApUtils* aputils = CApUtils::NewLC( *commDb ); |
257 RCmConnectionMethodExt cm; |
254 TRAP_IGNORE( accesspointId = aputils->WapIdFromIapIdL( accesspointId ) ); |
258 cm = cmmanagerExt.ConnectionMethodL( accesspointId ); |
255 TApBearerType bearerType = aputils->BearerTypeL( accesspointId ); |
259 CleanupClosePushL( cm ); |
256 CleanupStack::PopAndDestroy( 2 ); //commdb,aputils |
260 TUint32 bearer = 0; |
|
261 |
|
262 TRAP_IGNORE( accesspointId = cm.GetIntAttributeL(CMManager::ECmIapId) ); |
|
263 bearer = cm.GetIntAttributeL( CMManager::ECmBearerType ); |
|
264 CleanupStack::PopAndDestroy( 2 ); //cmmanagerext,cm |
|
265 |
257 |
266 if ( bearer != KUidWlanBearerType ) |
258 if ( bearerType != EApBearerTypeWLAN ) |
267 { |
259 { |
268 errormsg = ETrue; |
260 errormsg = ETrue; |
269 } |
261 } |
270 } |
262 } |
271 } |
263 } |