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
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.
18 #ifndef DISCOVERY_REPLY_H_
19 #define DISCOVERY_REPLY_H_
21 #include "finder/BaseFinderReply.h"
22 #include "finder/SearchItem.h"
23 #include "finder/PlaceItem.h"
24 #include "finder/DiscoveryQuery.h"
26 HERE_MAPS_BEGIN_NAMESPACE
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.
37 class EXPORT_API DiscoveryReply : public BaseFinderReply
42 * This is the default constructor.
47 * This is the (virtual) destructor.
49 virtual ~DiscoveryReply();
52 * This method retrieves a list of search result items that can lead an
53 * application user to detailed information about specific places.
55 * @return A vector of instances of <code>SearchItem</code> which represent
56 * individual search results.
58 SearchItemList GetSearchItems() const;
61 * This method retrieves a list of objects each of which contains
62 * information about a single place.
64 * @return A vector of instances of <code>PlaceItem</code> which represent
67 PlaceItemList GetPlaceItems() const;
70 * This method retrieves a string that contains the URL to the next page of
71 * search result items.
73 * @return A string containing the URL to a page containing the next set of
76 String GetNextResultsString() const;
79 * This method retrieves the offset (index) of the first item on the
80 * current page of results
82 * @return An integer indicating the index of the first result item on the
85 size_t GetOffset() const;
88 * This method retrieves an object that defines the search context used in
91 * @return An object containing the search context.
93 SearchContext GetSearchContext() const;
96 * This method retrieves a query object that can be used to retrieve the
97 * next page of results.
99 * @return A pointer to an object encapsulating a query to the next page of
102 DiscoveryQuery* GetNextPageQuery() const;
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);
112 HERE_MAPS_NO_COPY_NO_ASSIGN(DiscoveryReply);
113 friend class TestDiscoveryReply;
115 virtual bool OnDataReceived(const unsigned char* pBuffer, size_t uSize);
117 class DiscoveryReplyImpl;
118 DiscoveryReplyImpl* m_pImpl;
120 friend class JsonParser;
123 HERE_MAPS_END_NAMESPACE
125 #endif // DISCOVERY_REPLY_H_