equal
deleted
inserted
replaced
37 #include "wsfwlanmonitorobserver.h" |
37 #include "wsfwlanmonitorobserver.h" |
38 #include "wsflogger.h" |
38 #include "wsflogger.h" |
39 #include "wsfactivewaiter.h" |
39 #include "wsfactivewaiter.h" |
40 #include "wsfservercloseradapter.h" |
40 #include "wsfservercloseradapter.h" |
41 #include "wsfcommon.h" |
41 #include "wsfcommon.h" |
|
42 #include "wsfict.h" |
42 |
43 |
43 |
44 |
44 // LOCAL DEFINITIONS |
45 // LOCAL DEFINITIONS |
45 using namespace CMManager; |
46 using namespace CMManager; |
46 |
47 |
146 { |
147 { |
147 |
148 |
148 } |
149 } |
149 |
150 |
150 delete iClientPoll; |
151 delete iClientPoll; |
|
152 |
|
153 delete iIct; |
151 |
154 |
152 iCmMgr.Close(); |
155 iCmMgr.Close(); |
153 } |
156 } |
154 |
157 |
155 |
158 |
177 { |
180 { |
178 LOG_ENTERFN( "CWsfWlanBearerConnectionMonitor::ConstructL" ); |
181 LOG_ENTERFN( "CWsfWlanBearerConnectionMonitor::ConstructL" ); |
179 iCmMgr.OpenL(); |
182 iCmMgr.OpenL(); |
180 iMonitor.ConnectL(); |
183 iMonitor.ConnectL(); |
181 iClientPoll = CPeriodic::NewL( CActive::EPriorityLow ); |
184 iClientPoll = CPeriodic::NewL( CActive::EPriorityLow ); |
|
185 iIct = CWsfIct::NewL(); |
182 FindWlanBearerConnectedL(); |
186 FindWlanBearerConnectedL(); |
183 } |
187 } |
184 |
188 |
185 |
189 |
186 // --------------------------------------------------------------------------- |
190 // --------------------------------------------------------------------------- |
423 |
427 |
424 // --------------------------------------------------------------------------- |
428 // --------------------------------------------------------------------------- |
425 // CWsfWlanBearerConnectionMonitor::ConnectBearer |
429 // CWsfWlanBearerConnectionMonitor::ConnectBearer |
426 // --------------------------------------------------------------------------- |
430 // --------------------------------------------------------------------------- |
427 // |
431 // |
428 TInt CWsfWlanBearerConnectionMonitor::ConnectBearer( TUint32 aIapId ) |
432 TInt CWsfWlanBearerConnectionMonitor::ConnectBearer( TUint32 aIapId, |
|
433 TBool aConnectOnly, |
|
434 TBool aTestAccessPoint ) |
429 { |
435 { |
430 LOG_ENTERFN( "CWsfWlanBearerConnectionMonitor::ConnectBearer" ); |
436 LOG_ENTERFN( "CWsfWlanBearerConnectionMonitor::ConnectBearer" ); |
431 |
437 |
432 if ( iConnectionId != KNoConnection || iConnectingState != ECsIdle ) |
438 if ( iConnectionId != KNoConnection || iConnectingState != ECsIdle ) |
433 { |
439 { |
443 iConnIap = aIapId; |
449 iConnIap = aIapId; |
444 iConnectingState = ECsNotConnected; |
450 iConnectingState = ECsNotConnected; |
445 iConnectionOwned = ETrue; |
451 iConnectionOwned = ETrue; |
446 iServerCloser.WaitForOwnedConnection( ETrue ); |
452 iServerCloser.WaitForOwnedConnection( ETrue ); |
447 |
453 |
|
454 TRAPD( err, iIct->InitializeIctL( aTestAccessPoint, aIapId, |
|
455 aConnectOnly ) ); |
|
456 if ( err ) |
|
457 { |
|
458 LOG_WRITEF( "Ict initialization failed error = %d", err ); |
|
459 } |
|
460 |
448 SetActive(); |
461 SetActive(); |
449 TRequestStatus* status = &iStatus; |
462 TRequestStatus* status = &iStatus; |
450 User::RequestComplete( status, KErrNone ); |
463 User::RequestComplete( status, KErrNone ); |
451 } |
464 } |
452 |
465 |
1067 TTimeIntervalMicroSeconds32( KClientPollInterval ), |
1080 TTimeIntervalMicroSeconds32( KClientPollInterval ), |
1068 TTimeIntervalMicroSeconds32( KClientPollInterval ), |
1081 TTimeIntervalMicroSeconds32( KClientPollInterval ), |
1069 TCallBack( CheckClientCount, this ) ); |
1082 TCallBack( CheckClientCount, this ) ); |
1070 |
1083 |
1071 LOG_WRITE( "connection client polling started" ); |
1084 LOG_WRITE( "connection client polling started" ); |
1072 |
1085 |
1073 // notify observers of the connection name |
1086 // notify observers of the connection name |
1074 iObserver->ConnectionEstablishedL( iWlanNetworkName ); |
1087 iObserver->ConnectionEstablishedL( iWlanNetworkName ); |
1075 |
1088 |
|
1089 TRAPD( err, iIct->TestConnectedAccessPointL( iConnIap ) ); |
|
1090 if ( err ) |
|
1091 { |
|
1092 LOG_WRITEF( "Ict start failed error = %d", err ); |
|
1093 } |
|
1094 |
1076 iConnectingState = ECsConnected; |
1095 iConnectingState = ECsConnected; |
1077 break; |
1096 break; |
1078 } |
1097 } |
1079 |
1098 |
1080 default: |
1099 default: |