wvuing/wvuiave/AppSrc/CCASettingsViewContainer.h
branchRCL_3
changeset 13 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
12:6ca72c0fe49a 13:a941bc465d9f
       
     1 /*
       
     2 * Copyright (c) 2003 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 settings view
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CCASETTINGSVIEWCONTAINER_H
       
    21 #define CCASETTINGSVIEWCONTAINER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "MCALayoutChangeObserver.h"
       
    25 #include "impsbuilddefinitions.h"
       
    26 
       
    27 #include <aknlists.h>
       
    28 #include <eiklbo.h>	// MEikListBoxObserver
       
    29 #include <bldvariant.hrh>
       
    30 #include <MWVSettingsObserverng.h>
       
    31 #include "MCASettingsPC.h"
       
    32 #include "MCAProcessManager.h"
       
    33 
       
    34 // CLASS DECLARATION
       
    35 class MCAViewSwitcher;
       
    36 class CCAEngine;
       
    37 class CIMPSSAPSettingsStore;
       
    38 class CWVSettingsUIDialog;
       
    39 class MCAOpBrandVariant;
       
    40 class CCAAppUi;
       
    41 
       
    42 // CLASS DECLARATION
       
    43 
       
    44 /**
       
    45  *  Container for class settings view
       
    46  *
       
    47  *  @lib chat.app
       
    48  *  @since 1.2
       
    49  */
       
    50 class CCASettingsViewContainer : public CCoeControl,
       
    51             public MEikListBoxObserver,
       
    52             public MWVSettingsObserver,
       
    53             public MCALayoutChangeObserver
       
    54     {
       
    55     public: // enums
       
    56         enum TSettingItemLayout // enum values must match index in listbox.
       
    57             {
       
    58             EApplicationSettings = 0,
       
    59             EServiceSettings
       
    60             };
       
    61 
       
    62     public:  // Constructors and destructor
       
    63         /**
       
    64         * Default constructor
       
    65         * @param aViewSwitcher Handle to view-switcher
       
    66         * @param aSAPSettingsStore Pointer to SAP settings store
       
    67         * @param aSettings Pointer to settings API
       
    68         */
       
    69         CCASettingsViewContainer( MCAViewSwitcher& aViewSwitcher,
       
    70                                   MCASettingsPC& aSettings  );
       
    71         /**
       
    72         * By default Symbian OS constructor is private.
       
    73         * @param aRect Frame rectangle for container.
       
    74         */
       
    75         void ConstructL( const TRect& aRect );
       
    76 
       
    77         /**
       
    78         * Destructor.
       
    79         */
       
    80         virtual ~CCASettingsViewContainer();
       
    81 
       
    82     public: // New functions
       
    83 
       
    84         /**
       
    85         * Returns Pointer to listbox
       
    86         * @return Listbox pointer
       
    87         */
       
    88         CAknSettingStyleListBox* Listbox() const;
       
    89 
       
    90         /**
       
    91         * Launches application settings dialog
       
    92         */
       
    93         void LaunchAppSettingsDialogL();
       
    94 
       
    95         /**
       
    96         * Launches server settings dialog
       
    97         */
       
    98         void LaunchServSettingsDialogL( TBool aForcedLaunch = EFalse );
       
    99 
       
   100 #ifdef RD_SERVICE_ENHANCEMENTS
       
   101         /**
       
   102          * Returns ETrue if ServSettingsDialog should
       
   103          * be launched next time settings view is activated.
       
   104          * Used when forced login made in SercSettings dialog,
       
   105          * login causes view switch between refresh view and settings view
       
   106          * -> dialogs are closed.
       
   107          * @since S60 v3.2
       
   108          */
       
   109         TBool IsServSettingsDialogActive() const;
       
   110 #endif  // RD_SERVICE_ENHANCEMENTS
       
   111 
       
   112     private: // Functions from MEikListBoxObservers
       
   113 
       
   114         /**
       
   115         * @see MEikListBoxObservers
       
   116         */
       
   117         virtual void HandleListBoxEventL( CEikListBox* aListBox,
       
   118                                           TListBoxEvent aEventType );
       
   119 
       
   120     private: //From CCoeControl
       
   121 
       
   122         /**
       
   123         * @see CCoeControl
       
   124         */
       
   125         TInt CountComponentControls() const;
       
   126 
       
   127         /**
       
   128         * @see CCoeControl
       
   129         */
       
   130         CCoeControl* ComponentControl( TInt aIndex ) const;
       
   131 
       
   132         /**
       
   133         * @see CCoeControl
       
   134         */
       
   135         void SizeChanged();
       
   136 
       
   137         /**
       
   138         * @see CCoeControl
       
   139         */
       
   140         TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent,
       
   141                                      TEventCode aType );
       
   142 
       
   143         /**
       
   144         * @see CCoeControl
       
   145         */
       
   146         void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   147 
       
   148         /**
       
   149          * From CCoeControl.
       
   150          * Handle focus event change.
       
   151          * @see CCoeControl
       
   152          */
       
   153         void FocusChanged( TDrawNow aDrawNow );
       
   154 
       
   155     private: // From MWVSettingsObserver
       
   156 
       
   157         /**
       
   158          * @see MWVSettingsObserver
       
   159          */
       
   160         void ServerChangedL ( const TDesC& aNewServerName, TBool aDefaultServerChanged = EFalse );
       
   161 
       
   162         /**
       
   163          * @see MWVSettingsUICaller
       
   164          */
       
   165         HBufC* CurrentServerNameLC();
       
   166 
       
   167     private: // From MCALayoutChangeObserver
       
   168 
       
   169         /**
       
   170          * Called when layout/skins change
       
   171          * @since 2.1
       
   172          */
       
   173         void LayoutChangedL( TInt aType );
       
   174 
       
   175     private:    // Data
       
   176 
       
   177         // Doesn't own. View switcher
       
   178         MCAViewSwitcher& iViewSwitcher;
       
   179 
       
   180         // Owns. Listbox.
       
   181         CAknSettingStyleListBox* iListBox;
       
   182 
       
   183         // Owns. SAP settings store
       
   184         CIMPSSAPSettingsStore* iSAPSettingsStore;
       
   185 
       
   186         // Doesn't own. Handle to application settings.
       
   187         MCASettingsPC& iSettingsPC;
       
   188 
       
   189         // Does settings view need to be refreshed
       
   190         TBool iNeedRefresh;
       
   191 
       
   192         // Doesn't own (destroys itself).
       
   193         CWVSettingsUIDialog* iServSettingsDialog;
       
   194 
       
   195         // Doesn't own (singleton).
       
   196         MCAOpBrandVariant* iOpBrand;
       
   197 
       
   198         //Doesn't own
       
   199         CCAAppUi* iAppUi;
       
   200 
       
   201 #ifdef RD_SERVICE_ENHANCEMENTS
       
   202         // ETrue while service settings dialog launched
       
   203         TBool iServSettingsDialogActive;
       
   204 #endif  // RD_SERVICE_ENHANCEMENTS
       
   205     };
       
   206 
       
   207 #endif      // CCASETTINGSVIEWCONTAINER_H
       
   208 
       
   209 // End of File