Kgapi

childreference.h
1 /*
2  SPDX-FileCopyrightText: 2012 Andrius da Costa Ribas <[email protected]>
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 "types.h"
10 #include "object.h"
11 #include "kgapidrive_export.h"
12 
13 #include <QString>
14 #include <QUrl>
15 
16 namespace KGAPI2
17 {
18 
19 namespace 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 <[email protected]>
30  * @author Daniel Vr├ítil <[email protected]>
31  */
32 class KGAPIDRIVE_EXPORT ChildReference: public KGAPI2::Object
33 {
34 
35  public:
36  explicit ChildReference(const QString &id);
37  explicit ChildReference(const ChildReference &other);
38  ~ChildReference() override;
39  bool operator==(const ChildReference &other) const;
40  bool operator!=(const ChildReference &other) const { return !operator==(other); }
41 
42  /**
43  * @brief Returns the id of the child.
44  */
45  QString id() const;
46 
47  /**
48  * @brief Returns a link back to this reference.
49  */
50  QUrl selfLink() const;
51 
52  /**
53  * @brief Returns a link to the child.
54  */
55  QUrl childLink() const;
56 
57  static ChildReferencePtr fromJSON(const QByteArray &jsonData);
58  static ChildReferencesList fromJSONFeed(const QByteArray &jsonData,
59  FeedData &feedData);
60  static QByteArray toJSON(const ChildReferencePtr &reference);
61 
62  private:
63  class Private;
64  Private * const d;
65  friend class Private;
66 };
67 
68 } /* namespace Drive */
69 
70 } /* namespace KGAPI2 */
71 
Base class for all objects.
Definition: object.h:30
ChildReference contains a reference to a folder&#39;s child.
Structure to store additional information about a feed.
Definition: types.h:23
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:15
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jul 29 2021 23:11:32 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.