kmail Library API Documentation

KMail::ListJob Class Reference

Generic folder list job for (d)imap accounts. More...

#include <listjob.h>

Collaboration diagram for KMail::ListJob:

Collaboration graph
[legend]
List of all members.

Signals

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

Public Member Functions

 ListJob (FolderStorage *storage, ImapAccountBase *account, ImapAccountBase::ListType type, bool secondStep=false, bool complete=false, bool hasInbox=false, const QString &path=QString::null, KPIM::ProgressItem *item=0)
void setHonorLocalSubscription (bool value)
bool honorLocalSubscription () const
virtual void execute ()

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
ImapAccountBase * mAccount
ImapAccountBase::ListType mType
bool mHasInbox
bool mSecondStep
bool mComplete
bool mHonorLocalSubscription
QString mPath
QStringList mSubfolderNames
QStringList mSubfolderPaths
QStringList mSubfolderMimeTypes
QStringList mSubfolderAttributes
QGuardedPtr< KPIM::ProgressItem > mParentProgressItem

Detailed Description

Generic folder list job for (d)imap accounts.

Definition at line 55 of file listjob.h.


Constructor & Destructor Documentation

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

Create a new job.

Parameters:
storage the parent folder, either provide this or a path
account the ImapAccountBase
secondStep if this is the second listing (when a prefix is set)
complete list all folders or only next level
hasInbox if you already have an inbox
path the listing path; if empty the path of the folder will be taken
item a parent ProgressItem

Definition at line 48 of file listjob.cpp.


Member Function Documentation

void KMail::ListJob::setHonorLocalSubscription bool  value  ) 
 

Set whether the listing should include only folders that the account is subscribed to locally.

This is different from the server side subscription managed by the ctor parameter.

bool KMail::ListJob::honorLocalSubscription  )  const
 

Return whether the listing includes only folders that the account is subscribed to locally.

This is different from the server side subscription managed by the ctor parameter.

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 150 of file listjob.cpp.

References receivedFolders().

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

Collects the folder information.

Definition at line 173 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 138 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.

Referenced by slotListResult().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu May 3 20:24:26 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003