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 TUint32 aId, |
533 const TWlanSsid& aSsid, |
|
534 const TWlanWpsPin& aWpsPin, |
534 CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) |
535 CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) |
535 { |
536 { |
536 TraceDump( INFO_LEVEL, ( _L( "CWlanMgmtImpl::RunProtectedSetup()" ) ) ); |
537 TraceDump( INFO_LEVEL, ( _L( "CWlanMgmtImpl::RunProtectedSetup()" ) ) ); |
537 |
538 |
538 aCredentials.Reset(); |
539 aCredentials.Reset(); |
539 |
540 |
540 aStatus = KRequestPending; |
541 aStatus = KRequestPending; |
541 iPendingProtectedSetupStatus = &aStatus; |
542 iPendingProtectedSetupStatus = &aStatus; |
542 |
543 |
543 iProtectedSetupRequest = new CProtectedSetupRequest( *this, iServer, aId, aCredentials ); |
544 iProtectedSetupRequest = new CProtectedSetupRequest( *this, iServer, aSsid, aWpsPin, aCredentials ); |
544 if ( !iProtectedSetupRequest ) |
545 if ( !iProtectedSetupRequest ) |
545 { |
546 { |
546 User::RequestComplete( iPendingProtectedSetupStatus, KErrNoMemory ); |
547 User::RequestComplete( iPendingProtectedSetupStatus, KErrNoMemory ); |
547 iPendingProtectedSetupStatus = NULL; |
548 iPendingProtectedSetupStatus = NULL; |
548 return; |
549 return; |
1138 // might leave. |
1139 // might leave. |
1139 // |
1140 // |
1140 CProtectedSetupRequest::CProtectedSetupRequest( |
1141 CProtectedSetupRequest::CProtectedSetupRequest( |
1141 CWlanMgmtImpl& aCallback, |
1142 CWlanMgmtImpl& aCallback, |
1142 RWLMServer& aServer, |
1143 RWLMServer& aServer, |
1143 TUint32 aId, |
1144 const TWlanSsid& aSsid, |
|
1145 const TWlanWpsPin& aWpsPin, |
1144 CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) : |
1146 CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) : |
1145 CActive( CActive::EPriorityStandard ), |
1147 CActive( CActive::EPriorityStandard ), |
1146 iCallback( aCallback ), |
1148 iCallback( aCallback ), |
1147 iServer( aServer ), |
1149 iServer( aServer ), |
1148 iServiceId( aId ), |
1150 iSsid( aSsid ), |
|
1151 iWpsPin( aWpsPin ), |
1149 iCredentials ( aCredentials ), |
1152 iCredentials ( aCredentials ), |
1150 iCredentialsBuf( iCredentialsStorage ) |
1153 iCredentialsBuf( iCredentialsStorage ) |
1151 { |
1154 { |
1152 TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::CProtectedSetupRequest()" ) ) ); |
1155 TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::CProtectedSetupRequest()" ) ) ); |
1153 CActiveScheduler::Add( this ); |
1156 CActiveScheduler::Add( this ); |
1166 // --------------------------------------------------------- |
1169 // --------------------------------------------------------- |
1167 // |
1170 // |
1168 void CProtectedSetupRequest::IssueRequest() |
1171 void CProtectedSetupRequest::IssueRequest() |
1169 { |
1172 { |
1170 TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::IssueRequest()" ) ) ); |
1173 TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::IssueRequest()" ) ) ); |
1171 iServer.RunProtectedSetup( iStatus, iServiceId, iCredentialsBuf ); |
1174 iServer.RunProtectedSetup( iStatus, iSsid, iWpsPin, iCredentialsBuf ); |
1172 SetActive(); |
1175 SetActive(); |
1173 } |
1176 } |
1174 |
1177 |
1175 // --------------------------------------------------------- |
1178 // --------------------------------------------------------- |
1176 // CProtectedSetupRequest::RunL |
1179 // CProtectedSetupRequest::RunL |