![]() |
![]() |
![]() |
API Documentation for the Zeitgeist Client Library | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
ZeitgeistDataSourceRegistryZeitgeistDataSourceRegistry — Query the Zeitgeist Data Source Registry extension |
#include <zeitgeist.h> ZeitgeistDataSourceRegistry; struct ZeitgeistDataSourceRegistryClass; void zeitgeist_data_source_registry_get_data_sources (ZeitgeistDataSourceRegistry *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); GPtrArray * zeitgeist_data_source_registry_get_data_sources_finish (ZeitgeistDataSourceRegistry *self
,GAsyncResult *res
,GError **error
); ZeitgeistDataSourceRegistry * zeitgeist_data_source_registry_new (void
); void zeitgeist_data_source_registry_register_data_source (ZeitgeistDataSourceRegistry *self
,ZeitgeistDataSource *source
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean zeitgeist_data_source_registry_register_data_source_finish (ZeitgeistDataSourceRegistry *self
,GAsyncResult *res
,GError **error
); void zeitgeist_data_source_registry_set_data_source_enabled (ZeitgeistDataSourceRegistry *self
,const gchar *unique_id
,gboolean enabled
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean zeitgeist_data_source_registry_set_data_source_enabled_finish (ZeitgeistDataSourceRegistry *self
,GAsyncResult *res
,GError **error
);
"source-disconnected" :Run First
"source-enabled" :Run First
"source-registered" :Run First
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.
typedef struct _ZeitgeistDataSourceRegistry ZeitgeistDataSourceRegistry;
struct ZeitgeistDataSourceRegistryClass { GObjectClass parent_class; void (*source_registered) (ZeitgeistDataSourceRegistry *registry, ZeitgeistDataSource *source); void (*source_disconnected) (ZeitgeistDataSourceRegistry *registry, ZeitgeistDataSource *source); void (*source_enabled) (ZeitgeistDataSourceRegistry *registry, gchar *unique_id, gboolean enabled); };
void zeitgeist_data_source_registry_get_data_sources (ZeitgeistDataSourceRegistry *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
GPtrArray * zeitgeist_data_source_registry_get_data_sources_finish (ZeitgeistDataSourceRegistry *self
,GAsyncResult *res
,GError **error
);
|
Instance of ZeitgeistDataSourceRegistry. |
|
a GAsyncResult. |
|
a GError or NULL. |
Returns : |
Newly created GPtrArray containing ZeitgeistDataSource(s)
registered in Zeitgeist. Free using g_ptr_array_unref() once
you're done using it. |
ZeitgeistDataSourceRegistry * zeitgeist_data_source_registry_new
(void
);
Create a new data source registry instance.
DataSourceRegistry instances are not overly expensive for neither client or the Zeitgeist daemon so there's no need to go to lengths to keep singleton instances around.
Returns : |
A reference to a newly allocated registry. |
void zeitgeist_data_source_registry_register_data_source (ZeitgeistDataSourceRegistry *self
,ZeitgeistDataSource *source
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Registers new data source in the registry, the source
parameter needs to
have unique-id, name, description and optionally event_templates set,
therefore it is useful to pass ZeitgeistDataSource instance created using
zeitgeist_data_source_new_full()
. The registry will assume its ownership.
|
Instance of ZeitgeistDataSourceRegistry. |
|
Data source to register. If this is a floating reference it will be consumed |
|
a GCancellable or NULL. |
|
a GAsyncReadyCallback to call when the request is finished. |
|
the data to pass to callback function. |
gboolean zeitgeist_data_source_registry_register_data_source_finish (ZeitgeistDataSourceRegistry *self
,GAsyncResult *res
,GError **error
);
|
Instance of ZeitgeistDataSourceRegistry. |
|
Result of the asynchronous operation. |
|
a GError or NULL. |
Returns : |
If error is unset, returns whether this data source is 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
);
gboolean zeitgeist_data_source_registry_set_data_source_enabled_finish (ZeitgeistDataSourceRegistry *self
,GAsyncResult *res
,GError **error
);
"source-disconnected"
signalvoid user_function (ZeitgeistDataSourceRegistry *zeitgeistdatasourceregistry,
ZeitgeistDataSource *arg1,
gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"source-enabled"
signalvoid user_function (ZeitgeistDataSourceRegistry *zeitgeistdatasourceregistry,
gchar *arg1,
gboolean arg2,
gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"source-registered"
signalvoid user_function (ZeitgeistDataSourceRegistry *zeitgeistdatasourceregistry,
ZeitgeistDataSource *arg1,
gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |