voicerecorder/gsplugin/inc/CVRGSPlugin.h
branchRCL_3
changeset 20 072a5fa0c63b
parent 19 2f5c9ee7098c
child 21 c6bafb5162d8
equal deleted inserted replaced
19:2f5c9ee7098c 20:072a5fa0c63b
     1 /*
       
     2 * Copyright (c) 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:	Main settings view class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef GS_VOICERECORDERGSPLUGIN_H
       
    20 #define GS_VOICERECORDERGSPLUGIN_H
       
    21 
       
    22 // Includes
       
    23 #include <aknview.h>
       
    24 #include <eikclb.h>
       
    25 #include <ConeResLoader.h>
       
    26 #include <gsplugininterface.h>
       
    27 #include <gsbaseview.h>
       
    28 
       
    29 
       
    30 // Classes referenced
       
    31 class CVRGSPluginContainer;
       
    32 class CAknViewAppUi;
       
    33 class CGSBaseView;
       
    34 
       
    35 // Constants
       
    36 
       
    37 /** 
       
    38 * UPDATE THIS:
       
    39 *
       
    40 * This UID is used for both the view UID and the ECOM plugin implementation 
       
    41 * UID.
       
    42 */
       
    43 const TUid KGSVoiceRecorderGSPluginUid = { 0x1020729D };
       
    44 
       
    45 // CLASS DECLARATION
       
    46 
       
    47 /**
       
    48 *  CVRGSPlugin view class.
       
    49 *
       
    50 * This is an VoiceRecorderGS of the minimal GS plugin.CGSPluginInterface
       
    51 */
       
    52 class CVRGSPlugin : public CGSBaseView
       
    53     {
       
    54     
       
    55     public: // Constructors and destructor
       
    56         
       
    57         /**
       
    58         * Symbian OS two-phased constructor
       
    59         * @return 
       
    60         * @since 3.1
       
    61         */
       
    62         static CVRGSPlugin* NewL( TAny* aInitParams );
       
    63             
       
    64         /**
       
    65         * Destructor.
       
    66         */
       
    67         ~CVRGSPlugin();       
       
    68         
       
    69 
       
    70     public: // Functions from base classes
       
    71         
       
    72         /**
       
    73         * From CAknView, returns the views id.
       
    74         * @return Returns id of the view.
       
    75         * @since 3.1
       
    76         */       
       
    77         TUid Id() const;
       
    78         
       
    79          /**
       
    80         * From MEikCommandObserver, handles the menu based commands.
       
    81         * @param aCommand identifies the given command.
       
    82         * @since 3.1
       
    83         */
       
    84         void HandleCommandL( TInt aCommand );
       
    85         
       
    86         /**
       
    87         * Updates specific value to container 
       
    88         * @param aListItem item index to update
       
    89         * @param aNewValue new value for the setting
       
    90         * @since 3.1
       
    91         */
       
    92         void UpdateListBoxL( const TInt& aListItem, TInt aNewValue );
       
    93         
       
    94      public: // From CGSPluginInterface 
       
    95      
       
    96         /**
       
    97         * Method for getting caption of this plugin. This should be the
       
    98         * localized name of the settings view to be shown in parent view.
       
    99         * @param aCaption pointer to Caption variable
       
   100         * @since 3.1
       
   101         */
       
   102         void GetCaptionL( TDes& aCaption ) const;
       
   103         
       
   104         /**
       
   105         * Creates a new icon of desired type. Override this to provide custom
       
   106         * icons. Othervise default icon is used. Ownership of the created icon
       
   107         * is transferred to the caller.
       
   108         *
       
   109         * Icon type UIDs (use these defined constants):
       
   110         * KGSIconTypeLbxItem  -   ListBox item icon.
       
   111         * KGSIconTypeTab      -   Tab icon.
       
   112         *
       
   113         * @param aIconType UID Icon type UID of the icon to be created.
       
   114         * @return Pointer of the icon. NOTE: Ownership of this icon is
       
   115         *         transferred to the caller.
       
   116         * @since 3.1
       
   117         */
       
   118         CGulIcon* CreateIconL( const TUid aIconType );
       
   119         
       
   120         /**
       
   121         * Method for checking, if plugin should be visible and used in GS FW.
       
   122         * (for example shown in listbox of the parent view).
       
   123         *
       
   124         * On default plugin is visible. Overwrite this function to enable or
       
   125         * disable your plugin dynamically.
       
   126         *
       
   127         * @return ETrue if plugin should be visible in GS.
       
   128         * @return EFalse if plugin should not be visible in GS.
       
   129         * @since 3.1
       
   130         */
       
   131         TBool Visible() const;
       
   132         
       
   133         /**
       
   134         * Reserved for future use/plugin's custom functionality. This can be
       
   135         * overwritten if plugin needs to have custom functionality which cannot
       
   136         * be fulfilled otherwise.
       
   137         * @since 3.1
       
   138         */
       
   139         TAny* CustomOperationL( TAny* aParam1, TAny* aParam2 );
       
   140         
       
   141         /**
       
   142         * From CEikAppUi
       
   143         * Handle skin change event.
       
   144         * @since 3.1
       
   145         */
       
   146         void HandleClientRectChange();
       
   147         
       
   148         /**
       
   149         * From CAknView Activate this view
       
   150         * @param aPrevViewId 
       
   151         * @param aCustomMessageId 
       
   152         * @param aCustomMessage 
       
   153         * @since 3.1
       
   154         */
       
   155         void DoActivateL( const TVwsViewId& aPrevViewId,
       
   156                           TUid aCustomMessageId,
       
   157                           const TDesC8& aCustomMessage );
       
   158                           
       
   159         /**
       
   160         * From CAknView Deactivate this view
       
   161         * @since 3.1
       
   162         */
       
   163         void DoDeactivate();
       
   164         
       
   165         /**
       
   166         * Get VoiceRecorderGSPlugin's container.
       
   167         * @since 3.1
       
   168         */
       
   169         CVRGSPluginContainer* Container();
       
   170         
       
   171     protected:
       
   172 
       
   173         /**
       
   174         * C++ default constructor.
       
   175         */
       
   176         CVRGSPlugin();
       
   177 
       
   178         /**
       
   179         * Symbian OS default constructor.
       
   180         */
       
   181         void ConstructL();
       
   182         
       
   183         /**
       
   184         * Handles OK key press.
       
   185         * @since 3.1
       
   186         */
       
   187         void HandleListBoxSelectionL();
       
   188         
       
   189         /**
       
   190         * Creates new container.
       
   191         * @since 3.1
       
   192         */
       
   193         void NewContainerL();
       
   194  
       
   195         void CVRGSPlugin::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   196 
       
   197         
       
   198     protected: //Data        
       
   199        
       
   200         RConeResourceLoader iResourceLoader;
       
   201         
       
   202         // Buffered caption of the plugin. Owned
       
   203         HBufC* iCaption; 
       
   204         
       
   205     private:
       
   206     };
       
   207 
       
   208 #endif // GS_VoiceRecorderGSPLUGIN_H