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 
15 class AKONADICORE_NO_EXPORT ChangeNotification::Private : public QSharedData
16 {
17 public:
18  QDateTime timestamp;
19  QVector<QByteArray> listeners;
21  ChangeNotification::Type type;
22 };
23 
24 } // namespace Akonadi
25 
26 ChangeNotification::ChangeNotification()
27  : d(new Private)
28 {
29 }
30 
31 ChangeNotification::ChangeNotification(const ChangeNotification &other)
32  : d(other.d)
33 {
34 }
35 
36 ChangeNotification::~ChangeNotification()
37 {
38 }
39 
40 ChangeNotification &ChangeNotification::operator=(const ChangeNotification &other)
41 {
42  d = other.d;
43  return *this;
44 }
45 
46 bool ChangeNotification::isValid() const
47 {
48  return d->timestamp.isValid();
49 }
50 
51 void ChangeNotification::setType(ChangeNotification::Type type)
52 {
53  d->type = type;
54 }
55 
56 ChangeNotification::Type ChangeNotification::type() const
57 {
58  return d->type;
59 }
60 
61 void ChangeNotification::setListeners(const QVector<QByteArray> &listeners)
62 {
63  d->listeners = listeners;
64 }
65 
66 QVector<QByteArray> ChangeNotification::listeners() const
67 {
68  return d->listeners;
69 }
70 
71 void ChangeNotification::setTimestamp(const QDateTime &timestamp)
72 {
73  d->timestamp = timestamp;
74 }
75 
76 QDateTime ChangeNotification::timestamp() const
77 {
78  return d->timestamp;
79 }
80 
81 Protocol::ChangeNotificationPtr ChangeNotification::notification() const
82 {
83  return d->notification;
84 }
85 
86 void ChangeNotification::setNotification(const Protocol::ChangeNotificationPtr &ntf)
87 {
88  d->notification = ntf;
89 }
90 
Type type(const QString &mimeType)
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 12 2020 23:16:55 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.