kio Library API Documentation

KIO::ListJob Class Reference

A ListJob is allows you to get the get the content of a directory. More...

#include <jobclasses.h>

Inheritance diagram for KIO::ListJob:

KIO::SimpleJob KIO::Job QObject List of all members.

Signals

void entries (KIO::Job *job, const KIO::UDSEntryList &list)
void redirection (KIO::Job *job, const KURL &url)
void permanentRedirection (KIO::Job *job, const KURL &fromUrl, const KURL &toUrl)

Public Methods

 ListJob (const KURL &url, bool showProgressInfo, bool recursive=false, QString prefix=QString::null, bool includeHidden=true)
virtual void start (Slave *slave)
void setUnrestricted (bool unrestricted)

Protected Slots

virtual void slotFinished ()
virtual void slotMetaData (const KIO::MetaData &_metaData)
virtual void slotResult (KIO::Job *job)

Protected Methods

virtual void virtual_hook (int id, void *data)

Detailed Description

A ListJob is allows you to get the get the content of a directory.

Don't create the job directly, but use KIO::listRecursive() or KIO::listDir() instead.

See also:
KIO::listRecursive() , KIO::listDir()

Definition at line 1145 of file jobclasses.h.


Constructor & Destructor Documentation

ListJob::ListJob const KURL   url,
bool    showProgressInfo,
bool    recursive = false,
QString    prefix = QString::null,
bool    includeHidden = true
 

Do not create a ListJob directly.

Use KIO::listDir() or KIO::listRecursive() instead.

Parameters:
url  the url of the directory
showProgressInfo  true to show progress information to the user
recursive  true to get the data recursively from child directories, false to get only the content of the specified dir
prefix  the prefix of the files, or QString::null for no prefix
includeHidden  true to include hidden files (those starting with '.')

Definition at line 1680 of file job.cpp.


Member Function Documentation

void ListJob::setUnrestricted bool    unrestricted
 

Do not apply any KIOSK restrictions to this job.

Since:
3.2

Definition at line 1842 of file job.cpp.

Referenced by KIO::DeleteJob::slotResult().

void KIO::ListJob::entries KIO::Job   job,
const KIO::UDSEntryList &    list
[signal]
 

This signal emits the entry found by the job while listing.

The progress signals aren't specific to ListJob. It simply uses SimpleJob's processedSize (number of entries listed) and totalSize (total number of entries, if known), as well as percent.

Parameters:
job  the job that emitted this signal
list  the list of UDSEntries

void KIO::ListJob::redirection KIO::Job   job,
const KURL   url
[signal]
 

Signals a redirection.

Use to update the URL shown to the user. The redirection itself is handled internally.

Parameters:
job  the job that is redirected
url  the new url

void KIO::ListJob::permanentRedirection KIO::Job   job,
const KURL   fromUrl,
const KURL   toUrl
[signal]
 

Signals a permanent redirection.

The redirection itself is handled internally.

Parameters:
job  the job that emitted this signal
fromUrl  the original URL
toUrl  the new URL
Since:
3.1

Referenced by slotFinished().

void ListJob::slotFinished   [protected, virtual, slot]
 

Called when the slave marks the job as finished.

Reimplemented from KIO::SimpleJob.

Definition at line 1803 of file job.cpp.

References KURL::isEmpty(), KURL::isValid(), permanentRedirection(), and KIO::Job::queryMetaData().

void ListJob::slotMetaData const KIO::MetaData   _metaData [protected, virtual, slot]
 

MetaData from the slave is received.

Parameters:
_metaData  the meta data
See also:
metaData()

Reimplemented from KIO::SimpleJob.

Definition at line 1825 of file job.cpp.

void ListJob::slotResult KIO::Job   job [protected, virtual, slot]
 

Called whenever a subjob finishes.

Default implementation checks for errors and propagates to parent job, then calls removeSubjob. Override if you don't want subjobs errors to be propagated.

Parameters:
job  the subjob
See also:
result()

Reimplemented from KIO::Job.

Definition at line 1783 of file job.cpp.

References KIO::Job::removeSubjob().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.2.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 4 12:35:17 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003