Kgapi

latitudeservice.h
1/*
2 SPDX-FileCopyrightText: 2012 Jan Grulich <grulja@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include "kgapilatitude_export.h"
10#include "latitude.h"
11#include "types.h"
12
13namespace KGAPI2
14{
15
16/**
17 * @brief Additional methods for implementing support for Google Latitude service
18 *
19 * You should never need to use these methods, unless implementing your own Job
20 */
21namespace LatitudeService
22{
23
24/**
25 * @brief Parses JSON data into a Location object
26 *
27 * @param jsonData
28 */
29KGAPILATITUDE_DEPRECATED_EXPORT LocationPtr JSONToLocation(const QByteArray &jsonData);
30
31/**
32 * @brief Serializes a Location object to JSON
33 *
34 * @param location
35 */
36KGAPILATITUDE_DEPRECATED_EXPORT QByteArray locationToJSON(const LocationPtr &location);
37
38/**
39 * @brief Parses a JSON feed into list of Locations
40 *
41 * @param jsonFeed
42 * @param feedData The structure will be filled with additional data about
43 * the feed
44 */
45KGAPILATITUDE_DEPRECATED_EXPORT ObjectsList parseLocationJSONFeed(const QByteArray &jsonFeed, FeedData &feedData);
46
47/**
48 * @brief Supported version of API
49 */
50KGAPILATITUDE_DEPRECATED_EXPORT QString APIVersion();
51
52/**
53 * @brief Returns URL for fetch current user's location
54 *
55 * @param granularity
56 */
57KGAPILATITUDE_DEPRECATED_EXPORT QUrl retrieveCurrentLocationUrl(const Latitude::Granularity granularity = Latitude::City);
58
59/**
60 * @brief Returns URL for deleting user's current location
61 */
62KGAPILATITUDE_DEPRECATED_EXPORT QUrl deleteCurrentLocationUrl();
63
64/**
65 * @brief Returns URL for uploading user's current location
66 */
67KGAPILATITUDE_DEPRECATED_EXPORT QUrl insertCurrentLocationUrl();
68
69/**
70 * @brief Returns URL for fetching history of user's locations
71 *
72 * @param granularity Precision of the coordinates
73 * @param maxResults Maximum amount of results to return
74 * @param maxTime Maximum timestamp since epoch (in ms)
75 * @param minTime Minimum timestamp since epoch (in ms)
76 */
77KGAPILATITUDE_DEPRECATED_EXPORT QUrl locationHistoryUrl(const Latitude::Granularity granularity,
78 const int maxResults = 0,
79 const qlonglong maxTime = 0,
80 const qlonglong minTime = 0);
81
82/**
83 * @brief URL for fetching a specific location
84 *
85 * @param id
86 * @param granularity;
87 */
88KGAPILATITUDE_DEPRECATED_EXPORT QUrl retrieveLocationUrl(const qlonglong id, const Latitude::Granularity granularity = Latitude::City);
89
90/**
91 * @brief Returns URL for uploading a location
92 */
93KGAPILATITUDE_DEPRECATED_EXPORT QUrl insertLocationUrl();
94
95/**
96 * @brief Returns URL to delete a specific location
97 *
98 * @param id
99 */
100KGAPILATITUDE_DEPRECATED_EXPORT QUrl deleteLocationUrl(const qlonglong id);
101
102} // namespace LatitudeService
103
104} // namespace KGAPI2
QString APIVersion()
Supported version of API.
QUrl deleteLocationUrl(const qlonglong id)
Returns URL to delete a specific location.
ObjectsList parseLocationJSONFeed(const QByteArray &jsonFeed, FeedData &feedData)
Parses a JSON feed into list of Locations.
QUrl deleteCurrentLocationUrl()
Returns URL for deleting user's current location.
QUrl retrieveCurrentLocationUrl(const Latitude::Granularity granularity)
Returns URL for fetch current user's location.
QByteArray locationToJSON(const LocationPtr &location)
Serializes a Location object to JSON.
QUrl retrieveLocationUrl(const qlonglong id, const Latitude::Granularity granularity)
URL for fetching a specific location.
QUrl locationHistoryUrl(const Latitude::Granularity granularity, const int maxResults, const qlonglong maxTime, const qlonglong minTime)
Returns URL for fetching history of user's locations.
QUrl insertCurrentLocationUrl()
Returns URL for uploading user's current location.
LocationPtr JSONToLocation(const QByteArray &jsonData)
Parses JSON data into a Location object.
QUrl insertLocationUrl()
Returns URL for uploading a location.
A job to fetch a single map tile described by a StaticMapUrl.
Definition blog.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:59:23 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.