Zeitgeist.Event – zeitgeist-2.0 – Vala Binding Reference

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

### Creation methods:

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

### Methods:

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

### Inherited Members:

All known members inherited from class GLib.Object

- @new
- new_valist
- newv
- new_with_properties
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- freeze_notify
- @get

- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- notify_property
- @ref
- ref_sink
- replace_data
- replace_qdata
- remove_toggle_ref
- remove_weak_pointer
- @set
- set_data

- set_data_full
- set_property
- set_qdata
- set_qdata_full
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
- notify
- ref_count