.PP
.TH "KHTMLPageCache" 3 "28 Jan 2004" "khtml Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KHTMLPageCache \- Singleton Object that handles a binary cache on top of the http cache management of kio.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <khtml_pagecache.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "long \fBcreateCacheEntry\fP ()"
.br
.RI "\fICreate a new cache entry. \fP"
.ti -1c
.RI "void \fBaddData\fP (long id, const  \fBQByteArray\fP &data)"
.br
.RI "\fIAdd \fCdata\fP to the cache entry with id \fCid\fP. \fP"
.ti -1c
.RI "void \fBendData\fP (long id)"
.br
.RI "\fISignal end of data for the cache entry with id \fCid\fP. \fP"
.ti -1c
.RI "void \fBcancelEntry\fP (long id)"
.br
.RI "\fICancel the entry. \fP"
.ti -1c
.RI "bool \fBisValid\fP (long id)"
.br
.ti -1c
.RI "void \fBfetchData\fP (long id, \fBQObject\fP *recvObj, const  char *recvSlot)"
.br
.RI "\fIFetch data for cache entry \fCid\fP and send it to slot \fCrecvSlot\fP in the object \fCrecvObj\fP. \fP"
.ti -1c
.RI "void \fBcancelFetch\fP (\fBQObject\fP *recvObj)"
.br
.RI "\fICancel sending data to \fCrecvObj\fP. \fP"
.ti -1c
.RI "void \fBsaveData\fP (long id, \fBQDataStream\fP *str)"
.br
.RI "\fISave the data of cache entry \fCid\fP to the datastream \fCstr\fP. \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKHTMLPageCache\fP * \fBself\fP ()"
.br
.RI "\fIstatic 'constructor'. \fP"
.in -1c
.SH "Detailed Description"
.PP 
Singleton Object that handles a binary cache on top of the http cache management of kio. 

A limited number of HTML pages are stored in this cache. This cache is used for the history and operations like 'view source'. These operations always want to use the original document and don't want to fetch the data from the network again.
.PP
It operates completely independent from the kio_http cache. 
.PP
Definition at line 38 of file khtml_pagecache.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBKHTMLPageCache\fP * KHTMLPageCache::self ()\fC [static]\fP"
.PP
static 'constructor'. \fBReturns:\fP
.RS 4
returns a pointer to the cache, if it exists. creates a new cache otherwise. 
.RE
.PP
Definition at line 121 of file khtml_pagecache.cpp.
.PP
Referenced by KHTMLPart::closeURL(), and KHTMLPart::restoreState().
.SS "long KHTMLPageCache::createCacheEntry ()"
.PP
Create a new cache entry. \fBReturns:\fP
.RS 4
a cache entry ID is returned. 
.RE
.PP
Definition at line 143 of file khtml_pagecache.cpp.
.SS "void KHTMLPageCache::addData (long id, const \fBQByteArray\fP & data)"
.PP
Add \fCdata\fP to the cache entry with id \fCid\fP. Definition at line 158 of file khtml_pagecache.cpp.
.SS "void KHTMLPageCache::endData (long id)"
.PP
Signal end of data for the cache entry with id \fCid\fP. After calling this the entry is marked valid Definition at line 166 of file khtml_pagecache.cpp.
.SS "void KHTMLPageCache::cancelEntry (long id)"
.PP
Cancel the entry. Definition at line 174 of file khtml_pagecache.cpp.
.PP
Referenced by KHTMLPart::closeURL().
.SS "bool KHTMLPageCache::isValid (long id)"
.PP
\fBReturns:\fP
.RS 4
true when the cache entry with id \fCis\fP still valid. and can be accessed for reading. 
.RE
.PP
Definition at line 185 of file khtml_pagecache.cpp.
.PP
Referenced by KHTMLPart::restoreState().
.SS "void KHTMLPageCache::fetchData (long id, \fBQObject\fP * recvObj, const char * recvSlot)"
.PP
Fetch data for cache entry \fCid\fP and send it to slot \fCrecvSlot\fP in the object \fCrecvObj\fP. Definition at line 194 of file khtml_pagecache.cpp.
.PP
References QTimer::singleShot().
.SS "void KHTMLPageCache::cancelFetch (\fBQObject\fP * recvObj)"
.PP
Cancel sending data to \fCrecvObj\fP. Definition at line 212 of file khtml_pagecache.cpp.
.PP
References KStdAccel::next().
.PP
Referenced by KHTMLPart::closeURL().
.SS "void KHTMLPageCache::saveData (long id, \fBQDataStream\fP * str)"
.PP
Save the data of cache entry \fCid\fP to the datastream \fCstr\fP. Definition at line 266 of file khtml_pagecache.cpp.
.PP
References QDataStream::writeRawBytes().

.SH "Author"
.PP 
Generated automatically by Doxygen for khtml Library from the source code.
