data-source

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

Functions

Properties

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

Types and Values

Object Hierarchy

    GObject
    ╰── ZeitgeistDataSource

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.

Functions

zeitgeist_data_source_to_variant ()

GVariant *
zeitgeist_data_source_to_variant (ZeitgeistDataSource *self);

Parameters

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);

Parameters

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);

Parameters

variant

 

 

reset_running

 

 

error

location to store the error occurring, 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.

Parameters

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 .

Parameters

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.

Parameters

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 .

Parameters

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.

Parameters

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 .

Parameters

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.

Parameters

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 .

Parameters

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.

Parameters

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 .

Parameters

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.

Parameters

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 .

Parameters

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.

Parameters

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 .

Parameters

self

the ZeitgeistDataSource instance to modify

 

value

the new value of the "timestamp" property

 

zeitgeist_data_sources_from_variant ()

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

Parameters

self

the (null) instance

 

sources_variant

 

 

error

location to store the error occurring, or NULL to ignore.

[error-domains ZeitgeistDataModelError]

zeitgeist_data_sources_to_variant ()

GVariant *
zeitgeist_data_sources_to_variant (GHashTable *sources);

Parameters

self

the (null) instance

 

sources

 

 

Types and Values

ZEITGEIST_TYPE_DATA_SOURCE

#define ZEITGEIST_TYPE_DATA_SOURCE (zeitgeist_data_source_get_type ())

The type for ZeitgeistDataSource.


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.

Members


ZEITGEIST_DATA_SOURCES_SIG_DATASOURCES

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

Property Details

The “description” property

  “description”              char *

description.

Owner: ZeitgeistDataSource

Flags: Read / Write

Default value: NULL


The “enabled” property

  “enabled”                  gboolean

enabled.

Owner: ZeitgeistDataSource

Flags: Read / Write

Default value: FALSE


The “event-templates” property

  “event-templates”          GPtrArray *

event-templates.

Owner: ZeitgeistDataSource

Flags: Read / Write


The “name” property

  “name”                     char *

name.

Owner: ZeitgeistDataSource

Flags: Read / Write

Default value: NULL


The “running” property

  “running”                  gboolean

running.

Owner: ZeitgeistDataSource

Flags: Read / Write

Default value: FALSE


The “timestamp” property

  “timestamp”                gint64

timestamp.

Owner: ZeitgeistDataSource

Flags: Read / Write

Default value: 0


The “unique-id” property

  “unique-id”                char *

unique-id.

Owner: ZeitgeistDataSource

Flags: Read / Write

Default value: NULL