.TH "KDirListerCache" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KDirListerCache \- Design of the cache: There is a single KDirListerCache for the whole process.  

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

.in +1c
.ti -1c
.RI "\fBKDirListerCache\fP (int maxCount=10)"
.br
.ti -1c
.RI "void \fBlistDir\fP (\fBKDirLister\fP *lister, const  \fBKURL\fP &_url, bool _keep, bool _reload)"
.br
.ti -1c
.RI "void \fBstop\fP (\fBKDirLister\fP *lister)"
.br
.ti -1c
.RI "void \fBstop\fP (\fBKDirLister\fP *lister, const  \fBKURL\fP &_url)"
.br
.ti -1c
.RI "void \fBsetAutoUpdate\fP (\fBKDirLister\fP *lister, bool enable)"
.br
.ti -1c
.RI "void \fBforgetDirs\fP (\fBKDirLister\fP *lister)"
.br
.ti -1c
.RI "void \fBforgetDirs\fP (\fBKDirLister\fP *lister, const  \fBKURL\fP &_url, bool notify)"
.br
.ti -1c
.RI "void \fBupdateDirectory\fP (const  \fBKURL\fP &_dir)"
.br
.ti -1c
.RI "\fBKFileItemList\fP * \fBitemsForDir\fP (const  \fBKURL\fP &_dir) const "
.br
.ti -1c
.RI "\fBKFileItem\fP * \fBfindByName\fP (const  \fBKDirLister\fP *lister, const  \fBQString\fP &_name) const "
.br
.ti -1c
.RI "\fBKFileItem\fP * \fBfindByURL\fP (const  \fBKDirLister\fP *lister, const  \fBKURL\fP &_url) const "
.br
.ti -1c
.RI "virtual void \fBFilesAdded\fP (const  \fBKURL\fP &directory)"
.br
.RI "\fINotify that files have been added in \fCdirectory\fP The receiver will list that directory again to find the new items (since it needs more than just the names anyway). \fP"
.ti -1c
.RI "virtual void \fBFilesRemoved\fP (const  \fBKURL::List\fP &fileList)"
.br
.RI "\fINotify that files have been deleted. \fP"
.ti -1c
.RI "virtual void \fBFilesChanged\fP (const  \fBKURL::List\fP &fileList)"
.br
.RI "\fINotify that files have been changed. \fP"
.ti -1c
.RI "virtual void \fBFileRenamed\fP (const  \fBKURL\fP &src, const  \fBKURL\fP &dst)"
.br
.RI "\fINotify that a file has been renamed. \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKDirListerCache\fP * \fBself\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
Design of the cache: There is a single KDirListerCache for the whole process. 

It holds all the items used by the dir listers (itemsInUse) as well as a cache of the recently used items (itemsCached). Those items are grouped by directory (a DirItem represents a whole directory).
.PP
KDirListerCache also runs all the jobs for listing directories, whether they are for normal listing or for updates. For faster lookups, it also stores two dicts: a URL -> dirlister holding that URL (urlsCurrentlyHeld) a URL -> dirlister currently listing that URL (urlsCurrentlyListed) 
.PP
Definition at line 123 of file kdirlister_p.h.
.SH "Member Function Documentation"
.PP 
.SS "void KDirListerCache::FilesAdded (const \fBKURL\fP & directory)\fC [virtual]\fP"
.PP
Notify that files have been added in \fCdirectory\fP The receiver will list that directory again to find the new items (since it needs more than just the names anyway). Reimplemented from \fBKDirNotify\fP. Implements \fBKDirNotify\fP.
.PP
Definition at line 622 of file kdirlister.cpp.
.SS "void KDirListerCache::FilesRemoved (const \fBKURL::List\fP & fileList)\fC [virtual]\fP"
.PP
Notify that files have been deleted. This call passes the exact urls of the deleted files so that any view showing them can simply remove them or be closed (if its current dir was deleted) Reimplemented from \fBKDirNotify\fP. Implements \fBKDirNotify\fP.
.PP
Definition at line 627 of file kdirlister.cpp.
.PP
References QValueList< KURL >::begin(), QValueList< KURL >::ConstIterator(), KURL::directory(), KDirLister::emitDeleteItem(), QValueList< KURL >::end(), QPtrList::first(), KFileItem::isDir(), QPtrList::next(), KURL::setPath(), QPtrList::take(), KURL::url(), and KFileItem::url().
.SS "void KDirListerCache::FilesChanged (const \fBKURL::List\fP & fileList)\fC [virtual]\fP"
.PP
Notify that files have been changed. At the moment, this is only used for new icon, but it could be used for size etc. as well. Note: this is ASYNC so that it can be used with a broadcast Implements \fBKDirNotify\fP.
.PP
Definition at line 671 of file kdirlister.cpp.
.PP
References QValueList< KURL >::begin(), QValueList< KURL >::ConstIterator(), KURL::directory(), QValueList< KURL >::end(), QValueList< KURL >::find(), QValueList< KURL >::prepend(), KFileItem::refresh(), and KURL::setPath().
.SS "void KDirListerCache::FileRenamed (const \fBKURL\fP & src, const \fBKURL\fP & dst)\fC [virtual]\fP"
.PP
Notify that a file has been renamed. Note: this is ASYNC so that it can be used with a broadcast Reimplemented from \fBKDirNotify\fP.
.PP
Definition at line 707 of file kdirlister.cpp.
.PP
References KFileItem::refreshMimeType(), KFileItem::setURL(), and KURL::url().

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