7#ifndef KDAV_ETAGCACHE_H
8#define KDAV_ETAGCACHE_H
10#include "kdav_export.h"
19class EtagCachePrivate;
48 void setEtag(
const QString &remoteId,
const QString &etag);
53 Q_REQUIRED_RESULT
bool contains(
const QString &remoteId)
const;
58 Q_REQUIRED_RESULT
bool etagChanged(
const QString &remoteId,
const QString &refEtag)
const;
69 Q_REQUIRED_RESULT
bool isOutOfDate(
const QString &remoteId)
const;
79 Q_REQUIRED_RESULT QStringList
urls()
const;
94 const std::unique_ptr<EtagCachePrivate> d;
96 friend class DavItemsListJobPrivate;
100 Q_DECL_HIDDEN QMap<QString, QString> etagCacheMap()
const;
A helper class to cache ETags.
Definition etagcache.h:32
bool isOutOfDate(const QString &remoteId) const
Returns true if the remote ID is marked as changed (is contained in the return of changedRemoteIds)
EtagCache(QObject *parent=nullptr)
Creates a new ETag cache and populates it with the ETags of items found in collection.
QStringList urls() const
Returns the list of all items URLs.
bool etagChanged(const QString &remoteId, const QString &refEtag) const
Check if the known ETag for the remote ID is equal to refEtag.
QStringList changedRemoteIds() const
Returns the list of remote ids of items that have been changed in the backend.
void setEtag(const QString &remoteId, const QString &etag)
Sets the ETag for the remote ID.
void setEtagInternal(const QString &remoteId, const QString &etag)
Sets the ETag for the remote ID.
void markAsChanged(const QString &remoteId)
Mark an item as changed in the backend.
void removeEtag(const QString &remoteId)
Removes the entry for item with remote ID remoteId.
bool contains(const QString &remoteId) const
Checks if the given item is in the cache.
The KDAV namespace.
Definition davjobbase.h:17