wlanutilities/wlanplugin/inc/wlanplugindbobserver.h
branchRCL_3
changeset 24 63be7eb3fc78
parent 23 b852595f5cbe
child 25 f28ada11abbf
equal deleted inserted replaced
23:b852595f5cbe 24:63be7eb3fc78
     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 
       
    30 //forward declaration
       
    31 class CWlanPluginWlanState;
       
    32 
       
    33 /**
       
    34 * Database observer class.
       
    35 */
       
    36 NONSHARABLE_CLASS( CWlanPluginDbObserver ) : public CActive
       
    37     {
       
    38     public:
       
    39         /**
       
    40         * The Constructor.
       
    41         * @param aState Pointer to the WLAN State object.
       
    42         */
       
    43         CWlanPluginDbObserver( CWlanPluginWlanState* aState );
       
    44         
       
    45         /**
       
    46         * First phase of two phased construction.
       
    47         * @param aState Pointer to the WLAN State object.
       
    48         */
       
    49         static CWlanPluginDbObserver* NewL( CWlanPluginWlanState* aState );
       
    50         
       
    51         /**
       
    52         * This function activates this object as an active object.
       
    53         */
       
    54         void ActivateItL();
       
    55         
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59         virtual ~CWlanPluginDbObserver();
       
    60           
       
    61     protected:
       
    62         /**
       
    63         * When the WLAN device settings table is accessed this function
       
    64         * is called. Handle of the active object.
       
    65         */
       
    66         void RunL();
       
    67         
       
    68         /**
       
    69         * Whan waiting for a database access is stopped this function
       
    70         * is called.
       
    71         */
       
    72         void DoCancel();
       
    73  
       
    74     private:
       
    75         /**
       
    76         * Second phase of two phase construction.
       
    77         */
       
    78         void ConstructL();
       
    79 
       
    80     private:  
       
    81         /**
       
    82         * @var Pointer to the WLAN state object to ask and set scanning
       
    83         * state.
       
    84         */ 
       
    85         CWlanPluginWlanState * iWlanState;
       
    86         
       
    87         /**
       
    88         * A CommsDat session fod database access.
       
    89         */
       
    90         CMDBSession* iSession;
       
    91         
       
    92         /**
       
    93         * A class representing a recor of WLAN Devive Settings table.
       
    94         */
       
    95         CCDWlanDeviceSettingsRecord* iRecord;
       
    96         
       
    97         /**
       
    98         * The value of it shows the scan state of the WLAN availablity
       
    99         */
       
   100         TBool iOuterScanState;
       
   101     
       
   102     };
       
   103     
       
   104     
       
   105 #endif //C_WLAN_PLUGIN_DB_OBSERVER