dbcreator/commsdatcreator/Inc/cdcwlandevicesettings.h
changeset 0 5a93021fdf25
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2004 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:   Declaration of the class CWlanDeviceSettings.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef WLANDEVICESETTINGS_H
       
    21 #define WLANDEVICESETTINGS_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <metadatabase.h>
       
    26 
       
    27 #define DEBUG( a )
       
    28 #define DEBUG1( a, b )
       
    29 
       
    30 using namespace CommsDat;
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 *  Interface to read and write WLAN device specific settings.
       
    38 *  The data is stored in CommsDB.
       
    39 */
       
    40 NONSHARABLE_CLASS( CWlanDeviceSettings ): public CBase
       
    41     {
       
    42 public:
       
    43 
       
    44     NONSHARABLE_STRUCT( SWlanDeviceSettings )
       
    45         {
       
    46         //Is WLAN indication icon been showed in UI.
       
    47         TUint32 backgroundScanInterval;
       
    48         //Stores the previously set background scan interval.
       
    49         TUint32 savedBgScanInterval;
       
    50         //If - ETrue default values are being used, 
       
    51         //   - EFalse use the user defined values.
       
    52         TBool useDefaultSettings;
       
    53         //How many times packets bigger than 'rts' are been resent.
       
    54         TUint32 longRetry; 
       
    55         //How many times packets smaller than 'rts' are been resent.
       
    56         TUint32 shortRetry;
       
    57         //Min. size of a packet that CTS/RTS handshake is been used.
       
    58         TUint32 rts;
       
    59         //Transmission power level in use. In mWs.
       
    60         TUint32 txPowerLevel;
       
    61         //Are the radio measurements allowed.
       
    62         TBool radioMeasurements;
       
    63          //Is WLAN in power mode enabled
       
    64         TBool powerMode;
       
    65         };
       
    66  
       
    67     public:     // Methods
       
    68 
       
    69     // Constructors and destructor
       
    70 
       
    71         /**
       
    72         * Static constructor.
       
    73         */
       
    74         static CWlanDeviceSettings* NewL();
       
    75         
       
    76         /**
       
    77         * Destructor.
       
    78         */
       
    79         virtual ~CWlanDeviceSettings();
       
    80 
       
    81     // New methods
       
    82 
       
    83         /**
       
    84         * Returns the default WLAN device settings.
       
    85         * @param aSettings Default WLAN device settings
       
    86         */
       
    87         static void GetDefaultSettings( SWlanDeviceSettings& aSettings );
       
    88 
       
    89     private:    //Methods
       
    90 
       
    91         /**
       
    92         * C++ default constructor.
       
    93         */
       
    94         CWlanDeviceSettings();
       
    95 
       
    96         /**
       
    97         * By default Symbian 2nd phase constructor is private.
       
    98         */
       
    99         void ConstructL();
       
   100 
       
   101         /**
       
   102         * Fills a WLAN device settings record with default data.
       
   103         * @param aTableType 0 for default settings, 1 for user settings.
       
   104         * @param aRecord pointer to commsdat table view
       
   105         */
       
   106         void FillRecordL( TUint32 aTableType, CMDBGenericRecord* aRecord );
       
   107 
       
   108         /**
       
   109         * Open database table.
       
   110         */
       
   111         void OpenTableL();
       
   112         
       
   113     private:    // Data
       
   114     
       
   115         //@var session - Owned
       
   116         CMDBSession* iSession;
       
   117     };
       
   118 
       
   119 #endif      // WLANDEVICESETTINGS_H
       
   120 
       
   121 // End of File