a821eb2a5b64249b94da4a1362c389b49d9c280c
[platform/core/location/maps-plugin-here.git] / inc / engine / geocoder / GeoCoderReply.h
1 /*
2  * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3  * This software, including documentation, is protected by copyright controlled by
4  * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5  * storing, adapting or translating, any or all of this material requires the prior
6  * written consent of HERE Global B.V. You may use this
7  * Software in accordance with the terms and conditions defined in the
8  * HERE Location Platform Services Terms and Conditions, available at
9  * http://developer.here.com/terms-conditions-base
10  *
11  * As an additional permission to the above, you may distribute Software,
12  * in object code format as part of an Application, according to, and subject to, terms and
13  * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14  * You may distribute such object code format Application under terms of your choice,
15  * provided that the header and source files of the Software have not been modified.
16  */
17
18 #ifndef GEOCODERREPLY_H_
19 #define GEOCODERREPLY_H_
20
21 #include "common/HereMaps_global.h"
22 #include "common/BaseReply.h"
23
24 HERE_MAPS_BEGIN_NAMESPACE
25
26 class Result;
27 class MetaInfo;
28
29
30 /**
31  * This class encapsulates a reply to a geocoding query. 
32  *
33  * The class receives the response data returned by the server in reply to a
34  * query asynchronously. Notification that the data is available comes via a
35  * listener object registered on the class by calling <code>AddListener()</code>.
36  * 
37  * @ingroup geocoding
38  */
39 class EXPORT_API GeoCoderReply : public BaseReply
40 {
41 public:
42
43     /**
44      * This is the default constructor. 
45      */
46     GeoCoderReply();
47
48     /**
49      * This is a destructor.
50      */
51     virtual ~GeoCoderReply();
52
53     /**
54      * This method retrieves a value indicating the number of results in the
55      * reply to the query.
56      * 
57      * @return An integer value indicating the number of results.
58      */
59     size_t GetNumResults() const;
60
61     /**
62      * This method retrieves a result at the index specified by the caller.
63      * 
64      * @param A value indicating the index of the result to retrieve.
65      * 
66      * @return A constant pointer to an instance of <code>Result</code>.
67      */
68     const Result* GetResult(size_t idx) const;
69
70     /**
71      * This method retrieves the reply meta information.
72      * 
73      * @return A constant pointer to an instance of <code>MetaInfo</code>. 
74      */
75     const MetaInfo* GetMetaInfo() const;
76
77 private:
78     HERE_MAPS_NO_COPY_NO_ASSIGN(GeoCoderReply);
79     friend class TestGeoCoderParser;
80
81     virtual bool OnDataReceived(const unsigned char* pBuffer, size_t uSize);
82
83     class GeoCoderReplyImpl;
84     GeoCoderReplyImpl* m_pImpl;
85 };
86
87 HERE_MAPS_END_NAMESPACE
88
89 #endif /* GEOCODERREPLY_H_ */