[tracker/miner-fs-initable-iface: 3/8] libtracker-miner: New getters in TrackerMiner to retrieve dbus related variables
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-initable-iface: 3/8] libtracker-miner: New getters in TrackerMiner to retrieve dbus related variables
- Date: Tue, 1 Feb 2011 11:37:51 +0000 (UTC)
commit 4880c33148f41b9946dca384206022d32028720b
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Feb 1 11:39:24 2011 +0100
libtracker-miner: New getters in TrackerMiner to retrieve dbus related variables
src/libtracker-miner/tracker-miner-object.c | 21 ++++++++++++++++++++-
src/libtracker-miner/tracker-miner-object.h | 23 ++++++++++++-----------
2 files changed, 32 insertions(+), 12 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-object.c b/src/libtracker-miner/tracker-miner-object.c
index 2ea1bdf..780b534 100644
--- a/src/libtracker-miner/tracker-miner-object.c
+++ b/src/libtracker-miner/tracker-miner-object.c
@@ -380,7 +380,7 @@ miner_initable_init (GInitable *initable,
miner->private->name,
NULL);
- /* Register the service name for the miner */
+ /* Register the D-Bus object */
miner->private->full_path = g_strconcat (TRACKER_MINER_DBUS_PATH_PREFIX,
miner->private->name,
NULL);
@@ -405,6 +405,7 @@ miner_initable_init (GInitable *initable,
return FALSE;
}
+ /* Request the D-Bus name */
reply = g_dbus_connection_call_sync (miner->private->d_connection,
"org.freedesktop.DBus",
"/org/freedesktop/DBus",
@@ -815,6 +816,24 @@ tracker_miner_get_connection (TrackerMiner *miner)
return miner->private->connection;
}
+GDBusConnection *
+tracker_miner_get_dbus_connection (TrackerMiner *miner)
+{
+ return miner->private->d_connection;
+}
+
+G_CONST_RETURN gchar *
+tracker_miner_get_dbus_full_name (TrackerMiner *miner)
+{
+ return miner->private->full_name;
+}
+
+G_CONST_RETURN gchar *
+tracker_miner_get_dbus_full_path (TrackerMiner *miner)
+{
+ return miner->private->full_path;
+}
+
static void
miner_finalize (GObject *object)
{
diff --git a/src/libtracker-miner/tracker-miner-object.h b/src/libtracker-miner/tracker-miner-object.h
index e90df05..507ff6e 100644
--- a/src/libtracker-miner/tracker-miner-object.h
+++ b/src/libtracker-miner/tracker-miner-object.h
@@ -86,23 +86,24 @@ typedef struct {
const GStrv urls);
} TrackerMinerClass;
-GType tracker_miner_get_type (void) G_GNUC_CONST;
-GQuark tracker_miner_error_quark (void);
+GType tracker_miner_get_type (void) G_GNUC_CONST;
+GQuark tracker_miner_error_quark (void);
-void tracker_miner_start (TrackerMiner *miner);
-void tracker_miner_stop (TrackerMiner *miner);
-void tracker_miner_ignore_next_update (TrackerMiner *miner,
+void tracker_miner_start (TrackerMiner *miner);
+void tracker_miner_stop (TrackerMiner *miner);
+void tracker_miner_ignore_next_update (TrackerMiner *miner,
const GStrv urls);
-gboolean tracker_miner_is_started (TrackerMiner *miner);
-gint tracker_miner_pause (TrackerMiner *miner,
+gboolean tracker_miner_is_started (TrackerMiner *miner);
+gint tracker_miner_pause (TrackerMiner *miner,
const gchar *reason,
GError **error);
-gboolean tracker_miner_resume (TrackerMiner *miner,
+gboolean tracker_miner_resume (TrackerMiner *miner,
gint cookie,
GError **error);
-
-TrackerSparqlConnection *
- tracker_miner_get_connection (TrackerMiner *miner);
+TrackerSparqlConnection *tracker_miner_get_connection (TrackerMiner *miner);
+GDBusConnection *tracker_miner_get_dbus_connection (TrackerMiner *miner);
+G_CONST_RETURN gchar *tracker_miner_get_dbus_full_name (TrackerMiner *miner);
+G_CONST_RETURN gchar *tracker_miner_get_dbus_full_path (TrackerMiner *miner);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]