[tracker/gdbus-porting] Reinstate some things before we get messy some more
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/gdbus-porting] Reinstate some things before we get messy some more
- Date: Wed, 5 Jan 2011 11:10:18 +0000 (UTC)
commit 87e46ad9d010e7ca612bf8b85cff28bb5713d2d3
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Jan 5 11:47:46 2011 +0100
Reinstate some things before we get messy some more
src/libtracker-client/tracker.c | 19 +++++++------------
src/libtracker-common/tracker-dbus.c | 12 ++++++++++++
src/libtracker-common/tracker-dbus.h | 1 +
src/miners/fs/tracker-miner-files.c | 1 +
4 files changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/src/libtracker-client/tracker.c b/src/libtracker-client/tracker.c
index 071211b..c3154eb 100644
--- a/src/libtracker-client/tracker.c
+++ b/src/libtracker-client/tracker.c
@@ -610,7 +610,6 @@ iterator_buffer_read_int (TrackerResultIterator *iterator)
return v;
}
-#if 0
static void
callback_iterator (void *buffer,
gssize buffer_size,
@@ -661,7 +660,6 @@ callback_iterator (void *buffer,
fast_async_data_free (fad);
}
-#endif
/* Deprecated and only used for 0.6 API */
static void
@@ -2224,16 +2222,13 @@ tracker_resources_sparql_query_iterate_async (TrackerClient *client,
user_data);
fad->iterator_callback = callback;
- // todo: port to gdbus or remove this function
- g_critical ("Unsupported call, not ported to GDBus");
-
-// tracker_dbus_send_and_splice_async (connection,
-// message,
-// pipefd[0],
-// TRUE,
-// cancellable,
-// callback_iterator,
-// fad);
+ tracker_dbus_send_and_splice_async (connection,
+ message,
+ pipefd[0],
+ TRUE,
+ cancellable,
+ callback_iterator,
+ fad);
return fad->request_id;
}
diff --git a/src/libtracker-common/tracker-dbus.c b/src/libtracker-common/tracker-dbus.c
index 69970ed..4ab3a3e 100644
--- a/src/libtracker-common/tracker-dbus.c
+++ b/src/libtracker-common/tracker-dbus.c
@@ -49,6 +49,7 @@ typedef struct {
TrackerDBusSendAndSpliceCallback callback;
GCancellable *cancellable;
gpointer user_data;
+ gboolean expect_variable_names;
} SendAndSpliceData;
static gboolean client_lookup_enabled;
@@ -768,6 +769,7 @@ static SendAndSpliceData *
send_and_splice_data_new (GInputStream *unix_input_stream,
GInputStream *buffered_input_stream,
GOutputStream *output_stream,
+ gboolean expect_variable_names,
GCancellable *cancellable,
TrackerDBusSendAndSpliceCallback callback,
gpointer user_data)
@@ -783,6 +785,7 @@ send_and_splice_data_new (GInputStream *unix_input_stream,
}
data->callback = callback;
data->user_data = user_data;
+ data->expect_variable_names = expect_variable_names;
return data;
}
@@ -848,6 +851,13 @@ tracker_dbus_send_and_splice_async_finish (GObject *source,
} else {
GStrv v_names = NULL;
+ if (data->expect_variable_names) {
+#if 0
+ todo: port this function
+ v_names = dbus_send_and_splice_get_variable_names (reply, FALSE);
+#endif
+ }
+
/* dbus_pending_call_cancel (data->call); */
(* data->callback) (g_memory_output_stream_get_data (G_MEMORY_OUTPUT_STREAM (data->output_stream)),
@@ -889,6 +899,7 @@ gboolean
tracker_dbus_send_and_splice_async (GDBusConnection *connection,
GDBusMessage *message,
int fd,
+ gboolean expect_variable_names,
GCancellable *cancellable,
TrackerDBusSendAndSpliceCallback callback,
gpointer user_data)
@@ -911,6 +922,7 @@ tracker_dbus_send_and_splice_async (GDBusConnection *connection
data = send_and_splice_data_new (unix_input_stream,
buffered_input_stream,
output_stream,
+ expect_variable_names,
cancellable,
callback,
user_data);
diff --git a/src/libtracker-common/tracker-dbus.h b/src/libtracker-common/tracker-dbus.h
index f3bc350..041c9f8 100644
--- a/src/libtracker-common/tracker-dbus.h
+++ b/src/libtracker-common/tracker-dbus.h
@@ -210,6 +210,7 @@ gboolean tracker_dbus_send_and_splice (DBusConnection
gboolean tracker_dbus_send_and_splice_async (GDBusConnection *connection,
GDBusMessage *message,
int fd,
+ gboolean expect_variable_names,
GCancellable *cancellable,
TrackerDBusSendAndSpliceCallback callback,
gpointer user_data);
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index a184fc5..78265e2 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2056,6 +2056,7 @@ get_metadata_fast_async (GDBusConnection *connection,
tracker_dbus_send_and_splice_async (connection,
message,
pipefd[0],
+ FALSE,
cancellable,
get_metadata_fast_cb,
data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]