locationsystemui/locationsysui/locsuplsettingsui/inc/locsuplsettingsview.h
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     1 /*
       
     2 * Copyright (c) 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:  SUPL Settings UI view
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_LOCSUPLSETTINGSVIEW_H_
       
    19 #define C_LOCSUPLSETTINGSVIEW_H_
       
    20 
       
    21 //  System Includes
       
    22 #include <data_caging_path_literals.hrh>
       
    23 #include <e32base.h>
       
    24 #include <aknview.h>
       
    25 #include <ConeResLoader.h>
       
    26 
       
    27 // User Includes
       
    28 #include "locsuplsettingsuid.hrh"
       
    29 #include "locsuplsettingseventhandler.h"
       
    30 
       
    31 // Forward Declarations
       
    32 class CLocSUPLSettingsContainer;
       
    33 class MLocSUPLSettingsEventHandler;
       
    34 class CLocSUPLSettingsUiEngine;
       
    35 
       
    36 
       
    37 // Constant Declarations
       
    38 const TUid KLocSUPLSettingsUiViewId = { KLOCSUPLSETTINGSUIUID3 };
       
    39 _LIT( KLocSUPLSettingsUiResFileName, "locsuplsettingsui.rsc" );
       
    40 
       
    41 // Class Declaration
       
    42 
       
    43 /**
       
    44  * SUPL Settings UI View. 
       
    45  * This class also handles all View specific events for SUPL settings
       
    46  */
       
    47 class CLocSUPLSettingsView : public CAknView
       
    48 	{
       
    49     public:
       
    50         /**
       
    51          * Creates new SUPL Settings UI View.
       
    52          *
       
    53          * @param aEngine                   Reference to the SUPL Settings
       
    54          *                                  engine
       
    55          * @param aEventHandler			    Reference to the Event Handler
       
    56          * @return CLocSUPLSettingsView*	Reference to the application view
       
    57          */                                                 
       
    58         static CLocSUPLSettingsView* NewL( 
       
    59                             CLocSUPLSettingsUiEngine&       aEngine,
       
    60         					MLocSUPLSettingsEventHandler&	aEventHandler );
       
    61 
       
    62 		/**
       
    63          * Creates new SUPL Settings UI View. Leaves the object on the 
       
    64          * Clean up stack
       
    65          *
       
    66          * @param aEngine                   Reference to the SUPL Settings
       
    67          *                                  engine          
       
    68          * @param aEventHandler			    Pointer to the Event Handler
       
    69 		 * @return CLocSUPLSettingsView*	Reference to the application view
       
    70          */                                                 
       
    71         static CLocSUPLSettingsView* NewLC( 
       
    72                             CLocSUPLSettingsUiEngine&       aEngine,
       
    73          					MLocSUPLSettingsEventHandler&	aEventHandler );
       
    74         
       
    75 		/**
       
    76 		 * Destructor
       
    77 		 */
       
    78 		~CLocSUPLSettingsView ();
       
    79 		
       
    80         /**
       
    81          * Handles the Screen Size update
       
    82          */
       
    83         void HandleScreenSizeChange();
       
    84         
       
    85         /**
       
    86          * Updates the View
       
    87          */
       
    88         void UpdateView();
       
    89         
       
    90         /**
       
    91          * Indicates that the SUPL settings view is started from the Location
       
    92          * settings UI server
       
    93          */
       
    94         void StartedFromAppServer();
       
    95             
       
    96         /**
       
    97 		 * Returns the Selected element. The list box model defines the
       
    98 		 * enumeration that would determine the current element that has been
       
    99 		 * selected
       
   100 		 *
       
   101 		 * @return TInt Index of the item selected
       
   102 		 */
       
   103 		TInt SelectedItemIndex();
       
   104 		         
       
   105 		/**
       
   106          * From CAknView. 
       
   107          */
       
   108 		void DoActivateL( const TVwsViewId& aPrevViewId,
       
   109 		 						 TUid		 aCustomMessageId,
       
   110 						   const TDesC8&	 aCustomMessage);
       
   111 		
       
   112 		/**
       
   113          * From CAknView. 
       
   114          */
       
   115         void DoDeactivate();
       
   116  
       
   117  		/**
       
   118          * From CAknView. Returns the View Id. Should be chosen to reflect 
       
   119 		 * the Implementation UID of the Plugin
       
   120          */
       
   121         TUid Id() const;
       
   122 
       
   123         /**
       
   124          * From CAknView. 
       
   125          */
       
   126         void HandleCommandL(TInt aCommand);
       
   127         
       
   128        /**
       
   129         * From MEikMenuObserver
       
   130         */
       
   131         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   132                 	
       
   133         /**
       
   134          * Resets the Setting View Configuration
       
   135          */
       
   136         void Reset();	
       
   137 		
       
   138 		/**
       
   139 		 * Confirmation query to delete
       
   140 		 */
       
   141 		TInt DeletionConfirmationQueryL( );
       
   142     
       
   143 	private:
       
   144 		/**
       
   145  		 * C++ Overloaded Constructor
       
   146 		 */
       
   147 		CLocSUPLSettingsView( CLocSUPLSettingsUiEngine&     aEngine,
       
   148 		 					  MLocSUPLSettingsEventHandler&	aEventHandler );
       
   149 
       
   150 		/**
       
   151 		 * Second Phase Constructor
       
   152 		 */
       
   153 		void ConstructL();
       
   154 
       
   155        /**
       
   156         * Shows or dims help option, depending wheather help feature
       
   157         * is supported or not.
       
   158         * @param aMenuPane
       
   159         */
       
   160         void HandleHelpFeature( CEikMenuPane& aMenuPane ) const;		
       
   161 		
       
   162        /**
       
   163         * Changes the command button groups for the view
       
   164         */
       
   165 		void ChangeMSKL();
       
   166 			
       
   167 	private:		
       
   168 		/**
       
   169 		 * Reference to the event Handler for handling UI events
       
   170 		 */
       
   171 		MLocSUPLSettingsEventHandler&		iEventHandler;
       
   172 	
       
   173 	    /**
       
   174 	     * Reference to the SUPL Settings engine
       
   175 	     */
       
   176 	    CLocSUPLSettingsUiEngine&           iEngine;	
       
   177 		/**
       
   178 		 * Container Object
       
   179 		 * Owns
       
   180 		 */
       
   181 		CLocSUPLSettingsContainer*			iContainer;
       
   182 		
       
   183 		/**
       
   184 		 * Boolean value to indicate that the SUPL settings UI is
       
   185 		 * started from the settings UI server.
       
   186 		 */
       
   187 		TBool                               iStartedFromServer;
       
   188 
       
   189 		/**
       
   190 		 * Integer value to indicate whether the SUPL server view
       
   191                  * or session view was launched
       
   192 		 */
       
   193 		TInt                               iViewLaunched;
       
   194 		
       
   195 	};			
       
   196 
       
   197 #endif // C_LOCSUPLSETTINGSVIEW_H_
       
   198