Akonadi::AgentInstance

Search for usage in LXR

Akonadi::AgentInstance Class Reference

#include <agentinstance.h>

Public Types

using List = QList<AgentInstance>
 
enum  Status { Idle = 0 , Running , Broken , NotConfigured }
 

Public Member Functions

 AgentInstance ()
 
 AgentInstance (const AgentInstance &other)
 
 ~AgentInstance ()
 
void abortCurrentTask () const
 
QStringList activities () const
 
bool activitiesEnabled () const
 
AKONADICORE_DEPRECATED void configure (QWidget *parent=nullptr)
 
QString identifier () const
 
bool isOnline () const
 
bool isValid () const
 
QString name () const
 
AgentInstanceoperator= (const AgentInstance &other)
 
bool operator== (const AgentInstance &other) const
 
int progress () const
 
void reconfigure () const
 
void restart () const
 
void setActivities (const QStringList &online)
 
void setActivitiesEnabled (bool enabled)
 
void setIsOnline (bool online)
 
void setName (const QString &name)
 
Status status () const
 
QString statusMessage () const
 
void synchronize ()
 
void synchronizeCollectionTree ()
 
void synchronizeTags ()
 
AgentType type () const
 

Detailed Description

A representation of an agent instance.

The agent instance is a representation of a running agent process. It provides information about the instance and a reference to the AgentType of that instance.

All available agent instances can be retrieved from the AgentManager.

for( const Akonadi::AgentInstance &instance : instances ) {
qDebug() << "Name:" << instance.name() << "(" << instance.identifier() << ")";
}
A representation of an agent instance.
static AgentManager * self()
Returns the global instance of the agent manager.
AgentInstance::List instances() const
Returns the list of all available agent instances.
Note
To find the collections belonging to an AgentInstance, use CollectionFetchJob and supply AgentInstance::identifier() as the parameter to CollectionFetchScope::setResource().
Author
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org

Definition at line 46 of file core/agentinstance.h.

Member Typedef Documentation

◆ List

Describes a list of agent instances.

Definition at line 55 of file core/agentinstance.h.

Member Enumeration Documentation

◆ Status

Describes the status of the agent instance.

Enumerator
Idle 

The agent instance does currently nothing.

Running 

The agent instance is working on something.

Broken 

The agent instance encountered an error state.

NotConfigured 

The agent is lacking required configuration.

Definition at line 60 of file core/agentinstance.h.

Constructor & Destructor Documentation

◆ AgentInstance() [1/2]

AgentInstance::AgentInstance ( )

Creates a new agent instance object.

Definition at line 18 of file core/agentinstance.cpp.

◆ AgentInstance() [2/2]

AgentInstance::AgentInstance ( const AgentInstance & other)

Creates an agent instance from an other agent instance.

Definition at line 23 of file core/agentinstance.cpp.

◆ ~AgentInstance()

Akonadi::AgentInstance::~AgentInstance ( )

Destroys the agent instance object.

Member Function Documentation

◆ abortCurrentTask()

void AgentInstance::abortCurrentTask ( ) const

Tell the agent to abort its current operation.

Since
4.4

Definition at line 126 of file core/agentinstance.cpp.

◆ activities()

QStringList AgentInstance::activities ( ) const
nodiscard

Returns a list of activities of the agent instance.

Definition at line 171 of file core/agentinstance.cpp.

◆ activitiesEnabled()

bool AgentInstance::activitiesEnabled ( ) const
nodiscard

Returns true if agent instance has activities support enabled.

Definition at line 181 of file core/agentinstance.cpp.

◆ configure()

void AgentInstance::configure ( QWidget * parent = nullptr)

Triggers the agent instance to show its configuration dialog.

Deprecated
Use the new Akonadi::AgentConfigurationWidget and Akonadi::AgentConfigurationDialog to display configuration dialogs in-process
Parameters
parentParent window for the configuration dialog.

Definition at line 92 of file core/agentinstance.cpp.

◆ identifier()

QString Akonadi::AgentInstance::identifier ( ) const
nodiscard

Returns the unique identifier of the agent instance.

◆ isOnline()

bool Akonadi::AgentInstance::isOnline ( ) const
nodiscard

Returns whether the agent instance is online currently.

◆ isValid()

bool AgentInstance::isValid ( ) const
nodiscard

Returns whether the agent instance object is valid.

Definition at line 32 of file core/agentinstance.cpp.

◆ name()

QString AgentInstance::name ( ) const
nodiscard

Returns the user visible name of the agent instance.

Definition at line 52 of file core/agentinstance.cpp.

◆ operator=()

AgentInstance & AgentInstance::operator= ( const AgentInstance & other)
Parameters
otherother agent instance

Definition at line 112 of file core/agentinstance.cpp.

◆ operator==()

bool AgentInstance::operator== ( const AgentInstance & other) const
nodiscard
Parameters
otherother agent instance

Definition at line 121 of file core/agentinstance.cpp.

◆ progress()

int Akonadi::AgentInstance::progress ( ) const
nodiscard

Returns the progress of the agent instance in percent, or -1 if no progress information are available.

◆ reconfigure()

void AgentInstance::reconfigure ( ) const

Tell the agent that its configuration has been changed remotely via D-Bus.

Definition at line 141 of file core/agentinstance.cpp.

◆ restart()

void AgentInstance::restart ( ) const

Restart the agent process.

Definition at line 156 of file core/agentinstance.cpp.

◆ setActivities()

void AgentInstance::setActivities ( const QStringList & online)

Sets list of activities of the agent instance.

Definition at line 176 of file core/agentinstance.cpp.

◆ setActivitiesEnabled()

void AgentInstance::setActivitiesEnabled ( bool enabled)

Sets activities support enabled.

Definition at line 186 of file core/agentinstance.cpp.

◆ setIsOnline()

void AgentInstance::setIsOnline ( bool online)

Sets online status of the agent instance.

Definition at line 87 of file core/agentinstance.cpp.

◆ setName()

void AgentInstance::setName ( const QString & name)

Sets the user visible name of the agent instance.

Definition at line 47 of file core/agentinstance.cpp.

◆ status()

Status Akonadi::AgentInstance::status ( ) const
nodiscard

Returns the status of the agent instance.

◆ statusMessage()

QString Akonadi::AgentInstance::statusMessage ( ) const
nodiscard

Returns a textual presentation of the status of the agent instance.

◆ synchronize()

void AgentInstance::synchronize ( )

Triggers the agent instance to start synchronization.

Definition at line 97 of file core/agentinstance.cpp.

◆ synchronizeCollectionTree()

void AgentInstance::synchronizeCollectionTree ( )

Triggers a synchronization of the collection tree by the given agent instance.

Definition at line 102 of file core/agentinstance.cpp.

◆ synchronizeTags()

void AgentInstance::synchronizeTags ( )

Triggers a synchronization of tags by the given agent instance.

Definition at line 107 of file core/agentinstance.cpp.

◆ type()

AgentType AgentInstance::type ( ) const
nodiscard

Returns the agent type of this instance.

Definition at line 37 of file core/agentinstance.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.