Zeitgeist.Log – zeitgeist-2.0 – Vala Binding Reference

Zeitgeist.Log – zeitgeist-2.0 Reference Manual

# Log

## Object Hierarchy:

## Description:

public class Log : QueuedProxyWrapper

Primary access point for talking to the Zeitgeist daemon

Log encapsulates the low level access to the Zeitgeist daemon. You can use it to manage the log by inserting and deleting entries as well as do queries on the logged data.

It's important to realize that the #ZeitgeistLog class does not expose any API that does synchronous communications with the message bus - everything is asynchronous. To ease development some of the methods have variants that are "fire and forget" ignoring the normal return value, so that callbacks does not have to be set up.

Namespace: Zeitgeist
Package: zeitgeist-2.0

## Content:

### Static methods:

- public static Log get_default ()
  Get a unique instance of #ZeitgeistLog, that you can share in your application without caring about memory management.

### Creation methods:

- public Log ()

### Methods:

- protected override void on_connection_established ()
- protected override void on_connection_lost ()
- public async Array<uint32> insert_event (Event event, Cancellable? cancellable = null) throws Error
  Asynchronously send a set of events to the Zeitgeist daemon, requesting they be inserted into the log.
- public async Array<uint32> insert_events (GenericArray<Event> events, Cancellable? cancellable = null) throws Error
  Asynchronously send a set of events to the Zeitgeist daemon, requesting they be inserted into the log.
- public void insert_event_no_reply (Event event) throws Error
  Asynchronously send a set of events to the Zeitgeist daemon, requesting they be inserted into the log. This method is &quot;fire and forget&quot; and the caller will never know whether the events was successfully inserted or not.
- public void insert_events_no_reply (GenericArray<Event> events) throws Error
  Asynchronously send a set of events to the Zeitgeist daemon, requesting they be inserted into the log. This method is &quot;fire and forget&quot; and the caller will never know whether the events was successfully inserted or not.
- public async ResultSet find_events (TimeRange time_range, GenericArray<Event> event_templates, StorageState storage_state, uint32 num_events, ResultType result_type, Cancellable? cancellable = null) throws Error
  Send a query matching a collection of Event templates to the Log . The query will match if an event matches any of the templates. If an event template has more than one Subject the query will match if any one of the Subjects templates match.
- public async uint32[] find_event_ids (TimeRange time_range, GenericArray<Event> event_templates, StorageState storage_state, uint32 num_events, ResultType result_type, Cancellable? cancellable = null) throws Error
  Send a query matching a collection of Event templates to the Log . The query will match if an event matches any of the templates. If an event template has more than one Subject the query will match if any one of the Subjects templates match.
- public async ResultSet get_events (Array<uint32> event_ids, Cancellable? cancellable = null) throws Error
  Look up a collection of Event in the Log given a collection of event ids. This is useful for looking up the event data for events found with the find_event_ids_* family of functions.
- public async string[] find_related_uris (TimeRange time_range, GenericArray<Event> event_templates, GenericArray<Event> result_event_templates, StorageState storage_state, uint32 num_events, RelevantResultType result_type, Cancellable? cancellable = null) throws Error
  Get a list of URIs of subjects which frequently occur together with events matching event_templates. Possibly restricting to time_range or to URIs that occur as subject of events matching result_event_templates.
- public async TimeRange delete_events (Array<uint32> event_ids, Cancellable? cancellable = null) throws Error
  Delete a collection of events from the zeitgeist log given their event ids.
- public async void quit (Cancellable? cancellable = null) throws Error
- public void install_monitor (Monitor monitor) throws Error
  Install a monitor in the Zeitgeist engine that calls back when events matching event_templates are logged. The matching is done exactly as in the find_* family of methods and in Event.matches_template. Furthermore matched events must also have timestamps lying in time_range.
- public void remove_monitor (owned Monitor monitor) throws Error
  Remove a monitor from Zeitgeist engine that calls back when events matching event_templates are logged.
- public void get_version (out int major, out int minor, out int micro)
  Gets version of currently running Zeitgeist daemon.
- public string[] get_extensions ()
  Gets extensions of the running Zeitgeist daemon.
- public string datapath ()
  Gets datapath of the running Zeitgeist daemon.

### Inherited Members:

All known members inherited from class Zeitgeist.QueuedProxyWrapper

- proxy_created
- is_connected
- proxy_acquired

- proxy_unavailable
- process_queued_methods
- name_owner_changed

- on_connection_established
- on_connection_lost
- wait_for_proxy

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