appinstaller/AppMngr2/GSSettingsPlugin/inc/appmngr2gssettingsplugin.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2003-2008 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:   AppMngr2 Settings plug-in for GS (General Settings)
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_APPMNGR2GSSETTINGSPLUGIN_H
       
    20 #define C_APPMNGR2GSSETTINGSPLUGIN_H
       
    21 
       
    22 #include <gsplugininterface.h>          // CGSPluginInterface
       
    23 #include <eiklbo.h>                     // MEikListBoxObserver
       
    24 #include <ConeResLoader.h>              // RConeResourceLoader
       
    25 
       
    26 class CAppMngr2GSSettingsContainer;
       
    27 
       
    28 const TInt KAppMngr2GSSettingsUidValue = 0x101F9A11;
       
    29 const TUid KAppMngr2GSSettingsUid  = { KAppMngr2GSSettingsUidValue };
       
    30 
       
    31 
       
    32 class CAppMngr2GSSettingsPlugin : public CGSPluginInterface, public MEikListBoxObserver
       
    33     {
       
    34 public:     // constructors and destructor
       
    35     static CAppMngr2GSSettingsPlugin* NewL( TAny* aInitParams );
       
    36     ~CAppMngr2GSSettingsPlugin();
       
    37 
       
    38 public:     // from CGSPluginInterface
       
    39     void GetCaptionL( TDes& aCaption ) const;
       
    40     CGulIcon* CreateIconL( const TUid aIconType );
       
    41     TInt PluginProviderCategory() const;
       
    42 
       
    43 public:     // from CAknView, via CGSPluginInterface
       
    44     TUid Id() const;
       
    45     void HandleCommandL( TInt aCommand );
       
    46     void HandleViewRectChange();
       
    47     void DynInitMenuPaneL( TInt aResourceId,CEikMenuPane* aMenuPane );
       
    48 
       
    49 public:     // from MEikListBoxObserver
       
    50     void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
       
    51 
       
    52 protected:  // from CAknView, via CGSPluginInterface
       
    53     void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
       
    54             const TDesC8& aCustomMessage );
       
    55     void DoDeactivate();
       
    56     void HandleForegroundEventL( TBool aForeground );
       
    57 
       
    58 private:    // new functions
       
    59     CAppMngr2GSSettingsPlugin();
       
    60     void ConstructL();
       
    61 
       
    62     void HandleListBoxSelectionL();
       
    63     void ShowSettingPageL( TInt aSettingIndex );
       
    64     void SetPermissionL( TInt aSettingIndex, TInt aNewValueIndex, TPtrC16 aUrlText );
       
    65     TInt MapOCSPIndex( TInt aValue );
       
    66 
       
    67 private:    // data
       
    68     CAppMngr2GSSettingsContainer* iContainer;
       
    69     RConeResourceLoader iResources;
       
    70     TVwsViewId iPrevViewId;
       
    71     };
       
    72 
       
    73 #endif  // C_APPMNGR2GSSETTINGSPLUGIN_H
       
    74