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 #ifndef AKONADI_CHANGENOTIFICATION_H
8 #define AKONADI_CHANGENOTIFICATION_H
9 
10 #include <QDateTime>
11 #include <QVector>
12 #include <QSharedDataPointer>
13 #include <QSharedPointer>
14 
15 #include <akonadicore_export.h>
16 
17 namespace Akonadi
18 {
19 namespace Protocol
20 {
21 class ChangeNotification;
22 using ChangeNotificationPtr = QSharedPointer<ChangeNotification>;
23 }
24 
33 class AKONADICORE_EXPORT ChangeNotification
34 {
35 public:
36  enum Type {
37  Items,
38  Collection,
39  Tag,
40  Relation,
41  Subscription
42  };
43 
44  explicit ChangeNotification();
45  ChangeNotification(const ChangeNotification &other);
46  ~ChangeNotification();
47 
48  ChangeNotification &operator=(const ChangeNotification &other);
49 
50  Q_REQUIRED_RESULT bool isValid() const;
51 
52  Q_REQUIRED_RESULT QDateTime timestamp() const;
53  void setTimestamp(const QDateTime &timestamp);
54 
55  Q_REQUIRED_RESULT QVector<QByteArray> listeners() const;
56  void setListeners(const QVector<QByteArray> &listeners);
57 
58  Q_REQUIRED_RESULT Type type() const;
59  void setType(Type type);
60 
61  Q_REQUIRED_RESULT Protocol::ChangeNotificationPtr notification() const;
62  void setNotification(const Protocol::ChangeNotificationPtr &ntf);
63 
64 private:
65  class Private;
67 };
68 
69 }
70 
71 #endif
Type type(const QString &mimeType)
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 07:17:47 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.