wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtimpl.cpp
changeset 36 1c425781161e
parent 14 00032b836e76
child 32 c01ef7f246fd
equal deleted inserted replaced
35:5e6ba967244f 36:1c425781161e
    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 %
    19 * %version: 32 %
    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;
  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