|
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: Application's adapter class to Map and Navigation use cases |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_GLXCOMMANDHANDLERAIWSHOWMAPHARDKEY_H |
|
22 #define C_GLXCOMMANDHANDLERAIWSHOWMAPHARDKEY_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <AiwCommon.h> |
|
26 #include <e32std.h> |
|
27 // EXTERNAL INCLUDES |
|
28 #include "AiwServiceHandler.h" // AIW service handler |
|
29 |
|
30 // INTERNAL INCLUDES |
|
31 #include "glxmedialistcommandhandler.h" // for MediaListCommandHandler |
|
32 |
|
33 class CAiwServiceHandler; |
|
34 class TCoordinate; |
|
35 |
|
36 /** |
|
37 * The class CGlxCommandHandlerAiwShowMapHardKey contains the implemenation |
|
38 * for only show on map Functionality: |
|
39 * To check map service providers |
|
40 * To show location on map |
|
41 * To navigate to the location |
|
42 */ |
|
43 |
|
44 NONSHARABLE_CLASS( CGlxCommandHandlerAiwShowMapHardKey ) |
|
45 : public CGlxMediaListCommandHandler |
|
46 { |
|
47 |
|
48 public: // Constructors and destructor |
|
49 /** |
|
50 * Symbian 1st phase static constructor. |
|
51 * |
|
52 */ |
|
53 IMPORT_C static CGlxCommandHandlerAiwShowMapHardKey* NewL(MGlxMediaListProvider* |
|
54 aMediaListProvider, |
|
55 TBool aHasToolbarItem); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 ~CGlxCommandHandlerAiwShowMapHardKey(); |
|
61 |
|
62 private: // From CGlxMediaListCommandHandler |
|
63 /** |
|
64 * Execute the command, if applicable. |
|
65 * @param aCommand The command to handle |
|
66 * @param aList List of media items |
|
67 * @return ETrue if command was handled, EFalse otherwise |
|
68 * @ref CGlxMediaListCommandHandler |
|
69 */ |
|
70 TBool DoExecuteL (TInt aCommandId, MGlxMediaList& aList); |
|
71 |
|
72 /** |
|
73 * Called when the owning view is activated |
|
74 * @param aViewId The ID of the view |
|
75 * @ref CGlxMediaListCommandHandler |
|
76 */ |
|
77 void DoActivateL (TInt aViewId); |
|
78 |
|
79 /** |
|
80 * Called when the owning view is deactivated |
|
81 */ |
|
82 void Deactivate(); |
|
83 // Below methods are commented as they hold implemenatation of dofferent commandhandler |
|
84 // To check map service providers |
|
85 // To navigate to the location |
|
86 //public: // New methods |
|
87 |
|
88 /** |
|
89 * It will return total map service providers. |
|
90 * @since S60 v9.1 |
|
91 * @ret total number of map service providers |
|
92 */ |
|
93 // TInt MapServiceProvidersL(); |
|
94 |
|
95 /** |
|
96 * It will show location on map |
|
97 * @since S60 v9.1 |
|
98 */ |
|
99 // IMPORT_C void ShowOnMapL( const TCoordinate& aCoordinate ); |
|
100 |
|
101 /** |
|
102 * It will navigate to location |
|
103 * @since S60 v9.1 |
|
104 */ |
|
105 // void NavigateToPlaceL( const TCoordinate& aCoordinate ); |
|
106 |
|
107 private: |
|
108 /** |
|
109 * C++ default constructor. |
|
110 */ |
|
111 CGlxCommandHandlerAiwShowMapHardKey(MGlxMediaListProvider* |
|
112 aMediaListProvider, |
|
113 TBool aHasToolbarItem); |
|
114 |
|
115 /** |
|
116 * Symbian 2nd phase constructor. |
|
117 */ |
|
118 void ConstructL(); |
|
119 |
|
120 private: // Data |
|
121 |
|
122 // ID of owning view |
|
123 TInt iViewId; |
|
124 |
|
125 // Owns : Pointer to AIW service handler to send service commands |
|
126 CAiwServiceHandler* iAiwServiceHandler; |
|
127 |
|
128 // Owns : Generic parameter input list |
|
129 CAiwGenericParamList* iInList; |
|
130 |
|
131 // Owns : Generic parameter output list |
|
132 CAiwGenericParamList* iOutList; |
|
133 }; |
|
134 |
|
135 #endif //C_GLXCOMMANDHANDLERAIWSHOWMAPHARDKEY_H |
|
136 |
|
137 // End of file |
|
138 |