Top | ![]() |
![]() |
![]() |
![]() |
GQuark | tracker_miner_error_quark () |
TrackerSparqlConnection * | tracker_miner_get_connection () |
GDBusConnection * | tracker_miner_get_dbus_connection () |
const gchar * | tracker_miner_get_dbus_full_name () |
const gchar * | tracker_miner_get_dbus_full_path () |
guint | tracker_miner_get_n_pause_reasons () |
void | tracker_miner_ignore_next_update () |
gboolean | tracker_miner_is_paused () |
gboolean | tracker_miner_is_started () |
gint | tracker_miner_pause () |
gboolean | tracker_miner_resume () |
void | tracker_miner_start () |
void | tracker_miner_stop () |
gchar * | name | Read / Write / Construct Only |
gdouble | progress | Read / Write / Construct |
gint | remaining-time | Read / Write / Construct |
gchar * | status | Read / Write / Construct |
#define | TRACKER_MINER_ERROR |
#define | TRACKER_MINER_ERROR_DOMAIN |
struct | TrackerMiner |
TrackerMinerClass |
GObject ╰── TrackerMiner ├── TrackerDecorator ├── TrackerMinerFS ╰── TrackerMinerOnline
TrackerMiner is an abstract base class to help developing data miners for tracker-store, being an abstract class it doesn't do much by itself, but provides the basic signaling and operation control so the miners implementing this class are properly recognized by Tracker, and can be controlled properly by external means such as TrackerMinerManager.
TrackerMiner implements the GInitable interface, and thus, all objects of
types inheriting from TrackerMiner must be initialized with g_initable_init()
just after creation (or directly created with g_initable_new()
).
GQuark
tracker_miner_error_quark (void
);
Returns the GQuark used to identify miner errors in GError structures.
Since 0.8
TrackerSparqlConnection *
tracker_miner_get_connection (TrackerMiner *miner
);
Gets the TrackerSparqlConnection initialized by miner
Since 0.10
GDBusConnection *
tracker_miner_get_dbus_connection (TrackerMiner *miner
);
Gets the GDBusConnection initialized by miner
Since 0.10
const gchar *
tracker_miner_get_dbus_full_name (TrackerMiner *miner
);
Gets the DBus name registered by miner
Since 0.10
const gchar *
tracker_miner_get_dbus_full_path (TrackerMiner *miner
);
Gets the DBus path registered by miner
Since 0.10
guint
tracker_miner_get_n_pause_reasons (TrackerMiner *miner
);
Returns the number of pause reasons holding miner
from
indexing contents.
Since 0.10.5
void tracker_miner_ignore_next_update (TrackerMiner *miner
,const GStrv urls
);
Tells the miner to mark urls
are to ignore on next update.
Since 0.8
gboolean
tracker_miner_is_paused (TrackerMiner *miner
);
Returns TRUE if the miner is paused.
Since 0.10
gboolean
tracker_miner_is_started (TrackerMiner *miner
);
Returns TRUE if the miner has been started.
Since 0.8
gint tracker_miner_pause (TrackerMiner *miner
,const gchar *reason
,GError **error
);
Asks miner
to pause. On success the cookie ID is returned,
this is what must be used in tracker_miner_resume()
to resume
operations. On failure error
will be set and -1 will be returned.
miner |
||
reason |
reason to pause |
|
error |
return location for errors. |
[out callee-allocates][transfer full][allow-none] |
Since 0.8
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.
miner |
||
cookie |
pause cookie |
|
error |
return location for errors. |
[out][transfer full][allow-none] |
Since 0.8
void
tracker_miner_start (TrackerMiner *miner
);
Tells the miner to start processing data.
Since 0.8
void
tracker_miner_stop (TrackerMiner *miner
);
Tells the miner to stop processing data.
Since 0.8
typedef struct { GObjectClass parent_class; /* signals */ void (* started) (TrackerMiner *miner); void (* stopped) (TrackerMiner *miner); void (* paused) (TrackerMiner *miner); void (* resumed) (TrackerMiner *miner); void (* progress) (TrackerMiner *miner, const gchar *status, gdouble progress); void (* ignore_next_update) (TrackerMiner *miner, const GStrv urls); /* <Private> */ gpointer padding[10]; } TrackerMinerClass;
Virtual methods left to implement.
parent object class. |
||
Called when the miner is told to start collecting data. |
||
Called when the miner is told to stop collecting data. |
||
Called when the miner is told to pause. |
||
Called when the miner is told to resume activity. |
||
progress. |
||
Called after ignore on next update event happens. |
||
Reserved for future API improvements. |
“name”
property “name” gchar *
Miner name.
Flags: Read / Write / Construct Only
Default value: NULL
“progress”
property “progress” gdouble
Miner progress.
Flags: Read / Write / Construct
Allowed values: [0,1]
Default value: 0
“remaining-time”
property “remaining-time” gint
Estimated remaining time to finish processing.
Flags: Read / Write / Construct
Allowed values: >= -1
Default value: -1
“ignore-next-update”
signalvoid user_function (TrackerMiner *miner, GStrv urls, gpointer user_data)
the ::ignore-next-update signal is emitted in the miner
right after it has been asked to mark urls
as to ignore on next update
through tracker_miner_ignore_next_update()
.
miner |
the TrackerMiner |
|
urls |
the urls to mark as ignore on next update |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 0.8
“paused”
signalvoid user_function (TrackerMiner *miner, gpointer user_data)
the ::paused signal is emitted whenever
there is any reason to pause, either
internal (through tracker_miner_pause()
) or
external (through DBus, see TrackerMinerManager).
Flags: Run Last
Since 0.8
“progress”
signalvoid user_function (TrackerMiner *miner, gchar *status, gdouble progress, gint remaining_time, gpointer user_data)
the ::progress signal will be emitted by TrackerMiner implementations
to indicate progress about the data mining process. status
will
contain a translated string with the current miner status and progress
will indicate how much has been processed so far. remaining_time
will
give the number expected of seconds to finish processing, 0 if the
value cannot be estimated, and -1 if its not applicable.
miner |
the TrackerMiner |
|
status |
miner status |
|
progress |
a gdouble indicating miner progress, from 0 to 1. |
|
remaining_time |
a gint indicating the reamaining processing time, in seconds. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 0.12
“resumed”
signalvoid user_function (TrackerMiner *miner, gpointer user_data)
the ::resumed signal is emitted whenever
all reasons to pause have disappeared, see
tracker_miner_resume()
and TrackerMinerManager.
Flags: Run Last
Since 0.8
“started”
signalvoid user_function (TrackerMiner *miner, gpointer user_data)
the ::started signal is emitted in the miner
right after it has been started through
tracker_miner_start()
.
Flags: Run Last
Since 0.8
“stopped”
signalvoid user_function (TrackerMiner *miner, gpointer user_data)
the ::stopped signal is emitted in the miner
right after it has been stopped through
tracker_miner_stop()
.
Flags: Run Last
Since 0.8