42 #ifndef QNETWORKDISKCACHE_H 43 #define QNETWORKDISKCACHE_H 45 #include <QtNetwork/qabstractnetworkcache.h> 53 #ifndef QT_NO_NETWORKDISKCACHE 65 void setCacheDirectory(
const QString &cacheDir);
67 qint64 maximumCacheSize()
const;
68 void setMaximumCacheSize(
qint64 size);
74 bool remove(
const QUrl &url);
91 #endif // QT_NO_NETWORKDISKCACHE 97 #endif // QNETWORKDISKCACHE_H virtual void updateMetaData(const QNetworkCacheMetaData &metaData)=0
Updates the cache meta date for the metaData's url to metaData.
#define QT_END_NAMESPACE
This macro expands to.
The QNetworkDiskCache class provides a very basic disk cache.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
virtual qint64 cacheSize() const =0
Returns the current size taken up by the cache.
The QObject class is the base class of all Qt objects.
virtual void clear()=0
Removes all items from the cache.
virtual void insert(QIODevice *device)=0
Inserts the data in device and the prepared meta data into the cache.
virtual QIODevice * data(const QUrl &url)=0
Returns the data associated with url.
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual QIODevice * prepare(const QNetworkCacheMetaData &metaData)=0
Returns the device that should be populated with the data for the cache item metaData.
virtual QNetworkCacheMetaData metaData(const QUrl &url)=0
Returns the meta data for the url url.
#define Q_DECLARE_PRIVATE(Class)
The QIODevice class is the base interface class of all I/O devices in Qt.
static QString fileName(const QString &fileUrl)
The QAbstractNetworkCache class provides the interface for cache implementations. ...