Akonadi

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

KDE's Doxygen guidelines are available online.