|
1 /* |
|
2 * Copyright (c) 2008-2008 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: Location plugin factory implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CESMRLOCATIONPLUGINIMPL_H |
|
20 #define CESMRLOCATIONPLUGINIMPL_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 //<cmail> |
|
25 #include "AknServerApp.h" |
|
26 //</cmail> |
|
27 |
|
28 #include "cesmrlocationplugin.h" |
|
29 |
|
30 class MESMRLocationPluginObserver; |
|
31 class CMnProvider; |
|
32 class CMnMapView; |
|
33 class CPosLandmark; |
|
34 class CESMRUrlParserPlugin; |
|
35 |
|
36 /** |
|
37 * CESMRLocationPlugin Ecom API implementatation |
|
38 */ |
|
39 class CESMRLocationPluginImpl: public CESMRLocationPlugin, |
|
40 public MAknServerAppExitObserver |
|
41 { |
|
42 public: |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * |
|
46 * @param aObserver extension for the API |
|
47 */ |
|
48 static CESMRLocationPluginImpl* NewL(); |
|
49 |
|
50 /** |
|
51 * C++ Destructor. |
|
52 */ |
|
53 virtual ~CESMRLocationPluginImpl(); |
|
54 |
|
55 public:// from base CESMRLocationPlugin ecom interface |
|
56 void SetObserver ( MESMRLocationPluginObserver* aObserver ); |
|
57 |
|
58 public:// from base class MESMRLocationPlugin |
|
59 void SelectFromMapL( const TDesC& aSearchQuery, const TDesC& aLocationUrl ); |
|
60 void SearchFromMapL( const TDesC& aSearchQuery ); |
|
61 void ShowOnMapL( const TDesC& aLocationUrl ); |
|
62 |
|
63 protected: // from base class CActive |
|
64 void DoCancel(); |
|
65 void RunL(); |
|
66 TInt RunError( TInt aError ); |
|
67 |
|
68 protected:// from base class MAknServerAppExitObserver |
|
69 void HandleServerAppExit( TInt aReason ); |
|
70 |
|
71 private: |
|
72 CESMRLocationPluginImpl(); |
|
73 void ConstructL(); |
|
74 void CreateMapViewL(); |
|
75 void HandleSelectFromMapCompletedL(); |
|
76 |
|
77 private: // data |
|
78 |
|
79 MESMRLocationPluginObserver* iObserver; |
|
80 |
|
81 /** |
|
82 * Map provider. |
|
83 * Own. |
|
84 */ |
|
85 CMnProvider* iProvider; |
|
86 |
|
87 /** |
|
88 * Map view. |
|
89 * Own. |
|
90 */ |
|
91 CMnMapView* iMapView; |
|
92 |
|
93 /** |
|
94 * UrlparserPlugin |
|
95 * Own. |
|
96 */ |
|
97 CESMRUrlParserPlugin* iUrlParser; |
|
98 |
|
99 /** |
|
100 * RPointerArray for landmarks to perform for example search from maps |
|
101 * with search string functionality |
|
102 * Own. |
|
103 */ |
|
104 RPointerArray<CPosLandmark> iLandMarks; |
|
105 }; |
|
106 |
|
107 #endif // CESMRLOCATIONPLUGINIMPL_H |