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: CMnrpMapViewService class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MNRP_MAPVIEWSERVICE_H |
|
20 #define MNRP_MAPVIEWSERVICE_H |
|
21 |
|
22 #include <mnmapviewservicebase.h> |
|
23 |
|
24 #include "mnrpappui.h" |
|
25 |
|
26 class CPosLandmark; |
|
27 |
|
28 /** Implementation of MapView service (KMnAppMapViewService). |
|
29 */ |
|
30 class CMnrpMapViewService : public CMnMapViewServiceBase, public MMapSelectionCallback |
|
31 { |
|
32 public : |
|
33 static CMnrpMapViewService* NewL(); |
|
34 |
|
35 protected : |
|
36 CMnrpMapViewService(); |
|
37 virtual ~CMnrpMapViewService(); |
|
38 void ConstructL(); |
|
39 |
|
40 CMnrpAppUi* AppUi(); |
|
41 |
|
42 protected: // from CMnMapViewServiceBase |
|
43 |
|
44 /** Handles client's request for showing map */ |
|
45 void HandleShowMapL(); |
|
46 |
|
47 /** Handles client's request for showing map from current location */ |
|
48 void HandleShowCurrentLocationL(); |
|
49 |
|
50 /** Handles client's request for selecting a location from map */ |
|
51 void HandleSelectFromMapL(); |
|
52 |
|
53 protected: // from CMnServiceBase |
|
54 |
|
55 /** Reports that client cancelled request */ |
|
56 void DoCancel(); |
|
57 |
|
58 void CompleteSelectionL( const TCoordinate& aSelection ); |
|
59 |
|
60 protected: // from MMapSelectionCallback |
|
61 |
|
62 void HandleSelectionL( const TCoordinate& aSelection ); |
|
63 |
|
64 void HandleSelectionL( TInt aLandmarkIndex ); |
|
65 void HandleSelectionL( TPosLmItemId aLandmarkId, TInt aDbIndex ); |
|
66 |
|
67 void HandleSelectionErrorL( TInt aError ); |
|
68 |
|
69 private: |
|
70 void StopSelection(); |
|
71 |
|
72 private: |
|
73 |
|
74 /** Flag shows that selection is ongoing */ |
|
75 TBool iSelecting; |
|
76 }; |
|
77 |
|
78 #endif // MNRP_MAPVIEWSERVICE_H |
|
79 |
|
80 |
|