Kgapi

childreference.h
1/*
2 SPDX-FileCopyrightText: 2012 Andrius da Costa Ribas <andriusmao@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 "kgapidrive_export.h"
10#include "object.h"
11#include "types.h"
12
13#include <QString>
14#include <QUrl>
15
16namespace KGAPI2
17{
18
19namespace Drive
20{
21
22/**
23 * @brief ChildReference contains a reference to a folder's child.
24 *
25 * Getters and setters' documentation is based on Google Drive's API v2 reference
26 * @see <a href="https://developers.google.com/drive/v2/reference/children">Children</a>
27 *
28 * @since 2.0
29 * @author Andrius da Costa Ribas <andriusmao@gmail.com>
30 * @author Daniel Vrátil <dvratil@redhat.com>
31 */
32class KGAPIDRIVE_EXPORT ChildReference : public KGAPI2::Object
33{
34public:
35 explicit ChildReference(const QString &id);
36 explicit ChildReference(const ChildReference &other);
37 ~ChildReference() override;
38 bool operator==(const ChildReference &other) const;
39 bool operator!=(const ChildReference &other) const
40 {
41 return !operator==(other);
42 }
43
44 /**
45 * @brief Returns the id of the child.
46 */
47 [[nodiscard]] QString id() const;
48
49 /**
50 * @brief Returns a link back to this reference.
51 */
52 [[nodiscard]] QUrl selfLink() const;
53
54 /**
55 * @brief Returns a link to the child.
56 */
57 [[nodiscard]] QUrl childLink() const;
58
59 static ChildReferencePtr fromJSON(const QByteArray &jsonData);
60 static ChildReferencesList fromJSONFeed(const QByteArray &jsonData, FeedData &feedData);
61 static QByteArray toJSON(const ChildReferencePtr &reference);
62
63private:
64 class Private;
65 Private *const d;
66 friend class Private;
67};
68
69} /* namespace Drive */
70
71} /* namespace KGAPI2 */
ChildReference contains a reference to a folder's child.
Structure to store additional information about a feed.
Definition types.h:24
Base class for all objects.
Definition object.h:31
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 Tue Mar 26 2024 11:19:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.