Akonadi

changenotification.h
1 /*
2  SPDX-FileCopyrightText: 2016 Daniel Vr├ítil <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QDateTime>
10 #include <QSharedDataPointer>
11 #include <QSharedPointer>
12 #include <QVector>
13 
14 #include "akonadicore_export.h"
15 
16 namespace Akonadi
17 {
18 namespace Protocol
19 {
20 class ChangeNotification;
21 using ChangeNotificationPtr = QSharedPointer<ChangeNotification>;
22 }
23 
24 class ChangeNotificationPrivate;
25 
26 /**
27  * Emitted by Monitor::debugNotification() signal.
28  *
29  * This is purely for debugging purposes and should never be used in regular
30  * applications.
31  *
32  * @since 5.4
33  */
34 class AKONADICORE_EXPORT ChangeNotification
35 {
36 public:
37  enum Type {
38  Items,
39  Collection,
40  Tag,
41  Relation,
42  Subscription,
43  };
44 
45  explicit ChangeNotification();
48 
49  ChangeNotification &operator=(const ChangeNotification &other);
50 
51  Q_REQUIRED_RESULT bool isValid() const;
52 
53  Q_REQUIRED_RESULT QDateTime timestamp() const;
54  void setTimestamp(const QDateTime &timestamp);
55 
56  Q_REQUIRED_RESULT QVector<QByteArray> listeners() const;
57  void setListeners(const QVector<QByteArray> &listeners);
58 
59  Q_REQUIRED_RESULT Type type() const;
60  void setType(Type type);
61 
62  Q_REQUIRED_RESULT Protocol::ChangeNotificationPtr notification() const;
63  void setNotification(const Protocol::ChangeNotificationPtr &ntf);
64 
65 private:
67 };
68 
69 }
70 
An Akonadi Tag.
Definition: tag.h:25
Represents a collection of PIM items.
Definition: collection.h:61
An Akonadi Relation.
Definition: relation.h:39
Emitted by Monitor::debugNotification() signal.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.