AgentManager Class Reference
from PyKDE4.akonadi import *
Inherits: QObject
Namespace: Akonadi
Detailed Description
Provides an interface to retrieve agent types and manage agent instances.
This singleton class can be used to create or remove agent instances or trigger synchronization of collections. Furthermore it provides information about status changes of the agents.
Akonadi.AgentManager *manager = Akonadi.AgentManager.self(); Akonadi.AgentType.List types = manager->types(); foreach ( const Akonadi.AgentType& type, types ) { qDebug() << "Type:" << type.name() << type.description(); }
Signals | |
instanceAdded (Akonadi.AgentInstance instance) | |
instanceError (Akonadi.AgentInstance instance, QString message) | |
instanceNameChanged (Akonadi.AgentInstance instance) | |
instanceOnline (Akonadi.AgentInstance instance, bool online) | |
instanceProgressChanged (Akonadi.AgentInstance instance) | |
instanceRemoved (Akonadi.AgentInstance instance) | |
instanceStatusChanged (Akonadi.AgentInstance instance) | |
instanceWarning (Akonadi.AgentInstance instance, QString message) | |
typeAdded (Akonadi.AgentType type) | |
typeRemoved (Akonadi.AgentType type) | |
Methods | |
__init__ (self) | |
Akonadi.AgentInstance | instance (self, QString identifier) |
[Akonadi.AgentInstance] | instances (self) |
removeInstance (self, Akonadi.AgentInstance instance) | |
synchronizeCollection (self, Akonadi.Collection collection) | |
synchronizeCollection (self, Akonadi.Collection collection, bool recursive) | |
Akonadi.AgentType | type (self, QString identifier) |
[Akonadi.AgentType] | types (self) |
Static Methods | |
Akonadi.AgentManager | self () |
Signal Documentation
instanceAdded | ( | Akonadi.AgentInstance | instance | |
) |
This signal is emitted whenever a new agent instance was created.
- Parameters:
-
instance The new agent instance.
- Signal syntax:
QObject.connect(source, SIGNAL("instanceAdded(const Akonadi::AgentInstance&)"), target_slot)
instanceError | ( | Akonadi.AgentInstance | instance, | |
QString | message | |||
) |
This signal is emitted whenever the agent instance raised an error.
- Parameters:
-
instance The agent instance that raised the error. message The i18n'ed error message.
- Signal syntax:
QObject.connect(source, SIGNAL("instanceError(const Akonadi::AgentInstance&, const QString&)"), target_slot)
instanceNameChanged | ( | Akonadi.AgentInstance | instance | |
) |
This signal is emitted whenever the name of the agent instance has changed.
- Parameters:
-
instance The agent instance that name has changed.
- Signal syntax:
QObject.connect(source, SIGNAL("instanceNameChanged(const Akonadi::AgentInstance&)"), target_slot)
instanceOnline | ( | Akonadi.AgentInstance | instance, | |
bool | online | |||
) |
This signal is emitted whenever the online state of an agent changed.
- Parameters:
-
instance The agent instance that changed its online state. online The new online state.
- Since:
- 4.2
- Signal syntax:
QObject.connect(source, SIGNAL("instanceOnline(const Akonadi::AgentInstance&, bool)"), target_slot)
instanceProgressChanged | ( | Akonadi.AgentInstance | instance | |
) |
This signal is emitted whenever the progress of an agent instance has changed.
- Parameters:
-
instance The agent instance that progress has changed.
- Signal syntax:
QObject.connect(source, SIGNAL("instanceProgressChanged(const Akonadi::AgentInstance&)"), target_slot)
instanceRemoved | ( | Akonadi.AgentInstance | instance | |
) |
This signal is emitted whenever an agent instance was removed.
- Parameters:
-
instance The removed agent instance.
- Signal syntax:
QObject.connect(source, SIGNAL("instanceRemoved(const Akonadi::AgentInstance&)"), target_slot)
instanceStatusChanged | ( | Akonadi.AgentInstance | instance | |
) |
This signal is emitted whenever the status of an agent instance has changed.
- Parameters:
-
instance The agent instance that status has changed.
- Signal syntax:
QObject.connect(source, SIGNAL("instanceStatusChanged(const Akonadi::AgentInstance&)"), target_slot)
instanceWarning | ( | Akonadi.AgentInstance | instance, | |
QString | message | |||
) |
This signal is emitted whenever the agent instance raised a warning.
- Parameters:
-
instance The agent instance that raised the warning. message The i18n'ed warning message.
- Signal syntax:
QObject.connect(source, SIGNAL("instanceWarning(const Akonadi::AgentInstance&, const QString&)"), target_slot)
typeAdded | ( | Akonadi.AgentType | type | |
) |
This signal is emitted whenever a new agent type was installed on the system.
- Parameters:
-
type The new agent type.
- Signal syntax:
QObject.connect(source, SIGNAL("typeAdded(const Akonadi::AgentType&)"), target_slot)
typeRemoved | ( | Akonadi.AgentType | type | |
) |
This signal is emitted whenever an agent type was removed from the system.
- Parameters:
-
type The removed agent type.
- Signal syntax:
QObject.connect(source, SIGNAL("typeRemoved(const Akonadi::AgentType&)"), target_slot)
Method Documentation
__init__ | ( | self ) |
Akonadi.AgentInstance instance | ( | self, | ||
QString | identifier | |||
) |
Returns the agent instance with the given identifier or an invalid agent instance if the identifier does not exist.
[Akonadi.AgentInstance] instances | ( | self ) |
Returns the list of all available agent instances.
removeInstance | ( | self, | ||
Akonadi.AgentInstance | instance | |||
) |
Removes the given agent instance.
synchronizeCollection | ( | self, | ||
Akonadi.Collection | collection | |||
) |
Trigger a synchronization of the given collection by its owning resource agent.
- Parameters:
-
collection The collection to synchronize. recursive If true, the sub-collections are also synchronized
- Since:
- 4.6
synchronizeCollection | ( | self, | ||
Akonadi.Collection | collection, | |||
bool | recursive | |||
) |
Trigger a synchronization of the given collection by its owning resource agent.
- Parameters:
-
collection The collection to synchronize. recursive If true, the sub-collections are also synchronized
- Since:
- 4.6
Akonadi.AgentType type | ( | self, | ||
QString | identifier | |||
) |
Returns the agent type with the given identifier or an invalid agent type if the identifier does not exist.
[Akonadi.AgentType] types | ( | self ) |
Returns the list of all available agent types.
Static Method Documentation
Akonadi.AgentManager self | ( | ) |
Returns the global instance of the agent manager.