wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtimpl.cpp
branchRCL_3
changeset 42 a828660c511c
parent 34 13838cf40350
child 43 d3d7683d16f5
equal deleted inserted replaced
40:5fb7af913dfd 42:a828660c511c
    14 * Description:  Implementation of wlan management API
    14 * Description:  Implementation of wlan management API
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 31.1.2 %
    19 * %version: 34 %
    20 */
    20 */
    21 
    21 
    22 // INCLUDE FILES
    22 // INCLUDE FILES
    23 #include <e32std.h>
    23 #include <e32std.h>
    24 #include <ecom/implementationproxy.h>
    24 #include <ecom/implementationproxy.h>
   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;
  1208 // might leave.
  1209 // might leave.
  1209 //
  1210 //
  1210 CProtectedSetupRequest::CProtectedSetupRequest( 
  1211 CProtectedSetupRequest::CProtectedSetupRequest( 
  1211     CWlanMgmtImpl& aCallback, 
  1212     CWlanMgmtImpl& aCallback, 
  1212     RWLMServer& aServer, 
  1213     RWLMServer& aServer, 
  1213     TUint32 aId,
  1214     const TWlanSsid& aSsid,
       
  1215     const TWlanWpsPin& aWpsPin, 
  1214     CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) :
  1216     CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials ) :
  1215     CActive( CActive::EPriorityStandard ),
  1217     CActive( CActive::EPriorityStandard ),
  1216     iCallback( aCallback ),
  1218     iCallback( aCallback ),
  1217     iServer( aServer ),
  1219     iServer( aServer ),
  1218     iServiceId( aId ),
  1220     iSsid( aSsid ),
       
  1221     iWpsPin( aWpsPin ),
  1219     iCredentials ( aCredentials ),
  1222     iCredentials ( aCredentials ),
  1220     iCredentialsBuf( iCredentialsStorage )
  1223     iCredentialsBuf( iCredentialsStorage )
  1221     {
  1224     {
  1222     TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::CProtectedSetupRequest()" ) ) );
  1225     TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::CProtectedSetupRequest()" ) ) );
  1223     CActiveScheduler::Add( this );
  1226     CActiveScheduler::Add( this );
  1236 // ---------------------------------------------------------
  1239 // ---------------------------------------------------------
  1237 //
  1240 //
  1238 void CProtectedSetupRequest::IssueRequest()
  1241 void CProtectedSetupRequest::IssueRequest()
  1239     {
  1242     {
  1240     TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::IssueRequest()" ) ) );
  1243     TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::IssueRequest()" ) ) );
  1241     iServer.RunProtectedSetup( iStatus, iServiceId, iCredentialsBuf );
  1244     iServer.RunProtectedSetup( iStatus, iSsid, iWpsPin, iCredentialsBuf );
  1242     SetActive();
  1245     SetActive();
  1243     }
  1246     }
  1244 
  1247 
  1245 // ---------------------------------------------------------
  1248 // ---------------------------------------------------------
  1246 // CProtectedSetupRequest::RunL
  1249 // CProtectedSetupRequest::RunL