systemsettings/GSAccessoryPlugin/inc/gsaccessoryplugin.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Declaration of CGSAccessoryPlugin class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef GSACCESSORYPLUGIN_H
       
    20 #define GSACCESSORYPLUGIN_H
       
    21 
       
    22 #include <gsbaseview.h>
       
    23 #include <ConeResLoader.h>
       
    24 
       
    25 class CGSAccessoryPluginModel;
       
    26 class CGSAccBaseView;
       
    27 
       
    28 /**
       
    29 *  CGSAccessoryPlugin view class
       
    30 *
       
    31 *  @since S60 3.1
       
    32 */
       
    33 class CGSAccessoryPlugin : public CGSBaseView
       
    34     {
       
    35 
       
    36 public: // Constructors and destructor
       
    37 
       
    38     /**
       
    39     * Constructs a CGSAccessoryPlugin object.
       
    40     *
       
    41     * @return The new object
       
    42     */
       
    43     static CGSAccessoryPlugin* NewL( TAny* aInitParams );
       
    44 
       
    45     /**
       
    46     * Destructor.
       
    47     */
       
    48     virtual ~CGSAccessoryPlugin();
       
    49 
       
    50 private: // from CGSBaseView
       
    51 
       
    52     /**
       
    53     * @see class CGSBaseView.
       
    54     */
       
    55     void NewContainerL();
       
    56 
       
    57     /**
       
    58     * @see class CGSBaseView.
       
    59     */
       
    60     void HandleListBoxSelectionL();
       
    61 
       
    62 private: // From CGSPluginInterface
       
    63 
       
    64     /**
       
    65     * @see class CGSPluginInterface.
       
    66     */
       
    67     void GetCaptionL( TDes& aCaption ) const;
       
    68 
       
    69     /**
       
    70     * @see class CGSPluginInterface.
       
    71     */
       
    72     CGulIcon* CreateIconL( const TUid aIconType );
       
    73 
       
    74     /**
       
    75     * @see class CGSPluginInterface.
       
    76     */
       
    77     TInt PluginProviderCategory() const;
       
    78 
       
    79 private: // from CAknView
       
    80 
       
    81     /**
       
    82     * @see class CAknView.
       
    83     */
       
    84     TUid Id() const;
       
    85 
       
    86     /**
       
    87     * @see class CAknView.
       
    88     */
       
    89     void ProcessCommandL( TInt aCommand );
       
    90 
       
    91     /**
       
    92     * @see class CAknView.
       
    93     */
       
    94     void HandleCommandL( TInt aCommand );
       
    95 
       
    96 private: // From MEikMenuObserver
       
    97 
       
    98     /**
       
    99     * @see class MEikMenuObserver.
       
   100     */
       
   101     void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   102 
       
   103 private:
       
   104 
       
   105     /**
       
   106     * First phase constructor.
       
   107     */
       
   108     CGSAccessoryPlugin();
       
   109 
       
   110     /**
       
   111     * Second phase constructor.
       
   112     */
       
   113     void ConstructL();
       
   114 
       
   115     /**
       
   116     * Select and create local view based on current feature id.
       
   117     */
       
   118     void SelectLocalViewL();
       
   119 
       
   120     /**
       
   121     * Removes all local views that have been created.
       
   122     */
       
   123     void RemoveLocalViews();
       
   124 
       
   125     /**
       
   126     * Check if a local view already exists.
       
   127     *
       
   128     * @param aViewId Identifies the view.
       
   129     */
       
   130     TBool LocalViewExists( const TUid& aViewId ) const;
       
   131 
       
   132     /**
       
   133     * Change currently selected accessory to be the default accessory.
       
   134     */
       
   135     void ChangeDefaultAccessoryL();
       
   136 
       
   137 private: // data
       
   138 
       
   139     /** Resource loader. */
       
   140     RConeResourceLoader iResourceLoader;
       
   141 
       
   142     /** Data model. Own. */
       
   143     CGSAccessoryPluginModel* iModel;
       
   144 
       
   145     /**
       
   146     * Identifiers of local view that have been created. These are stored to
       
   147     * be able to remove them later.
       
   148     */
       
   149     RArray<TUid> iSubViewIds;
       
   150 
       
   151     /** To check for the dynamic menu key event. */
       
   152     TBool iRockerPress;
       
   153 
       
   154     };
       
   155 
       
   156 #endif // GSACCESSORYPLUGIN_H