## TrackerClient

TrackerClient — A client library for querying and inserting data in Tracker.

## Synopsis

    #include <libtracker-client/tracker.h>

    #define             TRACKER_DBUS_SERVICE
    #define             TRACKER_DBUS_OBJECT
    #define             TRACKER_DBUS_INTERFACE_RESOURCES
    #define             TRACKER_DBUS_INTERFACE_STATISTICS
                        TrackerClient;
                        TrackerClientClass;
    enum                TrackerClientFlags;
    TrackerClient *     tracker_client_new                  (TrackerClientFlags flags,
                                                             gint timeout);

## Object Hierarchy

      GObject
       +----TrackerClient

## Properties

      "enable-warnings"          gboolean              : Read / Write / Construct
      "timeout"                  gint                  : Read / Write / Construct

## Description

This API is for applications which want to integrate with Tracker either by storing their data or by querying it. They are also not limited to their application's data. Other data mined by other applications is also available in some cases.

## Details

### TRACKER_DBUS_SERVICE

    #define TRACKER_DBUS_SERVICE              "org.freedesktop.Tracker1"

### TRACKER_DBUS_OBJECT

    #define TRACKER_DBUS_OBJECT               "/org/freedesktop/Tracker1"

### TRACKER_DBUS_INTERFACE_RESOURCES

    #define TRACKER_DBUS_INTERFACE_RESOURCES  "org.freedesktop.Tracker1.Resources"

### TRACKER_DBUS_INTERFACE_STATISTICS

    #define TRACKER_DBUS_INTERFACE_STATISTICS "org.freedesktop.Tracker1.Statistics"

### TrackerClient

    typedef struct _TrackerClient TrackerClient;

### TrackerClientClass

    typedef struct {
    	GObjectClass parent;
    } TrackerClientClass;

### enum TrackerClientFlags

    typedef enum {
    	TRACKER_CLIENT_ENABLE_WARNINGS      = 1 << 0
    } TrackerClientFlags;

`TRACKER_CLIENT_ENABLE_WARNINGS` | If supplied warnings will be produced upon erronous situations. This is usually turned off for applications that want to provide their own error reporting.

### tracker_client_new ()

    TrackerClient *     tracker_client_new                  (TrackerClientFlags flags,
                                                             gint timeout);

Creates a connection over D-Bus to the Tracker store for doing data querying and inserting.

The `timeout` is only used if it is > 0. If it is, then it is used with `dbus_g_proxy_set_default_timeout()`.

`flags` : | This can be one or more combinations of TrackerClientFlags
`timeout` : | a gint used for D-Bus call timeouts.
Returns : | the TrackerClient which should be freed with `g_object_unref()` when finished with.

## Property Details

### The `"enable-warnings"` property

      "enable-warnings"          gboolean              : Read / Write / Construct

Enable warnings.

Default value: TRUE

### The `"timeout"` property

      "timeout"                  gint                  : Read / Write / Construct

Timeout.

Allowed values: >= G_MAXULONG

Default value: -1