# class AgentManager

###

Module | akonadi
Namespace | Akonadi
Class | AgentManager
Inherits | QObject

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>

### methods

- AgentManager ( )

  returns ctor
  Not implemented

- instance (identififer)

  returns Akonadi.AgentInstance

  Argument | Type | Default
  --- | --- | ---
  identififer | QString |

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

- instanceAdded (instance)

  returns Nothing
  SIGNAL ("instanceAdded (const AgentInstance&)")

  Argument | Type | Default
  --- | --- | ---
  instance | Akonadi.AgentInstance |

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

  instance - The new agent instance.

- instanceError (instance, message)

  returns Nothing
  SIGNAL ("instanceError (const AgentInstance&, const QString&)")

  Argument | Type | Default
  --- | --- | ---
  instance | Akonadi.AgentInstance |
  message | QString |

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

  instance - The agent instance that raised the error.

  message - The i18n'ed error message.

- instanceNameChanged (instance)

  returns Nothing
  SIGNAL ("instanceNameChanged (const AgentInstance&)")

  Argument | Type | Default
  --- | --- | ---
  instance | Akonadi.AgentInstance |

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

  instance - The agent instance that name has changed.

- instanceProgressChanged (instance)

  returns Nothing
  SIGNAL ("instanceProgressChanged (const AgentInstance&)")

  Argument | Type | Default
  --- | --- | ---
  instance | Akonadi.AgentInstance |

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

  instance - The agent instance that progress has changed.

- instanceRemoved (instance)

  returns Nothing
  SIGNAL ("instanceRemoved (const AgentInstance&)")

  Argument | Type | Default
  --- | --- | ---
  instance | Akonadi.AgentInstance |

  This signal is emitted whenever an agent instance was removed.

  instance - The removed agent instance.

- instanceStatusChanged (instance)

  returns Nothing
  SIGNAL ("instanceStatusChanged (const AgentInstance&)")

  Argument | Type | Default
  --- | --- | ---
  instance | Akonadi.AgentInstance |

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

  instance - The agent instance that status has changed.

- instanceWarning (instance, message)

  returns Nothing
  SIGNAL ("instanceWarning (const AgentInstance&, const QString&)")

  Argument | Type | Default
  --- | --- | ---
  instance | Akonadi.AgentInstance |
  message | QString |

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

  instance - The agent instance that raised the warning.

  message - The i18n'ed warning message.

- instances ( )

  returns Akonadi.AgentInstance.List

  Returns the list of all available agent instances.

- removeInstance (instance)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  instance | Akonadi.AgentInstance |

  Removes the given agent instance.

- self ( )

  returns Akonadi.AgentManager
  static

  Returns the global instance of the agent manager.

- synchronizeCollection (collection)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  collection | Akonadi.Collection |

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

  collection - The collection to synchronize.

- type (identififer)

  returns Akonadi.AgentType

  Argument | Type | Default
  --- | --- | ---
  identififer | QString |

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

- typeAdded (type)

  returns Nothing
  SIGNAL ("typeAdded (const AgentType&)")

  Argument | Type | Default
  --- | --- | ---
  type | Akonadi.AgentType |

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

  type - The new agent type.

- typeRemoved (type)

  returns Nothing
  SIGNAL ("typeRemoved (const AgentType&)")

  Argument | Type | Default
  --- | --- | ---
  type | Akonadi.AgentType |

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

  type - The removed agent type.

- types ( )

  returns Akonadi.AgentType.List

  Returns the list of all available agent types.