Kgapi

object.h
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#pragma once
10
11#include <QSharedPointer>
12#include <QString>
13
14#include "kgapicore_export.h"
15#include "types.h"
16
17namespace KGAPI2
18{
19
20/**
21 * @brief Base class for all objects
22 *
23 * There are many container classes to represent data fetched from Google servers,
24 * like KGAPI2::Contact, KGAPI2::Event, etc. All these container classes must
25 * be subclasses of the KGAPI2::Object.
26 *
27 * @author Daniel Vrátil <dvratil@redhat.com>
28 * @since 2.0
29 */
30class KGAPICORE_EXPORT Object
31{
32public:
33 /**
34 * @brief Constructor
35 */
36 Object();
37
38 /**
39 * @brief Copy constructor
40 */
41 Object(const Object &other);
42
43 /**
44 * @brief Destructor
45 */
46 virtual ~Object();
47
48 bool operator==(const Object &other) const;
49
50 /**
51 * @brief Set the etag of this object.
52 *
53 * Etag represents a revision of an object. When the object is changed on the
54 * remote side it is given a new etag.
55 *
56 * @param etag
57 */
58 void setEtag(const QString &etag);
59
60 /**
61 * @brief Returns etag of this object.
62 *
63 * @return Etag string
64 */
65 [[nodiscard]] QString etag() const;
66
67private:
68 class Private;
69 Private *const d;
70 friend class Private;
71};
72
73} // namespace KGAPI2
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 Sat Dec 21 2024 17:00:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.