wlanutilities/cpwlansettingsplugin/inc/wlansettings.h
branchRCL_3
changeset 24 63be7eb3fc78
equal deleted inserted replaced
23:b852595f5cbe 24:63be7eb3fc78
       
     1 /*
       
     2 * Copyright (c) 2010 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 *
       
    16 */
       
    17 
       
    18 #ifndef WLANSETTINGS_H_
       
    19 #define WLANSETTINGS_H_
       
    20 
       
    21 // System includes
       
    22 
       
    23 #include <QObject>
       
    24 
       
    25 // User includes
       
    26 
       
    27 // Forward declarations
       
    28 
       
    29 class CWlanSettingsPrivate;
       
    30 class XQSettingsManager;
       
    31 
       
    32 // External data types
       
    33 
       
    34 // Constants
       
    35 
       
    36 // Class declaration
       
    37 
       
    38 class WlanSettings : public QObject
       
    39 {
       
    40      Q_OBJECT
       
    41      
       
    42 public:
       
    43      
       
    44      // Data types
       
    45 
       
    46      enum ScanNetworkType {
       
    47          EScanNetworkAuto = 0,
       
    48          EScanNetworkUserDefined        
       
    49      };
       
    50      
       
    51      static const uint ScanNetworkAuto = 0xFFFFFFFF;
       
    52      static const uint ScanNetworkMin = 1;
       
    53      static const uint ScanNetworkMax = 30;
       
    54      
       
    55      WlanSettings();
       
    56 
       
    57      ~WlanSettings();
       
    58      
       
    59      int init();
       
    60      
       
    61      int loadSettings();
       
    62      
       
    63      ScanNetworkType scanNetworkType();
       
    64      
       
    65      uint scanInterval();
       
    66      
       
    67      int joinWlanMode() const;
       
    68      
       
    69      int setJoinWlanMode(int mode);
       
    70      
       
    71      bool isWlanPowerSavingEnabled() const;
       
    72      
       
    73      bool isDevicePowerSavingEnabled();
       
    74      
       
    75      int setWlanPowerSaving(int powerSavingOption);
       
    76      
       
    77      int setWlanScanInterval(uint scanInterval);
       
    78 
       
    79 signals:
       
    80 
       
    81     void devicePowerSavingUpdated();
       
    82 
       
    83 public slots:
       
    84 
       
    85 protected:
       
    86 
       
    87 protected slots:
       
    88 
       
    89 private:
       
    90 
       
    91      Q_DISABLE_COPY(WlanSettings)
       
    92 
       
    93      void readDevicePowerSavingKey();
       
    94 
       
    95 private slots:
       
    96 
       
    97     void devicePowerSavingKeyChanged();
       
    98     
       
    99 private: // data
       
   100 
       
   101      //! Private Symbian specific implementation.
       
   102      CWlanSettingsPrivate *d_ptr;
       
   103      
       
   104      //! Settings manager for platform settings reading & status changes.
       
   105      XQSettingsManager *mSettingsManager;
       
   106      
       
   107      //! Device Power Saving Mode.
       
   108      int mDevicePowerSavingMode;
       
   109      
       
   110      //! Is mDevicePowerSavingMode up to date, or do we need to read it again?
       
   111      bool mDevicePowerSavingModeUpToDate;
       
   112 };
       
   113 
       
   114 #endif /* WLANSETTINGS_H_ */