| API Documentation for the Zeitgeist Client Library | ||||
|---|---|---|---|---|
| Top | Description | ||||
#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);
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);