The QNetworkCacheMetaData class provides cache information. More...
Header: | #include <QNetworkCacheMetaData> |
qmake: | QT += network |
Since: | Qt 4.5 |
This class was introduced in Qt 4.5.
typedef | AttributesMap |
typedef | RawHeader |
typedef | RawHeaderList |
QNetworkCacheMetaData(const QNetworkCacheMetaData &other) | |
QNetworkCacheMetaData() | |
QNetworkCacheMetaData & | operator=(const QNetworkCacheMetaData &other) |
~QNetworkCacheMetaData() | |
QNetworkCacheMetaData::AttributesMap | attributes() const |
QDateTime | expirationDate() const |
bool | isValid() const |
QDateTime | lastModified() const |
QNetworkCacheMetaData::RawHeaderList | rawHeaders() const |
bool | saveToDisk() const |
void | setAttributes(const QNetworkCacheMetaData::AttributesMap &attributes) |
void | setExpirationDate(const QDateTime &dateTime) |
void | setLastModified(const QDateTime &dateTime) |
void | setRawHeaders(const QNetworkCacheMetaData::RawHeaderList &list) |
void | setSaveToDisk(bool allow) |
void | setUrl(const QUrl &url) |
void | swap(QNetworkCacheMetaData &other) |
QUrl | url() const |
bool | operator!=(const QNetworkCacheMetaData &other) const |
bool | operator==(const QNetworkCacheMetaData &other) const |
QDataStream & | operator<<(QDataStream &out, const QNetworkCacheMetaData &metaData) |
QDataStream & | operator>>(QDataStream &in, QNetworkCacheMetaData &metaData) |
QNetworkCacheMetaData provides information about a cache file including the url, when it was last modified, when the cache file was created, headers for file and if the file should be saved onto a disk.
See also QAbstractNetworkCache.
Synonym for QHash<QNetworkRequest::Attribute, QVariant>
Synonym for QPair<QByteArray, QByteArray>
Constructs a copy of the other QNetworkCacheMetaData.
Constructs an invalid network cache meta data.
See also isValid().
Makes a copy of the other QNetworkCacheMetaData and returns a reference to the copy.
Destroys the network cache meta data.
Returns all the attributes stored with this cache item.
This function was introduced in Qt 4.6.
See also setAttributes() and QNetworkRequest::Attribute.
Returns the date and time when the meta data expires.
See also setExpirationDate().
Returns true
if this network cache meta data has attributes that have been set otherwise false.
Returns the date and time when the meta data was last modified.
See also setLastModified().
Returns a list of all raw headers that are set in this meta data. The list is in the same order that the headers were set.
See also setRawHeaders().
Returns is this cache should be allowed to be stored on disk.
Some cache implementations can keep these cache items in memory for performance reasons, but for security reasons they should not be written to disk.
Specifically with http, documents with Cache-control set to no-store or any https document that doesn't have "Cache-control: public" set will set the saveToDisk to false.
See also setSaveToDisk().
Sets all attributes of this cache item to be the map attributes.
This function was introduced in Qt 4.6.
See also attributes() and QNetworkRequest::setAttribute().
Sets the date and time when the meta data expires to dateTime.
See also expirationDate().
Sets the date and time when the meta data was last modified to dateTime.
See also lastModified().
Sets the raw headers to list.
See also rawHeaders().
Sets whether this network cache meta data and associated content should be allowed to be stored on disk to allow.
See also saveToDisk().
Sets the URL this network cache meta data to be url.
The password and fragment are removed from the url.
See also url().
Swaps this metadata instance with other. This function is very fast and never fails.
This function was introduced in Qt 5.0.
Returns the URL this network cache meta data is referring to.
See also setUrl().
Returns true
if this meta data is not equal to the other meta data; otherwise returns false
.
See also operator==().
Returns true
if this meta data is equal to the other meta data; otherwise returns false
.
See also operator!=().
Writes metaData to the out stream.
This function was introduced in Qt 4.5.
See also Serializing Qt Data Types.
Reads a QNetworkCacheMetaData from the stream in into metaData.
This function was introduced in Qt 4.5.
See also Serializing Qt Data Types.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.15/qnetworkcachemetadata.html