changed attributes of header files
[platform/core/location/maps-plugin-here.git] / inc / engine / finder / DiscoveryReply.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 DISCOVERY_REPLY_H_
19 #define DISCOVERY_REPLY_H_
20
21 #include "finder/BaseFinderReply.h"
22 #include "finder/SearchItem.h"
23 #include "finder/PlaceItem.h"
24 #include "finder/DiscoveryQuery.h"
25
26 HERE_MAPS_BEGIN_NAMESPACE
27
28 class SearchContext;
29
30 /**
31  * This class encapsulates a response to a discovery query. The response is a
32  * page of link objects, each containing information about one place. It also
33  * includes a link to the next page of results, if available.  
34  * 
35  * \ingroup finder
36  */
37 class EXPORT_API DiscoveryReply : public BaseFinderReply
38 {
39 public:
40
41     /**
42      * This is the default constructor. 
43      */
44     DiscoveryReply();
45
46     /**
47      * This is the (virtual) destructor.
48      */
49     virtual ~DiscoveryReply();
50
51     /**
52      * This method retrieves a list of search result items that can lead an
53      * application user to detailed information about specific places.
54      * 
55      * @return A vector of instances of <code>SearchItem</code> which represent
56      *       individual search results.
57      */
58     SearchItemList GetSearchItems() const;
59
60     /**
61      * This method retrieves a list of objects each of which contains
62      * information about a single place.
63      * 
64      * @return A vector of instances of <code>PlaceItem</code> which represent
65      *       individual places.
66      */
67     PlaceItemList GetPlaceItems() const;
68
69     /**
70      * This method retrieves a string that contains the URL to the next page of
71      * search result items. 
72      * 
73      * @return A string containing the URL to a page containing the next set of
74      *       results.
75      */
76     String GetNextResultsString() const;
77
78     /**
79      * This method retrieves the offset (index) of the first item on the
80      * current page of results
81      * 
82      * @return An integer indicating the index of the first result item on the
83      *       current page.
84      */
85     size_t GetOffset() const;
86
87     /**
88      * This method retrieves an object that defines the search context used in
89      * the original query.
90      * 
91      * @return An object containing the search context.
92      */
93     SearchContext GetSearchContext() const;
94
95     /**
96      * This method retrieves a query object that can be used to retrieve the
97      * next page of results.
98      * 
99      * @return A pointer to an object encapsulating a query to the next page of
100      *       results.
101      */
102     DiscoveryQuery* GetNextPageQuery() const;
103
104 private:
105     void SetSearchItems(const SearchItemList&);
106     void SetPlaceItems(const PlaceItemList&);
107     void SetNextResults(const String&);
108     void SetOffset(size_t);
109     void SetSearchContext(const SearchContext& sContext);
110     
111 private:
112     HERE_MAPS_NO_COPY_NO_ASSIGN(DiscoveryReply);
113     friend class TestDiscoveryReply;
114
115     virtual bool OnDataReceived(const unsigned char* pBuffer, size_t uSize);
116
117     class DiscoveryReplyImpl;
118     DiscoveryReplyImpl* m_pImpl;
119
120     friend class JsonParser;
121 };
122
123 HERE_MAPS_END_NAMESPACE
124
125 #endif // DISCOVERY_REPLY_H_