KDE 4.2 PyKDE API Reference

- KDE's Python API

# 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();
       }

Author:
  Tobias Koenig <tokoe@kde.org>

## 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 identififer)
| instanceAdded (self, Akonadi.AgentInstance instance)
| instanceError (self, Akonadi.AgentInstance instance, QString message)
| instanceNameChanged (self, Akonadi.AgentInstance instance)
| instanceOnline (self, Akonadi.AgentInstance instance, bool online)
| instanceProgressChanged (self, Akonadi.AgentInstance instance)
| instanceRemoved (self, Akonadi.AgentInstance instance)
| instanceStatusChanged (self, Akonadi.AgentInstance instance)
| instanceWarning (self, Akonadi.AgentInstance instance, QString message)
Akonadi.AgentInstance.List | instances (self)
| removeInstance (self, Akonadi.AgentInstance instance)
| synchronizeCollection (self, Akonadi.Collection collection)
Akonadi.AgentType | type (self, QString identififer)
| typeAdded (self, Akonadi.AgentType type)
| typeRemoved (self, Akonadi.AgentType type)
Akonadi.AgentType.List | types (self)

## Static Methods

Akonadi.AgentManager | self ()

## Method Documentation

__init__ | ( |  | self ) |

Akonadi.AgentInstance instance | ( | self, |
|  | QString | identififer
| ) |  |  |

Returns the agent instance with the given identifier or an invalid agent instance if the identifier does not exist.

instanceAdded | ( | self, |
|  | 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 AgentInstance&)"), target_slot)`

instanceError | ( | self, |
|  | 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 AgentInstance&, const QString&)"), target_slot)`

instanceNameChanged | ( | self, |
|  | 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 AgentInstance&)"), target_slot)`

instanceOnline | ( | self, |
|  | 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 AgentInstance&, bool)"), target_slot)`

instanceProgressChanged | ( | self, |
|  | 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 AgentInstance&)"), target_slot)`

instanceRemoved | ( | self, |
|  | 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 AgentInstance&)"), target_slot)`

instanceStatusChanged | ( | self, |
|  | 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 AgentInstance&)"), target_slot)`

instanceWarning | ( | self, |
|  | 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 AgentInstance&, const QString&)"), target_slot)`

Akonadi.AgentInstance.List instances | ( |  | self ) |

Returns the list of all available agent instances.

removeInstance | ( | self, |
|  | Akonadi.AgentInstance | instance
| ) |  |  |

Removes the given agent instance.

Akonadi.AgentManager self | ( |  | ) |

Returns the global instance of the agent manager.

synchronizeCollection | ( | self, |
|  | Akonadi.Collection | collection
| ) |  |  |

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

Parameters:

  | collection | The collection to synchronize.

Akonadi.AgentType type | ( | self, |
|  | QString | identififer
| ) |  |  |

Returns the agent type with the given identifier or an invalid agent type if the identifier does not exist.

typeAdded | ( | self, |
|  | 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 AgentType&)"), target_slot)`

typeRemoved | ( | self, |
|  | 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 AgentType&)"), target_slot)`

Akonadi.AgentType.List types | ( |  | self ) |

Returns the list of all available agent types.