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

Detailed Description
Definition at line 59 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 | receivedStorageQuotaInfo (KMFolder *folder, KIO::Job *job, const KMail::QuotaInfo &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 | onlyLocallySubscribedFolders () const |
virtual void | setOnlyLocallySubscribedFolders (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) |
bool | locallySubscribedTo (const QString &imapPath) |
void | changeLocalSubscription (const QString &imapPath, bool subscribe) |
void | getUserRights (KMFolder *folder, const QString &imapPath) |
void | getACL (KMFolder *folder, const QString &imapPath) |
void | getStorageQuotaInfo (KMFolder *folder, const QString &imapPath) |
void | setImapStatus (KMFolder *folder, const QString &path, const QCString &flags) |
void | setImapSeenStatus (KMFolder *folder, const QString &path, bool seen) |
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 | hasQuotaSupport () const |
void | setHasNoQuotaSupport () |
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 | slotGetStorageQuotaInfoResult (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 () |
QStringList | locallyBlacklistedFolders () const |
void | localBlacklistFromStringList (const QStringList &) |
QString | prettifyQuotaError (const QString &_error, KIO::Job *job) |
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 | mOnlyLocallySubscribedFolders: 1 |
bool | mLoadOnDemand: 1 |
bool | mListOnlyOpenFolders: 1 |
bool | mProgressEnabled: 1 |
bool | mErrorDialogIsActive: 1 |
bool | mPasswordDialogIsActive: 1 |
bool | mACLSupport: 1 |
bool | mAnnotationSupport: 1 |
bool | mQuotaSupport: 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 |
std::set< QString > | mLocalSubscriptionBlackList |
Classes | |
struct | jobData |
Info Data for the Job. More... |
Member Enumeration Documentation
|
The state of the kioslave connection.
Definition at line 107 of file imapaccountbase.h. |
Member Function Documentation
|
Adds "/" as needed to the given namespace.
Definition at line 1315 of file imapaccountbase.cpp. |
|
Definition at line 74 of file imapaccountbase.h. |
|
Abort all running mail checks. Used when exiting. Reimplemented from KMAccount. Reimplemented in KMAcctCachedImap, and KMAcctImap. Definition at line 990 of file imapaccountbase.cpp. |
|
Locally subscribe (
Definition at line 1416 of file imapaccountbase.cpp. |
|
Subscribe ( Emits subscriptionChanged signal on success. Definition at line 360 of file imapaccountbase.cpp. |
|
Set/Get if this account is currently checking mail.
Reimplemented from KMAccount. Definition at line 276 of file imapaccountbase.h. |
|
Check whether we're checking for new mail and the folder is included.
Definition at line 1050 of file imapaccountbase.cpp. |
|
Return true if we are processing a mailcheck for a single folder.
Definition at line 262 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 1133 of file imapaccountbase.cpp. |
|
Create an IMAP path for a parent imapPath and a folderName.
Definition at line 1365 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 1394 of file imapaccountbase.cpp. |
|
Definition at line 834 of file imapaccountbase.cpp. |
|
Definition at line 803 of file imapaccountbase.cpp. |
|
Look for the jobData related to a given job. Compare with end() Definition at line 176 of file imapaccountbase.h. |
|
Definition at line 1307 of file imapaccountbase.cpp. |
|
Retrieve the complete list of ACLs on the folder identified by Emits receivedACL signal on success/error. Definition at line 466 of file imapaccountbase.cpp. |
|
Call this to get the namespaces You are notified by the signal namespacesFetched.
Definition at line 614 of file imapaccountbase.cpp. |
|
Retrieve the the quota inforamiton on the folder identified by Emits receivedQuotaInfo signal on success/error. Definition at line 493 of file imapaccountbase.cpp. |
|
Retrieve the users' right on the folder identified by Emits receivedUserRights signal on success/error. Definition at line 411 of file imapaccountbase.cpp. |
|
Handles the result from a BODYSTRUCTURE fetch.
Definition at line 1058 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 912 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 330 of file imapaccountbase.cpp. |
|
Handle an error during KIO::put - helper method.
Definition at line 868 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 293 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 299 of file imapaccountbase.h. |
|
Returns true if the account has the given capability.
Definition at line 396 of file imapaccountbase.h. |
|
Returns false if the IMAP server for this account doesn't support quotas. (and true if it does, or if we didn't try yet). Definition at line 310 of file imapaccountbase.h. |
|
Definition at line 78 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 121 of file imapaccountbase.cpp. |
|
Call this when starting a new job.
Definition at line 170 of file imapaccountbase.h. |
|
Returns true if the given string is a namespace.
Definition at line 1329 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 1283 of file imapaccountbase.cpp. |
|
Definition at line 95 of file imapaccountbase.h. |
|
Definition at line 91 of file imapaccountbase.h. |
|
Returns whether the account is locally subscribed to the folder.
Definition at line 1411 of file imapaccountbase.cpp. |
|
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 272 of file imapaccountbase.cpp. |
|
Migrate the prefix.
Definition at line 707 of file imapaccountbase.cpp. |
|
Definition at line 773 of file imapaccountbase.cpp. |
|
Definition at line 342 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 1345 of file imapaccountbase.cpp. |
|
Definition at line 379 of file imapaccountbase.h. |
|
Definition at line 86 of file imapaccountbase.h. |
|
Definition at line 82 of file imapaccountbase.h. |
|
Called when we're completely done checking mail for this account When
Definition at line 342 of file imapaccountbase.cpp. |
|
Init a new-mail-check for a single folder.
Definition at line 1018 of file imapaccountbase.cpp. |
|
A weak assignment operator.
Reimplemented from KMail::NetworkAccount. Reimplemented in KMAcctCachedImap, and KMAcctImap. Definition at line 131 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 192 of file imapaccountbase.cpp. |
|
Emitted when the get-the-ACLs job is done, as a result of a getACL call.
|
|
Emitted when the getQuotaInfo job is done, as a result of a getQuotaInfo 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 1267 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 1256 of file imapaccountbase.cpp. |
|
Called if the annotation command failed due to 'unsupported'.
Definition at line 304 of file imapaccountbase.h. |
|
Called if the quota command failed due to 'unsupported'.
Definition at line 315 of file imapaccountbase.h. |
|
Set seen status on the server. Emits imapStatusChanged signal on success/error. Definition at line 1213 of file imapaccountbase.cpp. |
|
Set the status on the server Emits imapStatusChanged signal on success/error.
Definition at line 1189 of file imapaccountbase.cpp. |
|
Set defined namespaces.
Definition at line 347 of file imapaccountbase.h. |
|
Set the namespace - delimiter map.
Definition at line 385 of file imapaccountbase.h. |
|
Configure the slave by adding to the meta data map.
Reimplemented from KMail::NetworkAccount. Definition at line 262 of file imapaccountbase.cpp. |
|
The KIO-Slave died.
Definition at line 242 of file imapaccountbase.h. |
|
Kills all jobs.
Definition at line 552 of file imapaccountbase.cpp. |
|
Saves the capabilities list.
Definition at line 607 of file imapaccountbase.cpp. |
|
Result of getACL() job.
Definition at line 480 of file imapaccountbase.cpp. |
|
Result of getStorageQuotaInfo() job.
Definition at line 508 of file imapaccountbase.cpp. |
|
Result of getUserRights() job.
Definition at line 439 of file imapaccountbase.cpp. |
|
Log out when idle.
Definition at line 540 of file imapaccountbase.cpp. |
|
Gets and parses the namespaces.
Definition at line 652 of file imapaccountbase.cpp. |
|
Send a NOOP command regularly to keep the slave from disconnecting.
Definition at line 521 of file imapaccountbase.cpp. |
|
Saves the fetched namespaces.
Definition at line 680 of file imapaccountbase.cpp. |
|
Handle a message coming from the KIO scheduler saying that the slave is now connected.
Definition at line 583 of file imapaccountbase.cpp. |
|
Handle an error coming from the KIO scheduler.
Definition at line 561 of file imapaccountbase.cpp. |
|
Only delete information about the job and ignore write errors.
Definition at line 1236 of file imapaccountbase.cpp. |
|
Only delete information about the job.
Definition at line 842 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 231 of file imapaccountbase.cpp. |
Member Data Documentation
|
used to detect when the slave has not been used for a while
Definition at line 526 of file imapaccountbase.h. |
|
used to send a noop to the slave in regular intervals to keep it from disonnecting
Definition at line 528 of file imapaccountbase.h. |
The documentation for this class was generated from the following files: