zeitgeist-sharp : Zeitgeist Namespace

LogClient Class

Primary interface to the Zeitgeist engine.

public class LogClient

Remarks

Used to update and query the log. It also provides means to listen for events matching certain criteria. All querying is heavily based around an “event template”-concept.

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

Members

See Also: Inherited members from object.

Public Constructors

The constructor for LogClient

Public Properties

[read-only]
Extensions List<string> . The list of zeitgeist daemon extension loaded by the engine

Public Methods

DeleteEvents (List<uint>) : Zeitgeist.Datamodel.TimeRange
Delete a set of events from the log given their IDs If all the Event ID provided does not exist, then null is returned
DeleteLog ()
Delete the log file and all its content
FindEventIds (Zeitgeist.Datamodel.TimeRange, List<Zeitgeist.Datamodel.Event>, Zeitgeist.Datamodel.StorageState, uint, Zeitgeist.Datamodel.ResultType) : List<uint>
Search for events matching a given set of templates and return the IDs of matching events. Use GetEvents() passing in the returned IDs to look up the full event data. The matching is done where unset fields in the templates are treated as wildcards. If a template has more than one subject then events will match the template if any one of their subjects match any one of the subject templates. The fields uri, interpretation, manifestation, origin, and mimetype can be prepended with an exclamation mark ‘!’ in order to negate the matching. The fields uri, origin, and mimetype can be prepended with an asterisk ‘*’ in order to do truncated matching.
FindEvents (Zeitgeist.Datamodel.TimeRange, List<Zeitgeist.Datamodel.Event>, Zeitgeist.Datamodel.StorageState, uint, Zeitgeist.Datamodel.ResultType) : List<Zeitgeist.Datamodel.Event>
Get events matching a given set of templates. The matching is done where unset fields in the templates are treated as wildcards. If a template has more than one subject then events will match the template if any one of their subjects match any one of the subject templates.
FindRelatedUris (Zeitgeist.Datamodel.TimeRange, List<Zeitgeist.Datamodel.Event>, List<Zeitgeist.Datamodel.Event>, Zeitgeist.Datamodel.StorageState, uint, Zeitgeist.Datamodel.ResultType) : List<string>
Get a list of URIs of subjects which frequently occur together with events matching event_templates within time_range. The resulting URIs must occur as subjects of events matching result_event_templates and have storage state storage_state.
GetEvents (List<uint>) : List<Zeitgeist.Datamodel.Event>
Get full event data for a set of event IDs Each event which is not found in the event log is represented by the null in the resulting List.
InsertEvents (List<Zeitgeist.Datamodel.Event>) : List<uint>
Inserts events into the log. Returns an array containing the IDs of the inserted events
InstallMonitor (string, Zeitgeist.Datamodel.TimeRange, List<Zeitgeist.Datamodel.Event>)
Register a client side monitor object to receive callbacks when events matching time_range and event_templates are inserted or deleted.
Quit ()
Terminate the running Zeitgeist engine process
RemoveMonitor (string)
Remove a monitor installed with InstallMonitor()

Member Details

LogClient Constructor

The constructor for LogClient

public LogClient ()

Remarks

This constructor gets the DBus object for LogClient which the object's methods use

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

DeleteEvents Method

Delete a set of events from the log given their IDs If all the Event ID provided does not exist, then null is returned

public Zeitgeist.Datamodel.TimeRange DeleteEvents (List<uint> eventIds)

Parameters

eventIds
The eventId (of type System.Collection.Generic.List<uint> ) of the Events to be deleted

Returns

The TimeRange Zeitgeist.Datamodel.TimeRange

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

DeleteLog Method

Delete the log file and all its content

public void DeleteLog ()

Remarks

This method is used to delete the entire log file and all its content in one go. To delete specific subsets use FindEventIds() combined with DeleteEvents().

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

Extensions Property

The list of zeitgeist daemon extension loaded by the engine

public List<string> Extensions { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Examples are Blacklist, DataSourceRegistry, Full-Text-Search, StorageMonitor etc

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

FindEventIds Method

Search for events matching a given set of templates and return the IDs of matching events. Use GetEvents() passing in the returned IDs to look up the full event data. The matching is done where unset fields in the templates are treated as wildcards. If a template has more than one subject then events will match the template if any one of their subjects match any one of the subject templates. The fields uri, interpretation, manifestation, origin, and mimetype can be prepended with an exclamation mark ‘!’ in order to negate the matching. The fields uri, origin, and mimetype can be prepended with an asterisk ‘*’ in order to do truncated matching.

Parameters

range
The TimeRange Zeitgeist.Datamodel.TimeRange for the query
eventTemplates
An List of event templates System.Collection.Generic.List<Zeitgeist.Datamodel.Event> which the returned events should match at least one of.
state
Value of type Zeitgeist.Datamodel.StorageState whether the item is currently known to be available
maxEvents
Maximal amount of returned events Zeitgeist.Datamodel.System.UInt32
resType
The Order in which the result should be made available Zeitgeist.Datamodel.ResultType

Returns

An array of type System.Collection.Generic.List<uint> containing the IDs of all matching events, up to a maximum of num_events events. Sorted and grouped as defined by the result_type parameter.

Remarks

This method is intended for queries potentially returning a large result set. It is especially useful in cases where only a portion of the results are to be displayed at the same time (eg., by using paging or dynamic scrollbars), as by holding a list of IDs you keep a stable ordering and you can ask for the details associated to them in batches, when you need them. For queries yielding a small amount of results, or where you need the information about all results at once no matter how many of them there are, see FindEvents().

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

FindEvents Method

Get events matching a given set of templates. The matching is done where unset fields in the templates are treated as wildcards. If a template has more than one subject then events will match the template if any one of their subjects match any one of the subject templates.

Parameters

range
The TimeRange Zeitgeist.Datamodel.TimeRange for the query
eventTemplates
An array of event templates of type System.Collection.Generic.List<Zeitgeist.Datamodel.Event> which the returned events should match at least one of
state
Value of type Zeitgeist.Datamodel.StorageState whether the item is currently known to be available
maxEvents
Maximal amount of returned events uint
resType
The Order in which the result should be made available Zeitgeist.Datamodel.ResultType

Returns

Full event data of type System.Collection.Generic.List<Zeitgeist.Datamodel.Event> for all the requested IDs, up to a maximum of num_events events, sorted and grouped as defined by the result_type parameter.

Remarks

The fields uri, interpretation, manifestation, origin, and mimetype can be prepended with an exclamation mark ‘!’ in order to negate the matching. The fields uri, origin, and mimetype can be prepended with an asterisk ‘*’ in order to do truncated matching. In case you need to do a query yielding a large (or unpredictable) result set and you only want to show some of the results at the same time (eg., by paging them), use FindEventIds().

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

FindRelatedUris Method

Get a list of URIs of subjects which frequently occur together with events matching event_templates within time_range. The resulting URIs must occur as subjects of events matching result_event_templates and have storage state storage_state.

Parameters

range
The TimeRange Zeitgeist.Datamodel.TimeRange for the query
eventTemplates
An List of event templates System.Collection.Generic.List<Zeitgeist.Datamodel.Event> which you want URIs that relate to.
resultEventTemplates
An array of event templates System.Collection.Generic.List<Zeitgeist.Datamodel.Event> which the returned URIs must occur as subjects of.
state
Value of type Zeitgeist.Datamodel.StorageState whether the item is currently known to be available
maxEvents
Maximal amount of returned events uint
resType
The Order in which the result should be made available Zeitgeist.Datamodel.ResultType

Returns

A list of URIs System.Collection.Generic.List<string> matching the described criteria

Remarks

Warning: This API is EXPERIMENTAL and is not fully supported yet.

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

GetEvents Method

Get full event data for a set of event IDs Each event which is not found in the event log is represented by the null in the resulting List.

public List<Zeitgeist.Datamodel.Event> GetEvents (List<uint> eventIds)

Parameters

eventIds
An array of event IDs System.Collection.Generic.List<uint>

Returns

Full event data for all the requested IDs of type System.Collection.Generic.List<Zeitgeist.Datamodel.Event>

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

InsertEvents Method

Inserts events into the log. Returns an array containing the IDs of the inserted events

public List<uint> InsertEvents (List<Zeitgeist.Datamodel.Event> events)

Parameters

events
List of System.Collection.Generic.List<Zeitgeist.Datamodel.Event> events to be inserted in the log

Returns

An array containing the event IDs (type System.Collection.Generic.List<uint> ) of the inserted events. 0 as ID means failed to insert

Remarks

Each event which failed to be inserted into the log (either by being blocked or because of an error) will be represented by 0 in the resulting array. One way events may end up being blocked is if they match any of the blacklist templates. Any monitors with matching templates will get notified about the insertion. Note that the monitors are notified after the events have been inserted.

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

InstallMonitor Method

Register a client side monitor object to receive callbacks when events matching time_range and event_templates are inserted or deleted.

public void InstallMonitor (string monitorPath, Zeitgeist.Datamodel.TimeRange range, List<Zeitgeist.Datamodel.Event> eventTemplates)

Parameters

monitorPath
The path to be monitored string
range
The time range Zeitgeist.Datamodel.TimeRange under which Monitored events must fall within
eventTemplates
Event templates System.Collection.Generic.List<Zeitgeist.Datamodel.Event> that events must match in order to trigger the monitor

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

Quit Method

Terminate the running Zeitgeist engine process

public void Quit ()

Remarks

Use with caution, this action must only be triggered with the user’s explicit consent, as it will affect all applications using Zeitgeist

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0

RemoveMonitor Method

Remove a monitor installed with InstallMonitor()

public void RemoveMonitor (string monitorPath)

Parameters

monitorPath
The path of the monitor to be removed string

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Zeitgeist
Assembly: zeitgeist-sharp (in zeitgeist-sharp.dll)
Assembly Versions: 0.8.0.0