Statistics

Statistics — Data statistics.

Synopsis


#include <libtracker-client/tracker.h>

GPtrArray *         tracker_statistics_get              (TrackerClient *client,
                                                         GError **error);
guint               tracker_statistics_get_async        (TrackerClient *client,
                                                         TrackerReplyGPtrArray callback,
                                                         gpointer user_data);

Description

This API is meant to get statistics about the stored data.

Details

tracker_statistics_get ()

GPtrArray *         tracker_statistics_get              (TrackerClient *client,
                                                         GError **error);

Requests statistics about each class in the ontology (for example, nfo:Image and nmm:Photo which indicate the number of images and the number of photos).

The returned GPtrArray contains an array of GStrv which have 2 strings. The first is the class (e.g. nfo:Image), the second is the count for that class.

This API call is completely synchronous so it may block.

client :

a TrackerClient.

error :

a GError.

Returns :

A GPtrArray with the statistics which must be freed using g_ptr_array_free().

tracker_statistics_get_async ()

guint               tracker_statistics_get_async        (TrackerClient *client,
                                                         TrackerReplyGPtrArray callback,
                                                         gpointer user_data);

This behaves exactly as tracker_statistics_get() but asynchronously.

client :

a TrackerClient.

callback :

a TrackerReplyGPtrArray to be used when the data is available.

user_data :

user data to pass to callback.

Returns :

A guint for the ID of this API call. This can be cancelled with tracker_cancel_call().