tizen 2.4 release
[framework/location/maps-plugin-here.git] / src / here / here_geocode.h
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef _LOCATION_HERE_GEOCODER_H_
18 #define _LOCATION_HERE_GEOCODER_H_
19
20 //plug-in header
21 #include "here_manager.h"
22
23 // maps-service header
24 #include <maps_address.h>
25 #include <maps_coordinates.h>
26 #include <maps_area.h>
27
28 //map engine header
29 #include <geocoder/GeoCoderQuery.h>
30 #include <geocoder/GeoCoderQueryListener.h>
31 #include <geocoder/GeoCoderReply.h>
32 #include <geocoder/Result.h>
33 #include <common/GeoLocation.h>
34 #include <common/Address.h>
35
36
37 HERE_PLUGIN_BEGIN_NAMESPACE
38
39 using namespace HERE_MAPS_NAMESPACE_PREFIX;
40
41 class HereGeocode
42 : public HereBase
43 , public GeoCoderQueryListener
44 {
45 public:
46         /**
47          *This is the default constructor for Geocoder.
48          */
49
50         HereGeocode(void *pCbFunc, void *pUserData, int nReqId);
51
52         /**
53          *This is the default destructor for Geocoder.
54          */
55
56         ~HereGeocode();
57
58         here_error_e PrepareQuery();
59         here_error_e PreparePreference(maps_preference_h hPref);
60
61         here_error_e StartGeocode(const char* szAddr);
62         here_error_e StartGeocodeInsideArea(const char* szAddr, const maps_area_h hArea);
63         here_error_e StartGeocodeByStructuredAddress(const maps_address_h hAddr);
64
65         virtual void OnGeoCoderReply(const GeoCoderReply& Reply);
66
67 private:
68         GeoCoderQuery* m_pQuery;
69 };
70
71 HERE_PLUGIN_END_NAMESPACE
72
73 #endif //_LOCATION_HERE_GEOCODER_H_