20 #include "itemfetchscope.h"
22 #include "itemfetchscope_p.h"
24 #include <QtCore/QStringList>
26 using namespace Akonadi;
28 ItemFetchScope::ItemFetchScope()
38 ItemFetchScope::~ItemFetchScope()
50 QSet< QByteArray > ItemFetchScope::payloadParts()
const
52 return d->mPayloadParts;
55 void ItemFetchScope::fetchPayloadPart(
const QByteArray & part,
bool fetch)
58 d->mPayloadParts.insert( part );
60 d->mPayloadParts.remove( part );
63 bool ItemFetchScope::fullPayload()
const
65 return d->mFullPayload;
68 void ItemFetchScope::fetchFullPayload(
bool fetch)
70 d->mFullPayload = fetch;
73 QSet< QByteArray > ItemFetchScope::attributes()
const
75 return d->mAttributes;
78 void ItemFetchScope::fetchAttribute(
const QByteArray & type,
bool fetch)
81 d->mAttributes.insert( type );
83 d->mAttributes.remove( type );
86 bool ItemFetchScope::allAttributes()
const
88 return d->mAllAttributes;
91 void ItemFetchScope::fetchAllAttributes(
bool fetch)
93 d->mAllAttributes = fetch;
96 bool ItemFetchScope::isEmpty()
const
98 return d->mPayloadParts.
isEmpty() && d->mAttributes.isEmpty() && !d->mFullPayload && !d->mAllAttributes;
101 bool ItemFetchScope::cacheOnly()
const
103 return d->mCacheOnly;
106 void ItemFetchScope::setCacheOnly(
bool cacheOnly)
108 d->mCacheOnly = cacheOnly;
113 return d->mAncestorDepth;
118 d->mAncestorDepth = depth;
121 void ItemFetchScope::setFetchModificationTime(
bool retrieveMtime )
123 d->mFetchMtime = retrieveMtime;
126 bool ItemFetchScope::fetchModificationTime()
const
128 return d->mFetchMtime;