• PySide 模块
  • PySide.QtNetwork
  • 内容表

    上一话题

    QFtp

    下一话题

    QNetworkDiskCache

    QAbstractNetworkCache

    继承者: QNetworkDiskCache

    详细描述

    PySide.QtNetwork.QAbstractNetworkCache class provides the interface for cache implementations.

    PySide.QtNetwork.QAbstractNetworkCache is the base class for every standard cache that is used be PySide.QtNetwork.QNetworkAccessManager . PySide.QtNetwork.QAbstractNetworkCache is an abstract class and cannot be instantiated.

    class PySide.QtNetwork. QAbstractNetworkCache ( [ parent=None ] )
    参数: parent PySide.QtCore.QObject

    构造抽象网络缓存采用给定 parent .

    PySide.QtNetwork.QAbstractNetworkCache. cacheSize ( )
    返回类型: PySide.QtCore.qint64

    Returns the current size taken up by the cache. Depending upon the cache implementation this might be disk or memory size.

    在基类中,这是纯虚函数。

    PySide.QtNetwork.QAbstractNetworkCache. clear ( )

    Removes all items from the cache. Unless there was failures clearing the cache PySide.QtNetwork.QAbstractNetworkCache.cacheSize() should return 0 after a call to clear.

    在基类中,这是纯虚函数。

    PySide.QtNetwork.QAbstractNetworkCache. data ( url )
    参数: url PySide.QtCore.QUrl
    返回类型: PySide.QtCore.QIODevice

    Returns the data associated with url .

    It is up to the application that requests the data to delete the PySide.QtCore.QIODevice when done with it.

    If there is no cache for url , the url is invalid, or if there is an internal cache error 0 is returned.

    在基类中,这是纯虚函数。

    PySide.QtNetwork.QAbstractNetworkCache. insert ( device )
    参数: device PySide.QtCore.QIODevice

    Inserts the data in device and the prepared meta data into the cache. After this function is called the data and meta data should be retrievable using PySide.QtNetwork.QAbstractNetworkCache.data() and PySide.QtNetwork.QAbstractNetworkCache.metaData() .

    To cancel a prepared inserted call PySide.QtNetwork.QAbstractNetworkCache.remove() on the metadata's url.

    在基类中,这是纯虚函数。

    PySide.QtNetwork.QAbstractNetworkCache. metaData ( url )
    参数: url PySide.QtCore.QUrl
    返回类型: PySide.QtNetwork.QNetworkCacheMetaData

    Returns the meta data for the url url .

    If the url is valid and the cache contains the data for url, a valid PySide.QtNetwork.QNetworkCacheMetaData 被返回。

    在基类中,这是纯虚函数。

    PySide.QtNetwork.QAbstractNetworkCache. prepare ( metaData )
    参数: metaData PySide.QtNetwork.QNetworkCacheMetaData
    返回类型: PySide.QtCore.QIODevice

    Returns the device that should be populated with the data for the cache item metaData . When all of the data has been written PySide.QtNetwork.QAbstractNetworkCache.insert() should be called. If metaData is invalid or the url in the metadata is invalid 0 is returned.

    The cache owns the device and will take care of deleting it when it is inserted or removed.

    To cancel a prepared inserted call PySide.QtNetwork.QAbstractNetworkCache.remove() on the metadata's url.

    在基类中,这是纯虚函数。

    PySide.QtNetwork.QAbstractNetworkCache. remove ( url )
    参数: url PySide.QtCore.QUrl
    返回类型: PySide.QtCore.bool

    Removes the cache entry for url , returning true if success otherwise false.

    在基类中,这是纯虚函数。

    PySide.QtNetwork.QAbstractNetworkCache. updateMetaData ( metaData )
    参数: metaData PySide.QtNetwork.QNetworkCacheMetaData

    Updates the cache meta date for the metaData's url to metaData

    If the cache does not contains a cache item for the url then no action is taken.

    在基类中,这是纯虚函数。