locationsystemui/locationsysui/locpsysettings/locpsysettingsui/inc/locpsysettingsview.h
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     1 /*
       
     2 * Copyright (c) 2002,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:  View declaration for Position method settings UI
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CLOCPSYSETTINGSVIEW_H
       
    19 #define CLOCPSYSETTINGSVIEW_H
       
    20 
       
    21 // System Include
       
    22 #include <aknview.h>
       
    23 #include <AknServerApp.h>
       
    24 #include  <bldvariant.hrh>
       
    25 
       
    26 // User Include
       
    27 #include "locpsyengobserver.h"
       
    28 #include "locpsykeyprocessor.h"
       
    29 #include <lbs.h>                        // Location Acquisition API
       
    30 // CONSTANTS
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CLocPsySettingsContainer;
       
    34 class CLocPsyEng;
       
    35 class CEikMenuPane;
       
    36 class MLocPsyCommandHandler;
       
    37 class CAknQueryDialog;
       
    38 	
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 *  CLocPsySettingsView view class.
       
    43 * 
       
    44 */
       
    45 class CLocPsySettingsView : public CAknView, 
       
    46 				 		    public MLocPsyEngObserver, 
       
    47 				 		    public MLocPsyKeyProcessor,
       
    48 				 		    public MAknServerAppExitObserver
       
    49     {
       
    50     private:
       
    51         /**
       
    52         * C++ constructor
       
    53         * @param aKeyProcessor processes key events, ownership not transferred
       
    54         */
       
    55         CLocPsySettingsView( MLocPsyCommandHandler& 	aCommandHandler );
       
    56     public:
       
    57         /**
       
    58         * Destructor.
       
    59         */
       
    60         virtual ~CLocPsySettingsView();
       
    61 
       
    62         /**
       
    63         * C++ default constructor.
       
    64         * @param aKeyProcessor processes key events, ownership not transferred
       
    65         * @return created object
       
    66         */
       
    67         static CLocPsySettingsView* NewLC( MLocPsyCommandHandler& 	aCommandHandler );
       
    68 
       
    69         /**
       
    70         * C++ default constructor.
       
    71         * @param aKeyProcessor processes key events, ownership not transferred
       
    72         * @return created object
       
    73         */
       
    74         static CLocPsySettingsView* NewL( MLocPsyCommandHandler& 	aCommandHandler );
       
    75 
       
    76         /**
       
    77         * Handles the Screen Size update
       
    78         */
       
    79         void HandleScreenSizeChange();
       
    80 
       
    81     public:
       
    82         /**
       
    83         * From CAknView
       
    84         */
       
    85         TUid Id() const;
       
    86 
       
    87         /**
       
    88         * From CAknView
       
    89         */
       
    90         void HandleCommandL(TInt aCommand);
       
    91 
       
    92         /**
       
    93         * From CAknView
       
    94         */
       
    95         void ProcessCommandL( TInt aCommand );
       
    96 
       
    97     public:
       
    98         /**
       
    99         * From MEikMenuObserver
       
   100         */
       
   101         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   102         
       
   103     public:
       
   104         /**
       
   105         * From MLocPsyEngObserver
       
   106         */
       
   107         void NotifyL();
       
   108         
       
   109 		/**
       
   110         * From MLocPsyEngObserver
       
   111         */
       
   112         void NotifyError( TInt aErrorCode );
       
   113 
       
   114     public:
       
   115 		/**
       
   116         * From MLocPsyKeyProcessor
       
   117         */
       
   118 		TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
   119 			
       
   120     public:
       
   121 		/**
       
   122         * From MAknServerAppExitObserver
       
   123         */
       
   124 		virtual void HandleServerAppExit(TInt aReason);
       
   125         
       
   126     private:
       
   127         /**
       
   128         * By default Symbian 2nd phase constructor is private.
       
   129         */
       
   130         void ConstructL();
       
   131 
       
   132     private: 
       
   133     	/**
       
   134         * From CAknView
       
   135         */
       
   136         void DoActivateL( const TVwsViewId& aPrevViewId,
       
   137                                 TUid        aCustomMessageId,
       
   138                           const TDesC8&     aCustomMessage );
       
   139             
       
   140         /**
       
   141         * From CAknView
       
   142         */
       
   143         void DoDeactivate();
       
   144         
       
   145         /**
       
   146         * Launch the popup.
       
   147         *
       
   148         * @param aResourceId Resource ID.
       
   149         */
       
   150         void DoLaunchPopupL( TInt aResourceId );
       
   151         
       
   152         /**
       
   153         * Uses LocAppUI::ActivateLocalViewL.
       
   154         * @param aViewId
       
   155         * @param aCustomMessageId
       
   156         * @param aCustomMessage
       
   157         */
       
   158         void ActivateLocalViewL(       TUid     aViewId, 
       
   159                                        TUid     aCustomMessageId,
       
   160                                  const TDesC8&  aCustomMessage );
       
   161 
       
   162         /**
       
   163         * Uses LocAppUI::ActivateLocalViewL.
       
   164         * @param aViewId
       
   165         * @param aCustomMessageId
       
   166         * @param aCustomMessage
       
   167         */
       
   168         void ActivateLocalViewL( TUid aViewId );
       
   169 
       
   170         /**
       
   171         * Shows or dims help option, depending wheather help feature
       
   172         * is supported or not.
       
   173         * @param aMenuPane
       
   174         */
       
   175         void HandleHelpFeature( CEikMenuPane& aMenuPane ) const;
       
   176 
       
   177     private:
       
   178         /**
       
   179          * Owns
       
   180          */
       
   181     	CLocPsyEng*		   				iLocationEngine;
       
   182     	
       
   183     	MLocPsyCommandHandler& 		    iCommandHandler; 
       
   184         CLocPsySettingsContainer* 	    iContainer;  
       
   185         CEikMenuBar* 					iPopup;   
       
   186       
       
   187 		/**
       
   188 		 * Handle to the RPostionServer
       
   189 		 */
       
   190 		RPositionServer 				iPositionServer;    		
       
   191 		
       
   192 		/**
       
   193 		 * Reference to the confirmation query for disabling the
       
   194 		 * PSYs
       
   195 		 */
       
   196 		 CAknQueryDialog*				iConfirmationQuery;      
       
   197     };
       
   198 
       
   199 #endif // CLOCPSYSETTINGSVIEW_H
       
   200 
       
   201 // End of File