kmail
KMail::ImapAccountBase Class Reference
Inheritance diagram for KMail::ImapAccountBase:

Detailed Description
Definition at line 56 of file imapaccountbase.h.
Public Types | |
typedef QMap< imapNamespace, QStringList > | nsMap |
typedef QMap< QString, QString > | namespaceDelim |
typedef QMap< imapNamespace, namespaceDelim > | nsDelimMap |
typedef QMap< KIO::Job *, jobData >::Iterator | JobIterator |
enum | ConnectionState { Error = 0, Connected, Connecting } |
enum | ListType { List, ListSubscribed, ListSubscribedNoCheck, ListFolderOnly, ListFolderOnlySubscribed } |
enum | imapNamespace { PersonalNS = 0, OtherUsersNS = 1, SharedNS = 2 } |
Public Slots | |
void | getNamespaces () |
Signals | |
void | connectionResult (int errorCode, const QString &errorMsg) |
void | subscriptionChanged (const QString &imapPath, bool subscribed) |
void | imapStatusChanged (KMFolder *, const QString &imapPath, bool cont) |
void | receivedUserRights (KMFolder *folder) |
void | receivedACL (KMFolder *folder, KIO::Job *job, const KMail::ACLList &entries) |
void | namespacesFetched (const ImapAccountBase::nsDelimMap &) |
void | namespacesFetched () |
Public Member Functions | |
virtual | ~ImapAccountBase () |
virtual void | init () |
virtual void | pseudoAssign (const KMAccount *a) |
bool | autoExpunge () const |
virtual void | setAutoExpunge (bool expunge) |
bool | hiddenFolders () const |
virtual void | setHiddenFolders (bool show) |
bool | onlySubscribedFolders () const |
virtual void | setOnlySubscribedFolders (bool show) |
bool | loadOnDemand () const |
virtual void | setLoadOnDemand (bool load) |
bool | listOnlyOpenFolders () const |
virtual void | setListOnlyOpenFolders (bool only) |
virtual KIO::MetaData | slaveConfig () const |
virtual void | readConfig (KConfig &config) |
virtual void | writeConfig (KConfig &config) |
ConnectionState | makeConnection () |
void | insertJob (KIO::Job *job, const jobData &data) |
JobIterator | findJob (KIO::Job *job) |
JobIterator | jobsEnd () |
void | removeJob (JobIterator &it) |
void | removeJob (KIO::Job *job) |
void | changeSubscription (bool subscribe, const QString &imapPath) |
void | getUserRights (KMFolder *folder, const QString &imapPath) |
void | getACL (KMFolder *folder, const QString &imapPath) |
void | setImapStatus (KMFolder *folder, const QString &path, const QCString &flags) |
void | slaveDied () |
void | killAllJobs (bool disconnectSlave=false)=0 |
virtual void | cancelMailCheck () |
void | processNewMailSingleFolder (KMFolder *folder) |
bool | checkingSingleFolder () |
void | postProcessNewMail (bool setStatusMsg=true) |
bool | checkingMail (KMFolder *folder) |
bool | checkingMail () |
void | handleBodyStructure (QDataStream &stream, KMMessage *msg, const AttachmentStrategy *as) |
virtual void | setFolder (KMFolder *, bool addAccount=false) |
bool | hasACLSupport () const |
bool | hasAnnotationSupport () const |
void | setHasNoAnnotationSupport () |
bool | handleJobError (KIO::Job *job, const QString &context, bool abortSync=false) |
virtual FolderStorage *const | rootFolder () const =0 |
KPIM::ProgressItem * | listDirProgressItem () |
virtual unsigned int | folderCount () const |
nsMap | namespaces () const |
virtual void | setNamespaces (nsMap map) |
nsDelimMap | namespacesWithDelimiter () |
QString | namespaceForFolder (FolderStorage *) |
QString | addPathToNamespace (const QString &ns) |
QString | delimiterForNamespace (const QString &prefix) |
QString | delimiterForFolder (FolderStorage *) |
namespaceDelim | namespaceToDelimiter () const |
void | setNamespaceToDelimiter (namespaceDelim map) |
bool | isNamespaceFolder (QString &name) |
bool | hasCapability (const QString &capa) |
QString | createImapPath (FolderStorage *parent, const QString &folderName) |
QString | createImapPath (const QString &parent, const QString &folderName) |
Protected Slots | |
virtual void | slotCheckQueuedFolders () |
void | slotSchedulerSlaveConnected (KIO::Slave *aSlave) |
void | slotSchedulerSlaveError (KIO::Slave *aSlave, int, const QString &errorMsg) |
void | slotSetStatusResult (KIO::Job *job) |
void | slotGetUserRightsResult (KIO::Job *_job) |
void | slotGetACLResult (KIO::Job *_job) |
void | slotNoopTimeout () |
void | slotIdleTimeout () |
void | slotAbortRequested (KPIM::ProgressItem *) |
void | slotSimpleResult (KIO::Job *job) |
void | slotNamespaceResult (KIO::Job *, const QString &str) |
void | slotSaveNamespaces (const ImapAccountBase::nsDelimMap &map) |
void | slotCapabilitiesResult (KIO::Job *, const QString &result) |
Protected Member Functions | |
ImapAccountBase (AccountManager *parent, const QString &name, uint id) | |
virtual bool | handleError (int error, const QString &errorMsg, KIO::Job *job, const QString &context, bool abortSync=false) |
bool | handlePutError (KIO::Job *job, jobData &jd, KMFolder *folder) |
virtual QString | protocol () const |
virtual unsigned short int | defaultPort () const |
void | constructParts (QDataStream &stream, int count, KMMessagePart *parentKMPart, DwBodyPart *parent, const DwMessage *dwmsg) |
void | migratePrefix () |
Protected Attributes | |
QPtrList< QGuardedPtr< KMFolder > > | mOpenFolders |
QStringList | mSubfolderNames |
QStringList | mSubfolderPaths |
QStringList | mSubfolderMimeTypes |
QStringList | mSubfolderAttributes |
QMap< KIO::Job *, jobData > | mapJobData |
QTimer | mIdleTimer |
QTimer | mNoopTimer |
int | mTotal |
int | mCountUnread |
int | mCountLastUnread |
QMap< QString, int > | mUnreadBeforeCheck |
bool | mAutoExpunge: 1 |
bool | mHiddenFolders: 1 |
bool | mOnlySubscribedFolders: 1 |
bool | mLoadOnDemand: 1 |
bool | mListOnlyOpenFolders: 1 |
bool | mProgressEnabled: 1 |
bool | mErrorDialogIsActive: 1 |
bool | mPasswordDialogIsActive: 1 |
bool | mACLSupport: 1 |
bool | mAnnotationSupport: 1 |
bool | mSlaveConnected: 1 |
bool | mSlaveConnectionError: 1 |
bool | mCheckingSingleFolder: 1 |
QValueList< QGuardedPtr< KMFolder > > | mMailCheckFolders |
QValueList< QGuardedPtr< KMFolder > > | mFoldersQueuedForChecking |
QPtrList< KMMessagePart > | mBodyPartList |
KMMessage * | mCurrentMsg |
QGuardedPtr< KPIM::ProgressItem > | mListDirProgressItem |
nsMap | mNamespaces |
namespaceDelim | mNamespaceToDelimiter |
QString | mOldPrefix |
QStringList | mCapabilities |
Classes | |
struct | jobData |
Info Data for the Job. More... |
Member Enumeration Documentation
|
The state of the kioslave connection.
Definition at line 99 of file imapaccountbase.h. |
Member Function Documentation
|
Adds "/" as needed to the given namespace.
Definition at line 1222 of file imapaccountbase.cpp. |
|
Definition at line 71 of file imapaccountbase.h. |
|
Abort all running mail checks. Used when exiting. Reimplemented from KMAccount. Reimplemented in KMAcctCachedImap, and KMAcctImap. Definition at line 920 of file imapaccountbase.cpp. |
|
Subscribe ( Emits subscriptionChanged signal on success. Definition at line 345 of file imapaccountbase.cpp. |
|
Set/Get if this account is currently checking mail.
Reimplemented from KMAccount. Definition at line 245 of file imapaccountbase.h. |
|
Check whether we're checking for new mail and the folder is included.
Definition at line 986 of file imapaccountbase.cpp. |
|
Return true if we are processing a mailcheck for a single folder.
Definition at line 231 of file imapaccountbase.h. |
|
Emitted when the slave managed or failed to connect This is always emitted at some point after makeConnection returned Connecting.
|
|
Build KMMessageParts and DwBodyParts from the bodystructure-stream.
Definition at line 1063 of file imapaccountbase.cpp. |
|
Create an IMAP path for a parent imapPath and a folderName.
Definition at line 1272 of file imapaccountbase.cpp. |
|
Create an IMAP path for a parent folder and a foldername Parent and folder are separated with the delimiter of the account The path starts and ends with '/'.
Definition at line 1301 of file imapaccountbase.cpp. |
|
Definition at line 790 of file imapaccountbase.cpp. |
|
Definition at line 759 of file imapaccountbase.cpp. |
|
Look for the jobData related to a given job. Compare with end() Definition at line 171 of file imapaccountbase.h. |
|
Definition at line 1214 of file imapaccountbase.cpp. |
|
Retrieve the complete list of ACLs on the folder identified by Emits receivedACL signal on success/error. Definition at line 451 of file imapaccountbase.cpp. |
|
Call this to get the namespaces You are notified by the signal namespacesFetched.
Definition at line 570 of file imapaccountbase.cpp. |
|
Retrieve the users' right on the folder identified by Emits receivedUserRights signal on success/error. Definition at line 396 of file imapaccountbase.cpp. |
|
Handles the result from a BODYSTRUCTURE fetch.
Definition at line 994 of file imapaccountbase.cpp. |
|
Handle an error coming from a KIO job or from a KIO slave (via the scheduler) and abort everything (in all cases) if abortSync is true [this is for slotSchedulerSlaveError]. Otherwise (abortSync==false), dimap will only abort in case of severe errors (connection broken), but on "normal" errors (no permission to delete, etc.) it will ask the user.
Reimplemented in KMAcctImap. Definition at line 843 of file imapaccountbase.cpp. |
|
React to an error from the job. Uses job->error and job->errorString and calls the protected virtual handleJobError with them. See handleError below for details. Definition at line 315 of file imapaccountbase.cpp. |
|
Handle an error during KIO::put - helper method.
Definition at line 824 of file imapaccountbase.cpp. |
|
Returns false if the IMAP server for this account doesn't support ACLs. (and true if it does, or if we didn't try yet). Definition at line 262 of file imapaccountbase.h. |
|
Returns false if the IMAP server for this account doesn't support annotations. (and true if it does, or if we didn't try yet). Definition at line 268 of file imapaccountbase.h. |
|
Returns true if the account has the given capability.
Definition at line 354 of file imapaccountbase.h. |
|
Definition at line 75 of file imapaccountbase.h. |
|
Emitted upon completion of the job for setting the status for a group of UIDs, as a result of a setImapStatus call. On error, if the user chooses abort (not continue), cont is set to false. |
|
Set the config options to a decent state.
Reimplemented from KMail::NetworkAccount. Reimplemented in KMAcctCachedImap. Definition at line 117 of file imapaccountbase.cpp. |
|
Call this when starting a new job.
Definition at line 165 of file imapaccountbase.h. |
|
Returns true if the given string is a namespace.
Definition at line 1236 of file imapaccountbase.cpp. |
|
Kill the slave if any jobs are active.
Implements KMail::NetworkAccount. Implemented in KMAcctCachedImap, and KMAcctImap. |
|
Progress item for listDir.
Definition at line 1190 of file imapaccountbase.cpp. |
|
Definition at line 87 of file imapaccountbase.h. |
|
Definition at line 83 of file imapaccountbase.h. |
|
Connect to the server, if no connection is active Returns Connected (ok), Error (ko) or Connecting - which means that one should wait for the slaveConnected signal from KIO::Scheduler before proceeding.
Reimplemented in KMAcctImap. Definition at line 257 of file imapaccountbase.cpp. |
|
Migrate the prefix.
Definition at line 663 of file imapaccountbase.cpp. |
|
Definition at line 729 of file imapaccountbase.cpp. |
|
Definition at line 300 of file imapaccountbase.h. |
|
Emitted when we got the namespaces, and they were set on the object.
|
|
Emitted when we got the namespaces.
|
|
Full blown section - namespace - delimiter map Do not call this very often as the map is constructed on the fly.
Definition at line 1252 of file imapaccountbase.cpp. |
|
Definition at line 337 of file imapaccountbase.h. |
|
Definition at line 79 of file imapaccountbase.h. |
|
Called when we're completely done checking mail for this account When
Definition at line 327 of file imapaccountbase.cpp. |
|
Init a new-mail-check for a single folder.
Definition at line 956 of file imapaccountbase.cpp. |
|
A weak assignment operator.
Reimplemented from KMail::NetworkAccount. Reimplemented in KMAcctCachedImap, and KMAcctImap. Definition at line 126 of file imapaccountbase.cpp. |
|
Read config file entries. This method is called by the account manager when a new account is created. The config group is already properly set by the caller. Reimplemented from KMail::NetworkAccount. Reimplemented in KMAcctCachedImap, and KMAcctImap. Definition at line 181 of file imapaccountbase.cpp. |
|
Emitted when the get-the-ACLs job is done, as a result of a getACL call.
|
|
Emitted when the get-user-rights job is done, as a result of a getUserRights call. Use userRights() to retrieve them, they will still be on 0 if the job failed. |
|
Call this when a job is finished.
Don't use Definition at line 1174 of file imapaccountbase.cpp. |
|
Returns the root folder of this account.
Implemented in KMAcctCachedImap, and KMAcctImap. |
|
Reimplemented. Additionally set the folder label Reimplemented from KMAccount. Definition at line 1163 of file imapaccountbase.cpp. |
|
Called if the annotation command failed due to 'unsupported'.
Definition at line 273 of file imapaccountbase.h. |
|
Set the status on the server Emits imapStatusChanged signal on success/error.
Definition at line 1119 of file imapaccountbase.cpp. |
|
Set defined namespaces.
Definition at line 305 of file imapaccountbase.h. |
|
Set the namespace - delimiter map.
Definition at line 343 of file imapaccountbase.h. |
|
Configure the slave by adding to the meta data map.
Reimplemented from KMail::NetworkAccount. Definition at line 247 of file imapaccountbase.cpp. |
|
The KIO-Slave died.
Definition at line 211 of file imapaccountbase.h. |
|
Kills all jobs.
Definition at line 508 of file imapaccountbase.cpp. |
|
Saves the capabilities list.
Definition at line 563 of file imapaccountbase.cpp. |
|
Result of getACL() job.
Definition at line 465 of file imapaccountbase.cpp. |
|
Result of getUserRights() job.
Definition at line 424 of file imapaccountbase.cpp. |
|
Log out when idle.
Definition at line 496 of file imapaccountbase.cpp. |
|
Gets and parses the namespaces.
Definition at line 608 of file imapaccountbase.cpp. |
|
Send a NOOP command regularly to keep the slave from disconnecting.
Definition at line 477 of file imapaccountbase.cpp. |
|
Saves the fetched namespaces.
Definition at line 636 of file imapaccountbase.cpp. |
|
Handle a message coming from the KIO scheduler saying that the slave is now connected.
Definition at line 539 of file imapaccountbase.cpp. |
|
Handle an error coming from the KIO scheduler.
Definition at line 517 of file imapaccountbase.cpp. |
|
Only delete information about the job and ignore write errors.
Definition at line 1143 of file imapaccountbase.cpp. |
|
Only delete information about the job.
Definition at line 798 of file imapaccountbase.cpp. |
|
Emitted when the subscription has changed, as a result of a changeSubscription call.
|
|
Write all account information to given config file. The config group is already properly set by the caller. Reimplemented from KMail::NetworkAccount. Reimplemented in KMAcctCachedImap. Definition at line 218 of file imapaccountbase.cpp. |
Member Data Documentation
|
used to detect when the slave has not been used for a while
Definition at line 477 of file imapaccountbase.h. |
|
used to send a noop to the slave in regular intervals to keep it from disonnecting
Definition at line 479 of file imapaccountbase.h. |
The documentation for this class was generated from the following files: