Class

TsparqlNotifier

Description [src]

final class Tsparql.Notifier : GObject.Object
{
  /* No available fields */
}

TrackerNotifier allows receiving notification on changes in the data stored by a TrackerSparqlConnection.

This object may be created through tracker_sparql_connection_create_notifier(), events can then be listened for by connecting to the TrackerNotifier::events signal.

Not every change is notified, only RDF resources with a class that has the nrl:notify property defined by the ontology will be notified upon changes.

Database changes are communicated through TrackerNotifierEvent events on individual graph/resource pairs. The event type obtained through tracker_notifier_event_get_event_type() will determine the type of event. Insertion of new resources is notified through TRACKER_NOTIFIER_EVENT_CREATE events, deletion of resources is notified through TRACKER_NOTIFIER_EVENT_DELETE events, and changes on any property of the resource is notified through TRACKER_NOTIFIER_EVENT_UPDATE events.

The events happen in reaction to database changes, after a TrackerNotifier received an event of type TRACKER_NOTIFIER_EVENT_DELETE, the resource will not exist anymore and only the information in the TrackerNotifierEvent will remain.

Similarly, when receiving an event of type TRACKER_NOTIFIER_EVENT_UPDATE, the resource will have already changed, so the data previous to the update is no longer available.

The TrackerNotifier::events signal is emitted in the thread-default main context of the thread where the TrackerNotifier instance was created.

Ancestors

Instance methods

tracker_notifier_signal_subscribe

Listens to notification events from a remote DBus SPARQL endpoint.

tracker_notifier_signal_unsubscribe

Undoes a signal subscription done through tracker_notifier_signal_subscribe().

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Tsparql.Notifier:connection

SPARQL connection to listen to.

Signals

Tsparql.Notifier::events

Notifies of changes in the Tracker database.

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct TsparqlNotifierClass {
  /* no available fields */
}

No description available.