File: qabstractnetworkcache.html

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (53 lines) | stat: -rw-r--r-- 9,680 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QAbstractNetworkCache Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAbstractNetworkCache Class Reference<br /><sup><sup>[<a href="qtnetwork.html">QtNetwork</a> module]</sup></sup></h1><p>The QAbstractNetworkCache class provides the interface for cache implementations. <a href="#details">More...</a></p>
<p>Inherits <a href="qobject.html">QObject</a>.</p><p>Inherited by <a href="qnetworkdiskcache.html">QNetworkDiskCache</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractnetworkcache.html#QAbstractNetworkCache">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />int <b><a href="qabstractnetworkcache.html#cacheSize">cacheSize</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractnetworkcache.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" />QIODevice <b><a href="qabstractnetworkcache.html#data">data</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" /><b><a href="qabstractnetworkcache.html#insert">insert</a></b> (<i>self</i>, QIODevice)</li><li><div class="fn" />QNetworkCacheMetaData <b><a href="qabstractnetworkcache.html#metaData">metaData</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" />QIODevice <b><a href="qabstractnetworkcache.html#prepare">prepare</a></b> (<i>self</i>, QNetworkCacheMetaData)</li><li><div class="fn" />bool <b><a href="qabstractnetworkcache.html#remove">remove</a></b> (<i>self</i>, QUrl)</li><li><div class="fn" /><b><a href="qabstractnetworkcache.html#updateMetaData">updateMetaData</a></b> (<i>self</i>, QNetworkCacheMetaData)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractNetworkCache class provides the interface for cache implementations.</p>
<p>QAbstractNetworkCache is the base class for every standard cache that is used be <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a>. QAbstractNetworkCache is an abstract class and cannot be instantiated.</p>
<p>See also <a href="qnetworkdiskcache.html">QNetworkDiskCache</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractNetworkCache" />QAbstractNetworkCache.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an abstract network cache with the given <i>parent</i>.</p>
<a name="//apple_ref/cpp/instm/QAbstractNetworkCache/~QAbstractNetworkCache" />
<h3 class="fn"><a name="cacheSize" />int QAbstractNetworkCache.cacheSize (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the current size taken up by the cache. Depending upon the cache implementation this might be disk or memory size.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractnetworkcache.html#clear">clear</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractNetworkCache/clear" />
<h3 class="fn"><a name="clear" />QAbstractNetworkCache.clear (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void clear()</tt>.</p><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Removes all items from the cache. Unless there was failures clearing the cache <a href="qabstractnetworkcache.html#cacheSize">cacheSize</a>() should return 0 after a call to clear.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractnetworkcache.html#cacheSize">cacheSize</a>() and <a href="qabstractnetworkcache.html#remove">remove</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractNetworkCache/data" />
<h3 class="fn"><a name="data" /><a href="qiodevice.html">QIODevice</a> QAbstractNetworkCache.data (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the data associated with <i>url</i>.</p>
<p>It is up to the application that requests the data to delete the <a href="qiodevice.html">QIODevice</a> when done with it.</p>
<p>If there is no cache for <i>url</i>, the url is invalid, or if there is an internal cache error 0 is returned.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractnetworkcache.html#metaData">metaData</a>() and <a href="qabstractnetworkcache.html#prepare">prepare</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractNetworkCache/insert" />
<h3 class="fn"><a name="insert" />QAbstractNetworkCache.insert (<i>self</i>, <a href="qiodevice.html">QIODevice</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Inserts the data in <i>device</i> and the prepared meta data into the cache. After this function is called the data and meta data should be retrievable using <a href="qabstractnetworkcache.html#data">data</a>() and <a href="qabstractnetworkcache.html#metaData">metaData</a>().</p>
<p>To cancel a prepared inserted call <a href="qabstractnetworkcache.html#remove">remove</a>() on the metadata's url.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractnetworkcache.html#prepare">prepare</a>() and <a href="qabstractnetworkcache.html#remove">remove</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractNetworkCache/metaData" />
<h3 class="fn"><a name="metaData" /><a href="qnetworkcachemetadata.html">QNetworkCacheMetaData</a> QAbstractNetworkCache.metaData (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the meta data for the url <i>url</i>.</p>
<p>If the url is valid and the cache contains the data for url, a valid <a href="qnetworkcachemetadata.html">QNetworkCacheMetaData</a> is returned.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractnetworkcache.html#updateMetaData">updateMetaData</a>() and <a href="qabstractnetworkcache.html#data">data</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractNetworkCache/prepare" />
<h3 class="fn"><a name="prepare" /><a href="qiodevice.html">QIODevice</a> QAbstractNetworkCache.prepare (<i>self</i>, <a href="qnetworkcachemetadata.html">QNetworkCacheMetaData</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the device that should be populated with the data for the cache item <i>metaData</i>. When all of the data has been written <a href="qabstractnetworkcache.html#insert">insert</a>() should be called. If metaData is invalid or the url in the metadata is invalid 0 is returned.</p>
<p>The cache owns the device and will take care of deleting it when it is inserted or removed.</p>
<p>To cancel a prepared inserted call <a href="qabstractnetworkcache.html#remove">remove</a>() on the metadata's url.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractnetworkcache.html#remove">remove</a>(), <a href="qabstractnetworkcache.html#updateMetaData">updateMetaData</a>(), and <a href="qabstractnetworkcache.html#insert">insert</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractNetworkCache/remove" />
<h3 class="fn"><a name="remove" />bool QAbstractNetworkCache.remove (<i>self</i>, <a href="qurl.html">QUrl</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Removes the cache entry for <i>url</i>, returning true if success otherwise false.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractnetworkcache.html#clear">clear</a>() and <a href="qabstractnetworkcache.html#prepare">prepare</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractNetworkCache/updateMetaData" />
<h3 class="fn"><a name="updateMetaData" />QAbstractNetworkCache.updateMetaData (<i>self</i>, <a href="qnetworkcachemetadata.html">QNetworkCacheMetaData</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Updates the cache meta date for the metaData's url to <i>metaData</i></p>
<p>If the cache does not contains a cache item for the url then no action is taken.</p>
<p>In the base class this is a pure virtual function.</p>
<p>See also <a href="qabstractnetworkcache.html#metaData">metaData</a>() and <a href="qabstractnetworkcache.html#prepare">prepare</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.2</td></tr></table></div></address></body></html>