Akonadi

changenotification.cpp
1/*
2 SPDX-FileCopyrightText: 2016 Daniel Vrátil <dvratil@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "changenotification.h"
8#include "private/protocol_p.h"
9
10using namespace Akonadi;
11
12namespace Akonadi
13{
14class ChangeNotificationPrivate : public QSharedData
15{
16public:
17 QDateTime timestamp;
18 QList<QByteArray> listeners;
20 ChangeNotification::Type type;
21};
22
23} // namespace Akonadi
24
25ChangeNotification::ChangeNotification()
26 : d(new ChangeNotificationPrivate)
27{
28}
29
30ChangeNotification::ChangeNotification(const ChangeNotification &other)
31 : d(other.d)
32{
33}
34
35ChangeNotification::~ChangeNotification()
36{
37}
38
39ChangeNotification &ChangeNotification::operator=(const ChangeNotification &other)
40{
41 d = other.d;
42 return *this;
43}
44
45bool ChangeNotification::isValid() const
46{
47 return d->timestamp.isValid();
48}
49
50void ChangeNotification::setType(ChangeNotification::Type type)
51{
52 d->type = type;
53}
54
55ChangeNotification::Type ChangeNotification::type() const
56{
57 return d->type;
58}
59
60void ChangeNotification::setListeners(const QList<QByteArray> &listeners)
61{
62 d->listeners = listeners;
63}
64
65QList<QByteArray> ChangeNotification::listeners() const
66{
67 return d->listeners;
68}
69
70void ChangeNotification::setTimestamp(const QDateTime &timestamp)
71{
72 d->timestamp = timestamp;
73}
74
75QDateTime ChangeNotification::timestamp() const
76{
77 return d->timestamp;
78}
79
80Protocol::ChangeNotificationPtr ChangeNotification::notification() const
81{
82 return d->notification;
83}
84
85void ChangeNotification::setNotification(const Protocol::ChangeNotificationPtr &ntf)
86{
87 d->notification = ntf;
88}
Emitted by Monitor::debugNotification() signal.
Helper integration between Akonadi and Qt.
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:00:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.