AgentManager

AgentManager Class Reference

#include <agentmanager.h>

Inheritance diagram for AgentManager:

Signals

void agentInstanceAdded (const QString &agentIdentifier)
 
void agentInstanceAdvancedStatusChanged (const QString &agentIdentifier, const QVariantMap &status)
 
void agentInstanceError (const QString &agentIdentifier, const QString &message)
 
void agentInstanceNameChanged (const QString &agentIdentifier, const QString &name)
 
void agentInstanceOnlineChanged (const QString &agentIdentifier, bool state)
 
void agentInstanceProgressChanged (const QString &agentIdentifier, uint progress, const QString &message)
 
void agentInstanceRemoved (const QString &agentIdentifier)
 
void agentInstanceStatusChanged (const QString &agentIdentifier, int status, const QString &message)
 
void agentInstanceWarning (const QString &agentIdentifier, const QString &message)
 
void agentTypeAdded (const QString &agentType)
 
void agentTypeRemoved (const QString &agentType)
 

Public Member Functions

 AgentManager (bool verbose, QObject *parent=nullptr)
 
 ~AgentManager ()
 
void addSearch (const QString &query, const QString &queryLanguage, qint64 resultCollectionId)
 
QStringList agentCapabilities (const QString &identifier) const
 
QString agentComment (const QString &identifier) const
 
QVariantMap agentCustomProperties (const QString &identifier) const
 
QString agentIcon (const QString &identifier) const
 
void agentInstanceConfigure (const QString &identifier, qlonglong windowId)
 
QString agentInstanceName (const QString &identifier) const
 
bool agentInstanceOnline (const QString &identifier)
 
uint agentInstanceProgress (const QString &identifier) const
 
QString agentInstanceProgressMessage (const QString &identifier) const
 
QStringList agentInstances () const
 
int agentInstanceStatus (const QString &identifier) const
 
QString agentInstanceStatusMessage (const QString &identifier) const
 
void agentInstanceSynchronize (const QString &identifier)
 
void agentInstanceSynchronizeCollection (const QString &identifier, qint64 collection)
 
void agentInstanceSynchronizeCollection (const QString &identifier, qint64 collection, bool recursive)
 
void agentInstanceSynchronizeCollectionTree (const QString &identifier)
 
void agentInstanceSynchronizeRelations (const QString &identifier)
 
void agentInstanceSynchronizeTags (const QString &identifier)
 
QString agentInstanceType (const QString &identifier)
 
QStringList agentMimeTypes (const QString &identifier) const
 
QString agentName (const QString &identifier) const
 
QStringList agentTypes () const
 
void cleanup ()
 
QString createAgentInstance (const QString &identifier)
 
void removeAgentInstance (const QString &identifier)
 
void removeSearch (quint64 resultCollectionId)
 
void restartAgentInstance (const QString &identifier)
 
void setAgentInstanceName (const QString &identifier, const QString &name)
 
void setAgentInstanceOnline (const QString &identifier, bool state)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Protected Member Functions inherited from QDBusContext
bool calledFromDBus () const const
 
QDBusConnection connection () const const
 
bool isDelayedReply () const const
 
const QDBusMessagemessage () const const
 
void sendErrorReply (QDBusError::ErrorType type, const QString &msg) const const
 
void sendErrorReply (const QString &name, const QString &msg) const const
 
void setDelayedReply (bool enable) const const
 

Detailed Description

The agent manager has knowledge about all available agents (it scans for .desktop files in the agent directory) and the available configured instances.

Definition at line 42 of file akonadicontrol/agentmanager.h.

Constructor & Destructor Documentation

AgentManager::AgentManager ( bool  verbose,
QObject parent = nullptr 
)
explicit

Creates a new agent manager.

Parameters
parentThe parent object.

Definition at line 101 of file akonadicontrol/agentmanager.cpp.

AgentManager::~AgentManager ( )

Destroys the agent manager.

Definition at line 165 of file akonadicontrol/agentmanager.cpp.

Member Function Documentation

void AgentManager::addSearch ( const QString query,
const QString queryLanguage,
qint64  resultCollectionId 
)

Add a persistent search to remote search agents.

Definition at line 898 of file akonadicontrol/agentmanager.cpp.

QStringList AgentManager::agentCapabilities ( const QString identifier) const

Returns a list of supported capabilities of the agent type for the given identifier.

Definition at line 227 of file akonadicontrol/agentmanager.cpp.

QString AgentManager::agentComment ( const QString identifier) const

Returns the i18n'ed comment of the agent type for the given identifier.

Definition at line 195 of file akonadicontrol/agentmanager.cpp.

QVariantMap AgentManager::agentCustomProperties ( const QString identifier) const

Returns a list of Custom added propeties of the agent type for the given identifier.

Since
1.11

Definition at line 235 of file akonadicontrol/agentmanager.cpp.

QString AgentManager::agentIcon ( const QString identifier) const

Returns the icon name of the agent type for the given identifier.

Definition at line 204 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceAdded ( const QString agentIdentifier)
signal

This signal is emitted whenever a new agent instance was created.

Parameters
agentIdentifierThe identifier of the new agent instance.
void AgentManager::agentInstanceAdvancedStatusChanged ( const QString agentIdentifier,
const QVariantMap status 
)
signal

This signal is emitted whenever the status of an agent instance has changed.

Parameters
agentIdentifierThe identifier of the agent that has changed.
statusThe object that describes the status change.
void AgentManager::agentInstanceConfigure ( const QString identifier,
qlonglong  windowId 
)

Triggers the agent instance with the given identifier to show its configuration dialog.

Parameters
windowIdParent window id for the configuration dialog.

Definition at line 388 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceError ( const QString agentIdentifier,
const QString message 
)
signal

This signal is emitted whenever an agent instance raised an error.

Parameters
agentIdentifierThe identifier of the agent instance.
messageThe i18n'ed error message.
QString AgentManager::agentInstanceName ( const QString identifier) const

Returns the name of the agent instance with the given identifier.

Definition at line 425 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceNameChanged ( const QString agentIdentifier,
const QString name 
)
signal

This signal is emitted whenever the name of the agent instance has changed.

Parameters
agentIdentifierThe identifier of the agent that has changed.
nameThe new name of the agent instance.
bool AgentManager::agentInstanceOnline ( const QString identifier)

Returns if the agent instance identifier is in online mode.

Definition at line 397 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceOnlineChanged ( const QString agentIdentifier,
bool  state 
)
signal

Emitted when the online state of an agent changed.

uint AgentManager::agentInstanceProgress ( const QString identifier) const

Returns the current progress of the agent with the given identifier in percentage.

Definition at line 372 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceProgressChanged ( const QString agentIdentifier,
uint  progress,
const QString message 
)
signal

This signal is emitted whenever the progress of an agent instance has changed.

Parameters
agentIdentifierThe identifier of the agent that has changed.
progressThe new progress in percentage.
messageThe i18n'ed description of the new progress.
QString AgentManager::agentInstanceProgressMessage ( const QString identifier) const

Returns the i18n'ed description of the current progress of the agent with the given identifier.

Definition at line 381 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceRemoved ( const QString agentIdentifier)
signal

This signal is emitted whenever an agent instance was removed.

Parameters
agentIdentifierThe identifier of the removed agent instance.
QStringList AgentManager::agentInstances ( ) const

Returns the list of identifiers of configured instances.

Definition at line 349 of file akonadicontrol/agentmanager.cpp.

int AgentManager::agentInstanceStatus ( const QString identifier) const

Returns the current status code of the agent with the given identifier.

Definition at line 354 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceStatusChanged ( const QString agentIdentifier,
int  status,
const QString message 
)
signal

This signal is emitted whenever the status of an agent instance has changed.

Parameters
agentIdentifierThe identifier of the agent that has changed.
statusThe new status code.
messageThe i18n'ed description of the new status.
QString AgentManager::agentInstanceStatusMessage ( const QString identifier) const

Returns the i18n'ed description of the current status of the agent with the given identifier.

Definition at line 363 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceSynchronize ( const QString identifier)

Triggers the agent instance with the given identifier to start synchronization.

Definition at line 443 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceSynchronizeCollection ( const QString identifier,
qint64  collection 
)

Trigger a synchronization of the given collection by its owning resource agent.

Definition at line 461 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceSynchronizeCollection ( const QString identifier,
qint64  collection,
bool  recursive 
)

Trigger a synchronization of the given collection by its owning resource agent.

Parameters
recursiveset it true to have sub-collection synchronized as well

Definition at line 466 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceSynchronizeCollectionTree ( const QString identifier)

Trigger a synchronization of the collection tree by the given resource agent.

Parameters
identifierThe resource agent identifier.

Definition at line 452 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceSynchronizeRelations ( const QString identifier)

Trigger a synchronization of relations by the given resource agent.

Parameters
identifierThe resource agent identifier.

Definition at line 484 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceSynchronizeTags ( const QString identifier)

Trigger a synchronization of tags by the given resource agent.

Parameters
identifierThe resource agent identifier.

Definition at line 475 of file akonadicontrol/agentmanager.cpp.

QString AgentManager::agentInstanceType ( const QString identifier)

Returns the type of the agent instance with the given identifier.

Definition at line 338 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentInstanceWarning ( const QString agentIdentifier,
const QString message 
)
signal

This signal is emitted whenever an agent instance raised a warning.

Parameters
agentIdentifierThe identifier of the agent instance.
messageThe i18n'ed warning message.
QStringList AgentManager::agentMimeTypes ( const QString identifier) const

Returns a list of supported mimetypes of the agent type for the given identifier.

Definition at line 218 of file akonadicontrol/agentmanager.cpp.

QString AgentManager::agentName ( const QString identifier) const

Returns the i18n'ed name of the agent type for the given identifier.

Definition at line 186 of file akonadicontrol/agentmanager.cpp.

void AgentManager::agentTypeAdded ( const QString agentType)
signal

This signal is emitted whenever a new agent type was installed on the system.

Parameters
agentTypeThe identifier of the new agent type.
void AgentManager::agentTypeRemoved ( const QString agentType)
signal

This signal is emitted whenever an agent type was removed from the system.

Parameters
agentTypeThe identifier of the removed agent type.
QStringList AgentManager::agentTypes ( ) const

Returns the list of identifiers of all available agent types.

Definition at line 181 of file akonadicontrol/agentmanager.cpp.

void AgentManager::cleanup ( )

Called by the crash handler and dtor to terminate the child processes.

Definition at line 170 of file akonadicontrol/agentmanager.cpp.

QString AgentManager::createAgentInstance ( const QString identifier)

Creates a new agent of the given agent type identifier.

Returns
The identifier of the new agent if created successfully, an empty string otherwise. The identifier consists of two parts, the type of the agent and an unique instance number, and looks like the following: 'file_1' or 'imap_267'.

Definition at line 259 of file akonadicontrol/agentmanager.cpp.

void AgentManager::removeAgentInstance ( const QString identifier)

Removes the agent with the given identifier.

Definition at line 298 of file akonadicontrol/agentmanager.cpp.

void AgentManager::removeSearch ( quint64  resultCollectionId)

Removes a persistent search for the given result collection.

Definition at line 909 of file akonadicontrol/agentmanager.cpp.

void AgentManager::restartAgentInstance ( const QString identifier)

Restarts the agent instance identifier.

This is supposed to be used as a development aid and not something to use during normal operations.

Definition at line 493 of file akonadicontrol/agentmanager.cpp.

void AgentManager::setAgentInstanceName ( const QString identifier,
const QString name 
)

Sets the name of the agent instance with the given identifier.

Definition at line 416 of file akonadicontrol/agentmanager.cpp.

void AgentManager::setAgentInstanceOnline ( const QString identifier,
bool  state 
)

Sets agent instance identifier to online or offline mode.

Definition at line 406 of file akonadicontrol/agentmanager.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Jun 2 2020 23:09:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.