mapnavproviderrefapp/inc/mnrpappui.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     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:  CMnrpAppUi class definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MNRP_APPUI_H
       
    20 #define MNRP_APPUI_H
       
    21 
       
    22 #include <aknViewAppUi.h>
       
    23 #include <EPos_Landmarks.h>
       
    24 
       
    25 class TCoordinate;
       
    26 class CPosLandmark;
       
    27 
       
    28 class CMnrpAppView;
       
    29 class CMnrpNaviView;
       
    30 class CMnrpMapView;
       
    31 
       
    32 class CMnrpMapViewService;
       
    33 
       
    34 class CAknNavigationDecorator;
       
    35 class CAknNavigationControlContainer;
       
    36 
       
    37 class CMnrpEngine;
       
    38 
       
    39 /** Map selection callback class */
       
    40 class MMapSelectionCallback
       
    41     {
       
    42     public:
       
    43         /** Called when user selects location from map */
       
    44         virtual void HandleSelectionL( const TCoordinate& aSelection ) = 0;
       
    45 
       
    46         /** Called when user selects landmark from dialog list */
       
    47         virtual void HandleSelectionL( TInt aLandmarkIndex ) = 0;
       
    48         virtual void HandleSelectionL( TPosLmItemId aLandmarkId, TInt aDbIndex ) = 0;
       
    49         
       
    50         /** Called when user refuses selection */
       
    51         virtual void HandleSelectionErrorL( TInt aError ) = 0;
       
    52     };
       
    53 
       
    54 /** Simple App UI for MnRefProvider component.
       
    55  *	It manages application views.
       
    56  */
       
    57 class CMnrpAppUi : public CAknViewAppUi
       
    58     {
       
    59     public:
       
    60 
       
    61         CMnrpAppUi( CMnrpEngine& aEngine );
       
    62         void ConstructL();
       
    63         ~CMnrpAppUi();
       
    64 
       
    65         void ShowMapL( CMnrpMapViewService& aService );
       
    66 
       
    67         void StartSelectionL( 
       
    68             CMnrpMapViewService& aService,  
       
    69             MMapSelectionCallback& aCallback );
       
    70 
       
    71         void StopSelection();
       
    72 
       
    73         void ShowNavigationL( const CPosLandmark& aDestination );
       
    74 
       
    75 		/** Returns ETrue if Map or Navigaton view is still open */
       
    76         TBool IsAnyUserViewActive();
       
    77         
       
    78 		/** Returns ETrue if application was started embedded */
       
    79         TBool IsChainedMode();
       
    80 
       
    81         void SetNaviPaneTitleL( const TDesC& aPaneTitle );
       
    82         void SetRightSoftkeyCommandL( TInt aCommand, const TDesC& aButtonTitle );
       
    83         
       
    84     protected: // from CAknAppUi
       
    85     
       
    86         void HandleCommandL(TInt aCommand);
       
    87         void HandleResourceChangeL( TInt aType );
       
    88         TBool ProcessCommandParametersL( CApaCommandLine &aCommandLine );
       
    89 
       
    90     private:
       
    91 
       
    92         void PostConstructL();
       
    93 
       
    94         void SelectFromDialogL(
       
    95             CMnrpMapViewService& aService,
       
    96             MMapSelectionCallback& aCallback );
       
    97 
       
    98     private:
       
    99     	/** Empty view */
       
   100         CMnrpAppView* iAppView;
       
   101 
       
   102 		/** Navigation view */
       
   103         CMnrpNaviView* iNaviView;
       
   104 		/** Map view */
       
   105         CMnrpMapView* iMapView;
       
   106 
       
   107         //Own:
       
   108         CAknNavigationDecorator* iNaviPaneLabel;
       
   109 
       
   110         //Ref:
       
   111         CAknNavigationControlContainer* iNaviPane;
       
   112         
       
   113         TInt iParentWg;
       
   114 
       
   115         /** Reference to engine */
       
   116         CMnrpEngine& iEngine;
       
   117     };
       
   118 
       
   119 #endif // MNRP_APPUI_H
       
   120