cmmanager/gsconnsettingsplugin/inc/gsconnsettingspluginmodel.h
branchRCL_3
changeset 58 83ca720e2b9a
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Display Settings model.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GSCONNSETTINGSPLUGINMODEL_H
       
    19 #define GSCONNSETTINGSPLUGINMODEL_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <cmgenconnsettings.h>
       
    23 
       
    24 class CGSConnSettingsPluginContainer;
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 
       
    36 // CLASS DEFINITION
       
    37 /**
       
    38 *   CGSConnSettingsPluginModel is the model class of Connectivity Settings plugin.
       
    39 *  It provides functions to get and set setting values.
       
    40 *  @lib gsconnsettingsplugin.lib
       
    41 *  @since Series 60_3.1
       
    42 
       
    43 */
       
    44 NONSHARABLE_CLASS( CGSConnSettingsPluginModel ): public CBase
       
    45     {
       
    46     public:  // Constructor and destructor
       
    47         /**
       
    48         * Two-phased constructor
       
    49         */
       
    50         static CGSConnSettingsPluginModel* NewL();
       
    51 
       
    52         /**
       
    53         * Destructor
       
    54         */
       
    55         ~CGSConnSettingsPluginModel();
       
    56 
       
    57     public:
       
    58         /**
       
    59         * Loads settings by using CMManager's general connection settings API
       
    60         */
       
    61         void LoadSettingsL();
       
    62 
       
    63         /**
       
    64         * Saves settings by using CMManager's general connection settings API
       
    65         */
       
    66         void SaveSettingsL();
       
    67 
       
    68         /**
       
    69         * Gets and maps value from general connection settings API to match index in UI
       
    70         * @return TInt
       
    71         */ 
       
    72         TInt UsageOfWlan();
       
    73         
       
    74         /**
       
    75         * Gets and maps value from general connection settings API to match index in UI
       
    76         * @return TInt
       
    77         */ 
       
    78         TInt DataUsageAbroad();
       
    79 
       
    80         /**
       
    81         * Gets and maps value from general connection settings API to match index in UI
       
    82         * @return TInt
       
    83         */ 
       
    84         TInt DataUsageInHomeNw();
       
    85 
       
    86         /**
       
    87         * Maps UI index to according general connection setting API value
       
    88         * @param aValue index to be mapped to API value
       
    89         */
       
    90         void SetUsageOfWlan( TInt aValue );
       
    91         
       
    92         /**
       
    93         * Maps UI index to according general connection setting API value
       
    94         * @param aValue index to be mapped to API value
       
    95         */
       
    96         void SetDataUsageAbroad( TInt aValue );
       
    97 
       
    98         /**
       
    99         * Maps UI index to according general connection setting API value
       
   100         * @param aValue index to be mapped to API value
       
   101         */
       
   102         void SetDataUsageInHomeNw( TInt aValue );
       
   103         
       
   104         /**
       
   105          * @param
       
   106          */
       
   107         void SetOwner( CGSConnSettingsPluginContainer* aPlugin);
       
   108 
       
   109     private: // Private constructors
       
   110 
       
   111         /**
       
   112         * Default C++ contructor
       
   113         */
       
   114         CGSConnSettingsPluginModel();
       
   115 
       
   116         /**
       
   117         * Symbian OS default constructor
       
   118         * @return void
       
   119         */
       
   120         void ConstructL();
       
   121 
       
   122     private:
       
   123         /**
       
   124         * Pointer to container class
       
   125         */
       
   126         CGSConnSettingsPluginContainer* iContainer;
       
   127 
       
   128         /**
       
   129         * Struct to hold current settings
       
   130         */
       
   131         TCmGenConnSettings iSettings;
       
   132         
       
   133         /**
       
   134          * Flag is set when wlan is supported
       
   135          */
       
   136         TBool iIsWlanSupported;
       
   137         
       
   138     };
       
   139 
       
   140 #endif //GSCONNSETTINGSPLUGINMODEL_H
       
   141