zeitgeist-2.0 – Vala Binding Reference

zeitgeist-2.0 Reference Manual

# zeitgeist-2.0

## Description:

## Content:

### Namespaces:

- Zeitgeist - Abstracts data sources used by the DataSourceRegistry extension

### Interfaces:

- RemoteRegistry -
- RemoteLog -
- RemoteMonitor -
- RemoteSimpleIndexer -
- NetworkManagerDBus -
- ConnmanManagerDBus -
- ResultSet - Cursor-like interface for results sets

### Classes:

- DataSource -
- DataSourceRegistry - Query the Zeitgeist Data-Source Registry extension
- Event - Event objects abstract Zeitgeist events
- Subject - Subject objects abstract Zeitgeist subjects
- TimeRange - Immutable representation of an interval in time, marked by a beginning and an end
- Index - Query the Zeitgeist Full Text Search Extension
- Log - Primary access point for talking to the Zeitgeist daemon
- Monitor - Listens for updates to the Zeitgeist event log
- QueuedProxyWrapper -
- SimpleResultSet -

### Structs:

- VersionStruct - Version struct consisting of the following fields: - major - minor - minus

### Enums:

- ResultType - ZeitgeistResultType
- RelevantResultType -
- StorageState - Enumeration class defining the possible values for the storage state of an event subject.

### Error domains:

- DataModelError - Errors which can be thrown when asynchronously querying for Events.
- EngineError -

### Methods:

- public void register_mimetype (`string` mimetype, `string` interpretation_uri)
  zeitgeist_register_mimetype:
- public void register_mimetype_regex (`string` mimetype_regex, `string` interpretation_uri)
  zeitgeist_register_mimetype_regex:
- public unowned `string`? interpretation_for_mimetype (`string`? mimetype)
  zeitgeist_interpretation_for_mimetype:
- public void register_uri_scheme (`string` uri_scheme, `string` manifestation_type)
  zeitgeist_register_uri_scheme:
- public unowned `string`? manifestation_for_uri (`string` uri)
  zeitgeist_manifestation_for_uri

- DataSources -

### Constants:

- public const unowned `string` SIG_DATASOURCES

### Methods:

- public `GenericArray`<DataSource> from_variant (`Variant` sources_variant) throws DataModelError
- public `Variant` to_variant (`HashTable`<`string`,DataSource> sources)

- Events -

### Methods:

- public `GenericArray`<Event?> from_variant (`Variant` vevents) throws DataModelError
- public `Variant` to_variant (`GenericArray`<Event?> events)
- public `Variant` to_variant_with_limit (`GenericArray`<Event?> events, `size_t` limit = MAX_DBUS_RESULT_SIZE) throws DataModelError

- NCAL -

### Constants:

- public const unowned `string` ALARM
  ALARM:
- public const unowned `string` ATTACHMENT
  ATTACHMENT:
- public const unowned `string` CALENDAR
  CALENDAR:
- public const unowned `string` CALENDAR_DATA_OBJECT
  CALENDAR_DATA_OBJECT:
- public const unowned `string` EVENT
  EVENT:
- public const unowned `string` FREEBUSY
  FREEBUSY:
- public const unowned `string` JOURNAL
  JOURNAL:
- public const unowned `string` TIMEZONE
  TIMEZONE:
- public const unowned `string` TODO
  TODO:

- NCO -

### Constants:

- public const unowned `string` CONTACT
  CONTACT:
- public const unowned `string` CONTACT_GROUP
  CONTACT_GROUP:
- public const unowned `string` CONTACT_LIST
  CONTACT_LIST:
- public const unowned `string` CONTACT_LIST_DATA_OBJECT
  CONTACT_LIST_DATA_OBJECT:
- public const unowned `string` ORGANIZATION_CONTACT
  ORGANIZATION_CONTACT:
- public const unowned `string` PERSON_CONTACT
  PERSON_CONTACT:

- NFO -

### Constants:

- public const unowned `string` APPLICATION
  APPLICATION:
- public const unowned `string` ARCHIVE
  ARCHIVE:
- public const unowned `string` ARCHIVE_ITEM
  ARCHIVE_ITEM:
- public const unowned `string` ATTACHMENT
  ATTACHMENT:
- public const unowned `string` AUDIO
  AUDIO:
- public const unowned `string` BOOKMARK
  BOOKMARK:
- public const unowned `string` BOOKMARK_FOLDER
  BOOKMARK_FOLDER:
- public const unowned `string` CURSOR
  CURSOR:
- public const unowned `string` DATA_CONTAINER
  DATA_CONTAINER:
- public const unowned `string` DELETED_RESOURCE
  DELETED_RESOURCE:
- public const unowned `string` DOCUMENT
  DOCUMENT:
- public const unowned `string` EMBEDDED_FILE_DATA_OBJECT
  EMBEDDED_FILE_DATA_OBJECT:
- public const unowned `string` EXECUTABLE
  EXECUTABLE:
- public const unowned `string` FILESYSTEM
  FILESYSTEM:
- public const unowned `string` FILESYSTEM_IMAGE
  FILESYSTEM_IMAGE:
- public const unowned `string` FILE_DATA_OBJECT
  FILE_DATA_OBJECT:
- public const unowned `string` FOLDER
  FOLDER:
- public const unowned `string` FONT
  FONT:
- public const unowned `string` HARD_DISK_PARTITION
  HARD_DISK_PARTITION:
- public const unowned `string` HTML_DOCUMENT
  HTML_DOCUMENT:
- public const unowned `string` ICON
  ICON:
- public const unowned `string` IMAGE
  IMAGE:
- public const unowned `string` MEDIA
  MEDIA:
- public const unowned `string` MEDIA_LIST
  MEDIA_LIST:
- public const unowned `string` MEDIA_STREAM
  MEDIA_STREAM:
- public const unowned `string` MIND_MAP
  MIND_MAP:
- public const unowned `string` OPERATING_SYSTEM
  OPERATING_SYSTEM:
- public const unowned `string` PAGINATED_TEXT_DOCUMENT
  PAGINATED_TEXT_DOCUMENT:
- public const unowned `string` PLAIN_TEXT_DOCUMENT
  PLAIN_TEXT_DOCUMENT:
- public const unowned `string` PRESENTATION
  PRESENTATION:
- public const unowned `string` RASTER_IMAGE
  RASTER_IMAGE:
- public const unowned `string` REMOTE_DATA_OBJECT
  REMOTE_DATA_OBJECT:
- public const unowned `string` REMOTE_PORT_ADDRESS
  REMOTE_PORT_ADDRESS:
- public const unowned `string` SOFTWARE
  SOFTWARE:
- public const unowned `string` SOFTWARE_ITEM
  SOFTWARE_ITEM:
- public const unowned `string` SOFTWARE_SERVICE
  SOFTWARE_SERVICE:
- public const unowned `string` SOURCE_CODE
  SOURCE_CODE:
- public const unowned `string` SPREADSHEET
  SPREADSHEET:
- public const unowned `string` TEXT_DOCUMENT
  TEXT_DOCUMENT:
- public const unowned `string` TRASH
  TRASH:
- public const unowned `string` VECTOR_IMAGE
  VECTOR_IMAGE:
- public const unowned `string` VIDEO
  VIDEO:
- public const unowned `string` VISUAL
  VISUAL:
- public const unowned `string` WEBSITE
  WEBSITE:
- public const unowned `string` WEB_DATA_OBJECT
  WEB_DATA_OBJECT:

- NIE -

### Constants:

- public const unowned `string` DATA_OBJECT
  DATA_OBJECT:
- public const unowned `string` INFORMATION_ELEMENT
  INFORMATION_ELEMENT:

- NMM -

### Constants:

- public const unowned `string` MOVIE
  MOVIE:
- public const unowned `string` MUSIC_ALBUM
  MUSIC_ALBUM:
- public const unowned `string` MUSIC_PIECE
  MUSIC_PIECE:
- public const unowned `string` TVSERIES
  TVSERIES:
- public const unowned `string` TVSHOW
  TVSHOW:

- NMO -

### Constants:

- public const unowned `string` EMAIL
  EMAIL:
- public const unowned `string` IMMESSAGE
  IMMESSAGE:
- public const unowned `string` MAILBOX
  MAILBOX:
- public const unowned `string` MAILBOX_DATA_OBJECT
  MAILBOX_DATA_OBJECT:
- public const unowned `string` MESSAGE
  MESSAGE:
- public const unowned `string` MIME_ENTITY
  MIME_ENTITY:

- Symbol -

### Methods:

- public unowned `string` get_display_name (`string` symbol_uri)
- public unowned `string` get_description (`string` symbol_uri)
- public `List`<unowned `string`> get_all_parents (`string` symbol_uri)
- public `List`<unowned `string`> get_all_children (`string` symbol_uri)
- public `List`<unowned `string`> get_children (`string` symbol_uri)
- public `List`<unowned `string`> get_parents (`string` symbol_uri)
- public `bool` is_a (`string`? symbol_uri, `string`? parent_uri)

- Timestamp - Convenience functions for dealing with timestamps and dates

### Constants:

- public const `int64` SECOND
  A second represented as a Zeitgeist timestamp (ie. 1000ms)
- public const `int64` MINUTE
  A minute represented as a Zeitgeist timestamp (ie. 60000ms)
- public const `int64` HOUR
  An hour represented as a Zeitgeist timestamp (ie. 3600000ms)
- public const `int64` DAY
  A day represented as a Zeitgeist timestamp (ie. 86400000ms)
- public const `int64` WEEK
  A week represented as a Zeitgeist timestamp (ie. 604800000ms)
- public const `int64` YEAR
  A year represented as a Zeitgeist timestamp (ie. 31556952000ms). Be warned that a year is not 365 days, but in fact 365.2425 days, to account for leap years.

### Methods:

- public `int64` from_timeval (`TimeVal` timeval)
  Convert a `GLib.TimeVal` to an amount of milliseconds since the Unix Epoch
- public `TimeVal` to_timeval (`int64` timestamp)
  Write a Zeitgeist timestamp to a `GLib.TimeVal` instance. Note that Zeitgeist uses only a millisecond resolution, whereas `GLib.TimeVal` has microsecond resolution. This means that the lower three digits of @tv.tv_usec will always be 0.
- public `int64` from_now ()
  Return the current timestamp in milliseconds.
- public `int64` from_iso8601 (`string` datetime)
  Parse a timestamp from an ISO8601-encoded string.
- public `string` to_iso8601 (`int64` timestamp)
  Convert a timestamp to a human-readable ISO8601 format
- public `int64` from_date (`Date` date)
  Convert a GDate to a Zeitgeist timestamp
- public `int64` from_dmy (`DateDay` day, `DateMonth` month, `DateYear` year)
  Convert a day, month, year tuple into a Zeitgeist timestamp
- public `Date` to_date (`int64` timestamp)
  Write a timestamp to a `GLib.Date` structure
- public `int64` next_midnight (`int64` timestamp)
  Calculate the timestamp for the next midnight after the given timestamp.
- public `int64` prev_midnight (`int64` timestamp)
  Calculate the timestamp for the midnight just before the given timestamp.

- Utils - Utility functions. FOR INTERNAL USE ONLY

### Constants:

- public const unowned `string` ENGINE_DBUS_NAME
- public const unowned `string` ENGINE_DBUS_PATH
- public const unowned `string` SIG_EVENT
- public const `size_t` MAX_DBUS_RESULT_SIZE
- public const `uint` CACHE_SIZE

### Methods:

- public unowned `string` get_data_path ()
- public `string` get_default_data_path ()
- public unowned `string` get_database_file_path ()
- public void set_database_file_path (`string` path)
  Sets the filepath of the database.
- public unowned `string` get_database_file_backup_path ()
- public `string` get_database_file_retire_name ()
- public unowned `string` get_local_extensions_path ()
- public `bool` using_in_memory_database ()
- public void backup_database () throws `Error`
- public `bool` parse_negation (ref `string` val)
  Check if the value starts with the negation operator. If it does, remove the operator from the value and return true. Otherwise, return false.
- public `bool` parse_noexpand (ref `string` val)
  Check if the value starts with the noexpand operator. If it does, remove the operator from the value and return true. Otherwise, return false.
- public `bool` parse_wildcard (ref `string` val)
  Check if the value ends with the wildcard character. If it does, remove the wildcard character from the value and return true. Otherwise, return false.
- public `bool` is_empty_string (`string`? s)
  Return true if a string is empty (null or containing just a null byte).
- public `bool` log_may_read_directly ()

- ZG -

### Constants:

- public const unowned `string` ACCEPT_EVENT
  ACCEPT_EVENT:
- public const unowned `string` ACCESS_EVENT
  ACCESS_EVENT:
- public const unowned `string` APPLICATION_ACTION
  APPLICATION_ACTION:
- public const unowned `string` CREATE_EVENT
  CREATE_EVENT:
- public const unowned `string` DELETE_EVENT
  DELETE_EVENT:
- public const unowned `string` DENY_EVENT
  DENY_EVENT:
- public const unowned `string` EVENT_INTERPRETATION
  EVENT_INTERPRETATION:
- public const unowned `string` EVENT_MANIFESTATION
  EVENT_MANIFESTATION:
- public const unowned `string` EXPIRE_EVENT
  EXPIRE_EVENT:
- public const unowned `string` HEURISTIC_ACTIVITY
  HEURISTIC_ACTIVITY:
- public const unowned `string` LEAVE_EVENT
  LEAVE_EVENT:
- public const unowned `string` MODIFY_EVENT
  MODIFY_EVENT:
- public const unowned `string` MOVE_EVENT
  MOVE_EVENT:
- public const unowned `string` RECEIVE_EVENT
  RECEIVE_EVENT:
- public const unowned `string` SCHEDULED_ACTIVITY
  SCHEDULED_ACTIVITY:
- public const unowned `string` SEND_EVENT
  SEND_EVENT:
- public const unowned `string` SYSTEM_NOTIFICATION
  SYSTEM_NOTIFICATION:
- public const unowned `string` USER_ACTIVITY
  USER_ACTIVITY:
- public const unowned `string` WORLD_ACTIVITY
  WORLD_ACTIVITY: