wlanutilities/wlansniffer/aiplugin/src/wsfactivewrappers.cpp
branchRCL_3
changeset 15 dff6ebfd236f
child 18 981afc7d3841
equal deleted inserted replaced
8:c2bc3f8c7777 15:dff6ebfd236f
       
     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 CWsfActiveWrappers.
       
    15  *
       
    16  */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "wsflogger.h"
       
    22 #include "wsfactivewrappers.h"
       
    23 #include "wsfwlanlistactivewrapper.h"
       
    24 #include "wsfrefreshscanactivewrapper.h"
       
    25 #include "wsfdisconnectactivewrapper.h"
       
    26 #include "wsfconnectactivewrapper.h"
       
    27 
       
    28 
       
    29 // ----------------------------------------------------------------------------
       
    30 // CWsfActiveWrappers::CWsfActiveWrappers
       
    31 // ----------------------------------------------------------------------------
       
    32 //
       
    33 CWsfActiveWrappers::CWsfActiveWrappers()
       
    34     {
       
    35     // No implementation required
       
    36     }
       
    37 
       
    38 
       
    39 // ----------------------------------------------------------------------------
       
    40 // CWsfActiveWrappers::~CWsfActiveWrappers
       
    41 // ----------------------------------------------------------------------------
       
    42 //
       
    43 CWsfActiveWrappers::~CWsfActiveWrappers()
       
    44     {
       
    45     delete iWLANListActiveWrapper;
       
    46     delete iRefreshScanActiveWrapper;
       
    47     delete iDisconnectActiveWrapper;
       
    48     delete iConnectActiveWrapper;
       
    49     }
       
    50 
       
    51 
       
    52 // ----------------------------------------------------------------------------
       
    53 // CWsfActiveWrappers::NewLC
       
    54 // ----------------------------------------------------------------------------
       
    55 //
       
    56 CWsfActiveWrappers* CWsfActiveWrappers::NewLC( CWsfModel* aModel,
       
    57         TWsfAiController &aController )
       
    58     {
       
    59     LOG_ENTERFN( "CWsfActiveWrappers::NewLC" );
       
    60     CWsfActiveWrappers* self = new (ELeave) CWsfActiveWrappers();
       
    61     CleanupStack::PushL( self );
       
    62     self->ConstructL( aModel,aController );
       
    63     return self;
       
    64     }
       
    65 
       
    66 
       
    67 // ----------------------------------------------------------------------------
       
    68 // CWsfActiveWrappers::NewL
       
    69 // ----------------------------------------------------------------------------
       
    70 //
       
    71 CWsfActiveWrappers* CWsfActiveWrappers::NewL( CWsfModel* aModel,
       
    72         TWsfAiController &aController )
       
    73     {
       
    74     LOG_ENTERFN( "CWsfActiveWrappers::NewL" );
       
    75     CWsfActiveWrappers* self = CWsfActiveWrappers::NewLC( aModel, aController );
       
    76     CleanupStack::Pop(); // self;
       
    77     return self;
       
    78     }
       
    79 
       
    80 
       
    81 // ----------------------------------------------------------------------------
       
    82 // CWsfActiveWrappers::ConstructL
       
    83 // ----------------------------------------------------------------------------
       
    84 //
       
    85 void CWsfActiveWrappers::ConstructL( CWsfModel* aModel,
       
    86         TWsfAiController &aController )
       
    87     {
       
    88     LOG_ENTERFN( "CWsfActiveWrappers::ConstructL" );
       
    89     iWLANListActiveWrapper = CWsfWLANListActiveWrapper::NewL( aModel, 
       
    90                                                               aController );
       
    91     
       
    92     iRefreshScanActiveWrapper = CWsfRefreshScanActiveWrapper::NewL( aModel );
       
    93     
       
    94     iDisconnectActiveWrapper = CWsfDisconnectActiveWrapper::NewL( aModel );
       
    95     
       
    96     iConnectActiveWrapper = CWsfConnectActiveWrapper::NewL( aModel );
       
    97     }
       
    98 
       
    99 
       
   100 // ----------------------------------------------------------------------------
       
   101 // CWsfActiveWrappers::Disconnect
       
   102 // ----------------------------------------------------------------------------
       
   103 //
       
   104 void CWsfActiveWrappers::Disconnect()
       
   105     {
       
   106     LOG_ENTERFN( "CWsfActiveWrappers::Disconnect" );
       
   107     iDisconnectActiveWrapper->Start();
       
   108     }
       
   109 
       
   110 
       
   111 // ----------------------------------------------------------------------------
       
   112 // CWsfActiveWrappers::Connect
       
   113 // ----------------------------------------------------------------------------
       
   114 //
       
   115 void CWsfActiveWrappers::Connect( TUint aIapID, TWsfIapPersistence aPersistence )
       
   116     {
       
   117     LOG_ENTERFN( "CWsfActiveWrappers::Connect" );
       
   118     iConnectActiveWrapper->Start( aIapID, aPersistence );
       
   119     }
       
   120 
       
   121 
       
   122 // ----------------------------------------------------------------------------
       
   123 // CWsfActiveWrappers::RefreshScan
       
   124 // ----------------------------------------------------------------------------
       
   125 //
       
   126 void CWsfActiveWrappers::RefreshScan()
       
   127     {
       
   128     LOG_ENTERFN( "CWsfActiveWrappers::RefreshScan" );
       
   129     iRefreshScanActiveWrapper->Start();
       
   130     }
       
   131 
       
   132 
       
   133 // ----------------------------------------------------------------------------
       
   134 // CWsfActiveWrappers::RefreshWLANList
       
   135 // ----------------------------------------------------------------------------
       
   136 //
       
   137 void CWsfActiveWrappers::RefreshWLANList( TBool aStarUp )
       
   138     {
       
   139     LOG_ENTERFN( "CWsfActiveWrappers::RefreshWLANList" );
       
   140     iWLANListActiveWrapper->Start( aStarUp );
       
   141     }
       
   142 
       
   143 
       
   144 // ----------------------------------------------------------------------------
       
   145 // CWsfActiveWrappers::GetWLANList
       
   146 // ----------------------------------------------------------------------------
       
   147 //
       
   148 CWsfWlanInfoArray* CWsfActiveWrappers::GetWLANList()
       
   149     {
       
   150     LOG_ENTERFN( "CWsfActiveWrappers::GetWLANList" );
       
   151     return iWLANListActiveWrapper->GetWlanList();
       
   152     }
       
   153 
       
   154 
       
   155 // ----------------------------------------------------------------------------
       
   156 // CWsfActiveWrappers::GetConnectedWLANNetwork
       
   157 // ----------------------------------------------------------------------------
       
   158 //
       
   159 TWsfWlanInfo CWsfActiveWrappers::GetConnectedWLANNetwork()
       
   160     {
       
   161     LOG_ENTERFN( "CWsfActiveWrappers::GetConnectedWLANNetwork" );
       
   162     return iWLANListActiveWrapper->GetConnectedWLANNetwork();
       
   163     }
       
   164 
       
   165