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.
21 #include "common/HereMaps_global.h"
22 #include "common/QueryListener.h"
23 #include "common/RestItemHandle.h"
24 #ifdef TIZEN_MIGRATION
25 #include "base/HereObject.h"
30 HERE_MAPS_BEGIN_NAMESPACE
38 * This class is the base class representing any rest based query class
44 typedef int RequestId;
47 * This is the destructor.
52 * This method creates the query URI. It is to be implemented be derived classes.
56 virtual String CreateUri() const = 0;
60 * This constant represents an illegal URL (an empty string).
62 static const String ILLEGAL_URL;
65 * This is the default constructor.
70 * This method appends authentication credentials to the query. The
71 * authentication credentials are <code>app_id</code> and
72 * <code>app_code</code>. The method obtains the credentials set at
73 * initialization and copies them to the destination provided by the caller,
74 * following the standard query-parameter format:
75 * <code>app_id=app_id_value&app_code=app_code_value<code>
77 * @param sDst A reference to a string to receive the authentication
80 * @return <code>true</code> if the destination string has been set with the
81 * authentication credentials, <code>false</code> if the the
82 * <code>ApplicationContext</code> is uninitialized.
84 bool AppendCredentials(String& sDst) const;
86 #ifndef TIZEN_MIGRATION
88 * This method retrieves the user data associated with the query.
90 * @return A pointer to an object containing the user data.
92 Tizen::Maps::HereObject* GetUserData() const;
96 HERE_MAPS_NO_COPY_NO_ASSIGN(BaseQuery);
99 BaseQueryImpl* m_pImpl;
102 HERE_MAPS_END_NAMESPACE
104 #endif // BASEQUERY_H