tracker r1305 - in branches/xesam-support: data src/trackerd
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1305 - in branches/xesam-support: data src/trackerd
- Date: Thu, 24 Apr 2008 21:13:07 +0100 (BST)
Author: pvanhoof
Date: Thu Apr 24 20:13:07 2008
New Revision: 1305
URL: http://svn.gnome.org/viewvc/tracker?rev=1305&view=rev
Log:
Various corrections
Modified:
branches/xesam-support/data/tracker-xesam-search.xml
branches/xesam-support/src/trackerd/tracker-marshal.list
branches/xesam-support/src/trackerd/tracker-xesam-live-search.c
branches/xesam-support/src/trackerd/tracker-xesam-live-search.h
branches/xesam-support/src/trackerd/tracker-xesam-search.c
branches/xesam-support/src/trackerd/tracker-xesam-search.h
branches/xesam-support/src/trackerd/tracker-xesam-session.c
branches/xesam-support/src/trackerd/tracker-xesam-session.h
Modified: branches/xesam-support/data/tracker-xesam-search.xml
==============================================================================
--- branches/xesam-support/data/tracker-xesam-search.xml (original)
+++ branches/xesam-support/data/tracker-xesam-search.xml Thu Apr 24 20:13:07 2008
@@ -46,6 +46,7 @@
<method name="GetHits">
<arg type="s" name="search" direction="in" />
+ <arg type="u" name="count" direction="in" />
<arg type="aav" name="hits" direction="out" />
</method>
Modified: branches/xesam-support/src/trackerd/tracker-marshal.list
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-marshal.list (original)
+++ branches/xesam-support/src/trackerd/tracker-marshal.list Thu Apr 24 20:13:07 2008
@@ -1,5 +1,13 @@
VOID:STRING,STRING,INT,INT,INT
VOID:STRING,STRING,STRING
VOID:STRING,BOOLEAN,BOOLEAN,BOOLEAN,BOOLEAN,BOOLEAN,BOOLEAN
-VOID:STRING,INT
-VOID:STRING,POINTER
+
+# HitsRemoved, HitsModified DBus signals
+VOID:STRING,BOXED
+
+# HitsAdded DBus signal
+VOID:STRING,UINT
+
+#hits-added, hits-modified, hits-removed GObject signals
+VOID:OBJECT
+
Modified: branches/xesam-support/src/trackerd/tracker-xesam-live-search.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-xesam-live-search.c (original)
+++ branches/xesam-support/src/trackerd/tracker-xesam-live-search.c Thu Apr 24 20:13:07 2008
@@ -91,14 +91,16 @@
* on any of the given hit ids should return unset fields.
**/
void
-tracker_xesam_live_search_emit_hits_removed (TrackerXesamLiveSearch *self, guint *hit_ids, gint hit_ids_length)
+tracker_xesam_live_search_emit_hits_removed (TrackerXesamLiveSearch *self, GArray *hit_ids)
{
TrackerXesamSearch *proxy;
proxy = TRACKER_XESAM_SEARCH (tracker_dbus_get_object (TRACKER_TYPE_XESAM_SEARCH));
+ // todo
+
g_signal_emit (proxy, xesam_signals[XESAM_HITS_REMOVED], 0,
- tracker_xesam_live_search_get_id (self), 0); // todo
+ tracker_xesam_live_search_get_id (self), hit_ids);
}
@@ -114,14 +116,16 @@
* They can have been moved in which case their uri will have changed.
**/
void
-tracker_xesam_live_search_emit_hits_modified (TrackerXesamLiveSearch *self, guint *hit_ids, gint hit_ids_length)
+tracker_xesam_live_search_emit_hits_modified (TrackerXesamLiveSearch *self, GArray *hit_ids)
{
TrackerXesamSearch *proxy;
proxy = TRACKER_XESAM_SEARCH (tracker_dbus_get_object (TRACKER_TYPE_XESAM_SEARCH));
+ // todo
+
g_signal_emit (proxy, xesam_signals[XESAM_HITS_MODIFIED], 0,
- tracker_xesam_live_search_get_id (self), 0); // todo
+ tracker_xesam_live_search_get_id (self), hit_ids);
}
@@ -208,7 +212,7 @@
* @tracker_xesam_live_search_activate yet.
**/
void
-tracker_xesam_live_search_get_hits (TrackerXesamLiveSearch *self, guint num, gpointer **hits, GError **error)
+tracker_xesam_live_search_get_hits (TrackerXesamLiveSearch *self, guint count, gpointer *hits, GError **error)
{
TrackerXesamLiveSearchPriv *priv = self->priv;
@@ -250,7 +254,7 @@
* will not result in an error, but return only unset fields.
**/
void
-tracker_xesam_live_search_get_hit_data (TrackerXesamLiveSearch *self, guint *hit_ids, const gchar **fields, gpointer **hit_data, GError **error)
+tracker_xesam_live_search_get_hit_data (TrackerXesamLiveSearch *self, GArray *hit_ids, GStrv fields, GPtrArray **hit_data, GError **error)
{
TrackerXesamLiveSearchPriv *priv = self->priv;
Modified: branches/xesam-support/src/trackerd/tracker-xesam-live-search.h
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-xesam-live-search.h (original)
+++ branches/xesam-support/src/trackerd/tracker-xesam-live-search.h Thu Apr 24 20:13:07 2008
@@ -55,14 +55,14 @@
const gchar* tracker_xesam_live_search_get_query (TrackerXesamLiveSearch *self);
void tracker_xesam_live_search_activate (TrackerXesamLiveSearch *self, GError **error);
gboolean tracker_xesam_live_search_is_active (TrackerXesamLiveSearch *self);
-void tracker_xesam_live_search_get_hit_data (TrackerXesamLiveSearch *self, guint *hit_ids, const gchar **fields, gpointer **hit_data, GError **error);
-void tracker_xesam_live_search_get_hits (TrackerXesamLiveSearch *self, guint num, gpointer **hits, GError **error);
+void tracker_xesam_live_search_get_hit_data (TrackerXesamLiveSearch *self, GArray *hit_ids, GStrv fields, GPtrArray **hit_data, GError **error);
+void tracker_xesam_live_search_get_hits (TrackerXesamLiveSearch *self, guint count, gpointer *hits, GError **error);
void tracker_xesam_live_search_get_hit_count (TrackerXesamLiveSearch *self, guint *count, GError **error);
void tracker_xesam_live_search_close (TrackerXesamLiveSearch *self, GError **error);
void tracker_xesam_live_search_emit_hits_added (TrackerXesamLiveSearch *self, guint count);
-void tracker_xesam_live_search_emit_hits_removed (TrackerXesamLiveSearch *self, guint *hit_ids, gint hit_ids_length);
-void tracker_xesam_live_search_emit_hits_modified (TrackerXesamLiveSearch *self, guint *hit_ids, gint hit_ids_length);
+void tracker_xesam_live_search_emit_hits_removed (TrackerXesamLiveSearch *self, GArray *hit_ids);
+void tracker_xesam_live_search_emit_hits_modified (TrackerXesamLiveSearch *self, GArray *hit_ids);
void tracker_xesam_live_search_emit_done (TrackerXesamLiveSearch *self);
G_END_DECLS
Modified: branches/xesam-support/src/trackerd/tracker-xesam-search.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-xesam-search.c (original)
+++ branches/xesam-support/src/trackerd/tracker-xesam-search.c Thu Apr 24 20:13:07 2008
@@ -67,11 +67,11 @@
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- tracker_marshal_VOID__STRING_INT,
+ tracker_marshal_VOID__STRING_UINT,
G_TYPE_NONE,
2,
G_TYPE_STRING,
- G_TYPE_INT);
+ G_TYPE_UINT);
xesam_signals[XESAM_HITS_REMOVED] =
g_signal_new ("hits-removed",
@@ -79,11 +79,11 @@
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- tracker_marshal_VOID__STRING_POINTER,
+ tracker_marshal_VOID__STRING_BOXED,
G_TYPE_NONE,
2,
G_TYPE_STRING,
- G_TYPE_POINTER);
+ DBUS_TYPE_G_UINT_ARRAY);
xesam_signals[XESAM_HITS_MODIFIED] =
g_signal_new ("hits-modified",
@@ -91,11 +91,11 @@
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- tracker_marshal_VOID__STRING_POINTER,
+ tracker_marshal_VOID__STRING_BOXED,
G_TYPE_NONE,
2,
G_TYPE_STRING,
- G_TYPE_POINTER);
+ DBUS_TYPE_G_UINT_ARRAY);
xesam_signals[XESAM_SEARCH_DONE] =
g_signal_new ("search-done",
@@ -115,10 +115,10 @@
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
+ g_cclosure_marshal_VOID__BOXED,
G_TYPE_NONE,
1,
- G_TYPE_POINTER);
+ G_TYPE_STRV);
}
@@ -197,8 +197,8 @@
tracker_xesam_search_set_property (TrackerXesamSearch *object,
const gchar *session_id,
const gchar *prop,
- gchar *val, /* not sure */
- gchar **new_val, /* not sure */
+ GValue *val, /* not sure */
+ GValue **new_val, /* not sure */
GError **error)
{
guint request_id = tracker_dbus_get_next_request_id ();
@@ -218,17 +218,17 @@
tracker_xesam_search_get_property (TrackerXesamSearch *object,
const gchar *session_id,
const gchar *prop,
- gchar **value, /* not sure */
+ GValue **value, /* not sure */
GError **error)
{
guint request_id = tracker_dbus_get_next_request_id ();
TrackerXesamSession *session = tracker_xesam_get_session (session_id, error);
if (session) {
- gchar *ret = NULL;
+ GValue *ret = NULL;
tracker_xesam_session_get_property (session, prop, &ret, error);
- *value = g_strdup (ret);
- g_free (ret);
+ g_value_copy (ret, *value);
+ g_value_unset (ret);
}
tracker_dbus_request_success (request_id);
@@ -304,15 +304,15 @@
gboolean
tracker_xesam_search_get_hits (TrackerXesamSearch *object,
const gchar *search_id,
- guint num,
- gpointer **hits, /* not sure */
+ guint count,
+ gpointer *hits, /* not sure */
GError **error)
{
guint request_id = tracker_dbus_get_next_request_id ();
TrackerXesamLiveSearch *search = tracker_xesam_get_live_search (search_id, error);
if (search) {
- tracker_xesam_live_search_get_hits (search, num, hits, error);
+ tracker_xesam_live_search_get_hits (search, count, hits, error);
g_object_unref (search);
}
@@ -324,9 +324,9 @@
gboolean
tracker_xesam_search_get_hit_data (TrackerXesamSearch *object,
const gchar *search_id,
- guint *hit_ids, /* not sure */
- const gchar **fields,
- gpointer **hit_data, /* not sure */
+ GArray *hit_ids, /* not sure */
+ GStrv fields,
+ GPtrArray **hit_data, /* not sure */
GError **error)
{
guint request_id = tracker_dbus_get_next_request_id ();
@@ -362,8 +362,8 @@
gboolean
tracker_xesam_search_get_state (TrackerXesamSearch *object,
- gchar ***state_info, /* not sure */
- GError **error)
+ GStrv *state_info, /* not sure */
+ GError **error)
{
if (state_info) {
gchar **state = g_malloc (sizeof (gchar *) * 1);
@@ -377,8 +377,7 @@
/**
* tracker_xesam_search_emit_state_changed:
* @self: A #TrackerXesamSearch
- * @state_info: (in): a list of strings that contain the state
- * @state_info_length: amount of strings in @state_info
+ * @state_info: (in): an array of strings that contain the state
*
* Emits the @state-changed signal on the DBus proxy for Xesam.
*
@@ -392,7 +391,8 @@
* interface.
**/
void
-tracker_xesam_search_emit_state_changed (TrackerXesamSearch *self, gchar **state_info, gint state_info_length)
+tracker_xesam_search_emit_state_changed (TrackerXesamSearch *self, GStrv state_info)
{
- g_signal_emit (self, xesam_signals[XESAM_STATE_CHANGED], 0, 0); // todo
+ // todo
+ g_signal_emit (self, xesam_signals[XESAM_STATE_CHANGED], 0, state_info);
}
Modified: branches/xesam-support/src/trackerd/tracker-xesam-search.h
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-xesam-search.h (original)
+++ branches/xesam-support/src/trackerd/tracker-xesam-search.h Thu Apr 24 20:13:07 2008
@@ -79,13 +79,13 @@
gboolean tracker_xesam_search_set_property (TrackerXesamSearch *object,
const gchar *session_id,
const gchar *prop,
- gchar *val, /* not sure */
- gchar **new_val, /* not sure */
+ GValue *val, /* not sure */
+ GValue **new_val, /* not sure */
GError **error);
gboolean tracker_xesam_search_get_property (TrackerXesamSearch *object,
const gchar *session_id,
const gchar *prop,
- gchar **value, /* not sure */
+ GValue **value, /* not sure */
GError **error);
gboolean tracker_xesam_search_close_session (TrackerXesamSearch *object,
const gchar *session_id,
@@ -104,24 +104,24 @@
GError **error);
gboolean tracker_xesam_search_get_hits (TrackerXesamSearch *object,
const gchar *search_id,
- guint num,
- gpointer **hits, /* not sure */
+ guint count,
+ gpointer *hits, /* not sure */
GError **error);
gboolean tracker_xesam_search_get_hit_data (TrackerXesamSearch *object,
const gchar *search_id,
- guint *hit_ids, /* not sure */
- const gchar **fields,
- gpointer **hit_data, /* not sure */
+ GArray *hit_ids, /* not sure */
+ GStrv fields,
+ GPtrArray **hit_data, /* not sure */
GError **error);
gboolean tracker_xesam_search_close_search (TrackerXesamSearch *object,
const gchar *search_id,
GError **error);
gboolean tracker_xesam_search_get_state (TrackerXesamSearch *object,
- gchar ***state_info, /* not sure */
+ GStrv *state_info, /* not sure */
GError **error);
-void tracker_xesam_search_emit_state_changed (TrackerXesamSearch *self, gchar **state_info, gint state_info_length);
+void tracker_xesam_search_emit_state_changed (TrackerXesamSearch *self, GStrv state_info);
G_END_DECLS
Modified: branches/xesam-support/src/trackerd/tracker-xesam-session.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-xesam-session.c (original)
+++ branches/xesam-support/src/trackerd/tracker-xesam-session.c Thu Apr 24 20:13:07 2008
@@ -138,10 +138,9 @@
* is invalid.
**/
void
-tracker_xesam_session_set_property (TrackerXesamSession *self, const gchar *prop, const gchar *val, gchar **new_val, GError **error)
+tracker_xesam_session_set_property (TrackerXesamSession *self, const gchar *prop, const GValue *val, GValue **new_val, GError **error)
{
- if (new_val)
- *new_val = g_strdup (val);
+ // todo
}
@@ -159,10 +158,9 @@
* prop is not a valid session property.
**/
void
-tracker_xesam_session_get_property (TrackerXesamSession *self, const gchar *prop, gchar **value, GError **error)
+tracker_xesam_session_get_property (TrackerXesamSession *self, const gchar *prop, GValue **value, GError **error)
{
- if (value)
- *value = g_strdup ("");
+ // todo
return;
}
Modified: branches/xesam-support/src/trackerd/tracker-xesam-session.h
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-xesam-session.h (original)
+++ branches/xesam-support/src/trackerd/tracker-xesam-session.h Thu Apr 24 20:13:07 2008
@@ -53,8 +53,8 @@
GObjectClass parent_class;
};
-void tracker_xesam_session_set_property (TrackerXesamSession *self, const gchar *prop, const gchar *val, gchar **new_val, GError **error);
-void tracker_xesam_session_get_property (TrackerXesamSession *self, const gchar *prop, gchar **value, GError **error);
+void tracker_xesam_session_set_property (TrackerXesamSession *self, const gchar *prop, const GValue *val, GValue **new_val, GError **error);
+void tracker_xesam_session_get_property (TrackerXesamSession *self, const gchar *prop, GValue **value, GError **error);
TrackerXesamLiveSearch* tracker_xesam_session_create_search (TrackerXesamSession *self, const gchar *query_xml , gchar **search_id, GError **error);
TrackerXesamLiveSearch* tracker_xesam_session_get_search (TrackerXesamSession *self, const gchar *search_id, GError **error);
GList *tracker_xesam_session_get_searches (TrackerXesamSession *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]