mapnavproviderrefapp/inc/mnrpmapview.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:  CMnrpMapView class definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MNRP_MAPVIEW_H
       
    20 #define MNRP_MAPVIEW_H
       
    21 
       
    22 #include <aknview.h>
       
    23 
       
    24 class CMnrpEngine;
       
    25 class CMnrpMapModel;
       
    26 class CMnrpMapControl;
       
    27 
       
    28 class CMnrpMapViewService;
       
    29 class MMapSelectionCallback;
       
    30 
       
    31 /** Map view. Draws map on screen using information from 
       
    32  	CMnrpMapModel.
       
    33  */
       
    34 class CMnrpMapView : public CAknView
       
    35     {
       
    36     public: 
       
    37 
       
    38         static CMnrpMapView* NewL( TBool aChained, CMnrpEngine& aEngine );
       
    39         virtual ~CMnrpMapView();
       
    40         
       
    41         /** Shows map view in browser mode 
       
    42          *  @param aService Object to get map view options from
       
    43          */
       
    44         void SetMapModeL( CMnrpMapViewService& aService );
       
    45 
       
    46         /** Shows map view in selection mode 
       
    47          *  @param aService Object to get map view options from
       
    48          *  @param aCallback Object to inform about selection
       
    49          */
       
    50         void SetSelectionModeL( 
       
    51             CMnrpMapViewService& aService,  
       
    52             MMapSelectionCallback& aCallback );
       
    53 
       
    54         void HandleUserSelectionL( TInt aError );
       
    55 
       
    56         void StopSelection();
       
    57 		
       
    58     public: // from CAknView
       
    59 
       
    60         TUid Id() const;
       
    61 
       
    62         void HandleCommandL( TInt aCommand );
       
    63 
       
    64         void DoActivateL(
       
    65             const TVwsViewId& aPrevViewId,
       
    66             TUid aCustomMessageId,
       
    67             const TDesC8& aCustomMessage);
       
    68 
       
    69         void DoDeactivate();
       
    70         
       
    71         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane *aMenuPane );
       
    72 
       
    73     private:
       
    74 
       
    75         CMnrpMapView( CMnrpEngine& aEngine );
       
    76         void ConstructL( TBool aChained );
       
    77         
       
    78     private:
       
    79         /** Application engine */
       
    80         CMnrpEngine& iEngine;
       
    81     	
       
    82     	/** UI control */
       
    83         CMnrpMapControl* iControl;    
       
    84 
       
    85         /** Map view data */
       
    86         CMnrpMapViewService* iMapViewService;
       
    87 
       
    88         /** Selection callback listener */        
       
    89         MMapSelectionCallback* iSelectionCallback;
       
    90         
       
    91         TBool iChained;
       
    92     };
       
    93 
       
    94 #endif // MNRP_MAPVIEW_H
       
    95