9a84d48ac9b9addb637729e222638b06ea378bd4
[platform/core/location/maps-plugin-here.git] / inc / engine / finder / FinderQueryListener.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 FINDERQUERYLISTENER_H
19 #define FINDERQUERYLISTENER_H
20
21 #include "common/HereMaps_global.h"
22
23 #include "common/QueryListener.h"
24
25 HERE_MAPS_BEGIN_NAMESPACE
26
27 class DiscoveryReply;
28 class PlaceDetailsReply;
29
30 /**
31  * This class encapsulates an object that is notified when a response to a query
32  * has become available. The derived classes must implement the methods defined
33  * on this class to handle the replies from the server.
34  */
35 class EXPORT_API FinderQueryListener : public QueryListener
36 {
37 public:
38
39     /**
40      * This is the default constructor.
41      */
42     FinderQueryListener();
43
44     /**
45      * This method is the destructor.
46      */
47     ~FinderQueryListener();
48
49     /**
50      * This method is a callback invoked when data have arrived in response to a
51      * places search request.
52      *
53      * @param rReply A constant reference to an object containing the response data.
54      */
55     virtual void OnDiscoverReply(const DiscoveryReply& rReply) = 0;
56
57     #ifdef TIZEN_MIGRATION
58     /**
59      * This method is a callback invoked when geocoding request is failed.
60      *
61      * @param rReply A Constant reference to an object containing the response data.
62      */
63     virtual void OnDiscoverFailure(const DiscoveryReply& rReply) = 0;
64     #endif
65
66     /**
67      * This method is a callback invoked when data have arrived in response to a
68      * places details request.
69      *
70      * @param rReply A constant reference to an object containing the response data.
71      */
72     virtual void OnPlaceDetailsReply(const PlaceDetailsReply& rReply) = 0;
73
74     #ifdef TIZEN_MIGRATION
75     /**
76      * This method is a callback invoked when geocoding request is failed.
77      *
78      * @param rReply A Constant reference to an object containing the response data.
79      */
80     virtual void OnPlaceDetailsFailure(const PlaceDetailsReply& rReply) = 0;
81     #endif
82
83 private:
84     HERE_MAPS_NO_COPY_NO_ASSIGN(FinderQueryListener);
85
86     void OnReplySuccess(BaseReply& rReply);
87
88     #ifdef TIZEN_MIGRATION
89     void OnFailure(const BaseReply& rReply);
90     #endif
91 };
92
93 HERE_MAPS_END_NAMESPACE
94
95 #endif