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.
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()
.
Signals
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.