data-source

data-source — Abstracts data sources used by the DataSourceRegistry extension

Synopsis

#define             ZEITGEIST_TYPE_DATA_SOURCE
GVariant *          zeitgeist_data_source_to_variant    (ZeitgeistDataSource *self);
ZeitgeistDataSource * zeitgeist_data_source_new         (void);
ZeitgeistDataSource * zeitgeist_data_source_new_full    (const gchar *unique_id,
                                                         const gchar *name,
                                                         const gchar *description,
                                                         GPtrArray *templates);
ZeitgeistDataSource * zeitgeist_data_source_new_from_variant
                                                        (GVariant *variant,
                                                         gboolean reset_running,
                                                         GError **error);
const gchar *       zeitgeist_data_source_get_unique_id (ZeitgeistDataSource *self);
void                zeitgeist_data_source_set_unique_id (ZeitgeistDataSource *self,
                                                         const gchar *value);
const gchar *       zeitgeist_data_source_get_name      (ZeitgeistDataSource *self);
void                zeitgeist_data_source_set_name      (ZeitgeistDataSource *self,
                                                         const gchar *value);
const gchar *       zeitgeist_data_source_get_description
                                                        (ZeitgeistDataSource *self);
void                zeitgeist_data_source_set_description
                                                        (ZeitgeistDataSource *self,
                                                         const gchar *value);
GPtrArray *         zeitgeist_data_source_get_event_templates
                                                        (ZeitgeistDataSource *self);
void                zeitgeist_data_source_set_event_templates
                                                        (ZeitgeistDataSource *self,
                                                         GPtrArray *value);
gboolean            zeitgeist_data_source_get_enabled   (ZeitgeistDataSource *self);
void                zeitgeist_data_source_set_enabled   (ZeitgeistDataSource *self,
                                                         gboolean value);
gboolean            zeitgeist_data_source_get_running   (ZeitgeistDataSource *self);
void                zeitgeist_data_source_set_running   (ZeitgeistDataSource *self,
                                                         gboolean value);
gint64              zeitgeist_data_source_get_timestamp (ZeitgeistDataSource *self);
void                zeitgeist_data_source_set_timestamp (ZeitgeistDataSource *self,
                                                         gint64 value);
struct              ZeitgeistDataSource;
struct              ZeitgeistDataSourceClass;
GPtrArray *         zeitgeist_data_sources_from_variant (GVariant *sources_variant,
                                                         GError **error);
GVariant *          zeitgeist_data_sources_to_variant   (GHashTable *sources);
#define             ZEITGEIST_DATA_SOURCES_SIG_DATASOURCES

Object Hierarchy

  GObject
   +----ZeitgeistDataSource

Properties

  "description"              gchar*                : Read / Write
  "enabled"                  gboolean              : Read / Write
  "event-templates"          GPtrArray*            : Read / Write
  "name"                     gchar*                : Read / Write
  "running"                  gboolean              : Read / Write
  "timestamp"                gint64                : Read / Write
  "unique-id"                gchar*                : Read / Write

Description

ZeitgeistDataSource represents a data source used to insert events into Zeitgeist. The data sources are identified using the unique_id property, and when querying the data source registry you get other interesting information like timestamp of the last action of the data source, flag whether it is currently running etc.

Details

ZEITGEIST_TYPE_DATA_SOURCE

#define ZEITGEIST_TYPE_DATA_SOURCE (zeitgeist_data_source_get_type ())

The type for ZeitgeistDataSource.


zeitgeist_data_source_to_variant ()

GVariant *          zeitgeist_data_source_to_variant    (ZeitgeistDataSource *self);

self :

the ZeitgeistDataSource instance

zeitgeist_data_source_new ()

ZeitgeistDataSource * zeitgeist_data_source_new         (void);

ZeitgeistDataSource

Abstracts data sources used by the ZeitgeistDataSourceRegistry extension

ZeitgeistDataSource represents a data source used to insert events into Zeitgeist. The data sources are identified using the unique_id property, and when querying the data source registry you get other interesting information like timestamp of the last action of the data source, flag whether it is currently running etc.


zeitgeist_data_source_new_full ()

ZeitgeistDataSource * zeitgeist_data_source_new_full    (const gchar *unique_id,
                                                         const gchar *name,
                                                         const gchar *description,
                                                         GPtrArray *templates);

unique_id :

 

name :

 

description :

 

templates :

 

zeitgeist_data_source_new_from_variant ()

ZeitgeistDataSource * zeitgeist_data_source_new_from_variant
                                                        (GVariant *variant,
                                                         gboolean reset_running,
                                                         GError **error);

variant :

 

reset_running :

 

error :

location to store the error occuring, or NULL to ignore. [error-domains ZeitgeistDataModelError]

zeitgeist_data_source_get_unique_id ()

const gchar *       zeitgeist_data_source_get_unique_id (ZeitgeistDataSource *self);

Get and return the current value of the "unique-id" property.

self :

the ZeitgeistDataSource instance to query

Returns :

the value of the "unique-id" property

zeitgeist_data_source_set_unique_id ()

void                zeitgeist_data_source_set_unique_id (ZeitgeistDataSource *self,
                                                         const gchar *value);

Set the value of the "unique-id" property to value.

self :

the ZeitgeistDataSource instance to modify

value :

the new value of the "unique-id" property

zeitgeist_data_source_get_name ()

const gchar *       zeitgeist_data_source_get_name      (ZeitgeistDataSource *self);

Get and return the current value of the "name" property.

self :

the ZeitgeistDataSource instance to query

Returns :

the value of the "name" property

zeitgeist_data_source_set_name ()

void                zeitgeist_data_source_set_name      (ZeitgeistDataSource *self,
                                                         const gchar *value);

Set the value of the "name" property to value.

self :

the ZeitgeistDataSource instance to modify

value :

the new value of the "name" property

zeitgeist_data_source_get_description ()

const gchar *       zeitgeist_data_source_get_description
                                                        (ZeitgeistDataSource *self);

Get and return the current value of the "description" property.

self :

the ZeitgeistDataSource instance to query

Returns :

the value of the "description" property

zeitgeist_data_source_set_description ()

void                zeitgeist_data_source_set_description
                                                        (ZeitgeistDataSource *self,
                                                         const gchar *value);

Set the value of the "description" property to value.

self :

the ZeitgeistDataSource instance to modify

value :

the new value of the "description" property

zeitgeist_data_source_get_event_templates ()

GPtrArray *         zeitgeist_data_source_get_event_templates
                                                        (ZeitgeistDataSource *self);

Get and return the current value of the "event-templates" property.

self :

the ZeitgeistDataSource instance to query

Returns :

the value of the "event-templates" property

zeitgeist_data_source_set_event_templates ()

void                zeitgeist_data_source_set_event_templates
                                                        (ZeitgeistDataSource *self,
                                                         GPtrArray *value);

Set the value of the "event-templates" property to value.

self :

the ZeitgeistDataSource instance to modify

value :

the new value of the "event-templates" property

zeitgeist_data_source_get_enabled ()

gboolean            zeitgeist_data_source_get_enabled   (ZeitgeistDataSource *self);

Get and return the current value of the "enabled" property.

self :

the ZeitgeistDataSource instance to query

Returns :

the value of the "enabled" property

zeitgeist_data_source_set_enabled ()

void                zeitgeist_data_source_set_enabled   (ZeitgeistDataSource *self,
                                                         gboolean value);

Set the value of the "enabled" property to value.

self :

the ZeitgeistDataSource instance to modify

value :

the new value of the "enabled" property

zeitgeist_data_source_get_running ()

gboolean            zeitgeist_data_source_get_running   (ZeitgeistDataSource *self);

Get and return the current value of the "running" property.

self :

the ZeitgeistDataSource instance to query

Returns :

the value of the "running" property

zeitgeist_data_source_set_running ()

void                zeitgeist_data_source_set_running   (ZeitgeistDataSource *self,
                                                         gboolean value);

Set the value of the "running" property to value.

self :

the ZeitgeistDataSource instance to modify

value :

the new value of the "running" property

zeitgeist_data_source_get_timestamp ()

gint64              zeitgeist_data_source_get_timestamp (ZeitgeistDataSource *self);

Get and return the current value of the "timestamp" property.

self :

the ZeitgeistDataSource instance to query

Returns :

the value of the "timestamp" property

zeitgeist_data_source_set_timestamp ()

void                zeitgeist_data_source_set_timestamp (ZeitgeistDataSource *self,
                                                         gint64 value);

Set the value of the "timestamp" property to value.

self :

the ZeitgeistDataSource instance to modify

value :

the new value of the "timestamp" property

struct ZeitgeistDataSource

struct ZeitgeistDataSource;

struct ZeitgeistDataSourceClass

struct ZeitgeistDataSourceClass {
	GObjectClass parent_class;
};

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

GObjectClass parent_class;

the parent class structure

zeitgeist_data_sources_from_variant ()

GPtrArray *         zeitgeist_data_sources_from_variant (GVariant *sources_variant,
                                                         GError **error);

self :

the (null) instance

sources_variant :

 

error :

location to store the error occuring, or NULL to ignore. [error-domains ZeitgeistDataModelError]

zeitgeist_data_sources_to_variant ()

GVariant *          zeitgeist_data_sources_to_variant   (GHashTable *sources);

self :

the (null) instance

sources :

 

ZEITGEIST_DATA_SOURCES_SIG_DATASOURCES

#define ZEITGEIST_DATA_SOURCES_SIG_DATASOURCES "a(sssa(" ZEITGEIST_UTILS_SIG_EVENT ")bxb)"

Property Details

The "description" property

  "description"              gchar*                : Read / Write

description.

Default value: NULL


The "enabled" property

  "enabled"                  gboolean              : Read / Write

enabled.

Default value: FALSE


The "event-templates" property

  "event-templates"          GPtrArray*            : Read / Write

event-templates.


The "name" property

  "name"                     gchar*                : Read / Write

name.

Default value: NULL


The "running" property

  "running"                  gboolean              : Read / Write

running.

Default value: FALSE


The "timestamp" property

  "timestamp"                gint64                : Read / Write

timestamp.

Default value: 0


The "unique-id" property

  "unique-id"                gchar*                : Read / Write

unique-id.

Default value: NULL