gssettingsuis/Gs/GSCallBarringPlugin/Inc/GSCallBarringPlugin.h
branchRCL_3
changeset 54 7e0eff37aedb
equal deleted inserted replaced
53:8ee96d21d9bf 54:7e0eff37aedb
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Barrings sub-menu in General Settings.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef GSCALLBARRINGPLUGIN_H
       
    20 #define GSCALLBARRINGPLUGIN_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <gsbaseview.h>
       
    24 #include <aknview.h>
       
    25 #include <gspubsubslistener.h>
       
    26 #include <mgssettingpsobserver.h>
       
    27 #include <PsetCSP.h>
       
    28 #include <PsetCallBarring.h>
       
    29 #include <etelmm.h>
       
    30 #include <eikclb.h>
       
    31 
       
    32 #include "GSLocalBaseView.h"
       
    33 #include "CallBarringPlugin.hrh"
       
    34 
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class CGSBaseContainer;
       
    38 class CGSCallBarringPluginContainer;
       
    39 class CPsetCustomerServiceProfile;
       
    40 class CAknNavigationDecorator;
       
    41 class CPsetContainer;
       
    42 class CPsuiContainer;
       
    43 class CPsuiBarringObs;
       
    44 class CAknStaticNoteDialog;
       
    45 class CAknNoteDialog;
       
    46 
       
    47 // CONSTANTS
       
    48 _LIT( KGSCallBarringPluginIconDirAndName, "z:GSCallBarringPlugin.mbm");
       
    49 
       
    50 
       
    51 // CLASS DECLARATION
       
    52 /***************************************************
       
    53 *     CGSCallBarringPlugin class                   *
       
    54 ****************************************************/
       
    55 class CGSCallBarringPlugin : public CGSBaseView,
       
    56                              public MGSSettingPSObserver
       
    57     {
       
    58     public: // Constructors and destructor
       
    59 
       
    60         /* C++ Constructor */
       
    61         CGSCallBarringPlugin();
       
    62 
       
    63         /* Symbian OS two phase constructor - puts self into stack. 
       
    64         *
       
    65         * @return CGSCallBarringPlugin object
       
    66         */
       
    67         static CGSCallBarringPlugin* NewLC();
       
    68 
       
    69         /**
       
    70         * Destructor.
       
    71         */
       
    72         ~CGSCallBarringPlugin();
       
    73         
       
    74         /**
       
    75         * Symbian OS two-phased constructor
       
    76         * @return GS call barring view.
       
    77         */
       
    78         static CGSCallBarringPlugin* NewL( TAny* aInitParams );
       
    79         
       
    80         /**
       
    81         *
       
    82         */
       
    83         void HandleClientRectChange();
       
    84 
       
    85     public: // Functions from base classes
       
    86 
       
    87         /**
       
    88         * From CAknView, returns the views id.
       
    89         *
       
    90         * @return Returns TUid, which is the id of the view.
       
    91         */
       
    92         TUid Id() const;
       
    93 
       
    94         /**
       
    95         * From MEikCommandObserver, handles the commands given through menu.
       
    96         *
       
    97         * @param aCommand is the given command.
       
    98         */
       
    99         void HandleCommandL( TInt aCommand );
       
   100         
       
   101     public: // From CGSPluginInterface
       
   102 
       
   103         /**
       
   104         * @see CGSPluginInterface header file.
       
   105         */
       
   106         void GetCaptionL( TDes& aCaption ) const;
       
   107 
       
   108         /**
       
   109         * See base class.
       
   110         */
       
   111         CGulIcon* CreateIconL( const TUid aIconType );
       
   112 
       
   113         /**
       
   114         * @see CGSPluginInterface header file.
       
   115         */
       
   116         TInt PluginProviderCategory() const;
       
   117 
       
   118         /**
       
   119         * @see CGSPluginInterface header file.
       
   120         */
       
   121         TBool Visible() const;
       
   122 
       
   123         /**
       
   124         * @see CGSPluginInterface header file.
       
   125         */        
       
   126         TGSListboxItemTypes ItemType();
       
   127         
       
   128         void HandleSelection(
       
   129                     const TGSSelectionTypes aSelectionType );
       
   130     public: //new
       
   131         
       
   132         /**
       
   133         * This is a locally owned method used to activate
       
   134         * other local views seen from GSTelPlugin
       
   135         * @param aFeatureId feature ID of the folder
       
   136         */
       
   137         void ActivateInternalViewL();
       
   138 
       
   139         /**
       
   140         * This is a locally owned method used to initialize
       
   141         * other local views seen from GSTelPlugin
       
   142         * @param aLocalViewId view ID of local views to this plugin
       
   143         */
       
   144         void CreateLocalViewL( TUid aLocalViewId );
       
   145         
       
   146         /**
       
   147         * Removes sub-views owned by this plugin to make sure sub-view UIDs do
       
   148         * not clash.
       
   149         */
       
   150         void RemoveLocalViews();
       
   151         
       
   152         /**
       
   153         *Is VoIP feature supported 
       
   154         */
       
   155         TBool VoipSupported() const;
       
   156 
       
   157     protected: // from CAknView
       
   158 
       
   159         void DoActivateL( const TVwsViewId& aPrevViewId,
       
   160                           TUid aCustomMessageId,
       
   161                           const TDesC8& aCustomMessage );
       
   162     
       
   163         void DoDeactivate();
       
   164 
       
   165     private: // from base class
       
   166 
       
   167         /**
       
   168         * Symbian OS default constructor. 
       
   169         *
       
   170         */
       
   171         void ConstructL();
       
   172     
       
   173         /**
       
   174         * From CGSBaseView, handles selection of list box.
       
   175         */
       
   176         void HandleListBoxSelectionL();
       
   177 
       
   178         void NewContainerL();
       
   179     
       
   180     private: // From MGSSettingPSObserver
       
   181         /**
       
   182         * Callback from MGSSettingPSObserver
       
   183         */
       
   184         void HandleNotifyPSL( const TUid aUid, const TInt& aKey, 
       
   185                               const TRequestStatus& aStatus );
       
   186         
       
   187     private: //new
       
   188         /**
       
   189         * Retrieves container pointer.
       
   190         */
       
   191         CGSCallBarringPluginContainer*  Container();
       
   192 
       
   193         /**
       
   194         * Customer Service Profile status setting
       
   195         */
       
   196         void SetCSPActiveL( TBool aValue );
       
   197 
       
   198     private: // Member variables
       
   199         //Navi pane
       
   200         CAknNavigationDecorator* iNaviPaneContext;
       
   201         //PubSub object for BT SAP state
       
   202         CGSPubSubsListener* iBtSapListener;
       
   203         //check if CSP is active
       
   204         CPsetCustomerServiceProfile* iCSP;
       
   205         // Call barring view. Not owned by this - owned by iAppUi.
       
   206         CGSLocalBaseView* iBarringView;
       
   207         // check if voip supported
       
   208         TBool iVoipSupported;
       
   209     };
       
   210 
       
   211 #endif //GSCALLBARRINGPLUGIN_H
       
   212 
       
   213 // End of File