7 #include "notificationsubscriber.h"
8 #include "collectionfetchscope.h"
9 #include "itemfetchscope.h"
10 #include "tagfetchscope.h"
14 class NotificationSubscriberPrivate :
public QSharedData
29 bool isAllMonitored =
false;
30 bool isExclusive =
false;
37 NotificationSubscriber::NotificationSubscriber()
38 : d(new NotificationSubscriberPrivate)
42 NotificationSubscriber::NotificationSubscriber(
const NotificationSubscriber &other)
47 NotificationSubscriber::~NotificationSubscriber()
51 NotificationSubscriber &NotificationSubscriber::operator=(
const NotificationSubscriber &other)
57 bool NotificationSubscriber::isValid()
const
59 return !d->subscriber.isEmpty();
62 QByteArray NotificationSubscriber::subscriber()
const
67 void NotificationSubscriber::setSubscriber(
const QByteArray &subscriber)
69 d->subscriber = subscriber;
72 QByteArray NotificationSubscriber::sessionId()
const
77 void NotificationSubscriber::setSessionId(
const QByteArray &sessionId)
79 d->sessionId = sessionId;
82 QSet<qint64> NotificationSubscriber::monitoredCollections()
const
84 return d->collections;
87 void NotificationSubscriber::setMonitoredCollections(
const QSet<qint64> &collections)
89 d->collections = collections;
92 QSet<qint64> NotificationSubscriber::monitoredItems()
const
97 void NotificationSubscriber::setMonitoredItems(
const QSet<qint64> &items)
102 QSet<qint64> NotificationSubscriber::monitoredTags()
const
107 void NotificationSubscriber::setMonitoredTags(
const QSet<qint64> &tags)
122 QSet<QString> NotificationSubscriber::monitoredMimeTypes()
const
127 void NotificationSubscriber::setMonitoredMimeTypes(
const QSet<QString> &mimeTypes)
137 void NotificationSubscriber::setMonitoredResources(
const QSet<QByteArray> &resources)
139 d->resources = resources;
144 return d->ignoredSessions;
147 void NotificationSubscriber::setIgnoredSessions(
const QSet<QByteArray> &ignoredSessions)
149 d->ignoredSessions = ignoredSessions;
152 bool NotificationSubscriber::isAllMonitored()
const
154 return d->isAllMonitored;
157 void NotificationSubscriber::setIsAllMonitored(
bool isAllMonitored)
159 d->isAllMonitored = isAllMonitored;
162 bool NotificationSubscriber::isExclusive()
const
164 return d->isExclusive;
167 void NotificationSubscriber::setIsExclusive(
bool isExclusive)
169 d->isExclusive = isExclusive;
174 return d->itemFetchScope;
177 void NotificationSubscriber::setItemFetchScope(
const ItemFetchScope &itemFetchScope)
179 d->itemFetchScope = itemFetchScope;
184 return d->collectionFetchScope;
189 d->collectionFetchScope = fetchScope;
194 return d->tagFetchScope;
197 void NotificationSubscriber::setTagFetchScope(
const TagFetchScope &tagFetchScope)
199 d->tagFetchScope = tagFetchScope;