akonadi
protocolhelper.cpp
82 void ProtocolHelper::parseAncestorsCached( const QByteArray &data, Entity *entity, Collection::Id parentCollection,
129 int ProtocolHelper::parseCollection(const QByteArray & data, Collection & collection, int start)
216 QByteArray ProtocolHelper::encodePartIdentifier(PartNamespace ns, const QByteArray & label, int version )
218 const QByteArray versionString( version != 0 ? '[' + QByteArray::number( version ) + ']' : "" );
253 return '(' + QByteArray::number( col.id() ) + ' ' + ImapParser::quote( col.remoteId().toUtf8() ) + ") " + parentHrid;
259 return '(' + QByteArray::number( item.id() ) + ' ' + ImapParser::quote( item.remoteId().toUtf8() ) + ") " + parentHrid;
289 command += " " AKONADI_PARAM_CHANGEDSINCE " " + QByteArray::number( fetchScope.fetchChangedSince().toTime_t() );
307 void ProtocolHelper::parseItemFetchResult( const QList<QByteArray> &lineTokens, Item &item, ProtocolHelperValuePool *valuePool )
411 //kDebug() << "Payload is external: " << isExternal << " filename: " << lineTokens.value( i + 1 );
static int parseCachePolicy(const QByteArray &data, CachePolicy &policy, int start=0)
Parse a cache policy definition.
Definition: protocolhelper.cpp:38
int intervalCheckTime() const
Returns the interval check time in minutes, -1 for never.
Definition: cachepolicy.cpp:118
void setSyncOnDemand(bool enable)
Sets whether the collection shall be synced automatically when necessary, i.e.
Definition: cachepolicy.cpp:133
AncestorRetrieval ancestorRetrieval() const
Returns the ancestor retrieval depth.
Definition: itemfetchscope.cpp:124
bool inheritFromParent() const
Returns whether it inherits cache policy from the parent collection.
Definition: cachepolicy.cpp:88
No ancestor retrieval at all (the default)
Definition: itemfetchscope.h:76
void setCacheTimeout(int timeout)
Sets cache timeout for non-permanently cached parts.
Definition: cachepolicy.cpp:113
Provides statistics information of a Collection.
Definition: collectionstatistics.h:69
static QByteArray itemFetchScopeToByteArray(const ItemFetchScope &fetchScope)
Converts a given ItemFetchScope object into a protocol representation.
Definition: protocolhelper.cpp:262
virtual void deserialize(const QByteArray &data)=0
Sets the data of this attribute, using the same encoding as returned by toByteArray().
static QByteArray attributesToByteArray(const Entity &entity, bool ns=false)
Convert attributes to their protocol representation.
Definition: protocolhelper.cpp:206
bool fullPayload() const
Returns whether the full payload should be fetched.
Definition: itemfetchscope.cpp:63
bool fetchModificationTime() const
Returns whether item modification time should be retrieved.
Definition: itemfetchscope.cpp:139
void setParentCollection(const Collection &parent)
Set the parent collection of this object.
Definition: entity.cpp:195
static int parseCollection(const QByteArray &data, Collection &collection, int start=0)
Parse a collection description.
Definition: protocolhelper.cpp:129
void setName(const QString &name)
Sets the i18n'ed name of the collection.
Definition: collection.cpp:93
void setVirtual(bool isVirtual)
Sets whether the collection is virtual or not.
Definition: collection.cpp:266
Collection parentCollection() const
Returns the parent collection of this object.
Definition: entity.cpp:186
void setRemoteRevision(const QString &revision)
Sets the remote revision of the entity.
Definition: entity.cpp:87
void setStatistics(const CollectionStatistics &statistics)
Sets the collection statistics for the collection.
Definition: collection.cpp:243
QSet< QByteArray > attributes() const
Returns all explicitly fetched attributes.
Definition: itemfetchscope.cpp:73
Only retrieve the immediate parent collection.
Definition: itemfetchscope.h:77
void setUnreadCount(qint64 count)
Sets the number of unread items in this collection.
Definition: collectionstatistics.cpp:83
static QByteArray hierarchicalRidToByteArray(const Collection &col)
Converts the given collection's hierarchical RID into a protocol representation.
Definition: protocolhelper.cpp:246
int cacheTimeout() const
Returns the cache timeout for non-permanently cached parts in minutes; -1 means indefinitely.
Definition: cachepolicy.cpp:108
void setSize(qint64 size)
Sets the total size of the items in this collection.
Definition: collectionstatistics.cpp:93
static QByteArray encodePartIdentifier(PartNamespace ns, const QByteArray &label, int version=0)
Encodes part label and namespace.
Definition: protocolhelper.cpp:216
void setCachePolicy(const CachePolicy &policy)
Sets the cache policy of the collection.
Definition: collection.cpp:254
static void deserialize(Item &item, const QByteArray &label, const QByteArray &data, int version, bool external)
throws ItemSerializerException on failure
Definition: itemserializer.cpp:81
QSet< QByteArray > payloadParts() const
Returns the payload parts that should be fetched.
Definition: itemfetchscope.cpp:50
KDateTime fetchChangedSince() const
Returns timestamp of the oldest item to fetch.
Definition: itemfetchscope.cpp:159
Specifies which parts of an item should be fetched from the Akonadi storage.
Definition: itemfetchscope.h:68
void setLocalParts(const QStringList &parts)
Specifies the parts to permanently cache locally.
Definition: cachepolicy.cpp:103
static void parseAncestors(const QByteArray &data, Entity *entity, int start=0)
Convert a ancestor chain from its protocol representation into an Entity object.
Definition: protocolhelper.cpp:101
bool checkForCachedPayloadPartsOnly() const
Returns whether payload data should be fetched or only checked for presence in the cache...
Definition: itemfetchscope.cpp:118
static Attribute * createAttribute(const QByteArray &type)
Creates an entity attribute object of the given type.
Definition: attributefactory.cpp:133
void setCount(qint64 count)
Sets the number of items in this collection.
Definition: collectionstatistics.cpp:73
Retrieve all ancestors, up to Collection::root()
Definition: itemfetchscope.h:78
static QByteArray decodePartIdentifier(const QByteArray &data, PartNamespace &ns)
Decode part label and namespace.
Definition: protocolhelper.cpp:232
virtual QByteArray serialized() const =0
Returns a QByteArray representation of the attribute which will be storaged.
bool ignoreRetrievalErrors() const
Returns whether retrieval errors should be ignored.
Definition: itemfetchscope.cpp:149
QStringList localParts() const
Returns the parts to permanently cache locally.
Definition: cachepolicy.cpp:98
bool allAttributes() const
Returns whether all available attributes should be fetched.
Definition: itemfetchscope.cpp:86
static void parseAncestorsCached(const QByteArray &data, Entity *entity, Collection::Id parentCollection, ProtocolHelperValuePool *valuePool=0, int start=0)
Convert a ancestor chain from its protocol representation into an Entity object.
Definition: protocolhelper.cpp:82
bool cacheOnly() const
Returns whether payload data should be requested from remote sources or just from the local cache...
Definition: itemfetchscope.cpp:101
static void parseItemFetchResult(const QList< QByteArray > &lineTokens, Item &item, ProtocolHelperValuePool *valuePool=0)
Parses a single line from an item fetch job result into an Item object.
Definition: protocolhelper.cpp:307
CollectionStatistics statistics() const
Returns the collection statistics of the collection.
Definition: collection.cpp:238
void setResource(const QString &identifier)
Sets the identifier of the resource owning the collection.
Definition: collection.cpp:212
void setInheritFromParent(bool inherit)
Sets whether the cache policy should be inherited from the parent collection.
Definition: cachepolicy.cpp:93
Attribute::List attributes() const
Returns a list of all attributes of the entity.
Definition: entity.cpp:151
void setContentMimeTypes(const QStringList &types)
Sets the list of possible content mime types.
Definition: collection.cpp:120
bool syncOnDemand() const
Returns whether the collection will be synced automatically when necessary, i.e.
Definition: cachepolicy.cpp:128
static QByteArray cachePolicyToByteArray(const CachePolicy &policy)
Convert a cache policy object into its protocol representation.
Definition: protocolhelper.cpp:66
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:03:18 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:03:18 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.