7#include "notificationsubscriber.h" 
    8#include "collectionfetchscope.h" 
    9#include "itemfetchscope.h" 
   10#include "tagfetchscope.h" 
   14class NotificationSubscriberPrivate : 
public QSharedData
 
   17    QByteArray subscriber;
 
   19    QSet<qint64> collections;
 
   22    QSet<Monitor::Type> types;
 
   23    QSet<QString> mimeTypes;
 
   24    QSet<QByteArray> resources;
 
   25    QSet<QByteArray> ignoredSessions;
 
   26    ItemFetchScope itemFetchScope;
 
   27    CollectionFetchScope collectionFetchScope;
 
   28    TagFetchScope tagFetchScope;
 
   29    bool isAllMonitored = 
false;
 
   30    bool isExclusive = 
false;
 
   37NotificationSubscriber::NotificationSubscriber()
 
   38    : d(new NotificationSubscriberPrivate)
 
   42NotificationSubscriber::NotificationSubscriber(
const NotificationSubscriber &other)
 
   47NotificationSubscriber::~NotificationSubscriber()
 
   51NotificationSubscriber &NotificationSubscriber::operator=(
const NotificationSubscriber &other)
 
   57bool NotificationSubscriber::isValid()
 const 
   59    return !d->subscriber.isEmpty();
 
   62QByteArray NotificationSubscriber::subscriber()
 const 
   67void NotificationSubscriber::setSubscriber(
const QByteArray &subscriber)
 
   69    d->subscriber = subscriber;
 
   72QByteArray NotificationSubscriber::sessionId()
 const 
   77void NotificationSubscriber::setSessionId(
const QByteArray &sessionId)
 
   79    d->sessionId = sessionId;
 
   82QSet<qint64> NotificationSubscriber::monitoredCollections()
 const 
   84    return d->collections;
 
   87void NotificationSubscriber::setMonitoredCollections(
const QSet<qint64> &collections)
 
   89    d->collections = collections;
 
   92QSet<qint64> NotificationSubscriber::monitoredItems()
 const 
   97void NotificationSubscriber::setMonitoredItems(
const QSet<qint64> &items)
 
  102QSet<qint64> NotificationSubscriber::monitoredTags()
 const 
  107void NotificationSubscriber::setMonitoredTags(
const QSet<qint64> &tags)
 
  112QSet<Monitor::Type> NotificationSubscriber::monitoredTypes()
 const 
  117void NotificationSubscriber::setMonitoredTypes(
const QSet<Monitor::Type> &types)
 
  122QSet<QString> NotificationSubscriber::monitoredMimeTypes()
 const 
  127void NotificationSubscriber::setMonitoredMimeTypes(
const QSet<QString> &mimeTypes)
 
  129    d->mimeTypes = mimeTypes;
 
  132QSet<QByteArray> NotificationSubscriber::monitoredResources()
 const 
  137void NotificationSubscriber::setMonitoredResources(
const QSet<QByteArray> &resources)
 
  139    d->resources = resources;
 
  142QSet<QByteArray> NotificationSubscriber::ignoredSessions()
 const 
  144    return d->ignoredSessions;
 
  147void NotificationSubscriber::setIgnoredSessions(
const QSet<QByteArray> &ignoredSessions)
 
  149    d->ignoredSessions = ignoredSessions;
 
  152bool NotificationSubscriber::isAllMonitored()
 const 
  154    return d->isAllMonitored;
 
  157void NotificationSubscriber::setIsAllMonitored(
bool isAllMonitored)
 
  159    d->isAllMonitored = isAllMonitored;
 
  162bool NotificationSubscriber::isExclusive()
 const 
  164    return d->isExclusive;
 
  167void NotificationSubscriber::setIsExclusive(
bool isExclusive)
 
  169    d->isExclusive = isExclusive;
 
  174    return d->itemFetchScope;
 
  177void NotificationSubscriber::setItemFetchScope(
const ItemFetchScope &itemFetchScope)
 
  179    d->itemFetchScope = itemFetchScope;
 
  184    return d->collectionFetchScope;
 
  189    d->collectionFetchScope = fetchScope;
 
  194    return d->tagFetchScope;
 
  197void NotificationSubscriber::setTagFetchScope(
const TagFetchScope &tagFetchScope)
 
  199    d->tagFetchScope = tagFetchScope;
 
Specifies which parts of a collection should be fetched from the Akonadi storage.
 
Specifies which parts of an item should be fetched from the Akonadi storage.
 
Specifies which parts of a tag should be fetched from the Akonadi storage.
 
Helper integration between Akonadi and Qt.