# class CollectionStatisticsJob

###

Module | akonadi
Namespace | Akonadi
Class | CollectionStatisticsJob
Inherits | Akonadi::Job

Job that fetches collection statistics from the Akonadi storage.

This class fetches the CollectionStatistics object for a given collection.

Example:

    Akonadi.Collection collection = ...

    Akonadi.CollectionStatisticsJob *job = new Akonadi.CollectionStatisticsJob( collection );
    if ( job->exec() ) {
    Akonadi.CollectionStatistics statistics = job->statistics();
    qDebug() << "Unread items:" << statistics.unreadCount();
    }

Author Volker Krause <vkrause@kde.org>

### methods

- CollectionStatisticsJob (collection, parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  collection | Akonadi.Collection |
  parent | QObject | 0

  Creates a new collection statistics job.

  collection - The collection to fetch the statistics from.

  parent - The parent object.

- collection ( )

  returns Akonadi.Collection

  Returns the corresponding collection, if the job was executed successfully, the collection is already updated.

- doHandleResponse (tag, data)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  tag | QByteArray |
  data | QByteArray |

- doStart ( )

  returns Nothing

- statistics ( )

  returns Akonadi.CollectionStatistics

  Returns the fetched collection statistics.