internetradio2.0/settingsviewinc/irsettingsviewbase.h
changeset 0 09774dfdd46b
equal deleted inserted replaced
-1:000000000000 0:09774dfdd46b
       
     1 /*
       
     2 * Copyright (c) 2006-2006 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:  Base class for the Settings View
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CIRSETTINGSVIEWBASE_H
       
    20 #define C_CIRSETTINGSVIEWBASE_H
       
    21 
       
    22 #include <coneresloader.h>
       
    23 #include <gsplugininterface.h>
       
    24 
       
    25 
       
    26 class CIRCommonSettingsContainer;
       
    27 
       
    28 /**
       
    29  * Implements the common settings view for internet Radio.
       
    30  * Inherited from the general settings plugin interface so that 
       
    31  * common behaviour can be shared between General Settings View and 
       
    32  * internet Radio's own settings view.
       
    33  */
       
    34 
       
    35   class CIRSettingsViewBase : public CGSPluginInterface
       
    36     {
       
    37 
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Destructor.
       
    42      */
       
    43     IMPORT_C virtual ~CIRSettingsViewBase();
       
    44     
       
    45     /**
       
    46      * ResolveDriveL()
       
    47      * Static version of ResolveDriveL.
       
    48      */
       
    49     IMPORT_C void ResolveDriveL( const RFs& aFs, TFileName& aFileName );
       
    50         
       
    51      /**
       
    52      * SetTitleL()
       
    53      * Sets the Title of the View
       
    54      */
       
    55 
       
    56     IMPORT_C void SetTitleL( TInt aResourceId );
       
    57     
       
    58         
       
    59      /**
       
    60      * HandleForegroundEventL()
       
    61      * Handles changes in keyboard focus when an application switches to 
       
    62      * foreground
       
    63      */
       
    64 
       
    65     IMPORT_C void HandleForegroundEventL( TBool aForeground );
       
    66 
       
    67 protected:
       
    68 
       
    69     /**
       
    70      * Constructor.
       
    71      */
       
    72     IMPORT_C CIRSettingsViewBase();
       
    73 
       
    74     /**
       
    75      * Second-phase constructor.
       
    76      */
       
    77     IMPORT_C void BaseConstructL();
       
    78 
       
    79     /**
       
    80      * Loads resource file with given resource loader
       
    81      *
       
    82      * @param aResourceLoader A reference to resource loader
       
    83      * @param aFileName The resource file to be opened, no path included
       
    84      */
       
    85     IMPORT_C void LoadResourcesL( RConeResourceLoader& aResourceLoader, const TDesC& aFileName );
       
    86     
       
    87 // from base class CAknView
       
    88 
       
    89     
       
    90      /**
       
    91      * DoActivateL()
       
    92      * View activation
       
    93      */
       
    94 
       
    95     IMPORT_C virtual void DoActivateL( const TVwsViewId& aPrevViewId,
       
    96     		 TUid aCustomMessageId, const TDesC8& aCustomMessage );
       
    97     		 
       
    98     		     
       
    99      /**
       
   100      * DoDeactivate()
       
   101      * View Deactivation
       
   102      */
       
   103 
       
   104     IMPORT_C virtual void DoDeactivate();
       
   105     
       
   106         
       
   107      /**
       
   108      * HandleCommandL()
       
   109      * Command Handler
       
   110      */
       
   111 
       
   112     IMPORT_C virtual void HandleCommandL( TInt aCommand );
       
   113     
       
   114     // from base class CGSPluginInterface
       
   115     
       
   116         
       
   117      /**
       
   118      * GetCaptionL()
       
   119      * Gets the caption
       
   120      */
       
   121 
       
   122     IMPORT_C virtual void GetCaptionL( TDes& aCaption ) const;
       
   123 
       
   124    
       
   125 private:
       
   126 
       
   127     /**
       
   128      * DeleteContainer()
       
   129      * Deletes the container and removes it from the view stack.
       
   130      */
       
   131     void DeleteContainer();
       
   132 
       
   133     /**
       
   134      * CreateContainerL()
       
   135      * Constructs new container
       
   136      */
       
   137     virtual void CreateContainerL() = 0;
       
   138     
       
   139     
       
   140 
       
   141 protected:
       
   142 
       
   143     
       
   144      /**
       
   145      * iContainer
       
   146      * Static version of ResolveDriveL.
       
   147      */
       
   148 
       
   149 	CIRCommonSettingsContainer* iContainer;
       
   150     
       
   151 private:
       
   152 
       
   153    
       
   154     /** 
       
   155      * iSettingsBaseResourceLoader
       
   156      * The resource loader for the resource file.
       
   157      */
       
   158     RConeResourceLoader iSettingsBaseResourceLoader;
       
   159 
       
   160 	/** 
       
   161 	 * iPrevViewUid
       
   162 	 * The UID of the view that activated this one. 
       
   163 	 */
       
   164     TUid iPrevViewUid;
       
   165     };
       
   166 
       
   167 #endif // C_CIRSETTINGSVIEWBASE_H