25
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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(
|
|
60 |
const TDesC& aSearchQuery,
|
|
61 |
const TDesC& aLocationUrl );
|
|
62 |
void SelectFromMapL(
|
|
63 |
const TDesC& aSearchQuery,
|
|
64 |
const CCalGeoValue* aGeoValue );
|
|
65 |
void SearchFromMapL( const TDesC& aSearchQuery );
|
|
66 |
void ShowOnMapL( const TDesC& aLocationUrl );
|
|
67 |
void ShowOnMapL( const CCalGeoValue& aGeoValue );
|
|
68 |
|
|
69 |
protected: // from base class CActive
|
|
70 |
void DoCancel();
|
|
71 |
void RunL();
|
|
72 |
TInt RunError( TInt aError );
|
|
73 |
|
|
74 |
protected:// from base class MAknServerAppExitObserver
|
|
75 |
void HandleServerAppExit( TInt aReason );
|
|
76 |
|
|
77 |
private:
|
|
78 |
CESMRLocationPluginImpl();
|
|
79 |
void ConstructL();
|
|
80 |
void CreateMapViewL();
|
|
81 |
void HandleSelectFromMapCompletedL();
|
|
82 |
void SelectFromMapL(
|
|
83 |
const TDesC& aSearchQuery,
|
|
84 |
CPosLandmark* aLandmark );
|
|
85 |
void ShowLandmarkL( CPosLandmark* aLandmark );
|
|
86 |
CESMRUrlParserPlugin& UrlParserL();
|
|
87 |
|
|
88 |
private: // data
|
|
89 |
|
|
90 |
MESMRLocationPluginObserver* iObserver;
|
|
91 |
|
|
92 |
/**
|
|
93 |
* Map provider.
|
|
94 |
* Own.
|
|
95 |
*/
|
|
96 |
CMnProvider* iProvider;
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Map view.
|
|
100 |
* Own.
|
|
101 |
*/
|
|
102 |
CMnMapView* iMapView;
|
|
103 |
|
|
104 |
/**
|
|
105 |
* UrlparserPlugin
|
|
106 |
* Own.
|
|
107 |
*/
|
|
108 |
CESMRUrlParserPlugin* iUrlParser;
|
|
109 |
|
|
110 |
/**
|
|
111 |
* RPointerArray for landmarks to perform for example search from maps
|
|
112 |
* with search string functionality
|
|
113 |
* Own.
|
|
114 |
*/
|
|
115 |
RPointerArray<CPosLandmark> iLandMarks;
|
|
116 |
};
|
|
117 |
|
|
118 |
#endif // CESMRLOCATIONPLUGINIMPL_H
|