21 #include "collectionfetchscope.h"
24 #include <QStringList>
28 class CollectionFetchScopePrivate :
public QSharedData
31 CollectionFetchScopePrivate() :
32 ancestorDepth( CollectionFetchScope::None ),
33 unsubscribed( false ),
38 CollectionFetchScopePrivate(
const CollectionFetchScopePrivate &other )
39 : QSharedData( other )
41 resource = other.resource;
42 contentMimeTypes = other.contentMimeTypes;
43 ancestorDepth = other.ancestorDepth;
44 unsubscribed = other.unsubscribed;
45 statistics = other.statistics;
50 QStringList contentMimeTypes;
51 CollectionFetchScope::AncestorRetrieval ancestorDepth;
56 CollectionFetchScope::CollectionFetchScope()
58 d =
new CollectionFetchScopePrivate();
66 CollectionFetchScope::~CollectionFetchScope()
78 bool CollectionFetchScope::isEmpty ()
const
80 return d->
resource.isEmpty() && d->contentMimeTypes.isEmpty() && !d->statistics && !d->unsubscribed && d->ancestorDepth == None;
83 bool CollectionFetchScope::includeUnubscribed ()
const
85 return includeUnsubscribed();
88 bool CollectionFetchScope::includeUnsubscribed ()
const
90 return d->unsubscribed;
93 void CollectionFetchScope::setIncludeUnsubscribed (
bool include)
95 d->unsubscribed = include;
98 bool CollectionFetchScope::includeStatistics ()
const
100 return d->statistics;
103 void CollectionFetchScope::setIncludeStatistics (
bool include)
105 d->statistics = include;
108 QString CollectionFetchScope::resource ()
const
113 void CollectionFetchScope::setResource (
const QString & resource)
115 d->resource = resource;
118 QStringList CollectionFetchScope::contentMimeTypes ()
const
120 return d->contentMimeTypes;
123 void CollectionFetchScope::setContentMimeTypes (
const QStringList & mimeTypes)
125 d->contentMimeTypes = mimeTypes;
130 return d->ancestorDepth;
135 d->ancestorDepth = ancestorDepth;