tracker r1981 - branches/indexer-split/src/tracker-indexer
- From: ifrade svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1981 - branches/indexer-split/src/tracker-indexer
- Date: Fri, 1 Aug 2008 13:50:29 +0000 (UTC)
Author: ifrade
Date: Fri Aug 1 13:50:29 2008
New Revision: 1981
URL: http://svn.gnome.org/viewvc/tracker?rev=1981&view=rev
Log:
Forgot the file
Modified:
branches/indexer-split/src/tracker-indexer/tracker-indexer.c
Modified: branches/indexer-split/src/tracker-indexer/tracker-indexer.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-indexer.c (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-indexer.c Fri Aug 1 13:50:29 2008
@@ -1018,6 +1018,11 @@
}
for (i = 0; values[i] != NULL; i++) {
+ g_debug ("Setting metadata: service_type '%s' id '%d' field '%s' value '%s'",
+ tracker_service_get_name (service_def),
+ service_id,
+ tracker_field_get_name (field_def),
+ values[i]);
tracker_db_set_metadata (service_def,
service_id,
field_def,
@@ -1056,6 +1061,7 @@
field_def = tracker_ontology_get_field_def (property);
if (!field_def) {
+ g_message ("Unknow field %d", property);
return FALSE;
}
@@ -1072,6 +1078,8 @@
return FALSE;
}
+
+
for (i = 0; values[i] != NULL; i++) {
tracker_db_delete_metadata (service_def,
service_id,
@@ -1498,8 +1506,9 @@
DBusGMethodInvocation *context,
GError **error) {
- guint request_id;
-
+ guint request_id;
+ gboolean result;
+ GError *actual_error = NULL;
request_id = tracker_dbus_get_next_request_id ();
tracker_dbus_async_return_if_fail (TRACKER_IS_INDEXER (indexer), FALSE);
@@ -1509,7 +1518,22 @@
tracker_dbus_async_return_if_fail (values != NULL, FALSE);
tracker_dbus_async_return_if_fail (g_strv_length (values) > 0, FALSE);
- handle_metadata_add (indexer, service_type, uri, property, values);
+ tracker_dbus_request_new (request_id,
+ "DBus request to set %d values in property '%s' for file '%s' ",
+ g_strv_length (values),
+ property,
+ uri);
+
+ if (!handle_metadata_add (indexer, service_type, uri, property, values)) {
+ tracker_dbus_request_failed (request_id,
+ &actual_error,
+ "Unespecified error adding metadata");
+ dbus_g_method_return_error (context, actual_error);
+ g_error_free (actual_error);
+ return;
+ }
+
+ schedule_flush (indexer, TRUE);
dbus_g_method_return (context);
tracker_dbus_request_success (request_id);
@@ -1524,7 +1548,8 @@
DBusGMethodInvocation *context,
GError **error) {
- guint request_id;
+ guint request_id;
+ GError *actual_error;
request_id = tracker_dbus_get_next_request_id ();
@@ -1534,7 +1559,20 @@
tracker_dbus_async_return_if_fail (property != NULL, FALSE);
/* Values can be NULL */
- handle_metadata_remove (indexer, service_type, uri, property, values);
+ tracker_dbus_request_new (request_id,
+ "DBus request to remove %s values in property '%s' for file '%s' ",
+ ( values == NULL ? "all" : g_strdup_printf ("%d", g_strv_length (values))),
+ property,
+ uri);
+
+ if (!handle_metadata_remove (indexer, service_type, uri, property, values)) {
+ tracker_dbus_request_failed (request_id,
+ &actual_error,
+ "Unespecified error deleting metadata");
+ dbus_g_method_return_error (context, actual_error);
+ g_error_free (actual_error);
+ return;
+ }
dbus_g_method_return (context);
tracker_dbus_request_success (request_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]