Zeitgeist.Event – zeitgeist-2.0 Reference Manual

# Event

## Object Hierarchy:

## Description:

public class Event : Object

Event objects abstract Zeitgeist events

The Event class is one of the primary elements for communicating with the Zeitgeist daemon. Events serve two purposes Unsurprisingly, they represent events that have happened, but they can also act as templates. See also Subject.

An event in the Zeitgeist world is characterized by two main properties. "What happened", also called the interpretation, and "How did it happen", also called the manifestation. Besides these properties, an event also has an actor which identifies the party responsible for triggering the event which in most cases will be an application. Lastly there is an event timestamp and an event ID. The timestamp is calculated as the number of milliseconds since the Unix epoch and the event ID is a number assigned to the event by the Zeitgeist engine when it's logged. These five properties are collectively known as the event metadata.

An event must also describe what it happened to. For this we have event subjects. Most events have one subject, but they may also have more. The metadata of the subjects are recorded at the time of logging, and are encapsulated by the #Subject class. It's important to understand that it's just the subject metadata at the time of logging, not necessarily the subject metadata as it exists right now.

In addition to the listed properties, events may also carry a free form binary payload. The usage of this is application specific and is generally useless unless you have some contextual information to figure out what's in it.

A large part of the Zeitgeist query and monitoring API revolves around a concept of template matching. A query is simply a list of event templates that you want to look for in the log. An unset property on an event template indicates that anything is allowed in that field. If the property is set it indicates that the property must be an exact match, unless a special operator is used.

Namespace: Zeitgeist
Package: zeitgeist-2.0

## Content:

### Constants:

- public const unowned string SIGNATURE

### Properties:

- public string? actor { get; set; }
- public uint32 id { get; set; }
- public string? interpretation { get; set; }
- public string? manifestation { get; set; }
- public string? origin { get; set; }
- public ByteArray? payload { get; set; }
- public GenericArray<Subject> subjects { get; set; }
- public int64 timestamp { get; set; }

### Creation methods:

- public Event ()
- public Event.from_variant (Variant event_variant) throws DataModelError
- public Event.full (string? interpretation = null, string? manifestation = null, string? actor = null, string? origin = null, ...)

### Methods:

- public void add_subject (Subject subject)
- public void debug_print ()
- public Subject get_subject (int index)
- public bool matches_template (Event template_event)
- public int num_subjects ()
- public void set_actor_from_app_info (AppInfo info)
- public void take_subject (owned Subject subject)
- public Variant to_variant ()

### Inherited Members:

All known members inherited from class GLib.Object

- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data

- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer

- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref