|
1 /* |
|
2 * Copyright (c) 2010 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: Declaration of Geo coding interface class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef POSREVERSEGEOCODEINTERFACE_H |
|
19 #define POSREVERSEGEOCODEINTERFACE_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <EPos_CPosLandmark.h> |
|
23 |
|
24 /* |
|
25 * Observer class which exposes callbacks to notify the completion of reversegeocoding event. |
|
26 * |
|
27 **/ |
|
28 class MPosReverseGeocodeObserver |
|
29 { |
|
30 public: |
|
31 /* |
|
32 * Callback function which notifys the completion of reverse geocode event. This signals the completion |
|
33 * of the asynchronous function CReverseGeoCode::GetAddressByCoordinate. |
|
34 * |
|
35 * @param aErrorcode Error status KErrNone in case of success or other system specific errorcodes |
|
36 * in case of failures. |
|
37 */ |
|
38 |
|
39 virtual void ReverseGeocodeComplete( TInt aErrorcode ) =0; |
|
40 }; |
|
41 |
|
42 /* |
|
43 * CReverseGeocode |
|
44 * Concrete class which exposes interfaces to convert the geo-coordinates information |
|
45 * in to the address information. |
|
46 * |
|
47 **/ |
|
48 class CPosReverseGeocodeInterface : public CBase |
|
49 { |
|
50 public: |
|
51 /* |
|
52 * Factory function to create the instance of CReverseGeocode Class. This also registers |
|
53 * observer for getting the reverse geocode completion notifications. |
|
54 * |
|
55 * @param[in] aObserver refrence to the instance MReverseGeocodeObserver's |
|
56 * implementation class. |
|
57 * @return pointer to the instance of CReverseGeocode. |
|
58 */ |
|
59 IMPORT_C static CPosReverseGeocodeInterface* NewL( MPosReverseGeocodeObserver& aObserver ); |
|
60 |
|
61 /** |
|
62 * Unloads the plugin. |
|
63 */ |
|
64 IMPORT_C virtual ~CPosReverseGeocodeInterface(); |
|
65 |
|
66 /* |
|
67 * |
|
68 * Gets the address information for the given geo coordinates. The geo-coordinates should be |
|
69 * encapsulated inside a landmark object which is passed as argument to this method. This is an |
|
70 * asyncronous function whose completion will be notified by |
|
71 * MReverseGeocodeObserver::ReverseGeocodeComplete call back.Address information corresponding to |
|
72 * coordinates can be retrieved from the same landmarks object. |
|
73 * |
|
74 * @param aLandmark[in/out] Landmarks object in which address information is expected. |
|
75 * |
|
76 */ |
|
77 IMPORT_C virtual void GetAddressByCoordinateL( CPosLandmark& aLandmark ) = 0; |
|
78 |
|
79 |
|
80 /** |
|
81 * Cancels the current operation. |
|
82 */ |
|
83 IMPORT_C virtual void Cancel() = 0; |
|
84 private: |
|
85 /** |
|
86 * Instance identifier key |
|
87 */ |
|
88 TUid iDtor_ID_Key; |
|
89 }; |
|
90 |
|
91 #endif //POSREVERSEGEOCODEINTERFACE_H |