internetradio2.0/settingsviewinc/ircommonsettingscontainer.h
changeset 0 09774dfdd46b
child 2 2e1adbfc62af
equal deleted inserted replaced
-1:000000000000 0:09774dfdd46b
       
     1 /*
       
     2 * Copyright (c) 2006-2006 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:  Container class for the settings UI
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CIRCOMMONSETTINGSCONTAINER_H
       
    20 #define C_CIRCOMMONSETTINGSCONTAINER_H
       
    21 
       
    22 #include <aknsettingitemlist.h>
       
    23 #include <cmapplicationsettingsui.h>
       
    24 #include "irsettings.h"
       
    25 class CIRNetworkController;
       
    26 
       
    27 using namespace CMManager;
       
    28 
       
    29 //Added for ALR/SNAP
       
    30 enum TUserSelection
       
    31    {
       
    32     EUserSelectionAlwaysAsk = 0,
       
    33     EUserSelectionDefaultConnection,
       
    34     EUserSelectionDestination,
       
    35     EUserSelectionConnectionMethod
       
    36     };
       
    37 
       
    38 /**
       
    39  * The container that holds all the setting items.
       
    40  */
       
    41 class CIRCommonSettingsContainer : public CAknSettingItemList
       
    42     {
       
    43 public:  // Methods
       
    44 
       
    45     /**
       
    46      * Two-phased constructor.
       
    47      *
       
    48      * @param   aModel          The model that provides writing and reading of the settings.
       
    49      */
       
    50     IMPORT_C static CIRCommonSettingsContainer* NewL( );
       
    51 
       
    52     /**
       
    53      * Destructor.
       
    54      */
       
    55     IMPORT_C ~CIRCommonSettingsContainer();
       
    56 
       
    57     /**
       
    58      * Starts editing the item at the current index.
       
    59      */
       
    60     void EditCurrentItemL( TBool aCalledFromMenu );
       
    61     
       
    62     /**
       
    63      * GetCurrentSelection()
       
    64      * Getter function for the currently selected item in the list
       
    65      */    
       
    66     TInt GetCurrentSelection();
       
    67     
       
    68     /**
       
    69      * UpdateStatusL()
       
    70      * Fetches the new settings values from iIRSettings and updates the list
       
    71      */  
       
    72     void UpdateStatusL();
       
    73     
       
    74     /**
       
    75      * GetUserSelectionL()
       
    76      * Queries the Settings and returns the user selected IAP/SNAP
       
    77      */
       
    78     TCmSettingSelectionMode GetUserSelectionL();
       
    79     
       
    80     /**
       
    81      * SetAccessPointDetailsL()
       
    82      * Sets the details of the chosen IAP in cenrep
       
    83      */
       
    84     void SetAccessPointDetailsL(TUint aId);
       
    85     
       
    86     /**
       
    87      * SetListBoxTextL()
       
    88      * Sets the text of the Network Selection in the Settings UI
       
    89      */
       
    90     void SetListBoxTextL();
       
    91 
       
    92 protected:
       
    93 
       
    94     /**
       
    95      * Constructor.
       
    96      *
       
    97      * @param   aModel      The model that provides writing and reading of the settings.
       
    98      */
       
    99     IMPORT_C CIRCommonSettingsContainer();
       
   100 
       
   101     /**
       
   102      * Second-phase constructor.
       
   103      */
       
   104     IMPORT_C void BaseConstructL();
       
   105 
       
   106 // from base class CAknSettingItemList.
       
   107 
       
   108 	/**
       
   109      * CreateSettingItemL()
       
   110      * Creates a setting item based upon the user id aSettingId
       
   111      */
       
   112     IMPORT_C virtual CAknSettingItem* CreateSettingItemL( TInt aSettingId );
       
   113     
       
   114     /**
       
   115      * EditItemL()
       
   116      * Launches the setting page for the current item 
       
   117      */
       
   118     IMPORT_C virtual void EditItemL( TInt aIndex, TBool aCalledFromMenu );
       
   119 
       
   120 // from base class CCoeControl
       
   121 
       
   122 	/**
       
   123      * GetHelpContext()
       
   124      * Gets the control's help context
       
   125      */
       
   126     IMPORT_C void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   127     
       
   128     /**
       
   129      * SizeChanged()
       
   130      * Responds to changes to the size and position of the contents of this control.
       
   131      */
       
   132     IMPORT_C void SizeChanged();
       
   133     
       
   134     
       
   135     /**
       
   136      * ShowConnectionSettingsUiL()
       
   137      * Displays the connection settings ui
       
   138      */
       
   139     void ShowConnectionSettingsUiL();
       
   140 
       
   141 private:
       
   142 
       
   143     /**
       
   144      * iIRSettings
       
   145      * An instance of the CIRSettings class
       
   146      */
       
   147     CIRSettings* iIRSettings;
       
   148     
       
   149     /**
       
   150      * iAccessPointIndex
       
   151      * Index of the AccessPoint setting
       
   152      */
       
   153     TInt iAccessPointIndex;
       
   154     
       
   155     /**
       
   156      * iWifiBitRateIndex
       
   157      * Index of the WifiBitRate setting
       
   158      */
       
   159     TInt iWifiBitRateIndex;
       
   160     
       
   161     /**
       
   162      * i3GBitRateIndex
       
   163      * Index of the 3GBitRate setting
       
   164      */
       
   165     TInt i3GBitRateIndex;
       
   166     
       
   167     /**
       
   168      * iGprsBitRateIndex
       
   169      * Index of the GprsBitRate setting
       
   170      */
       
   171     TInt iGprsBitRateIndex;
       
   172     
       
   173     /**
       
   174      * iNetworkController
       
   175      * An instance of the CIRNetworkController class
       
   176      */
       
   177 	CIRNetworkController* iNetworkController;
       
   178 	
       
   179 	/** 
       
   180 	 * iIapArray
       
   181 	 * An array of Available IAP IDs 
       
   182 	 */
       
   183 	const CDesCArray* iIapArray;
       
   184 
       
   185 	/** 
       
   186 	 * iDestinationSelected
       
   187 	 * A Boolean value to indicate if the selection is a Destination
       
   188 	 */
       
   189 	TBool iDestinationSelected;
       
   190     };
       
   191 
       
   192 #endif // C_CIRCOMMONSETTINGSCONTAINER_H