mmshplugins/mmshsettingsuiplugin/inc/mussettingsplugin.h
changeset 15 ccd8e69b5392
parent 2 b31261fd4e04
child 20 e8be2c2e049d
child 22 496ad160a278
equal deleted inserted replaced
2:b31261fd4e04 15:ccd8e69b5392
     1 /*
       
     2 * Copyright (c) 2006-2007 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:  MUSSettingsPlugin implementation.
       
    15 *  Version     : %version: 21 % << Don't touch! Updated by Synergy at check-out.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef C_MUSSETTINGSPLUGIN_H
       
    22 #define C_MUSSETTINGSPLUGIN_H
       
    23 
       
    24 
       
    25 #include <aknview.h>
       
    26 #include <ConeResLoader.h>
       
    27 #include <eikclb.h>
       
    28 #include <gsplugininterface.h>
       
    29 #include <gsbaseview.h>
       
    30 #include <disknotifyhandler.h>
       
    31 
       
    32 
       
    33 class CMusSettingsContainer;
       
    34 class CAknNavigationDecorator;
       
    35 class CAknViewAppUi;
       
    36 class CMusSettingsModel;
       
    37 class CMusSIPProfileModel;
       
    38 
       
    39 
       
    40 /**  UID of *this* plugin. */
       
    41 const TUid KGSVSSettingsPluginUID = { 0x1028238F };
       
    42 
       
    43 /**  VS resource filename. */
       
    44 _LIT( KVSSettingsResourceFileName, "mussettingsuirsc.rsc" );
       
    45 
       
    46 /**  Name of icon of *this* plugin. Directory is KDC_BITMAP_DIR. */
       
    47 _LIT( KGSVSSettingsPluginIconDirAndName, "mussettingsplugin.mif");
       
    48 
       
    49 
       
    50 /**
       
    51  *  CMusSettingsPlugin view class.
       
    52  *  This class implements view of VS settings plugin.
       
    53  *
       
    54  *  @since S60 v3.2
       
    55  */
       
    56 class CMusSettingsPlugin : public CGSBaseView, public MDiskNotifyHandlerCallback
       
    57     {
       
    58 public:
       
    59 
       
    60     /**
       
    61      * Two-phased constructor.
       
    62      * @param aInitParams Params from framework. Not used.
       
    63      * @return Newly created instance of CMusSettingsPlugin class.
       
    64      */
       
    65     static CMusSettingsPlugin* NewL( TAny* aInitParams );
       
    66 
       
    67     /**
       
    68      * Destructor.
       
    69      */
       
    70     ~CMusSettingsPlugin();
       
    71 
       
    72     /**
       
    73      * Returns CGSBaseContainer sub-class.
       
    74      * Hides non-virtual base class function. (PC-Lint warning #1511).
       
    75      * @return CGSBaseContainer sub-class.
       
    76      */
       
    77     CMusSettingsContainer* Container();
       
    78 
       
    79 public: // From CAknView.
       
    80 
       
    81     /**
       
    82     * From CAknView.
       
    83     * Returns views id.
       
    84     * @return id for this view.
       
    85     */
       
    86     virtual TUid Id() const;
       
    87 
       
    88     /**
       
    89      * From CAknView.
       
    90      * Command handling function. Handles user initiated commands.
       
    91      * @param aCommand ID of the command to respond to.
       
    92      */
       
    93     virtual void HandleCommandL( TInt aCommand );
       
    94 
       
    95 public: // From CGSPluginInterface.
       
    96 
       
    97     /**
       
    98      * From CGSPluginInterface.
       
    99      * Method for getting caption of this plugin. This should be the
       
   100      * localized name of the settings view to be shown in parent view.
       
   101      *
       
   102      * @param aCaption Reference to descriptor to store caption.
       
   103      */
       
   104     virtual void GetCaptionL( TDes& aCaption ) const;
       
   105 
       
   106     /**
       
   107      * From CGSPluginInterface.
       
   108      * Creates a new icon of desired type. Overrided to provide custom
       
   109      * icons. Ownership of the created icon is transferred to the caller.
       
   110      *
       
   111      * Icon type UIDs (use these defined constants):
       
   112      * KGSIconTypeLbxItem  -   ListBox item icon.
       
   113      * KGSIconTypeTab      -   Tab icon.
       
   114      *
       
   115      * @param aIconType UID Icon type UID of the icon to be created.
       
   116      * @return Pointer of the icon. NOTE: Ownership of this icon is
       
   117      *         transferred to the caller.
       
   118      */
       
   119     virtual CGulIcon* CreateIconL( const TUid aIconType );
       
   120 
       
   121     /**
       
   122      * From CGSPluginInterface.
       
   123      * Method for reading the ID of the plugin provider category. See
       
   124      * TGSPluginProviderCategory. PluginProviderCategory is used for
       
   125      * sorting plugins.
       
   126      *
       
   127      * @return Plugin provider category ID defined in
       
   128      *         TGSPluginProviderCategory.
       
   129      */
       
   130     virtual TInt PluginProviderCategory() const;
       
   131 	
       
   132 
       
   133 public: // From MEikMenuObserver    
       
   134     
       
   135 	void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   136     
       
   137 public:     // From observer interface
       
   138     void HandleNotifyDisk( TInt aError, const TDiskEvent& aEvent );
       
   139 
       
   140 protected:
       
   141 
       
   142     CMusSettingsPlugin();
       
   143 
       
   144     void ConstructL();
       
   145     
       
   146     void OpenResourceFileL();
       
   147     void CloseResourceFile();
       
   148 
       
   149     /**
       
   150     * Hides non-virtual member from base class CGSBaseView.
       
   151     * (PC-Lint warning #1511).
       
   152     * Handles a change in client rectangle.
       
   153     */
       
   154     void HandleClientRectChange();
       
   155 
       
   156 // from base class CAknView.
       
   157 
       
   158     /**
       
   159      * From CAknView.
       
   160      * Handles a view activation and passes the message of type
       
   161      * @c aCustomMessageId. This function is called by @c AknViewActivatedL().
       
   162      * @param aPrevViewId Specifies the view previously active.
       
   163      * @param aCustomMessageId Specifies the message type.
       
   164      * @param aCustomMessage The activation message.
       
   165      */
       
   166     virtual void DoActivateL( const TVwsViewId& aPrevViewId,
       
   167                               TUid aCustomMessageId,
       
   168                               const TDesC8& aCustomMessage );
       
   169 
       
   170     /**
       
   171      * From CAknView.
       
   172      * This function is called by AknViewDeactivated() to indicate
       
   173      * deactivation of *this* view.
       
   174      */
       
   175     virtual void DoDeactivate();
       
   176 
       
   177 // from base class CGSBaseView.
       
   178 
       
   179     /**
       
   180     * From CGSBaseView.
       
   181     * Creates a container for *this* view. Called by DoActivateL().
       
   182     */
       
   183     virtual void NewContainerL();
       
   184 
       
   185 private:
       
   186 
       
   187     /**
       
   188     * Shows Profile Setting dialog.
       
   189     */
       
   190     void ShowVSSettingsProfileSettingDialogL();
       
   191 
       
   192     /**
       
   193     * Shows SIP profile selection dialog.
       
   194     */
       
   195     void ShowVSSettingsSelectSipProfileDialogL();
       
   196 
       
   197     /**
       
   198     * Shows Recorded Video Saving Setting dialog.
       
   199     */
       
   200     void ShowVSSettingsRecordedVideoSavingSettingDialogL();
       
   201 
       
   202     /**
       
   203     * Shows note setting dialog. In standard branch this is the "Capability
       
   204     * auditory note" setting and in operator variant this is the "Alerts"
       
   205     * setting displayed to user.
       
   206     */
       
   207     void ShowVSSettingsNoteSettingDialogL();
       
   208 
       
   209     /**
       
   210     * Shows notification of no profiles defined.
       
   211     */
       
   212     void ShowNoProfilesNotificationL();
       
   213 
       
   214     /**
       
   215     * Switches between two possible values from one to another.
       
   216     * Leaves with KErrArgument if setting is not recognised, otherwise
       
   217     * tries to toggle specified setting value and on failure leaves on
       
   218     * systemwide errorcode.
       
   219     * @param aValue Id of setting to toggle.
       
   220     */
       
   221     void SwitchOnOffValueL( TInt aValue );
       
   222     
       
   223     void ShowGlobalInformationDialogL( TInt aResourceId );
       
   224 
       
   225 // from base class CGSBaseView.
       
   226 
       
   227     /**
       
   228     * From CGSBaseView.
       
   229     * Handles listbox selection. Called by HandleListBoxEventL.
       
   230     */
       
   231     virtual void HandleListBoxSelectionL();
       
   232 
       
   233 protected: // data
       
   234 
       
   235 	HBufC* iCaption;
       
   236 	bool iResourceFileOpen;
       
   237 
       
   238     /**
       
   239      * Instance of SIP profile handler to manage SIP profiles.
       
   240      * Own.
       
   241      */
       
   242     CMusSIPProfileModel* iHandler;
       
   243 
       
   244 
       
   245     /**
       
   246      * Pointer of model class of this application.
       
   247      * Own.
       
   248      */
       
   249     CMusSettingsModel* iModel;
       
   250 
       
   251     /**
       
   252      * Resource loader to load resources.
       
   253      */
       
   254     RConeResourceLoader iResources;
       
   255 
       
   256     /**
       
   257      * Disk notify handler
       
   258      */
       
   259     CDiskNotifyHandler* iDiskNotifyHandler;
       
   260     };
       
   261 
       
   262 #endif // C_MUSSETTINGSPLUGIN_H