QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
QgsRangeRequestCache Class Reference

A custom cache for handling the storage and retrieval of HTTP range requests on disk. More...

#include <qgsrangerequestcache.h>

Public Member Functions

 QgsRangeRequestCache ()
 Constructor.
 
void clear ()
 Clears the cache removing all of the files.
 
QByteArray entry (const QNetworkRequest &request)
 Returns the range request data stored in the cache and an empty byte array if the data is not in the cache.
 
QString error () const
 Returns the last error that occurred when manipulating the cache.
 
bool hasEntry (const QNetworkRequest &request)
 Checks whether the range request exists in the cache.
 
void registerEntry (const QNetworkRequest &request, QByteArray data)
 Adds the range request data into the cache.
 
bool setCacheDirectory (const QString &path)
 Set the Cache Directory object.
 
void setCacheSize (qint64 maxBytes)
 Sets the cache size.
 

Friends

class TestQgsCopcProvider
 

Detailed Description

A custom cache for handling the storage and retrieval of HTTP range requests on disk.

Note
The API is considered EXPERIMENTAL and can be changed without a notice
Since
QGIS 3.26

Definition at line 43 of file qgsrangerequestcache.h.

Constructor & Destructor Documentation

◆ QgsRangeRequestCache()

QgsRangeRequestCache::QgsRangeRequestCache ( )

Constructor.

Definition at line 25 of file qgsrangerequestcache.cpp.

Member Function Documentation

◆ clear()

void QgsRangeRequestCache::clear ( )

Clears the cache removing all of the files.

Definition at line 50 of file qgsrangerequestcache.cpp.

◆ entry()

QByteArray QgsRangeRequestCache::entry ( const QNetworkRequest &  request)

Returns the range request data stored in the cache and an empty byte array if the data is not in the cache.

Definition at line 30 of file qgsrangerequestcache.cpp.

◆ error()

QString QgsRangeRequestCache::error ( ) const
inline

Returns the last error that occurred when manipulating the cache.

Definition at line 69 of file qgsrangerequestcache.h.

◆ hasEntry()

bool QgsRangeRequestCache::hasEntry ( const QNetworkRequest &  request)

Checks whether the range request exists in the cache.

Definition at line 37 of file qgsrangerequestcache.cpp.

◆ registerEntry()

void QgsRangeRequestCache::registerEntry ( const QNetworkRequest &  request,
QByteArray  data 
)

Adds the range request data into the cache.

Definition at line 43 of file qgsrangerequestcache.cpp.

◆ setCacheDirectory()

bool QgsRangeRequestCache::setCacheDirectory ( const QString &  path)

Set the Cache Directory object.

Returns whether the cache directory was set properly

See also
error()

Definition at line 59 of file qgsrangerequestcache.cpp.

◆ setCacheSize()

void QgsRangeRequestCache::setCacheSize ( qint64  maxBytes)

Sets the cache size.

Definition at line 76 of file qgsrangerequestcache.cpp.

Friends And Related Symbol Documentation

◆ TestQgsCopcProvider

friend class TestQgsCopcProvider
friend

Definition at line 71 of file qgsrangerequestcache.h.


The documentation for this class was generated from the following files: