18#ifndef QGSRANGEREQUESTCACHE_H
19#define QGSRANGEREQUESTCACHE_H
25#include <QFileInfoList>
27#include <QNetworkRequest>
50 bool hasEntry(
const QNetworkRequest &request );
52 QByteArray entry(
const QNetworkRequest &request );
54 void registerEntry(
const QNetworkRequest &request, QByteArray data );
64 bool setCacheDirectory(
const QString &path );
66 void setCacheSize( qint64 maxBytes );
69 QString
error()
const {
return mError; }
71 friend class TestQgsCopcProvider;
75 qint64 mMaxDataSize = 256 * 1024 * 1024;
77 QString rangeFileName(
const QNetworkRequest &request )
const;
79 QByteArray readFile(
const QString &fileName );
80 bool writeFile(
const QString &fileName, QByteArray data );
81 bool removeFile(
const QString &fileName );
85 QFileInfoList cacheEntries();
A custom cache for handling the storage and retrieval of HTTP range requests on disk.
QString error() const
Returns the last error that occurred when manipulating the cache.