![]() |
![]() |
![]() |
Tracker Miner Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#include <libtracker-miner/tracker-miner.h> typedef TrackerMiner; typedef TrackerMinerClass; GQuark tracker_miner_error_quark (void); void tracker_miner_start (TrackerMiner *miner); void tracker_miner_stop (TrackerMiner *miner); gboolean tracker_miner_is_started (TrackerMiner *miner); gboolean tracker_miner_execute_update (TrackerMiner *miner, const gchar *sparql, GError **error); GPtrArray * tracker_miner_execute_sparql (TrackerMiner *miner, const gchar *sparql, GError **error); gboolean tracker_miner_execute_batch_update (TrackerMiner *miner, const gchar *sparql, GError **error); gboolean tracker_miner_commit (TrackerMiner *miner); gint tracker_miner_pause (TrackerMiner *miner, const gchar *application, const gchar *reason, GError **error); gboolean tracker_miner_resume (TrackerMiner *miner, gint cookie, GError **error);
"name" gchar* : Read / Write / Construct Only "progress" gdouble : Read / Write "status" gchar* : Read / Write
"error" : Run Last "paused" : Run Last "progress" : Run Last "resumed" : Run Last "started" : Run Last "stopped" : Run Last "terminated" : Run Last
GQuark tracker_miner_error_quark (void);
Returns the GQuark used to identify miner errors in GError structures.
Returns : |
the error GQuark |
void tracker_miner_start (TrackerMiner *miner);
Tells the miner to start processing data.
|
a TrackerMiner |
void tracker_miner_stop (TrackerMiner *miner);
Tells the miner to stop processing data.
|
a TrackerMiner |
gboolean tracker_miner_is_started (TrackerMiner *miner);
Returns TRUE if the miner has been started.
|
a TrackerMiner |
Returns : |
TRUE if the miner is already started. |
gboolean tracker_miner_execute_update (TrackerMiner *miner, const gchar *sparql, GError **error);
Executes an update SPARQL query on tracker-store, use this whenever you want to perform data insertions or modifications.
|
a TrackerMiner |
|
a SPARQL query |
|
return location for errors |
Returns : |
TRUE if the SPARQL query was executed successfully. |
GPtrArray * tracker_miner_execute_sparql (TrackerMiner *miner, const gchar *sparql, GError **error);
Executes the SPARQL query on tracker-store and returns the queried data. Use this whenever you need to get data from already stored information.
|
a TrackerMiner |
|
a SPARQL query |
|
return location for errors |
Returns : |
a GPtrArray with the returned data. |
gboolean tracker_miner_execute_batch_update (TrackerMiner *miner, const gchar *sparql, GError **error);
Executes a batch of update SPARQL queries on tracker-store, use this whenever you want to perform data insertions or modifications in batches.
|
a TrackerMiner |
|
a set of SPARQL updates |
|
return location for errors |
Returns : |
TRUE if the SPARQL query was executed successfully. |
gboolean tracker_miner_commit (TrackerMiner *miner);
Commits all pending batch updates. see tracker_miner_execute_batch_update()
|
a TrackerMiner |
Returns : |
TRUE if the data was committed successfully. |
gint tracker_miner_pause (TrackerMiner *miner, const gchar *application, const gchar *reason, GError **error);
|
|
|
|
|
|
|
|
Returns : |
gboolean tracker_miner_resume (TrackerMiner *miner, gint cookie, GError **error);
Asks the miner to resume processing. The cookie must be something
returned by tracker_miner_pause()
. The miner won't actually resume
operations until all pause requests have been resumed.
|
a TrackerMiner |
|
pause cookie |
|
return location for errors |
Returns : |
TRUE if the cookie was valid. |
"progress"
property"progress" gdouble : Read / Write
Progress (between 0 and 1).
Allowed values: [0,1]
Default value: 0
"status"
property"status" gchar* : Read / Write
Status (unique to each miner).
Default value: NULL
"error"
signalvoid user_function (TrackerMiner *trackerminer, gpointer arg1, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |
"paused"
signalvoid user_function (TrackerMiner *trackerminer, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"progress"
signalvoid user_function (TrackerMiner *trackerminer, gchar *arg1, gdouble arg2, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
|
|
user data set when the signal handler was connected. |
"resumed"
signalvoid user_function (TrackerMiner *trackerminer, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"started"
signalvoid user_function (TrackerMiner *trackerminer, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"stopped"
signalvoid user_function (TrackerMiner *trackerminer, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"terminated"
signalvoid user_function (TrackerMiner *trackerminer, gpointer user_data) : Run Last
|
the object which received the signal. |
|
user data set when the signal handler was connected. |