ZeitgeistDataSourceRegistry: Zeitgeist Reference Manual

## ZeitgeistDataSourceRegistry ZeitgeistDataSourceRegistry — Query the Zeitgeist Data-Source Registry extension |

## Functions

#define | ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY
void | zeitgeist_data_source_registry_get_data_sources ()
GPtrArray * | zeitgeist_data_source_registry_get_data_sources_finish ()
void | zeitgeist_data_source_registry_get_data_source_from_id ()
ZeitgeistDataSource * | zeitgeist_data_source_registry_get_data_source_from_id_finish ()
void | zeitgeist_data_source_registry_register_data_source ()
gboolean | zeitgeist_data_source_registry_register_data_source_finish ()
void | zeitgeist_data_source_registry_set_data_source_enabled ()
void | zeitgeist_data_source_registry_set_data_source_enabled_finish ()
ZeitgeistDataSourceRegistry * | zeitgeist_data_source_registry_new ()
void | zeitgeist_remote_registry_get_data_sources ()
GVariant * | zeitgeist_remote_registry_get_data_sources_finish ()
void | zeitgeist_remote_registry_register_data_source ()
gboolean | zeitgeist_remote_registry_register_data_source_finish ()
void | zeitgeist_remote_registry_set_data_source_enabled ()
void | zeitgeist_remote_registry_set_data_source_enabled_finish ()
void | zeitgeist_remote_registry_get_data_source_from_id ()
GVariant * | zeitgeist_remote_registry_get_data_source_from_id_finish ()

## Signals

void | source-disconnected | Run Last
void | source-enabled | Run Last
void | source-registered | Run Last
void | data-source-disconnected | Run Last
void | data-source-enabled | Run Last
void | data-source-registered | Run Last

## Types and Values

struct | ZeitgeistDataSourceRegistry
struct | ZeitgeistDataSourceRegistryClass
| ZeitgeistRemoteRegistry
struct | ZeitgeistRemoteRegistryIface

## Object Hierarchy

        GInterface
        ╰── ZeitgeistRemoteRegistry
        GObject
        ╰── ZeitgeistQueuedProxyWrapper
            ╰── ZeitgeistDataSourceRegistry

## Prerequisites

ZeitgeistRemoteRegistry requires GObject.

## Description

The Zeitgeist engine maintains a publicly available list of recognized data-sources (components inserting information into Zeitgeist). ZeitgeistDataSourceRegistry is used to register new data sources, get information about them and gives the ability to enable or disable the data sources.

## Functions

### ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY

    #define ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY (zeitgeist_data_source_registry_get_type ())

The type for ZeitgeistDataSourceRegistry.

### zeitgeist_data_source_registry_get_data_sources ()

    void
    zeitgeist_data_source_registry_get_data_sources
                                   (ZeitgeistDataSourceRegistry *self,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);

See also: `zeitgeist_data_source_registry_get_data_sources_finish()`

#### Parameters

self | the ZeitgeistDataSourceRegistry instance |
cancellable |  |
_callback_ | callback to call when the request is satisfied. | [scope async]
_user_data_ | the data to pass to `_callback_` function. | [closure]

### zeitgeist_data_source_registry_get_data_sources_finish ()

    GPtrArray *
    zeitgeist_data_source_registry_get_data_sources_finish
                                   (ZeitgeistDataSourceRegistry *self,
                                    GAsyncResult *_res_,
                                    GError **error);

See also: `zeitgeist_data_source_registry_get_data_sources()`

#### Parameters

self | the ZeitgeistDataSourceRegistry instance |
_res_ | a GAsyncResult |
error | location to store the error occuring, or `NULL` to ignore |

### zeitgeist_data_source_registry_get_data_source_from_id ()

    void
    zeitgeist_data_source_registry_get_data_source_from_id
                                   (ZeitgeistDataSourceRegistry *self,
                                    const gchar *unique_id,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);

See also: `zeitgeist_data_source_registry_get_data_source_from_id_finish()`

#### Parameters

self | the ZeitgeistDataSourceRegistry instance |
unique_id |  |
cancellable |  |
_callback_ | callback to call when the request is satisfied. | [scope async]
_user_data_ | the data to pass to `_callback_` function. | [closure]

### zeitgeist_data_source_registry_get_data_source_from_id_finish ()

    ZeitgeistDataSource *
    zeitgeist_data_source_registry_get_data_source_from_id_finish
                                   (ZeitgeistDataSourceRegistry *self,
                                    GAsyncResult *_res_,
                                    GError **error);

See also: `zeitgeist_data_source_registry_get_data_source_from_id()`

#### Parameters

self | the ZeitgeistDataSourceRegistry instance |
_res_ | a GAsyncResult |
error | location to store the error occuring, or `NULL` to ignore |

### zeitgeist_data_source_registry_register_data_source ()

    void
    zeitgeist_data_source_registry_register_data_source
                                   (ZeitgeistDataSourceRegistry *self,
                                    ZeitgeistDataSource *data_source,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);

See also: `zeitgeist_data_source_registry_register_data_source_finish()`

#### Parameters

self | the ZeitgeistDataSourceRegistry instance |
data_source |  |
cancellable |  |
_callback_ | callback to call when the request is satisfied. | [scope async]
_user_data_ | the data to pass to `_callback_` function. | [closure]

### zeitgeist_data_source_registry_register_data_source_finish ()

    gboolean
    zeitgeist_data_source_registry_register_data_source_finish
                                   (ZeitgeistDataSourceRegistry *self,
                                    GAsyncResult *_res_,
                                    GError **error);

See also: `zeitgeist_data_source_registry_register_data_source()`

#### Parameters

self | the ZeitgeistDataSourceRegistry instance |
_res_ | a GAsyncResult |
error | location to store the error occuring, or `NULL` to ignore |

### zeitgeist_data_source_registry_set_data_source_enabled ()

    void
    zeitgeist_data_source_registry_set_data_source_enabled
                                   (ZeitgeistDataSourceRegistry *self,
                                    const gchar *unique_id,
                                    gboolean enabled,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);

See also: `zeitgeist_data_source_registry_set_data_source_enabled_finish()`

#### Parameters

self | the ZeitgeistDataSourceRegistry instance |
unique_id |  |
enabled |  |
cancellable |  |
_callback_ | callback to call when the request is satisfied. | [scope async]
_user_data_ | the data to pass to `_callback_` function. | [closure]

### zeitgeist_data_source_registry_set_data_source_enabled_finish ()

    void
    zeitgeist_data_source_registry_set_data_source_enabled_finish
                                   (ZeitgeistDataSourceRegistry *self,
                                    GAsyncResult *_res_,
                                    GError **error);

See also: `zeitgeist_data_source_registry_set_data_source_enabled()`

#### Parameters

self | the ZeitgeistDataSourceRegistry instance |
_res_ | a GAsyncResult |
error | location to store the error occuring, or `NULL` to ignore |

### zeitgeist_data_source_registry_new ()

    ZeitgeistDataSourceRegistry *
    zeitgeist_data_source_registry_new (void);

### zeitgeist_remote_registry_get_data_sources ()

    void
    zeitgeist_remote_registry_get_data_sources
                                   (ZeitgeistRemoteRegistry *self,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);

See also: `zeitgeist_remote_registry_get_data_sources_finish()`

#### Parameters

self | the ZeitgeistRemoteRegistry instance |
cancellable |  |
_callback_ | callback to call when the request is satisfied. | [scope async]
_user_data_ | the data to pass to `_callback_` function. | [closure]

### zeitgeist_remote_registry_get_data_sources_finish ()

    GVariant *
    zeitgeist_remote_registry_get_data_sources_finish
                                   (ZeitgeistRemoteRegistry *self,
                                    GAsyncResult *_res_,
                                    GError **error);

See also: `zeitgeist_remote_registry_get_data_sources()`

#### Parameters

self | the ZeitgeistRemoteRegistry instance |
_res_ | a GAsyncResult |
error | location to store the error occuring, or `NULL` to ignore |

### zeitgeist_remote_registry_register_data_source ()

    void
    zeitgeist_remote_registry_register_data_source
                                   (ZeitgeistRemoteRegistry *self,
                                    const gchar *unique_id,
                                    const gchar *name,
                                    const gchar *description,
                                    GVariant *event_templates,
                                    GCancellable *cancellable,
                                    const char *sender,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);

See also: `zeitgeist_remote_registry_register_data_source_finish()`

#### Parameters

self | the ZeitgeistRemoteRegistry instance |
unique_id |  |
name |  |
description |  |
event_templates |  |
cancellable |  |
sender |  |
_callback_ | callback to call when the request is satisfied. | [scope async]
_user_data_ | the data to pass to `_callback_` function. | [closure]

### zeitgeist_remote_registry_register_data_source_finish ()

    gboolean
    zeitgeist_remote_registry_register_data_source_finish
                                   (ZeitgeistRemoteRegistry *self,
                                    GAsyncResult *_res_,
                                    GError **error);

See also: `zeitgeist_remote_registry_register_data_source()`

#### Parameters

self | the ZeitgeistRemoteRegistry instance |
_res_ | a GAsyncResult |
error | location to store the error occuring, or `NULL` to ignore |

### zeitgeist_remote_registry_set_data_source_enabled ()

    void
    zeitgeist_remote_registry_set_data_source_enabled
                                   (ZeitgeistRemoteRegistry *self,
                                    const gchar *unique_id,
                                    gboolean enabled,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);

See also: `zeitgeist_remote_registry_set_data_source_enabled_finish()`

#### Parameters

self | the ZeitgeistRemoteRegistry instance |
unique_id |  |
enabled |  |
cancellable |  |
_callback_ | callback to call when the request is satisfied. | [scope async]
_user_data_ | the data to pass to `_callback_` function. | [closure]

### zeitgeist_remote_registry_set_data_source_enabled_finish ()

    void
    zeitgeist_remote_registry_set_data_source_enabled_finish
                                   (ZeitgeistRemoteRegistry *self,
                                    GAsyncResult *_res_,
                                    GError **error);

See also: `zeitgeist_remote_registry_set_data_source_enabled()`

#### Parameters

self | the ZeitgeistRemoteRegistry instance |
_res_ | a GAsyncResult |
error | location to store the error occuring, or `NULL` to ignore |

### zeitgeist_remote_registry_get_data_source_from_id ()

    void
    zeitgeist_remote_registry_get_data_source_from_id
                                   (ZeitgeistRemoteRegistry *self,
                                    const gchar *unique_id,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);

See also: `zeitgeist_remote_registry_get_data_source_from_id_finish()`

#### Parameters

self | the ZeitgeistRemoteRegistry instance |
unique_id |  |
cancellable |  |
_callback_ | callback to call when the request is satisfied. | [scope async]
_user_data_ | the data to pass to `_callback_` function. | [closure]

### zeitgeist_remote_registry_get_data_source_from_id_finish ()

    GVariant *
    zeitgeist_remote_registry_get_data_source_from_id_finish
                                   (ZeitgeistRemoteRegistry *self,
                                    GAsyncResult *_res_,
                                    GError **error);

See also: `zeitgeist_remote_registry_get_data_source_from_id()`

#### Parameters

self | the ZeitgeistRemoteRegistry instance |
_res_ | a GAsyncResult |
error | location to store the error occuring, or `NULL` to ignore |

## Types and Values

### struct ZeitgeistDataSourceRegistry

    struct ZeitgeistDataSourceRegistry;

Query the Zeitgeist Data-Source Registry extension

The Zeitgeist engine maintains a publicly available list of recognized data-sources (components inserting information into Zeitgeist). ZeitgeistDataSourceRegistry is used to register new data sources, get information about them and gives the ability to enable or disable the data sources.

### struct ZeitgeistDataSourceRegistryClass

    struct ZeitgeistDataSourceRegistryClass {
    	ZeitgeistQueuedProxyWrapperClass parent_class;
    };

The class structure for `ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY`. All the fields in this structure are private and should never be accessed directly.

#### Members

ZeitgeistQueuedProxyWrapperClass `parent_class`; | the parent class structure |

### ZeitgeistRemoteRegistry

    typedef struct _ZeitgeistRemoteRegistry ZeitgeistRemoteRegistry;

### struct ZeitgeistRemoteRegistryIface

    struct ZeitgeistRemoteRegistryIface {
    	GTypeInterface parent_iface;
    	void (*get_data_sources) (ZeitgeistRemoteRegistry* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
    	GVariant* (*get_data_sources_finish) (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
    	void (*register_data_source) (ZeitgeistRemoteRegistry* self, const gchar* unique_id, const gchar* name, const gchar* description, GVariant* event_templates, GCancellable* cancellable, const char* sender, GAsyncReadyCallback _callback_, gpointer _user_data_);
    	gboolean (*register_data_source_finish) (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
    	void (*set_data_source_enabled) (ZeitgeistRemoteRegistry* self, const gchar* unique_id, gboolean enabled, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
    	void (*set_data_source_enabled_finish) (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
    	void (*get_data_source_from_id) (ZeitgeistRemoteRegistry* self, const gchar* unique_id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
    	GVariant* (*get_data_source_from_id_finish) (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
    };

Interface for creating ZeitgeistRemoteRegistry implementations.

#### Members

GTypeInterface `parent_iface`; | the parent interface structure |
`get_data_sources` () | virtual method called by `zeitgeist_remote_registry_get_data_sources()` |
`get_data_sources_finish` () | asynchronous finish function for `get_data_sources`, called by `zeitgeist_remote_registry_get_data_sources()` |
`register_data_source` () | virtual method called by `zeitgeist_remote_registry_register_data_source()` |
`register_data_source_finish` () | asynchronous finish function for `register_data_source`, called by `zeitgeist_remote_registry_register_data_source()` |
`set_data_source_enabled` () | virtual method called by `zeitgeist_remote_registry_set_data_source_enabled()` |
`set_data_source_enabled_finish` () | asynchronous finish function for `set_data_source_enabled`, called by `zeitgeist_remote_registry_set_data_source_enabled()` |
`get_data_source_from_id` () | virtual method called by `zeitgeist_remote_registry_get_data_source_from_id()` |
`get_data_source_from_id_finish` () | asynchronous finish function for `get_data_source_from_id`, called by `zeitgeist_remote_registry_get_data_source_from_id()` |

## Signal Details

### The `“source-disconnected”` signal

    void
    user_function (ZeitgeistDataSourceRegistry *data_source_registry,
                   ZeitgeistDataSource         *data_source,
                   gpointer                     user_data)

#### Parameters

data_source_registry | the ZeitgeistDataSourceRegistry instance that received the signal |
data_source |  |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“source-enabled”` signal

    void
    user_function (ZeitgeistDataSourceRegistry *data_source_registry,
                   gchar                       *unique_id,
                   gboolean                     enabled,
                   gpointer                     user_data)

#### Parameters

data_source_registry | the ZeitgeistDataSourceRegistry instance that received the signal |
unique_id |  |
enabled |  |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“source-registered”` signal

    void
    user_function (ZeitgeistDataSourceRegistry *data_source_registry,
                   ZeitgeistDataSource         *data_source,
                   gpointer                     user_data)

#### Parameters

data_source_registry | the ZeitgeistDataSourceRegistry instance that received the signal |
data_source |  |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“data-source-disconnected”` signal

    void
    user_function (ZeitgeistRemoteRegistry *remote_registry,
                   GVariant                *data_source,
                   gpointer                 user_data)

#### Parameters

remote_registry | the ZeitgeistRemoteRegistry instance that received the signal |
data_source |  |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“data-source-enabled”` signal

    void
    user_function (ZeitgeistRemoteRegistry *remote_registry,
                   gchar                   *unique_id,
                   gboolean                 enabled,
                   gpointer                 user_data)

#### Parameters

remote_registry | the ZeitgeistRemoteRegistry instance that received the signal |
unique_id |  |
enabled |  |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“data-source-registered”` signal

    void
    user_function (ZeitgeistRemoteRegistry *remote_registry,
                   GVariant                *data_source,
                   gpointer                 user_data)

#### Parameters

remote_registry | the ZeitgeistRemoteRegistry instance that received the signal |
data_source |  |
user_data | user data set when the signal handler was connected. |

Flags: Run Last