wlanutilities/cpwlansettingsplugin/inc/wlansettings_s60_p.h
changeset 19 10810c91db26
child 53 bdc64aa9b954
equal deleted inserted replaced
3:ff3b37722600 19:10810c91db26
       
     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 
       
    19 #ifndef WLANSETTINGS_S60_H_
       
    20 #define WLANSETTINGS_S60_H_
       
    21 
       
    22 // System includes
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <wlancontainer.h>
       
    26 #include <centralrepository.h>
       
    27 #include <wlanmgmtclient.h>
       
    28 #include <cmgenconnsettings.h>
       
    29 
       
    30 // User includes
       
    31 
       
    32 // Forward declarations
       
    33 
       
    34 // External data types
       
    35 
       
    36 // Constants
       
    37 /**  Value for automatic scanning. */
       
    38 LOCAL_D const TUint KWlanSettingsScanNetworkAuto = 0xFFFFFFFF;
       
    39 
       
    40 /**  Default "Scan Networks" setting. */
       
    41 LOCAL_D const TUint KWlanSettingsDefaultScanNetwork =
       
    42     KWlanSettingsScanNetworkAuto;
       
    43 
       
    44 /**  Default "Power saving" setting. */
       
    45 LOCAL_D const TBool KWlanSettingsDefaultPowerSaving = ETrue;
       
    46 
       
    47 // Class declaration
       
    48 
       
    49 class CWlanSettingsPrivate : public CBase
       
    50 {
       
    51 public:
       
    52     
       
    53     enum JoinWlanType {
       
    54         EJoinWlanKnown = 0,
       
    55         EJoinWlanManual        
       
    56     };
       
    57     
       
    58     enum WlanOption {
       
    59         EWlanPowerSaving = 0,
       
    60         EWlanScanInterval        
       
    61     };
       
    62     
       
    63     static CWlanSettingsPrivate* NewL(int psmKeyValue);
       
    64     
       
    65     ~CWlanSettingsPrivate();
       
    66     
       
    67     void LoadDBSettingsL();
       
    68     
       
    69     void SaveDBSettingsL(TInt option);
       
    70     
       
    71     TUint ScanInterval();
       
    72     
       
    73     TBool PowerSaving();
       
    74     
       
    75     TInt JoinWlanMode();
       
    76     
       
    77     void SaveJoinWlanSettingL(TInt mode);
       
    78     
       
    79     void SetScanInterval(TUint interval);
       
    80     
       
    81     void SetPowerSaving(TBool powerSavingOption);
       
    82     
       
    83     TBool IsPsmEnabled();
       
    84     
       
    85 private:
       
    86     
       
    87     CWlanSettingsPrivate(int psmKeyValue);
       
    88     
       
    89     void ConstructL();
       
    90     
       
    91     void CheckPsmModeL();
       
    92     
       
    93     void LoadJoinWlanSettingL();
       
    94     
       
    95 private:    //data
       
    96     
       
    97     CommsDat::CMDBSession *mSession;
       
    98 
       
    99     //Wlan management
       
   100     CWlanMgmtClient *mWlanMgmtClient;
       
   101 
       
   102     // Full or partial PSM mode.
       
   103     TBool mPsmMode;   
       
   104 
       
   105     // Power saving.
       
   106     TBool mPowerSaving;
       
   107 
       
   108     // Scan networks interval in seconds. 0 for no scan, 0xFFFFFFFF for automatic. 
       
   109     TUint mScanInterval;
       
   110     
       
   111     JoinWlanType mJoinWlanType;
       
   112     
       
   113     //Struct to hold current settings
       
   114     TCmGenConnSettings mCmSettings;
       
   115     
       
   116     int mPsmKeyMode;
       
   117 
       
   118 };
       
   119 
       
   120 #endif /* WLANSETTINGS_S60_H_ */