Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QNetworkCacheMetaData Class

TheQNetworkCacheMetaData class provides cache information.More...

Header:#include <QNetworkCacheMetaData>
Since: Qt 4.5

Public Types

typedefAttributesMap
typedefRawHeader
typedefRawHeaderList

Public Functions

QNetworkCacheMetaData()
QNetworkCacheMetaData(const QNetworkCacheMetaData & other)
~QNetworkCacheMetaData()
AttributesMapattributes() const
QDateTimeexpirationDate() const
boolisValid() const
QDateTimelastModified() const
RawHeaderListrawHeaders() const
boolsaveToDisk() const
voidsetAttributes(const AttributesMap & attributes)
voidsetExpirationDate(const QDateTime & dateTime)
voidsetLastModified(const QDateTime & dateTime)
voidsetRawHeaders(const RawHeaderList & list)
voidsetSaveToDisk(bool allow)
voidsetUrl(const QUrl & url)
QUrlurl() const
booloperator!=(const QNetworkCacheMetaData & other) const
QNetworkCacheMetaData &operator=(const QNetworkCacheMetaData & other)
booloperator==(const QNetworkCacheMetaData & other) const

Related Non-Members

QDataStream &operator<<(QDataStream & out, const QNetworkCacheMetaData & metaData)
QDataStream &operator>>(QDataStream & in, QNetworkCacheMetaData & metaData)

Detailed Description

TheQNetworkCacheMetaData class provides cache information.

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 alsoQAbstractNetworkCache.

Member Type Documentation

typedef QNetworkCacheMetaData::AttributesMap

Synonym forQHash<QNetworkRequest::Attribute,QVariant>

typedef QNetworkCacheMetaData::RawHeader

Synonym forQPair<QByteArray,QByteArray>

typedef QNetworkCacheMetaData::RawHeaderList

Synonym forQList<RawHeader>

Member Function Documentation

QNetworkCacheMetaData::QNetworkCacheMetaData()

Constructs an invalid network cache meta data.

See alsoisValid().

QNetworkCacheMetaData::QNetworkCacheMetaData(constQNetworkCacheMetaData & other)

Constructs a copy of theotherQNetworkCacheMetaData.

QNetworkCacheMetaData::~QNetworkCacheMetaData()

Destroys the network cache meta data.

AttributesMap QNetworkCacheMetaData::attributes() const

Returns all the attributes stored with this cache item.

This function was introduced in Qt 4.6.

See alsosetAttributes() andQNetworkRequest::Attribute.

QDateTime QNetworkCacheMetaData::expirationDate() const

Returns the date and time when the meta data expires.

See alsosetExpirationDate().

bool QNetworkCacheMetaData::isValid() const

Returns true if this network cache meta data has attributes that have been set otherwise false.

QDateTime QNetworkCacheMetaData::lastModified() const

Returns the date and time when the meta data was last modified.

See alsosetLastModified().

RawHeaderList QNetworkCacheMetaData::rawHeaders() const

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 alsosetRawHeaders().

bool QNetworkCacheMetaData::saveToDisk() const

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 marked with Pragma: no-cache, or have a Cache-control set to no-store or no-cache or any https document that doesn't have "Cache-control: public" set will set the saveToDisk to false.

See alsosetSaveToDisk().

void QNetworkCacheMetaData::setAttributes(constAttributesMap & attributes)

Sets all attributes of this cache item to be the mapattributes.

This function was introduced in Qt 4.6.

See alsoattributes() andQNetworkRequest::setAttribute().

void QNetworkCacheMetaData::setExpirationDate(constQDateTime & dateTime)

Sets the date and time when the meta data expires todateTime.

See alsoexpirationDate().

void QNetworkCacheMetaData::setLastModified(constQDateTime & dateTime)

Sets the date and time when the meta data was last modified todateTime.

See alsolastModified().

void QNetworkCacheMetaData::setRawHeaders(constRawHeaderList & list)

Sets the raw headers tolist.

See alsorawHeaders().

void QNetworkCacheMetaData::setSaveToDisk(bool allow)

Sets whether this network cache meta data and associated content should be allowed to be stored on disk toallow.

See alsosaveToDisk().

void QNetworkCacheMetaData::setUrl(constQUrl & url)

Sets the URL this network cache meta data to to beurl.

The password and fragment are removed from the url.

See alsourl().

QUrl QNetworkCacheMetaData::url() const

Returns the URL this network cache meta data is referring to.

See alsosetUrl().

bool QNetworkCacheMetaData::operator!=(constQNetworkCacheMetaData & other) const

Returns true if this meta data is not equal to theother meta data; otherwise returns false.

See alsooperator==().

QNetworkCacheMetaData & QNetworkCacheMetaData::operator=(constQNetworkCacheMetaData & other)

Makes a copy of theotherQNetworkCacheMetaData and returns a reference to the copy.

bool QNetworkCacheMetaData::operator==(constQNetworkCacheMetaData & other) const

Returns true if this meta data is equal to theother meta data; otherwise returns false.

See alsooperator!=().

Related Non-Members

QDataStream &operator<<(QDataStream & out, constQNetworkCacheMetaData & metaData)

WritesmetaData to theout stream.

This function was introduced in Qt 4.5.

See alsoSerializing Qt Data Types.

QDataStream &operator>>(QDataStream & in,QNetworkCacheMetaData & metaData)

Reads aQNetworkCacheMetaData from the streamin intometaData.

This function was introduced in Qt 4.5.

See alsoSerializing Qt Data Types.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp