![]() |
![]() |
![]() |
API Documentation for the Zeitgeist Client Library | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#include <zeitgeist.h> ZeitgeistMonitor; struct ZeitgeistMonitorClass; ZeitgeistMonitor * zeitgeist_monitor_new (ZeitgeistTimeRange *time_range
,GPtrArray *event_templates
); ZeitgeistTimeRange * zeitgeist_monitor_get_time_range (ZeitgeistMonitor *self
); GPtrArray * zeitgeist_monitor_get_templates (ZeitgeistMonitor *self
); const gchar * zeitgeist_monitor_get_path (ZeitgeistMonitor *self
);
"event-templates" GPtrArray* : Read / Write / Construct Only "time-range" ZeitgeistTimeRange* : Read / Write / Construct Only
A ZeitgeistMonitor listens for updates to the Zeitgeist event log matching a given set of templates and with timestamps in some predefined time range.
A monitor must be installed into the running Zeitgeist daemon by calling
zeitgeist_log_install_monitor()
. The monitor will not emit any of the
::events-added or ::events-deleted signals before this.
struct ZeitgeistMonitorClass { GObjectClass parent_class; /*< signals >*/ void (*events_inserted) (ZeitgeistMonitor *self, ZeitgeistTimeRange *time_range, GPtrArray *events); void (*events_deleted) (ZeitgeistMonitor *self, ZeitgeistTimeRange *time_range, GArray *event_ids); };
ZeitgeistMonitor * zeitgeist_monitor_new (ZeitgeistTimeRange *time_range
,GPtrArray *event_templates
);
Create a new monitor. Before you can receive signals from the monitor you
need to install it in the running Zeitgeist daemon by calling
zeitgeist_log_install_monitor()
.
|
The monitor will only listen for events with timestamps within this time range. Note that it is legal for applications to insert events that are "in the past". |
|
A GPtrArray of ZeitgeistEvents. Only listen for
events that match any of these templates.
The monitor will assume ownership of the events and
the pointer array.
If you want to keep a reference for yourself you must do a
g_ptr_array_ref() on event_templates as well as reffing
the events held by it before calling this method. |
Returns : |
A reference to a newly allocated monitor. |
ZeitgeistTimeRange * zeitgeist_monitor_get_time_range (ZeitgeistMonitor *self
);
GPtrArray * zeitgeist_monitor_get_templates (ZeitgeistMonitor *self
);
"event-templates"
property"event-templates" GPtrArray* : Read / Write / Construct Only
Events must match at least one these templates in order to trigger the monitor
"time-range"
property"time-range" ZeitgeistTimeRange* : Read / Write / Construct Only
Events must have timestamps within this timerange in order to trigger the monitor.
"events-deleted"
signalvoid user_function (ZeitgeistMonitor *time_range,
ZeitgeistTimeRange *event_ids,
GArray *arg2,
gpointer user_data) : Run Last
Emitted when events with timestamps within the time range of this monitor has been deleted from the log. Note that the deleted events may not match the event templates for the monitor.
|
A ZeitgeistTimeRange that specifies the minimum and maximum timestamps of the deleted events |
|
A GArray of guint32s holding the ids of the deleted events |
|
user data set when the signal handler was connected. |
"events-inserted"
signalvoid user_function (ZeitgeistMonitor *time_range,
ZeitgeistTimeRange *events,
ZeitgeistResultSet *arg2,
gpointer user_data) : Run Last
Emitted when events matching the event templates and with timestamps within the time range of the monitor has been inserted into the log.
|
A ZeitgeistTimeRange that specifies the minimum and maximum
of the timestamps in events
|
|
A ZeitgeistResultSet holding the ZeitgeistEvents that have been inserted into the log |
|
user data set when the signal handler was connected. |