cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugincontainer.h
changeset 0 5a93021fdf25
child 8 2e6c4614c58e
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     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:  Container for the Connectivity Settings Plugin
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef GSCONNSETTINGSPLUGINCONTAINER_H
       
    20 #define GSCONNSETTINGSPLUGINCONTAINER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "gsconnsettingspluginmodel.h"
       
    24 #include <GSBaseContainer.h>
       
    25 
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // DATA TYPES
       
    32 
       
    33 // FUNCTION PROTOTYPES
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class CGSListBoxItemTextArray;
       
    37 class CGSPluginInterface;
       
    38 class MGSConnSettingsMskObserver;
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43 *  GSConnSettingsPluginContainer container class
       
    44 *
       
    45 *  Container class for Connectivity Settings plugin view
       
    46 *  @lib gsconnsettingsplugin.lib
       
    47 *  @since Series 60_3.1
       
    48 */
       
    49 class CGSConnSettingsPluginContainer : public CGSBaseContainer
       
    50     {
       
    51     public: // Constructors and destructor
       
    52         
       
    53         /**
       
    54         * Symbian OS constructor.
       
    55         * @param aRect Listbox's rect.
       
    56         * 
       
    57         */
       
    58         void ConstructL( const TRect& aRect );
       
    59         
       
    60         /**
       
    61         * Destructor.
       
    62         */
       
    63         ~CGSConnSettingsPluginContainer();
       
    64         
       
    65         /**
       
    66         * Constructor
       
    67         */
       
    68         CGSConnSettingsPluginContainer( MGSConnSettingsMskObserver& aMskObserver );
       
    69 
       
    70     public: //new
       
    71 
       
    72         /**
       
    73         * Updates listbox's item's value.
       
    74         * @since Series 60_3.1
       
    75         * @param aItemId An item which is updated.
       
    76         */
       
    77         void UpdateListBoxL( TInt aFeatureId );
       
    78         
       
    79         /**
       
    80         * Retrieves the currently selected listbox feature id
       
    81         * @since Series 60_3.1
       
    82         * @return feature id.
       
    83         */
       
    84         TInt CurrentFeatureId() const;
       
    85         
       
    86         /**
       
    87          * Return its member variable iMode
       
    88          * @param
       
    89          */
       
    90         CGSConnSettingsPluginModel* Model();
       
    91         
       
    92         /**
       
    93          * Finds user selected plugin from plugin array
       
    94          *
       
    95          * @return Plugin which is selected in the lbx or leaves 
       
    96          * with KErrnotFound if no plugins exist.
       
    97          */
       
    98         CGSPluginInterface* SelectedPluginL();
       
    99 
       
   100         /**
       
   101          * Makes ECOM plugin item
       
   102          */
       
   103         void MakeECOMPluginItemL();
       
   104 
       
   105         /**
       
   106         * Sets iPluginArray member.
       
   107         * @param aPluginArray Pointer to loaded ECOM plugin array
       
   108         */
       
   109         void SetPluginArray ( CArrayPtrFlat<CGSPluginInterface>* aPluginArray );
       
   110         
       
   111         
       
   112     protected: // from CGSBaseContainer
       
   113         void ConstructListBoxL( TInt aResLbxId );
       
   114         
       
   115     private: // new
       
   116         // create listbox from resource
       
   117         void CreateListBoxItemsL();
       
   118 
       
   119         /**
       
   120          * Adds items from iUsageOfWlanItems to main views list
       
   121          */
       
   122         void MakeUsageOfWlanNetworksItemL();
       
   123                 
       
   124         /**
       
   125          * Adds items from iDataUsageAbroadItems to main views list
       
   126          */
       
   127         void MakeDataUsageAbroadItemL();
       
   128         
       
   129         /**
       
   130          * Adds items from iDataUsageHomeNwItems to main views list
       
   131          */
       
   132         void MakeDataUsageHomeNwItemL();
       
   133         
       
   134         /**
       
   135          * From CGSBaseContainer. Constructs correct textformat for one list box item 
       
   136          * and adds it in listbox
       
   137          *
       
   138          * @param aPos Position of text in listbox
       
   139          * @param aFirstLabel Text in first row of listbox item
       
   140          * @param aSecondLabel Text in second row of listbox item
       
   141          */
       
   142         void AppendListItemL( const TInt aPos, 
       
   143                               const TDesC16& aFirstLabel, 
       
   144                               const TDesC16& aSecondLabel );
       
   145                
       
   146         /**
       
   147          * Handles changes in MSK label between item changes in listbox
       
   148          */
       
   149         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
   150                         
       
   151         /**
       
   152          * Return list index according to wlan variation.
       
   153          */
       
   154         TInt Index( TInt aIndex );
       
   155         
       
   156         // from CGSBaseContainer
       
   157         /**
       
   158         * Required for help.
       
   159         */
       
   160         void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   161         
       
   162     private: // Data
       
   163         
       
   164         /**
       
   165         * This holds items from resource R_USAGE_OF_WLAN_SETTING_PAGE_LBX
       
   166         */
       
   167         CDesCArrayFlat* iUsageOfWlanItems;
       
   168                 
       
   169         /**
       
   170         * This holds items from resource R_DATA_USAGE_ABROAD_SETTING_PAGE_LBX
       
   171         */
       
   172         CDesCArrayFlat* iDataUsageAbroadItems;
       
   173         
       
   174         /**
       
   175         * This holds items from resource R_DATA_USAGE_HOME_NW_SETTING_PAGE_LBX
       
   176         */
       
   177         CDesCArrayFlat* iDataUsageHomeNwItems;
       
   178         
       
   179         /**
       
   180          * Listbox item array.
       
   181          */
       
   182         CGSListBoxItemTextArray* iListboxItemArray;
       
   183         
       
   184         /**
       
   185          * Listbox item text array. Contains listbox item texts
       
   186          */
       
   187         CDesCArray* iListBoxTextArray;
       
   188                
       
   189         /** 
       
   190          * General list box items. Contains localized listbox texts
       
   191          * from R_CONN_SETTINGS_LBX_TXT resource .
       
   192          */
       
   193         CDesCArrayFlat* iListItems;
       
   194         
       
   195         // plugin model
       
   196         CGSConnSettingsPluginModel* iModel;        
       
   197 
       
   198         /**
       
   199          * Array of the child plugins. Owned by CGSConnSettingsPlugin.
       
   200          */
       
   201         CArrayPtrFlat<CGSPluginInterface>* iPluginArray;
       
   202         
       
   203         /**
       
   204          * General item count. Used when calculating item indexes to ECOM plugins
       
   205          */
       
   206         TInt iGeneralItemCount;
       
   207         
       
   208         /**
       
   209          * Reference to main view. Does not own
       
   210          */
       
   211         MGSConnSettingsMskObserver& iMskObserver;
       
   212 
       
   213         /**
       
   214          * Flag is set when wlan is supported
       
   215          */
       
   216         TBool iIsWlanSupported;              
       
   217     };
       
   218 
       
   219 #endif //GSCONNSETTINGSPLUGINCONTAINER_H
       
   220 
       
   221 //End of File