kmail

KMail::ListJob Class Reference

#include <listjob.h>

Inheritance diagram for KMail::ListJob:

KMail::FolderJob List of all members.

Detailed Description

Generic folder list job for (d)imap accounts.

Definition at line 54 of file listjob.h.


Signals

void receivedFolders (const QStringList &, const QStringList &, const QStringList &, const QStringList &, const ImapAccountBase::jobData &)

Public Member Functions

 ListJob (ImapAccountBase *account, ImapAccountBase::ListType type, FolderStorage *storage=0, const QString &path=QString::null, bool complete=false, KPIM::ProgressItem *item=0)
virtual ~ListJob ()
virtual void execute ()
void setPath (const QString &path)
void setStorage (FolderStorage *st)
void setComplete (bool complete)
void setParentProgressItem (KPIM::ProgressItem *it)
void setNamespace (const QString &ns)

Protected Slots

void slotListResult (KIO::Job *job)
void slotListEntries (KIO::Job *job, const KIO::UDSEntryList &uds)
void slotConnectionResult (int errorCode, const QString &errorMsg)

Protected Member Functions

void doListing (const KURL &url, const ImapAccountBase::jobData &jd)

Protected Attributes

FolderStoragemStorage
ImapAccountBasemAccount
ImapAccountBase::ListType mType
bool mComplete
QString mPath
QStringList mSubfolderNames
QStringList mSubfolderPaths
QStringList mSubfolderMimeTypes
QStringList mSubfolderAttributes
KPIM::ProgressItem * mParentProgressItem
QString mNamespace

Constructor & Destructor Documentation

ListJob::ListJob ( ImapAccountBase account,
ImapAccountBase::ListType  type,
FolderStorage storage = 0,
const QString &  path = QString::null,
bool  complete = false,
KPIM::ProgressItem *  item = 0 
)

Create a new job.

Parameters:
storage the parent folder, either provide this or a path
account the ImapAccountBase
type Type of subscription
complete list all folders or only next level
path the listing path; if empty the path of the folder will be taken
item a parent ProgressItem

Definition at line 53 of file listjob.cpp.


Member Function Documentation

void ListJob::execute (  )  [virtual]

Has to be reimplemented.

It's called by the start() method. Should start the processing of the specified job function.

Implements KMail::FolderJob.

Definition at line 67 of file listjob.cpp.

void KMail::ListJob::setPath ( const QString &  path  )  [inline]

Path.

Definition at line 77 of file listjob.h.

void KMail::ListJob::setStorage ( FolderStorage st  )  [inline]

Storage.

Definition at line 80 of file listjob.h.

void KMail::ListJob::setComplete ( bool  complete  )  [inline]

Set this to true for a complete listing.

Definition at line 83 of file listjob.h.

void KMail::ListJob::setParentProgressItem ( KPIM::ProgressItem *  it  )  [inline]

Set parent progress item.

Definition at line 86 of file listjob.h.

void KMail::ListJob::setNamespace ( const QString &  ns  )  [inline]

Set the namespace for this listing.

Definition at line 90 of file listjob.h.

void KMail::ListJob::doListing ( const KURL &  url,
const ImapAccountBase::jobData jd 
) [protected]

Does the actual KIO::listDir.

void ListJob::slotListResult ( KIO::Job *  job  )  [protected, slot]

Is called when the listing is done Passes the folders and the jobData to the responding folder.

Definition at line 165 of file listjob.cpp.

void ListJob::slotListEntries ( KIO::Job *  job,
const KIO::UDSEntryList &  uds 
) [protected, slot]

Collects the folder information.

Definition at line 188 of file listjob.cpp.

void ListJob::slotConnectionResult ( int  errorCode,
const QString &  errorMsg 
) [protected, slot]

Called from the account when a connection was established.

Definition at line 153 of file listjob.cpp.

void KMail::ListJob::receivedFolders ( const QStringList &  ,
const QStringList &  ,
const QStringList &  ,
const QStringList &  ,
const ImapAccountBase::jobData  
) [signal]

Emitted when new folders have been received.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys