akonadi
Akonadi::DefaultResourceJob Class Reference
#include <specialcollectionshelperjobs_p.h>

Public Member Functions | |
DefaultResourceJob (KCoreConfigSkeleton *settings, QObject *parent=0) | |
~DefaultResourceJob () | |
void | setDefaultResourceOptions (const QVariantMap &options) |
void | setDefaultResourceType (const QString &type) |
void | setIconForTypeMap (const QMap< QByteArray, QString > &map) |
void | setNameForTypeMap (const QMap< QByteArray, QString > &map) |
void | setTypes (const QList< QByteArray > &types) |
Protected Member Functions | |
virtual void | doStart () |
virtual void | slotResult (KJob *job) |
Detailed Description
Helper job for SpecialCollectionsRequestJob.
A custom ResourceScanJob for the default local folders resource. This is a maildir resource stored in ~/.local/share/local-mail.
This job does two things that a regular ResourceScanJob does not do: 1) It creates and syncs the resource if it is missing. The resource ID is stored in a config file named specialcollectionsrc. 2) If the resource had to be recreated, but the folders existed on disk before that, it recovers the folders based on name. For instance, it will give a folder named outbox a SpecialCollectionAttribute of type Outbox.
- Since:
- 4.4
Definition at line 117 of file specialcollectionshelperjobs_p.h.
Constructor & Destructor Documentation
DefaultResourceJob::DefaultResourceJob | ( | KCoreConfigSkeleton * | settings, |
QObject * | parent = 0 |
||
) | [explicit] |
Creates a new DefaultResourceJob.
Definition at line 485 of file specialcollectionshelperjobs.cpp.
DefaultResourceJob::~DefaultResourceJob | ( | ) |
Destroys the DefaultResourceJob.
Definition at line 491 of file specialcollectionshelperjobs.cpp.
Member Function Documentation
virtual void Akonadi::DefaultResourceJob::doStart | ( | ) | [protected, virtual] |
This method must be reimplemented in the concrete jobs.
It will be called after the job has been started and a connection to the Akonadi backend has been established.
Reimplemented from Akonadi::ResourceScanJob.
void Akonadi::DefaultResourceJob::setDefaultResourceOptions | ( | const QVariantMap & | options | ) |
Sets the configuration options
that shall be applied to the new resource that is created if the requested special collection does not exist yet.
void Akonadi::DefaultResourceJob::setDefaultResourceType | ( | const QString & | type | ) |
Sets the type
of the resource that shall be created if the requested special collection does not exist yet.
void Akonadi::DefaultResourceJob::setIconForTypeMap | ( | const QMap< QByteArray, QString > & | map | ) |
Sets the map
of special collection types to icon names.
void Akonadi::DefaultResourceJob::setNameForTypeMap | ( | const QMap< QByteArray, QString > & | map | ) |
Sets the map
of special collection types to display names.
void Akonadi::DefaultResourceJob::setTypes | ( | const QList< QByteArray > & | types | ) |
Sets the list of well known special collection types
.
The documentation for this class was generated from the following files: