wlanutilities/wlansniffer/engine/server/src/wsfsession.cpp
branchRCL_3
changeset 25 f28ada11abbf
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
       
     1 /*
       
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Implementation of CWsfSession
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 //  CLASS HEADER
       
    20 #include "wsfsession.h"
       
    21 #include "wsfserver.h"
       
    22 #include "wsfengine.h"
       
    23 #include "wsfservercommon.h"
       
    24 #include "wsfwlaninfo.h"
       
    25 #include "wsflogger.h"
       
    26 
       
    27 
       
    28 // ----------------------------------------------------------------------------
       
    29 // CWsfSession::CWsfSession
       
    30 // ----------------------------------------------------------------------------
       
    31 //
       
    32 CWsfSession::CWsfSession( CWsfServer& aServer ): 
       
    33     iServer( aServer ), 
       
    34     iRequestNotify( EFalse ),
       
    35     iEnabledScanning( EFalse )
       
    36     {
       
    37     }
       
    38 
       
    39 
       
    40 // ----------------------------------------------------------------------------
       
    41 // CWsfSession::NewL
       
    42 // ----------------------------------------------------------------------------
       
    43 //
       
    44 CWsfSession* CWsfSession::NewL( CWsfServer& aServer )
       
    45     {
       
    46     CWsfSession* thisPtr = new (ELeave) CWsfSession( aServer );
       
    47     CleanupStack::PushL( thisPtr );
       
    48     thisPtr->ConstructL();
       
    49     CleanupStack::Pop( thisPtr );
       
    50     return thisPtr; 
       
    51     }
       
    52 
       
    53     
       
    54 // ----------------------------------------------------------------------------
       
    55 // CWsfSession::~CWsfSession
       
    56 // ----------------------------------------------------------------------------
       
    57 //
       
    58 CWsfSession::~CWsfSession()
       
    59     {
       
    60     LOG_ENTERFN( "CWsfSession::~CWsfSession" );
       
    61     CancelPendingTasks();
       
    62     iServer.Engine()->Detach( this );
       
    63     iServer.ClientRelease();
       
    64     iEventQueue.Close();
       
    65     }
       
    66 
       
    67 
       
    68 // ----------------------------------------------------------------------------
       
    69 // CWsfSession::ConstructL
       
    70 // ----------------------------------------------------------------------------
       
    71 //
       
    72 void CWsfSession::ConstructL()
       
    73     {
       
    74     iServer.ClientAttach();
       
    75     iServer.Engine()->AttachL( this );
       
    76     iEnabledScanning = iServer.Engine()->IsScanning();
       
    77     }
       
    78 
       
    79 
       
    80 // ----------------------------------------------------------------------------
       
    81 // CWsfSession::ServiceL
       
    82 // ----------------------------------------------------------------------------
       
    83 //
       
    84 void CWsfSession::ServiceL( const RMessage2& aMessage )
       
    85     {
       
    86     TRAPD( err, DispatchMessageL( aMessage ) );
       
    87     if ( err != KErrNone )
       
    88         {
       
    89         LOG_WRITEF( "CWsfSession::ServiceL DispatchMessageL leave error = %d", 
       
    90                     err );
       
    91         aMessage.Complete( err );
       
    92         }
       
    93     }
       
    94 
       
    95 
       
    96 // ----------------------------------------------------------------------------
       
    97 // CWsfSession::DispatchMessageL
       
    98 // ----------------------------------------------------------------------------
       
    99 //
       
   100 void CWsfSession::DispatchMessageL( const RMessage2& aMessage )
       
   101     {
       
   102     LOG_ENTERFN( "CWsfSession::DispatchMessageL" );
       
   103     LOG_WRITEF( "CWsfSession::DispatchMessageL message = %d", 
       
   104                 aMessage.Function() );
       
   105     
       
   106     switch ( aMessage.Function() )
       
   107         {
       
   108         case ESnifferCmdWlanDataSize:
       
   109             {
       
   110             ReplyWlanDataSizeL( aMessage );
       
   111             aMessage.Complete( KErrNone );
       
   112             break;
       
   113             }
       
   114 
       
   115         case ESnifferCmdNotifyEvents:
       
   116             {
       
   117             RequestNotifyL( aMessage );    
       
   118             break;
       
   119             }
       
   120 
       
   121         case ESnifferCmdCancelNotifyEvents:
       
   122             {
       
   123             CancelNotifyEvents();    
       
   124             aMessage.Complete( KErrNone );
       
   125             break;
       
   126             }
       
   127 
       
   128         case ESnifferCmdGetWlanInfo:
       
   129             {
       
   130             WriteWlanDataL( aMessage );
       
   131             aMessage.Complete( KErrNone );
       
   132             break;
       
   133             }    
       
   134 
       
   135         case ESnifferCmdConnect:
       
   136             {
       
   137             ConnectWlanL( aMessage );
       
   138             aMessage.Complete( KErrNone );    
       
   139             break;
       
   140             }
       
   141 
       
   142         case ESnifferCmdDisconnect:
       
   143             {
       
   144             DisconnectWlanL( aMessage );
       
   145             aMessage.Complete( KErrNone );    
       
   146             break;
       
   147             }
       
   148 
       
   149         case ESnifferCmdActivateScan:
       
   150             {
       
   151             ActivateScanL();    
       
   152             aMessage.Complete( KErrNone );
       
   153             break;
       
   154             }
       
   155 
       
   156         case ESnifferCmdDisableScan:
       
   157             {
       
   158             DisableScanL();
       
   159             aMessage.Complete( KErrNone ); 
       
   160             break;
       
   161             }
       
   162 
       
   163         case ESnifferCmdConnectionName:
       
   164             {
       
   165             GetConnectedAccountNameL( aMessage );          
       
   166             aMessage.Complete( KErrNone );    
       
   167             break;     
       
   168             }
       
   169 
       
   170         case ESnifferCmdCancelAll:
       
   171             {
       
   172             CancelPendingTasks();
       
   173             aMessage.Complete( KErrNone );
       
   174             break;
       
   175             }             
       
   176 
       
   177         case ESnifferCmdRequestScan:
       
   178             {
       
   179             RequestScanL( aMessage );
       
   180             aMessage.Complete( KErrNone );
       
   181             break;
       
   182             }
       
   183 
       
   184         case ESnifferCmdMonitorAp:
       
   185             {
       
   186             MonitorApL( aMessage );
       
   187             aMessage.Complete( KErrNone );                
       
   188             break;    
       
   189             }
       
   190 
       
   191         case ESnifferCmdIsScanEnabled:
       
   192             {
       
   193             ReplyIsScanningL(aMessage); 
       
   194             aMessage.Complete( KErrNone );    
       
   195             break;
       
   196             }
       
   197         
       
   198         case ESnifferCmdIsConnected:
       
   199             {
       
   200             IsConnectedL( aMessage );
       
   201             aMessage.Complete( KErrNone );
       
   202             break;
       
   203             }
       
   204             
       
   205         case ESnifferCmdConnectedDetails:
       
   206             {
       
   207             GetConnectedDetailsL( aMessage );
       
   208             aMessage.Complete( KErrNone );
       
   209             break;
       
   210             }
       
   211             
       
   212         case ESnifferCmdAbortScanning:
       
   213             {
       
   214             AbortScanning();
       
   215             aMessage.Complete( KErrNone );
       
   216             break;
       
   217             }
       
   218             
       
   219         case ESnifferCmdAbortConnecting:
       
   220             {
       
   221             AbortConnectingL();
       
   222             aMessage.Complete( KErrNone );
       
   223             break;
       
   224             }
       
   225             
       
   226         case ESnifferCmdSetIapPersistence:
       
   227             {
       
   228             SetIapPersistenceL( aMessage );
       
   229             aMessage.Complete( KErrNone );
       
   230             break;
       
   231             }
       
   232             
       
   233         case ESnifferCmdControlDisconnectTimer:
       
   234             {
       
   235             ControlDisconnectTimerL( aMessage );
       
   236             aMessage.Complete( KErrNone );
       
   237             break;
       
   238             }
       
   239             
       
   240        
       
   241         // requests we don't understand at all are a different thing,
       
   242         // so panic the client here, this function also completes the message
       
   243         default:
       
   244             {
       
   245             _LIT( KWsfServerPanic, "WlanSnifferServer" );
       
   246             aMessage.Panic( KWsfServerPanic, 1 );
       
   247             }
       
   248             
       
   249         }
       
   250     }
       
   251 
       
   252 
       
   253 // ---------------------------------------------------------------------------
       
   254 // CWsfSession::RequestNotify
       
   255 // ---------------------------------------------------------------------------
       
   256 //        
       
   257 void CWsfSession::RequestNotifyL( const RMessage2& aMessage )
       
   258     {
       
   259     LOG_ENTERFN( "CWsfSession::RequestNotifyL" );
       
   260     if ( !iRequestNotify )
       
   261         {
       
   262         LOG_WRITE( "CWsfSession::RequestNotifyL first subscription" );
       
   263         // first subscription
       
   264         iRequestNotify = ETrue;
       
   265         iEventQueue.Reset();
       
   266         }
       
   267         
       
   268     // initial value / processing finished
       
   269     iProcessingEvent = EFalse;
       
   270     
       
   271     // store the message to be completed
       
   272     iNotifyChangesMessage = aMessage;
       
   273     
       
   274     // deal with the queue
       
   275     if ( iEventQueue.Count() )
       
   276         {
       
   277         LOG_WRITE( "CWsfSession::RequestNotifyL queue not empty" );
       
   278         NotifyClientL();
       
   279         }
       
   280     }
       
   281     
       
   282     
       
   283 // ---------------------------------------------------------------------------
       
   284 // CWsfSession::CancelNotifyEvents
       
   285 // ---------------------------------------------------------------------------
       
   286 //        
       
   287 void CWsfSession::CancelNotifyEvents()
       
   288     {
       
   289     LOG_ENTERFN( "CWsfSession::CancelNotifyEvents" );
       
   290     
       
   291     // interrupt ongoing event handling
       
   292     iProcessingEvent = EFalse;
       
   293     if ( !iNotifyChangesMessage.IsNull() )
       
   294         {
       
   295         iNotifyChangesMessage.Complete( KErrCancel );
       
   296         }
       
   297 
       
   298     // unsubscribe
       
   299     iRequestNotify = EFalse;
       
   300     
       
   301     // drop all waiting events
       
   302     iEventQueue.Reset();
       
   303     }
       
   304 
       
   305 
       
   306 // ---------------------------------------------------------------------------
       
   307 // CWsfSession::CancelPendingTasks
       
   308 // ---------------------------------------------------------------------------
       
   309 //        
       
   310 void CWsfSession::CancelPendingTasks()
       
   311     {
       
   312     LOG_ENTERFN( "CWsfSession::CancelPendingTasks" );
       
   313     if ( iEnabledScanning )
       
   314         {
       
   315         TRAP_IGNORE( iServer.Engine()->DisableScanningL() );
       
   316         }
       
   317 
       
   318     CancelNotifyEvents();
       
   319     }
       
   320 
       
   321     
       
   322 
       
   323 // from MWsfEngineObserver
       
   324 
       
   325 // ---------------------------------------------------------------------------
       
   326 // CWsfSession::WlanListChangedL
       
   327 // ---------------------------------------------------------------------------
       
   328 //    
       
   329 void CWsfSession::WlanListChangedL()
       
   330     {    
       
   331     LOG_ENTERFN( "CWsfSession::WlanListChangedL" );
       
   332     TWsfNotifyEventContainer event = { EEngineWlanDataChanged, KErrNone };
       
   333     iEventQueue.AppendL( event );
       
   334 
       
   335     NotifyClientL();
       
   336     }
       
   337 
       
   338     
       
   339 // ---------------------------------------------------------------------------
       
   340 // CWsfSession::NotifyErrorL
       
   341 // ---------------------------------------------------------------------------
       
   342 //    
       
   343 void CWsfSession::NotifyErrorL( TInt aError )
       
   344     {
       
   345     LOG_ENTERFN( "CWsfSession::NotifyErrorL" );
       
   346     TWsfNotifyEventContainer event = { EEngineError, aError };
       
   347     iEventQueue.AppendL( event );
       
   348 
       
   349     NotifyClientL();
       
   350     }
       
   351     
       
   352 
       
   353 // ---------------------------------------------------------------------------
       
   354 // CWsfSession::ScanEnabledL
       
   355 // ---------------------------------------------------------------------------
       
   356 //    
       
   357 void CWsfSession::ScanEnabledL()
       
   358     {
       
   359     LOG_ENTERFN( "CWsfSession::ScanEnabledL" );
       
   360     iEnabledScanning = ETrue;
       
   361     TWsfNotifyEventContainer event = { EEngineScanEnabled, KErrNone };
       
   362     iEventQueue.AppendL( event );
       
   363 
       
   364     NotifyClientL();
       
   365     }
       
   366     
       
   367 
       
   368 // ---------------------------------------------------------------------------
       
   369 // CWsfSession::ScanDisabledL
       
   370 // ---------------------------------------------------------------------------
       
   371 //    
       
   372 void CWsfSession::ScanDisabledL()
       
   373     {
       
   374     LOG_ENTERFN( "CWsfSession::ScanDisabledL" );
       
   375     iEnabledScanning = EFalse;
       
   376     TWsfNotifyEventContainer event = { EEngineScanDisabled, KErrNone };
       
   377     iEventQueue.AppendL( event );
       
   378 
       
   379     NotifyClientL();
       
   380     }
       
   381     
       
   382 
       
   383 // ---------------------------------------------------------------------------
       
   384 // CWsfSession::ConnectedL
       
   385 // ---------------------------------------------------------------------------
       
   386 //    
       
   387 void CWsfSession::ConnectedL()
       
   388     {
       
   389     LOG_ENTERFN( "CWsfSession::ConnectedL" );
       
   390     TWsfNotifyEventContainer event = { EEngineConnected, KErrNone };
       
   391     iEventQueue.AppendL( event );
       
   392 
       
   393     NotifyClientL();
       
   394     }
       
   395     
       
   396 
       
   397 // ---------------------------------------------------------------------------
       
   398 // CWsfSession::DisconnectedL
       
   399 // ---------------------------------------------------------------------------
       
   400 //    
       
   401 void CWsfSession::DisconnectedL()
       
   402     {
       
   403     LOG_ENTERFN( "CWsfSession::DisconnectedL" );
       
   404     TWsfNotifyEventContainer event = { EEngineDisconnected, KErrNone };
       
   405     iEventQueue.AppendL( event );
       
   406     
       
   407     NotifyClientL();
       
   408     }
       
   409 
       
   410 
       
   411 // ---------------------------------------------------------------------------
       
   412 // CWsfSession::ConnectingFailedL
       
   413 // ---------------------------------------------------------------------------
       
   414 //    
       
   415 void CWsfSession::ConnectingFailedL( TInt aError )
       
   416     {
       
   417     LOG_ENTERFN( "CWsfSession::ConnectingFailedL" );
       
   418     TWsfNotifyEventContainer event = { EEngineConnectingFailed, aError };
       
   419     iEventQueue.AppendL( event );
       
   420     
       
   421     NotifyClientL();
       
   422     }
       
   423     
       
   424 
       
   425 // ---------------------------------------------------------------------------
       
   426 // CWsfSession::NotifyClientL
       
   427 // ---------------------------------------------------------------------------
       
   428 //    
       
   429 void CWsfSession::NotifyClientL()
       
   430     {
       
   431     LOG_ENTERFN( "CWsfSession::NotifyClientL" );
       
   432 
       
   433     if ( iRequestNotify && !iProcessingEvent )
       
   434         {
       
   435         LOG_WRITE( "CWsfSession::NotifyClientL notify" );
       
   436         TPckgBuf<TWsfNotifyEventContainer> container( iEventQueue[0] );
       
   437 
       
   438         iNotifyChangesMessage.WriteL( 0, container );
       
   439 
       
   440         // remove the item that we have just handed over
       
   441         iEventQueue.Remove( 0 );
       
   442 
       
   443         iProcessingEvent = ETrue;
       
   444         iNotifyChangesMessage.Complete( KErrNone );
       
   445         }
       
   446     }
       
   447     
       
   448 
       
   449 // ----------------------------------------------------------------------------
       
   450 // CWsfSession::GetConnectedAccountNameL
       
   451 // ----------------------------------------------------------------------------
       
   452 //
       
   453 void CWsfSession::GetConnectedAccountNameL( const RMessage2& aMessage )
       
   454     {
       
   455     LOG_ENTERFN( "CWsfSession::GetConnectedAccountNameL" );    
       
   456     HBufC* iapName = iServer.Engine()->ConnectedWlanSsidL();
       
   457     CleanupStack::PushL( iapName );
       
   458     TPckgBuf<TWsfQueryConnectedAccount> package;
       
   459 
       
   460     TInt maxLen = package().iConnectedAccountName.MaxLength();
       
   461 
       
   462     if ( iapName->Length() )
       
   463         {
       
   464         if ( iapName->Length() > maxLen )
       
   465             {
       
   466             package().iConnectedAccountName.Copy( iapName->Ptr(), maxLen );    
       
   467             }
       
   468         else
       
   469             {
       
   470             package().iConnectedAccountName.Copy( *iapName );
       
   471             }
       
   472         package().iConnected = ETrue;
       
   473         }
       
   474     else
       
   475         {
       
   476         package().iConnected = EFalse;
       
   477         }    
       
   478     aMessage.WriteL( 0, package );
       
   479     CleanupStack::PopAndDestroy( iapName );        
       
   480     }
       
   481 
       
   482 
       
   483 // ----------------------------------------------------------------------------
       
   484 // CWsfSession::GetConnectedDetailsL
       
   485 // ----------------------------------------------------------------------------
       
   486 //
       
   487 void CWsfSession::GetConnectedDetailsL( const RMessage2& aMessage )
       
   488     {
       
   489     LOG_ENTERFN( "CWsfSession::GetConnectedDetailsL" );    
       
   490     TPckgBuf<TWsfWlanInfo> package;
       
   491     TPckgBuf<TBool> ret( ETrue );
       
   492     
       
   493     if ( !iServer.Engine()->ConnectedWlanConnectionDetailsL( package() ) )
       
   494         {
       
   495         LOG_WRITE( "engine returned false, so wlaninfo is marked as invalid" );
       
   496         ret() = EFalse;
       
   497         }
       
   498     
       
   499     aMessage.WriteL( 0, ret );
       
   500     aMessage.WriteL( 1, package );
       
   501     }
       
   502     
       
   503     
       
   504 // ----------------------------------------------------------------------------
       
   505 // CWsfSession::ReplyWlanDataSizeL
       
   506 // ----------------------------------------------------------------------------
       
   507 //
       
   508 void CWsfSession::ReplyWlanDataSizeL( const RMessage2& aMessage )
       
   509     {
       
   510     LOG_ENTERFN( "CWsfSession::ReplyWlanDataSizeL" );
       
   511     const TInt KInvalidLength = 0;
       
   512     TPckgBuf<TUint> p( KInvalidLength );
       
   513 
       
   514     HBufC8* results = iServer.Engine()->GetScanResults();
       
   515     if ( results )
       
   516         {
       
   517         p() = results->Length();
       
   518         }
       
   519     
       
   520     aMessage.WriteL( 0, p );
       
   521     }
       
   522     
       
   523 
       
   524 // ----------------------------------------------------------------------------
       
   525 // CWsfSession::WriteWlanDataL
       
   526 // ----------------------------------------------------------------------------
       
   527 //
       
   528 void CWsfSession::WriteWlanDataL( const RMessage2& aMessage )
       
   529     {
       
   530     LOG_ENTERFN( "CWsfSession::WriteWlanDataL" );
       
   531     TPckgBuf<TUint> sizeData;
       
   532     
       
   533     // don't take the ownership
       
   534     HBufC8* scanData = iServer.Engine()->GetScanResults();
       
   535         
       
   536     if ( scanData )
       
   537         {
       
   538         LOG_WRITEF( "scanData->Length() = %d aMessage.GetDesMaxLength(1) = %d", 
       
   539 					scanData->Length(), aMessage.GetDesMaxLength( 1 ) );
       
   540         if ( scanData->Length() > aMessage.GetDesMaxLength( 1 ) )
       
   541             {
       
   542             // the data has changed
       
   543             // return error to client to alloc more buffer
       
   544             sizeData() = scanData->Length();
       
   545             aMessage.WriteL( 0, sizeData );
       
   546             }
       
   547         else
       
   548             {
       
   549              // else we have enough buffer... copy the data
       
   550              sizeData() = scanData->Length();
       
   551              aMessage.WriteL( 0, sizeData );
       
   552              aMessage.WriteL( 1, *scanData, 0 );
       
   553             }
       
   554         }
       
   555     }
       
   556     
       
   557 
       
   558 // ----------------------------------------------------------------------------
       
   559 // CWsfSession::ActivateScanL
       
   560 // ----------------------------------------------------------------------------
       
   561 //
       
   562 void CWsfSession::ActivateScanL()
       
   563     {
       
   564     LOG_ENTERFN( "CWsfSession::ActivateScanL" );    
       
   565     iServer.Engine()->EnableScanningL();
       
   566     iEnabledScanning = ETrue;
       
   567     }
       
   568     
       
   569 
       
   570 // ----------------------------------------------------------------------------
       
   571 // CWsfSession::DisableScanL
       
   572 // ----------------------------------------------------------------------------
       
   573 //
       
   574 void CWsfSession::DisableScanL()
       
   575     {
       
   576     LOG_ENTERFN( "CWsfSession::DisableScanL" );    
       
   577     if ( iEnabledScanning )
       
   578         {
       
   579         iServer.Engine()->DisableScanningL();
       
   580         iEnabledScanning = EFalse;
       
   581         }
       
   582     }
       
   583 
       
   584 
       
   585 // ----------------------------------------------------------------------------
       
   586 // CWsfSession::ConnectWlanL
       
   587 // ----------------------------------------------------------------------------
       
   588 //
       
   589 void CWsfSession::ConnectWlanL( const RMessage2& aMessage )
       
   590     {
       
   591     LOG_ENTERFN( "CWsfSession::ConnectWlanL" );    
       
   592     TUint32 iapId( aMessage.Int1() );
       
   593     TBool connectOnly( aMessage.Int2() );
       
   594     TWsfIapPersistence persistence( TWsfIapPersistence( aMessage.Int3() ) );
       
   595     TPckgBuf<TInt> p( iServer.Engine()->ConnectWlanL( iapId, connectOnly, persistence ) );
       
   596     aMessage.WriteL( 0, p );
       
   597     }
       
   598     
       
   599 
       
   600 // ----------------------------------------------------------------------------
       
   601 // CWsfSession::DisconnectWlanL
       
   602 // ----------------------------------------------------------------------------
       
   603 //
       
   604 void CWsfSession::DisconnectWlanL( const RMessage2& aMessage )
       
   605     {
       
   606     LOG_ENTERFN( "CWsfSession::DisconnectWlanL" );    
       
   607     TPckgBuf<TInt> p( iServer.Engine()->DisconnectWlan() );
       
   608     aMessage.WriteL( 0, p );
       
   609     }
       
   610     
       
   611 
       
   612 // ----------------------------------------------------------------------------
       
   613 // CWsfSession::RequestScanL
       
   614 // ----------------------------------------------------------------------------
       
   615 //
       
   616 void CWsfSession::RequestScanL( const RMessage2& aMessage )
       
   617     {
       
   618     LOG_ENTERFN( "CWsfSession::RequestScanL" );    
       
   619     TPckgBuf<TBool> requestMade( EFalse );
       
   620     // check if the client has enabled scanning - if not do not request scans
       
   621     if ( !iEnabledScanning )
       
   622         {
       
   623         LOG_WRITE( "CWsfSession::RequestScanL error, not scanning" );
       
   624         aMessage.WriteL( 0, requestMade );
       
   625         return;
       
   626         }
       
   627     
       
   628     requestMade = iServer.Engine()->RefreshScanResults();
       
   629     aMessage.WriteL( 0, requestMade );
       
   630     }
       
   631     
       
   632 
       
   633 // ----------------------------------------------------------------------------
       
   634 // CWsfSession::MonitorApL
       
   635 // ----------------------------------------------------------------------------
       
   636 //
       
   637 void CWsfSession::MonitorApL( const RMessage2& aMessage )
       
   638     {
       
   639     LOG_ENTERFN( "CWsfSession::MonitorApL" );    
       
   640     TUint32 accessPoint( (TUint32) aMessage.Int0() );
       
   641     iServer.Engine()->MonitorAccessPointL( accessPoint );
       
   642     }
       
   643 
       
   644 
       
   645 // ----------------------------------------------------------------------------
       
   646 // CWsfSession::ReplyIsScanningL
       
   647 // ----------------------------------------------------------------------------
       
   648 //
       
   649 void CWsfSession::ReplyIsScanningL( const RMessage2& aMessage )
       
   650     {
       
   651     LOG_ENTERFN( "CWsfSession::ReplyIsScanningL" );    
       
   652     TPckgBuf<TBool> p( iServer.Engine()->IsScanning() );
       
   653     aMessage.WriteL( 0, p );
       
   654     }
       
   655 
       
   656 
       
   657 // ----------------------------------------------------------------------------
       
   658 // CWsfSession::IsConnectedL
       
   659 // ----------------------------------------------------------------------------
       
   660 //
       
   661 void CWsfSession::IsConnectedL( const RMessage2& aMessage )
       
   662     {
       
   663     TBool b = iServer.Engine()->IsConnected();
       
   664     TPckgBuf<TBool> p( b );
       
   665     aMessage.WriteL( 0, p );
       
   666     }
       
   667 
       
   668 
       
   669 // ----------------------------------------------------------------------------
       
   670 // CWsfSession::AbortScanning
       
   671 // ----------------------------------------------------------------------------
       
   672 //
       
   673 void CWsfSession::AbortScanning()
       
   674     {
       
   675     LOG_ENTERFN( "CWsfSession::AbortScanningL" );    
       
   676     iServer.Engine()->AbortScanning();
       
   677     }
       
   678     
       
   679 
       
   680 // ----------------------------------------------------------------------------
       
   681 // CWsfSession::AbortConnectingL
       
   682 // ----------------------------------------------------------------------------
       
   683 //
       
   684 void CWsfSession::AbortConnectingL()
       
   685     {
       
   686     LOG_ENTERFN( "CWsfSession::AbortConnectingL" );    
       
   687     iServer.Engine()->AbortConnectingL();
       
   688     }
       
   689 
       
   690 
       
   691 // ----------------------------------------------------------------------------
       
   692 // CWsfSession::SetIapPersistenceL
       
   693 // ----------------------------------------------------------------------------
       
   694 //
       
   695 void CWsfSession::SetIapPersistenceL( const RMessage2& aMessage )
       
   696     {
       
   697     LOG_ENTERFN( "CWsfSession::SetIapPersistenceL" );    
       
   698     
       
   699     TWsfIapPersistence persistence( TWsfIapPersistence( aMessage.Int1() ) );
       
   700     TPckgBuf<TBool> ret( iServer.Engine()->SetIapPersistenceL( persistence ) );
       
   701     
       
   702     aMessage.WriteL( 0, ret );
       
   703     }
       
   704     
       
   705 
       
   706 // ----------------------------------------------------------------------------
       
   707 // CWsfSession::ControlDisconnectTimerL
       
   708 // ----------------------------------------------------------------------------
       
   709 //
       
   710 void CWsfSession::ControlDisconnectTimerL( const RMessage2& aMessage )
       
   711     {
       
   712     LOG_ENTERFN( "CWsfSession::ControlDisconnectTimerL" );
       
   713 
       
   714     TPckgBuf<TBool> ret( iServer.Engine()->ControlDisconnectTimer( 
       
   715                                                  TUint( aMessage.Int1() ) ) );
       
   716     
       
   717     aMessage.WriteL( 0, ret );
       
   718     }
       
   719 
       
   720