gssettingsuis/Gs/GSOpticalJoystickPlugin/Inc/GSOpticalJoystickPlugin.h
changeset 68 13e71d907dc3
parent 0 8c5d936e5675
equal deleted inserted replaced
40:6465d5bb863a 68:13e71d907dc3
       
     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:  View for GSOpticalJoystickPlugin
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GSOPTICALJOYSTICKPLUGIN_H
       
    19 #define GSOPTICALJOYSTICKPLUGIN_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <aknsettingpage.h>
       
    23 #include <gsbaseview.h>
       
    24 #include <ConeResLoader.h>
       
    25 #include <gsplugininterface.h>
       
    26 
       
    27 
       
    28 //CONSTANTS
       
    29 const TUid KGSOpticalJoystickPluginUid = { 0x1028331B };
       
    30 _LIT( KGSOpticalJoystickPluginIconDirAndName, "z:GSOpticalJoystickPlugin.mbm"); // Use KDC_BITMAP_DIR
       
    31 
       
    32 // MACROS
       
    33 
       
    34 // DATA TYPES
       
    35 
       
    36 // FUNCTION PROTOTYPES
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 class CAknViewAppUi;
       
    40 class CGSOpticalJoystickPluginContainer;
       
    41 class CGSOpticalJoystickPluginModel;
       
    42 
       
    43 // CLASS DEFINITION
       
    44 /**
       
    45 *  CGSOpticalJoystickPlugin view class for data call settings
       
    46 *  @since Series 60_3.1
       
    47 *
       
    48 */
       
    49 class CGSOpticalJoystickPlugin : public CGSBaseView,
       
    50                                  public MAknSettingPageObserver
       
    51     {
       
    52     public:
       
    53         enum TGSSettingIds
       
    54             {
       
    55             KGSOpticalJoystickSettingId
       
    56             };
       
    57 
       
    58     public: // Constructors and destructor
       
    59 
       
    60         /**
       
    61         * Symbian OS two-phased constructor
       
    62         * @return GS connection view.
       
    63         */
       
    64         static CGSOpticalJoystickPlugin* NewL( TAny* aInitParams );
       
    65 
       
    66         /**
       
    67         * Destructor
       
    68         */
       
    69         ~CGSOpticalJoystickPlugin();
       
    70 
       
    71     public: // From CGSPluginInterface
       
    72 
       
    73         /**
       
    74         * @see CGSPluginInterface header file.
       
    75         */
       
    76         void GetCaptionL( TDes& aCaption ) const;
       
    77 
       
    78         /**
       
    79         * See base class.
       
    80         */
       
    81         CGulIcon* CreateIconL( const TUid aIconType );
       
    82 
       
    83         /**
       
    84         * @see CGSPluginInterface header file.
       
    85         */
       
    86         TInt PluginProviderCategory() const;
       
    87 
       
    88         /**
       
    89         * @see CGSPluginInterface header file.
       
    90         */
       
    91         TBool Visible() const;
       
    92 
       
    93     public: // from MAknSettingPageObserver
       
    94 
       
    95         /**
       
    96         * Handle setting page events
       
    97         */
       
    98         virtual void HandleSettingPageEventL( CAknSettingPage* aSettingPage,
       
    99                                             TAknSettingPageEvent aEventType );
       
   100 
       
   101     public: // from base classes
       
   102 
       
   103         /**
       
   104         * Returns view id.
       
   105         * @return TUid
       
   106         */
       
   107         TUid Id() const;
       
   108 
       
   109         /**
       
   110         * Handles commands.
       
   111         * @param aCommand Command to be handled.
       
   112         *
       
   113         */
       
   114         void HandleCommandL( TInt aCommand );
       
   115 
       
   116     public: // new
       
   117 
       
   118         /**
       
   119         * Updates listbox's item's value.
       
   120         * @param aItemId An item which is updated.
       
   121         *
       
   122         */
       
   123         void UpdateListBoxL( TInt aItemId );
       
   124 
       
   125         /**
       
   126         * Get CGSOpticalJoystickPlugin's ccontainer.
       
   127         */
       
   128         CGSOpticalJoystickPluginContainer* Container();
       
   129 
       
   130     protected: // From CAknView
       
   131         void DoActivateL( const TVwsViewId& aPrevViewId,
       
   132                           TUid aCustomMessageId,
       
   133                           const TDesC8& aCustomMessage );
       
   134         void DoDeactivate();
       
   135     
       
   136     protected: // From MEikMenuObserver
       
   137 
       
   138         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   139 
       
   140     protected:
       
   141 
       
   142         /**
       
   143         * C++ default constructor.
       
   144         */
       
   145         CGSOpticalJoystickPlugin();
       
   146 
       
   147         /**
       
   148         * Symbian OS default constructor.
       
   149         *
       
   150         */
       
   151         void ConstructL();
       
   152 
       
   153         void HandleClientRectChange();
       
   154 
       
   155     private: // from CGSBaseView
       
   156 
       
   157         void NewContainerL();
       
   158         void HandleListBoxSelectionL();
       
   159 
       
   160     private: // new methods
       
   161 
       
   162         /**
       
   163         * Display dialup auto disconnect setting page.
       
   164         */
       
   165         void ShowSettingPageL();
       
   166 
       
   167     private:
       
   168         // resource loader
       
   169         RConeResourceLoader iResourceLoader;
       
   170 
       
   171     };
       
   172 
       
   173 #endif //GSOPTICALJOYSTICKPLUGIN_H
       
   174 
       
   175 // End of File