File indexing completed on 2024-11-10 04:40:43

0001 /*
0002     SPDX-FileCopyrightText: 2016 Daniel Vrátil <dvratil@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "akonadicore_export.h"
0010 
0011 #include "monitor.h"
0012 #include <QSet>
0013 
0014 namespace Akonadi
0015 {
0016 class NotificationSubscriberPrivate;
0017 
0018 class AKONADICORE_EXPORT NotificationSubscriber
0019 {
0020 public:
0021     explicit NotificationSubscriber();
0022     NotificationSubscriber(const NotificationSubscriber &other);
0023     ~NotificationSubscriber();
0024 
0025     NotificationSubscriber &operator=(const NotificationSubscriber &other);
0026 
0027     bool isValid() const;
0028 
0029     QByteArray subscriber() const;
0030     void setSubscriber(const QByteArray &subscriber);
0031 
0032     QByteArray sessionId() const;
0033     void setSessionId(const QByteArray &sessionId);
0034 
0035     QSet<qint64> monitoredCollections() const;
0036     void setMonitoredCollections(const QSet<qint64> &collections);
0037 
0038     QSet<qint64> monitoredItems() const;
0039     void setMonitoredItems(const QSet<qint64> &items);
0040 
0041     QSet<qint64> monitoredTags() const;
0042     void setMonitoredTags(const QSet<qint64> &tags);
0043 
0044     QSet<Monitor::Type> monitoredTypes() const;
0045     void setMonitoredTypes(const QSet<Monitor::Type> &type);
0046 
0047     QSet<QString> monitoredMimeTypes() const;
0048     void setMonitoredMimeTypes(const QSet<QString> &mimeTypes);
0049 
0050     QSet<QByteArray> monitoredResources() const;
0051     void setMonitoredResources(const QSet<QByteArray> &resources);
0052 
0053     QSet<QByteArray> ignoredSessions() const;
0054     void setIgnoredSessions(const QSet<QByteArray> &ignoredSessions);
0055 
0056     bool isAllMonitored() const;
0057     void setIsAllMonitored(bool isAllMonitored);
0058 
0059     bool isExclusive() const;
0060     void setIsExclusive(bool isExclusive);
0061 
0062     ItemFetchScope itemFetchScope() const;
0063     void setItemFetchScope(const ItemFetchScope &itemFetchScope);
0064 
0065     CollectionFetchScope collectionFetchScope() const;
0066     void setCollectionFetchScope(const CollectionFetchScope &collectionFetchScope);
0067 
0068     TagFetchScope tagFetchScope() const;
0069     void setTagFetchScope(const TagFetchScope &tagFetchScope);
0070 
0071 private:
0072     QSharedDataPointer<NotificationSubscriberPrivate> d;
0073 };
0074 
0075 }