ZeitgeistMonitor 3 ZEITGEIST-2.0 Library
ZeitgeistMonitor Listens for updates to the Zeitgeist event log

## Synopsis

    #define             ZEITGEIST_TYPE_MONITOR
    GPtrArray *         zeitgeist_monitor_get_templates     (ZeitgeistMonitor *self);
    char *              zeitgeist_monitor_get_path          (ZeitgeistMonitor *self);
    ZeitgeistMonitor *  zeitgeist_monitor_new               (ZeitgeistTimeRange *time_range,
                                                             GPtrArray *event_templates);
    ZeitgeistTimeRange * zeitgeist_monitor_get_time_range   (ZeitgeistMonitor *self);
    void                zeitgeist_monitor_set_time_range    (ZeitgeistMonitor *self,
                                                             ZeitgeistTimeRange *value);
    GPtrArray *         zeitgeist_monitor_get_event_templates
                                                            (ZeitgeistMonitor *self);
    void                zeitgeist_monitor_set_event_templates
                                                            (ZeitgeistMonitor *self,
                                                             GPtrArray *value);
    struct              ZeitgeistMonitor;
    struct              ZeitgeistMonitorClass;

## Object Hierarchy

      GObject
       +----ZeitgeistMonitor

## Implemented Interfaces

ZeitgeistMonitor implements ZeitgeistRemoteMonitor.

## Properties

      "event-templates"          GPtrArray*            : Read / Write / Construct
      "time-range"               ZeitgeistTimeRange*   : Read / Write / Construct

## Signals

      "events-deleted"                                 : Run Last
      "events-inserted"                                : Run Last

## Description

A Monitor 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.

## Details

### ZEITGEIST_TYPE_MONITOR

    #define ZEITGEIST_TYPE_MONITOR (zeitgeist_monitor_get_type ())

The type for ZeitgeistMonitor.

ZEITGEIST_TYPE_MONITOR

### zeitgeist_monitor_get_templates ()

    GPtrArray *         zeitgeist_monitor_get_templates     (ZeitgeistMonitor *self);

self :

  the ZeitgeistMonitor instance

zeitgeist_monitor_get_templates

### zeitgeist_monitor_get_path ()

    char *              zeitgeist_monitor_get_path          (ZeitgeistMonitor *self);

self :

  the ZeitgeistMonitor instance

zeitgeist_monitor_get_path

### zeitgeist_monitor_new ()

    ZeitgeistMonitor *  zeitgeist_monitor_new               (ZeitgeistTimeRange *time_range,
                                                             GPtrArray *event_templates);

zeitgeist_monitor_new

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()`.

time_range :

  . 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". [in]

event_templates :

  . A GPtrArray of ZeitgeistEvent<!-- -->s. Only listen for events that match any of these templates. [in][transfer full]

Returns :

  A reference to a newly allocated monitor

zeitgeist_monitor_new

### zeitgeist_monitor_get_time_range ()

    ZeitgeistTimeRange * zeitgeist_monitor_get_time_range   (ZeitgeistMonitor *self);

Get and return the current value of the "time-range" property.

self :

  the ZeitgeistMonitor instance to query

Returns :

  the value of the "time-range" property

zeitgeist_monitor_get_time_range

### zeitgeist_monitor_set_time_range ()

    void                zeitgeist_monitor_set_time_range    (ZeitgeistMonitor *self,
                                                             ZeitgeistTimeRange *value);

Set the value of the "time-range" property to value.

self :

  the ZeitgeistMonitor instance to modify

value :

  the new value of the "time-range" property

zeitgeist_monitor_set_time_range

### zeitgeist_monitor_get_event_templates ()

    GPtrArray *         zeitgeist_monitor_get_event_templates
                                                            (ZeitgeistMonitor *self);

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

self :

  the ZeitgeistMonitor instance to query

Returns :

  the value of the "event-templates" property

zeitgeist_monitor_get_event_templates

### zeitgeist_monitor_set_event_templates ()

    void                zeitgeist_monitor_set_event_templates
                                                            (ZeitgeistMonitor *self,
                                                             GPtrArray *value);

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

self :

  the ZeitgeistMonitor instance to modify

value :

  the new value of the "event-templates" property

zeitgeist_monitor_set_event_templates

### struct ZeitgeistMonitor

    struct ZeitgeistMonitor;

Listens for updates to the Zeitgeist event log

A Monitor 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.

ZeitgeistMonitor

### struct ZeitgeistMonitorClass

    struct ZeitgeistMonitorClass {
    	GObjectClass parent_class;
    };

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

GObjectClass parent_class;

  the parent class structure

ZeitgeistMonitorClass

## Property Details

### The `"event-templates"` property

      "event-templates"          GPtrArray*            : Read / Write / Construct

event-templates.

ZeitgeistMonitor:event-templates

### The `"time-range"` property

      "time-range"               ZeitgeistTimeRange*   : Read / Write / Construct

time-range.

ZeitgeistMonitor:time-range

## Signal Details

### The `"events-deleted"` signal

    void                user_function                      (ZeitgeistMonitor   *monitor,
                                                            ZeitgeistTimeRange *event_ids_length1,
                                                            gpointer            time_range,
                                                            gint                event_ids,
                                                            gpointer            user_data)              : Run Last

ZeitgeistMonitor::events-deleted:

Emitted when events with timestamps within the time range of this monitor have been deleted from the log. Note that the deleted events may not match the event templates for the monitor.

monitor :

  the ZeitgeistMonitor instance that received the signal

event_ids_length1 :

  length of the event_ids array

time_range :

  . A ZeitgeistTimeRange that specifies the minimum and maximum timestamps of the deleted events

event_ids :

  . A GArray of guint32<!-- -->s holding the IDs of the deleted events

user_data :

  user data set when the signal handler was connected.

ZeitgeistMonitor::events-deleted

### The `"events-inserted"` signal

    void                user_function                      (ZeitgeistMonitor   *monitor,
                                                            ZeitgeistTimeRange *time_range,
                                                            ZeitgeistResultSet *events,
                                                            gpointer            user_data)       : Run Last

ZeitgeistMonitor::events-inserted:

Emitted when events matching the event templates and with timestamps within the time range of the monitor has been inserted into the log.

monitor :

  the ZeitgeistMonitor instance that received the signal

time_range :

  . A ZeitgeistTimeRange that specifies the minimum and maximum of the timestamps in events

events :

  . A ZeitgeistResultSet holding the "ZeitgeistEvent"s that have been inserted into the log

user_data :

  user data set when the signal handler was connected.

ZeitgeistMonitor::events-inserted