wlanutilities/wlansniffer/aiplugin/inc/wsfdbobserver.h
changeset 19 10810c91db26
parent 3 ff3b37722600
child 22 498f36116140
equal deleted inserted replaced
3:ff3b37722600 19:10810c91db26
     1 /*
       
     2 * Copyright (c) 2007 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: 
       
    15 *        Header file for CWlanPluginDbObserver class.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef C_WLAN_PLUGIN_DB_OBSERVER
       
    21 #define C_WLAN_PLUGIN_DB_OBSERVER
       
    22 
       
    23 // System includes
       
    24 #include <e32base.h>
       
    25 #include <wlancontainer.h>
       
    26 #include <d32dbms.h> 
       
    27 #include <WlanCdbCols.h>
       
    28 #include <commsdat.h>
       
    29 #include <wlanmgmtclient.h>
       
    30 
       
    31 //forward declaration
       
    32 class TWsfAiController;
       
    33 
       
    34 /**
       
    35 * Database observer class.
       
    36 */
       
    37 NONSHARABLE_CLASS( CWsfDbObserver ) : public CActive
       
    38     {
       
    39     public:
       
    40         /**
       
    41         * The Constructor.
       
    42         * @param aState Pointer to the WLAN State object.
       
    43         */
       
    44     	CWsfDbObserver(  );
       
    45         
       
    46         /**
       
    47         * First phase of two phased construction.
       
    48         * @param aState Pointer to the WLAN State object.
       
    49         */
       
    50         static CWsfDbObserver* NewL(  );
       
    51         
       
    52         /**
       
    53         * This function activates this object as an active object.
       
    54         */
       
    55         void ActivateItL();
       
    56         
       
    57         /**
       
    58         * Destructor.
       
    59         */
       
    60         virtual ~CWsfDbObserver();
       
    61         
       
    62         /**
       
    63          * Set the controller
       
    64          */
       
    65         void SetController( TWsfAiController* aController );
       
    66         	
       
    67         /**
       
    68          * Set WLAN availablity to scanning
       
    69          */
       
    70         void EnableScanL();
       
    71         
       
    72         /*
       
    73          * Set WLAN availablity to not scanning
       
    74          */
       
    75         void DisableScanL();
       
    76           
       
    77     protected:
       
    78         /**
       
    79         * When the WLAN device settings table is accessed this function
       
    80         * is called. Handle of the active object.
       
    81         */
       
    82         void RunL();
       
    83         
       
    84         /**
       
    85         * Whan waiting for a database access is stopped this function
       
    86         * is called.
       
    87         */
       
    88         void DoCancel();
       
    89  
       
    90     private:
       
    91         /**
       
    92         * Second phase of two phase construction.
       
    93         */
       
    94         void ConstructL();
       
    95         
       
    96         /*
       
    97          * Get default scanning interval 
       
    98          */
       
    99         TInt DefaultScanIntervalL();
       
   100 
       
   101     private:  
       
   102         /**
       
   103         * @var Pointer to the WLAN state object to ask and set scanning
       
   104         * state.
       
   105         */ 
       
   106         //CWlanPluginWlanState * iWlanState;
       
   107         
       
   108         /**
       
   109         * A CommsDat session fod database access.
       
   110         */
       
   111         CMDBSession* iSession;
       
   112         
       
   113         /**
       
   114         * A class representing a recor of WLAN Devive Settings table.
       
   115         */
       
   116         CCDWlanDeviceSettingsRecord* iRecord;
       
   117         
       
   118         /**
       
   119         * The value of it shows the scan state of the WLAN availablity
       
   120         */
       
   121         TBool iOuterScanState;
       
   122         
       
   123         /**
       
   124          * Reference to the controller class of the module.
       
   125          */
       
   126         TWsfAiController* iController;
       
   127         
       
   128         /**
       
   129         * Handle to the WLAN management client (owned)
       
   130         */
       
   131         CWlanMgmtClient* iWlanMgmtClient;
       
   132     
       
   133     };
       
   134     
       
   135     
       
   136 #endif //C_WLAN_PLUGIN_DB_OBSERVER