File indexing completed on 2024-05-12 05:22:24
0001 /* 0002 SPDX-FileCopyrightText: 2012 Jan Grulich <grulja@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #pragma once 0008 0009 #include "kgapilatitude_export.h" 0010 #include "latitude.h" 0011 #include "types.h" 0012 0013 namespace KGAPI2 0014 { 0015 0016 /** 0017 * @brief Additional methods for implementing support for Google Latitude service 0018 * 0019 * You should never need to use these methods, unless implementing your own Job 0020 */ 0021 namespace LatitudeService 0022 { 0023 0024 /** 0025 * @brief Parses JSON data into a Location object 0026 * 0027 * @param jsonData 0028 */ 0029 KGAPILATITUDE_DEPRECATED_EXPORT LocationPtr JSONToLocation(const QByteArray &jsonData); 0030 0031 /** 0032 * @brief Serializes a Location object to JSON 0033 * 0034 * @param location 0035 */ 0036 KGAPILATITUDE_DEPRECATED_EXPORT QByteArray locationToJSON(const LocationPtr &location); 0037 0038 /** 0039 * @brief Parses a JSON feed into list of Locations 0040 * 0041 * @param jsonFeed 0042 * @param feedData The structure will be filled with additional data about 0043 * the feed 0044 */ 0045 KGAPILATITUDE_DEPRECATED_EXPORT ObjectsList parseLocationJSONFeed(const QByteArray &jsonFeed, FeedData &feedData); 0046 0047 /** 0048 * @brief Supported version of API 0049 */ 0050 KGAPILATITUDE_DEPRECATED_EXPORT QString APIVersion(); 0051 0052 /** 0053 * @brief Returns URL for fetch current user's location 0054 * 0055 * @param granularity 0056 */ 0057 KGAPILATITUDE_DEPRECATED_EXPORT QUrl retrieveCurrentLocationUrl(const Latitude::Granularity granularity = Latitude::City); 0058 0059 /** 0060 * @brief Returns URL for deleting user's current location 0061 */ 0062 KGAPILATITUDE_DEPRECATED_EXPORT QUrl deleteCurrentLocationUrl(); 0063 0064 /** 0065 * @brief Returns URL for uploading user's current location 0066 */ 0067 KGAPILATITUDE_DEPRECATED_EXPORT QUrl insertCurrentLocationUrl(); 0068 0069 /** 0070 * @brief Returns URL for fetching history of user's locations 0071 * 0072 * @param granularity Precision of the coordinates 0073 * @param maxResults Maximum amount of results to return 0074 * @param maxTime Maximum timestamp since epoch (in ms) 0075 * @param minTime Minimum timestamp since epoch (in ms) 0076 */ 0077 KGAPILATITUDE_DEPRECATED_EXPORT QUrl locationHistoryUrl(const Latitude::Granularity granularity, 0078 const int maxResults = 0, 0079 const qlonglong maxTime = 0, 0080 const qlonglong minTime = 0); 0081 0082 /** 0083 * @brief URL for fetching a specific location 0084 * 0085 * @param id 0086 * @param granularity; 0087 */ 0088 KGAPILATITUDE_DEPRECATED_EXPORT QUrl retrieveLocationUrl(const qlonglong id, const Latitude::Granularity granularity = Latitude::City); 0089 0090 /** 0091 * @brief Returns URL for uploading a location 0092 */ 0093 KGAPILATITUDE_DEPRECATED_EXPORT QUrl insertLocationUrl(); 0094 0095 /** 0096 * @brief Returns URL to delete a specific location 0097 * 0098 * @param id 0099 */ 0100 KGAPILATITUDE_DEPRECATED_EXPORT QUrl deleteLocationUrl(const qlonglong id); 0101 0102 } // namespace LatitudeService 0103 0104 } // namespace KGAPI2