|
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: The header file for ReverseGeoCoderPlugin that creates the ReverseGeocoder |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __REVERSEGEOCODERPLUGIN_H__ |
|
20 #define __REVERSEGEOCODERPLUGIN_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 #include "reversegeocode.h" |
|
26 |
|
27 /** |
|
28 * CReverseGeoCoderPlugin |
|
29 * |
|
30 * An implementation of the CReverseGeoCoderPlugin definition. |
|
31 * Encapsulates the reverse goecoding functionality |
|
32 * This is concrete class, instance of which |
|
33 * ECOM framework gives to ECOM clients. |
|
34 */ |
|
35 class CReverseGeoCoderPlugin : public CBase |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Create instance of concrete implementation. |
|
41 * @return: Instance of this class. |
|
42 */ |
|
43 static CReverseGeoCoderPlugin* NewL(); |
|
44 |
|
45 /** |
|
46 * Static constructor. |
|
47 * @return: Instance of this class. |
|
48 */ |
|
49 static CReverseGeoCoderPlugin* NewLC(); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 ~CReverseGeoCoderPlugin(); |
|
55 |
|
56 |
|
57 protected: |
|
58 |
|
59 /** |
|
60 * The default constructor |
|
61 * Perform the first phase of two phase construction |
|
62 */ |
|
63 CReverseGeoCoderPlugin(); |
|
64 |
|
65 /** |
|
66 * Perform the second phase construction of a |
|
67 * CImplementationClassPlus object. |
|
68 */ |
|
69 void ConstructL(); |
|
70 |
|
71 public: |
|
72 |
|
73 /** |
|
74 * Creates the instance of Reverse Geocoder |
|
75 * |
|
76 */ |
|
77 void CreateReverseGeoCoderL(); |
|
78 |
|
79 /** |
|
80 * Initializes the ReverseGeoCodeObserver |
|
81 * @param: aObserver The observer class instance that is to be notified when reverse geocoding completes |
|
82 * |
|
83 */ |
|
84 virtual void AddObserverL(MReverseGeocodeObserver& aObserver); |
|
85 |
|
86 /** |
|
87 * A wrapper API to fetch the address from geocoordinates |
|
88 * Internally calls the ReverseGeoCoder |
|
89 * @param aLocality A TLocality object that contains the geocoordinate information |
|
90 * @param aOption Indicates if the connection is silent connection or not |
|
91 * |
|
92 */ |
|
93 virtual void GetAddressByCoordinateL( TLocality aLocality,const TConnectionOption aOption ); |
|
94 |
|
95 /** |
|
96 * Wrapper API to check if the ReverseGeoCoder allows a silent connection |
|
97 * @return:TBool Indicates if a silent connection is allowed |
|
98 * |
|
99 */ |
|
100 virtual TBool SilentConnectionAllowed(); |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 * iRevGeocoder |
|
106 * An instance of the CReverseGeocode class to fetch the place name from geocoordinates |
|
107 */ |
|
108 CReverseGeocode *iRevGeocoder; |
|
109 |
|
110 /* |
|
111 * iObserver |
|
112 * An instance of the class that is to be notified once Reverse Geocoding is completed |
|
113 */ |
|
114 MReverseGeocodeObserver* iObserver; |
|
115 /** |
|
116 * iDtorKey |
|
117 * Identification of the plugin on cleanup |
|
118 */ |
|
119 TUid iDtorKey; |
|
120 |
|
121 }; |
|
122 |
|
123 |
|
124 #endif //__REVERSEGEOCODERPLUGIN_H__ |
|
125 |
|
126 //End of file |
|
127 |