|
|
KIOCacheEntry encapsulates all data associated with one entry in KIOCache. It is mainly used for communication between @see #KIOCache and @see #KIOCachedJob.
KIOCacheEntry () |
Constructs a new empty KIOCacheEntry.
KIOCacheEntry (const KIOCacheEntry &ref) |
Constructs a new KIOCacheEntry referencing the same document as 'ref'.
KIOCacheEntry (const QString& _url) |
Constructs a new KIOCacheEntry referencing _url
bool isEmpty () |
Returns: TRUE if this cache entry is empty, FALSE if it actually references a document.
QString url () |
Returns the URL of the document.
QString localFile () |
Returns the local file name for the document, without path.
void setLocalKey (QString key) |
Sets the local file key, that is the name of the file used to store the documents content. Don't set a complete path, only the filename relativ to the cache path.
QString mimeType () |
Returns the mime type of the document
void setMimeType (QString mimeType) |
Sets the mime type of the document
QString redirection () |
Returns the redirection, this means the real address of the document.
void setRedirection ( const char* _redirection ) |
Sets the redirection URL.
QByteArray content () |
Returns the document content or a NULL QByteArray in case something went wrong.
Caveat: content() returns a shallow copy of the data only, if you want to modify the data, you need to detach it first!
void addData (const QByteArray &_data) |
Appends to the document content. Should not be used outside of @see KIOCache and @see KIOCachedJob
QDateTime expiresAt () |
Returns date and time when this document expires. If an invalid date is returned, this document will never expire.
QDateTime setExpiresAt (const QDateTime &time) |
Set date and time when this document expires. You can pass a + null QDateTime to indicate that this document should never expire.
QDateTime createdAt () |
Returns the creation date and time of this document. An invalid QDateTime indicates there is no cretion date available for this document.
QDateTime setCreatedAt (const QDateTime &time) |
Sets the creation date and time of this document. This function should not be used by anything besides @see KIOCache and @see CacheKIOJob.
QDateTime lastAccessedAt () |
Returns the last date and time this cache entry has been read. Beware: This has nothing to do with the cached documents' last access time, it should be used within KIOCache only. (e.g. for an LRU algorithm to discard cached documents in order to limit on-disk cache size).
QDateTime setLastAccessedAt (const QDateTime &time) |
Sets the date and time returned as last access time for this cache entry. Shouldn't be used outside of @see KIOCache.
QDateTime lastModifiedAt () |
Returns the date and time this document has been last modified. An invalid QDateTime indicates there is no modification date available for this document.
QDateTime setLastModifiedAt (const QDateTime &time) |
Sets the modification date and timefor this document.
bool storeData () |
Write the content of data to a file and erase data. The filename is KIOCache::cachePath() + localKey(). This function is intended for use by KIOCache only.
Returns: TRUE on success, FALSE on failure.
Generated by: root@tantive.terraplex.com on Sun Feb 27 17:39:31 2000, using kdoc 2.0a33. |