Classes | Signals | Public Member Functions | Friends

TrackerChangeNotifier Class Reference

A class that wraps around the GraphUpdate D-Bus signal emitted by Tracker. More...

#include <trackerchangenotifier.h>

List of all members.

Classes

struct  Quad

Signals

void changed (QList< TrackerChangeNotifier::Quad > deletes, QList< TrackerChangeNotifier::Quad > inserts)
 Emitted when tracker signals that triples have been deleted or inserted.

Public Member Functions

 TrackerChangeNotifier (const QString &className, QObject *parent=0)
 Starts listening to GraphUpdated signals related to the ontolgy class className.
QString watchedClass () const
 Returns the name of the watched ontology class.
void setSignalsEnabled (bool enable=true)
 Enables or disables the internal signal buffer.
void setBufferSize (int newSize)
 Sets the internal signal buffer size.

Friends

class TrackerChangeNotifierPrivate

Detailed Description

A class that wraps around the GraphUpdate D-Bus signal emitted by Tracker.


Constructor & Destructor Documentation

TrackerChangeNotifier::TrackerChangeNotifier ( const QString &  className,
QObject *  parent = 0 
)

Starts listening to GraphUpdated signals related to the ontolgy class className.

className needs to be the long name of the class, e.g., http://www.semanticdesktop.org/ontologies/2007/03/22/nco#PersonContact. TrackerChangeNotifier will use the default session bus connection of QtDBus.


Member Function Documentation

void TrackerChangeNotifier::changed ( QList< TrackerChangeNotifier::Quad deletes,
QList< TrackerChangeNotifier::Quad inserts 
) [signal]

Emitted when tracker signals that triples have been deleted or inserted.

deletes is the list of deleted triples, inserts is the list of inserted triples. The lists contain Quad objects, and each Quad object contains the tracker id's of a triple. If the object of the triple is a literal, the corresponding Quad will contain 0 as its object.