bf10e666a5a12263cce1097e516137d6008e625b
[platform/core/location/maps-plugin-here.git] / inc / engine / geocoder / MetaInfo.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 METAINFO_H
19 #define METAINFO_H
20
21 #include "common/HereMaps_global.h"
22
23 HERE_MAPS_BEGIN_NAMESPACE
24
25 /**
26  * This class encapsulates meta information included in the search responses.  
27  * 
28  * \ingroup geocoding
29  */
30 class MetaInfo
31 {
32 public:
33     /**
34      * This method is the default constructor.
35      */
36     MetaInfo();
37
38     /**
39      * This method is the copy constructor.
40      * 
41      * @param rRhs A constant reference to an object whose contents are to be
42      *        copied to the newly created instance of the class.
43      */
44     MetaInfo(const MetaInfo& rRhs);
45
46     /**
47      * This method is the destructor.
48      */
49     ~MetaInfo();
50
51     /**
52      * This is the assignment operator.
53      * 
54      * @param rRhs A constant reference to an instance of
55      *        <code>MetaInfo</code> whose contents are to be copied into
56      *        the given instance.
57      */
58     MetaInfo& operator=(const MetaInfo& rRhs);
59
60     /**
61      * This methos sets a key that can be used in subsequent requests to
62      * access the next n results.
63      * 
64      * @param n A key that can be used in subsequent requests to
65      *        access the next n results.
66      */
67     void SetNextPageInformation(size_t n);
68
69     /**
70      * This method retrieves a key that can be used in subsequent requests to
71      * access the next n results.
72      * 
73      * @return A key that can be used in subsequent requests to
74      *        access the next n results.
75      */
76     bool GetNextPageInformation(size_t& rDst) const;
77
78     /**
79      * This method sets a key that can be used in subsequent requests to
80      * access the previous n results.
81      * 
82      * @param n A key that can be used in subsequent requests to
83      *        access the previous n results.
84      */
85     void SetPreviousPageInformation(size_t n);
86
87     /**
88      * This method retrieves a key that can be used in subsequent requests to
89      * access the previous n results.
90      * 
91      * @return A key that can be used in subsequent requests to
92      *        access the previous n results.
93      */
94     bool GetPreviousPageInformation(size_t& rDst) const;
95
96     /**
97      * This method sets the timestamp indicating when the search was run.
98      * 
99      * @param sTimestamp A constant reference to a string containing the
100      *        timestamp indicating when the search was run.
101      */
102     void SetTimestamp(const String& sTimestamp);
103
104     /**
105      * This method retrieves the timestamp indicating when the search was run.
106      * 
107      * @param rDst A reference to a string to which the
108      *        timestamp indicating when the search was run is to be copied.
109      * 
110      * @return <code>true</code> if the timestamp has been retrieved
111      *        successfully, <code>false</code> if the time stamp cannot be
112      *        retrieved.
113      */
114     bool GetTimestamp(String& rDst) const;
115
116 private:
117     class MetaInfoImpl;
118     MetaInfoImpl* m_pImpl;
119 };
120
121 HERE_MAPS_END_NAMESPACE
122
123 #endif