528 // CWlanMgmtImpl::RunProtectedSetup |
528 // CWlanMgmtImpl::RunProtectedSetup |
529 // --------------------------------------------------------- |
529 // --------------------------------------------------------- |
530 // |
530 // |
531 void CWlanMgmtImpl::RunProtectedSetup( |
531 void CWlanMgmtImpl::RunProtectedSetup( |
532 TRequestStatus& aStatus, |
532 TRequestStatus& aStatus, |
533 const TWlanSsid& aSsid, |
533 TUint32 aId, |
534 const TWlanWpsPin& aWpsPin, |
|
535 CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) |
534 CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) |
536 { |
535 { |
537 TraceDump( INFO_LEVEL, ( _L( "CWlanMgmtImpl::RunProtectedSetup()" ) ) ); |
536 TraceDump( INFO_LEVEL, ( _L( "CWlanMgmtImpl::RunProtectedSetup()" ) ) ); |
538 |
537 |
539 aCredentials.Reset(); |
538 aCredentials.Reset(); |
540 |
539 |
541 aStatus = KRequestPending; |
540 aStatus = KRequestPending; |
542 iPendingProtectedSetupStatus = &aStatus; |
541 iPendingProtectedSetupStatus = &aStatus; |
543 |
542 |
544 iProtectedSetupRequest = new CProtectedSetupRequest( *this, iServer, aSsid, aWpsPin, aCredentials ); |
543 iProtectedSetupRequest = new CProtectedSetupRequest( *this, iServer, aId, aCredentials ); |
545 if ( !iProtectedSetupRequest ) |
544 if ( !iProtectedSetupRequest ) |
546 { |
545 { |
547 User::RequestComplete( iPendingProtectedSetupStatus, KErrNoMemory ); |
546 User::RequestComplete( iPendingProtectedSetupStatus, KErrNoMemory ); |
548 iPendingProtectedSetupStatus = NULL; |
547 iPendingProtectedSetupStatus = NULL; |
549 return; |
548 return; |
1209 // might leave. |
1208 // might leave. |
1210 // |
1209 // |
1211 CProtectedSetupRequest::CProtectedSetupRequest( |
1210 CProtectedSetupRequest::CProtectedSetupRequest( |
1212 CWlanMgmtImpl& aCallback, |
1211 CWlanMgmtImpl& aCallback, |
1213 RWLMServer& aServer, |
1212 RWLMServer& aServer, |
1214 const TWlanSsid& aSsid, |
1213 TUint32 aId, |
1215 const TWlanWpsPin& aWpsPin, |
|
1216 CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) : |
1214 CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) : |
1217 CActive( CActive::EPriorityStandard ), |
1215 CActive( CActive::EPriorityStandard ), |
1218 iCallback( aCallback ), |
1216 iCallback( aCallback ), |
1219 iServer( aServer ), |
1217 iServer( aServer ), |
1220 iSsid( aSsid ), |
1218 iServiceId( aId ), |
1221 iWpsPin( aWpsPin ), |
|
1222 iCredentials ( aCredentials ), |
1219 iCredentials ( aCredentials ), |
1223 iCredentialsBuf( iCredentialsStorage ) |
1220 iCredentialsBuf( iCredentialsStorage ) |
1224 { |
1221 { |
1225 TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::CProtectedSetupRequest()" ) ) ); |
1222 TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::CProtectedSetupRequest()" ) ) ); |
1226 CActiveScheduler::Add( this ); |
1223 CActiveScheduler::Add( this ); |
1239 // --------------------------------------------------------- |
1236 // --------------------------------------------------------- |
1240 // |
1237 // |
1241 void CProtectedSetupRequest::IssueRequest() |
1238 void CProtectedSetupRequest::IssueRequest() |
1242 { |
1239 { |
1243 TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::IssueRequest()" ) ) ); |
1240 TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::IssueRequest()" ) ) ); |
1244 iServer.RunProtectedSetup( iStatus, iSsid, iWpsPin, iCredentialsBuf ); |
1241 iServer.RunProtectedSetup( iStatus, iServiceId, iCredentialsBuf ); |
1245 SetActive(); |
1242 SetActive(); |
1246 } |
1243 } |
1247 |
1244 |
1248 // --------------------------------------------------------- |
1245 // --------------------------------------------------------- |
1249 // CProtectedSetupRequest::RunL |
1246 // CProtectedSetupRequest::RunL |