# class AgentInstance

###

Module | akonadi
Namespace | Akonadi
Class | AgentInstance
Inherits |

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.

    Akonadi.AgentInstance.List instances = Akonadi.AgentManager.self()->instances();
    foreach ( const Akonadi.AgentInstance &instance, instances ) {
    qDebug() << "Name:" << instance.name() << "(" << instance.identifier() << ")";
    }

Author Tobias Koenig <tokoe@kde.org>

### enums

- Status { Idle, Running, Broken }

enum details

### methods

- AgentInstance ( )

  returns ctor

  Creates a new agent instance object.

- AgentInstance (other)

  returns ctor

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

  Creates an agent instance from an other agent instance.

- configure (parent)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0

  Triggers the agent instance to show its configuration dialog.

  parent - Parent window for the configuration dialog.

- identifier ( )

  returns QString

  Returns the unique identifier of the agent instance.

- isOnline ( )

  returns bool

  Returns whether the agent instance is online currently.

- isValid ( )

  returns bool

  Returns whether the agent instance object is valid.

- name ( )

  returns QString

  Returns the user visible name of the agent instance.

- operator == (other)

  returns bool

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

  Internal

- progress ( )

  returns int

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

- setIsOnline (online)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  online | bool |

  Sets online status of the agent instance.

- setName (name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  name | QString |

  Sets the user visible name of the agent instance.

- status ( )

  returns Akonadi.AgentInstance.Status

  Returns the status of the agent instance.

- statusMessage ( )

  returns QString

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

- synchronize ( )

  returns Nothing

  Triggers the agent instance to start synchronization.

- synchronizeCollectionTree ( )

  returns Nothing

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

- type ( )

  returns Akonadi.AgentType

  Returns the agent type of this instance.

### enums - detail

- Status { Idle, Running, Broken }

  Describes the status of the agent instance.

  | Idle | - 0 | - |
  | Running | - | - |
  | Broken | - | - |