idlefw/plugins/mcsplugin/settings/inc/mcspluginsettings.h
changeset 0 79c6a41cd166
child 14 15e4dd19031c
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2009 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:  MCS settings plug-in main class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCSPLUGINSETTINGS_H
       
    20 #define MCSPLUGINSETTINGS_H
       
    21 
       
    22 #include <gsbaseview.h>
       
    23 
       
    24 class CMCSPluginSettingsContainer;
       
    25 class CMCSPluginSettingsModel;
       
    26 
       
    27 /**
       
    28  *  @ingroup group_mcsplugin
       
    29  *
       
    30  * MCS settings plug-in main class
       
    31  *
       
    32  * @lib mcspluginsettings.lib
       
    33  * @since S60 9.1
       
    34  */
       
    35 class CMCSPluginSettings : public CGSBaseView
       
    36 {
       
    37 
       
    38 public:
       
    39     /**
       
    40      * Part of the two phased constuction
       
    41      * 
       
    42      * @param aInitParams
       
    43      * @return CMCSPluginSettings*
       
    44      */
       
    45     static CMCSPluginSettings* NewL(TAny* aInitParams);
       
    46 
       
    47     /**
       
    48      * Destructor
       
    49      */
       
    50     virtual ~CMCSPluginSettings();
       
    51 
       
    52     // from base class CAknView
       
    53 
       
    54     /**
       
    55      * From CAknView
       
    56      * Returns view id.
       
    57      *
       
    58      * @since S60 3.2
       
    59      * @return TUid
       
    60      */
       
    61     TUid Id() const;
       
    62 
       
    63     /**
       
    64      * From CAknView
       
    65      * Handles commands.
       
    66      *
       
    67      * @since S60 3.2
       
    68      * @param aCommand Command to be handled.
       
    69      */
       
    70     void HandleCommandL(TInt aCommand);
       
    71 
       
    72     /**
       
    73      * See base class in AknView.h
       
    74      * 
       
    75      * @param aPrevViewId
       
    76      * @param aCustomMessageId
       
    77      * @param aCustomMessage
       
    78      */
       
    79     void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, 
       
    80         const TDesC8& aCustomMessage);
       
    81 
       
    82     /**
       
    83      * See base class.
       
    84      */
       
    85     void DoDeactivate();
       
    86 
       
    87     // from base class CGSPluginInterface
       
    88 
       
    89     /**
       
    90      * From CGSPluginInterface
       
    91      *
       
    92      * @since S60 3.2
       
    93      * @see CGSPluginInterface header file.
       
    94      * @param aCaption
       
    95      */
       
    96     void GetCaptionL(TDes& aCaption) const;
       
    97 
       
    98     /**
       
    99      * From CGSPluginInterface
       
   100      *
       
   101      * @since S60 3.2
       
   102      * @see CGSPluginInterface header file.
       
   103      * @return TInt
       
   104      */
       
   105     TInt PluginProviderCategory() const;
       
   106 
       
   107     /**
       
   108      * From CGSPluginInterface
       
   109      *
       
   110      * @since S60 3.2
       
   111      * @see CGSPluginInterface header file.
       
   112      * @return TBool
       
   113      */
       
   114     TBool Visible() const;
       
   115 
       
   116     /**
       
   117      * From CGSBaseView
       
   118      *
       
   119      * @since S60 3.2
       
   120      * Returns the container this view has.
       
   121      * @return pointer to container, does not transfer ownership.
       
   122      */
       
   123     CMCSPluginSettingsContainer* Container();
       
   124 
       
   125     /**
       
   126     * Check if view is activate
       
   127     * @since S60 5.1
       
   128     * @return ETrue if activated, EFalse otherwise
       
   129     */
       
   130     TBool Activated() const;
       
   131 
       
   132 protected:
       
   133 
       
   134 private: // From MEikMenuObserver
       
   135 
       
   136     /**
       
   137      * Changes MenuPane dynamically
       
   138      * 
       
   139      * @param aResourceId
       
   140      * @param aMenuPane
       
   141      */
       
   142     void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
   143 
       
   144 private:
       
   145     /**
       
   146      * CMCSPluginSettings
       
   147      */
       
   148     CMCSPluginSettings();
       
   149 
       
   150     /**
       
   151      * Part of the two phased construction
       
   152      */
       
   153     void ConstructL();
       
   154 
       
   155 
       
   156     // from base class CGSBaseView
       
   157 
       
   158     /**
       
   159      * From CGSBaseView
       
   160      * Functionality for creating a container. Called by DoActivateL().
       
   161      */
       
   162     void NewContainerL();
       
   163 
       
   164     /**
       
   165      * From CGSBaseView
       
   166      * Handles listbox selection. Called by HandleListBoxEventL.
       
   167      * Implement by sub-class.
       
   168      */
       
   169     void HandleListBoxSelectionL();
       
   170 
       
   171     /**
       
   172      * DoHandleListBoxSelectionL
       
   173      * 
       
   174      * @param aAny
       
   175      * @return TInt
       
   176      */
       
   177     static TInt DoHandleListBoxSelectionL( TAny* aAny );
       
   178 
       
   179 
       
   180 private:  // data
       
   181 
       
   182     /**
       
   183      * Settings plug-in model.
       
   184      * Own.
       
   185      */
       
   186     CMCSPluginSettingsModel* iModel;
       
   187 };
       
   188 
       
   189 #endif // MCSPLUGINSETTINGS_H
       
   190 
       
   191 // End of File.