tracker r1555 - in branches/xesam-support: . src/tracker-indexer
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1555 - in branches/xesam-support: . src/tracker-indexer
- Date: Mon, 2 Jun 2008 07:50:55 +0000 (UTC)
Author: pvanhoof
Date: Mon Jun 2 07:50:55 2008
New Revision: 1555
URL: http://svn.gnome.org/viewvc/tracker?rev=1555&view=rev
Log:
2008-06-02 Philip Van Hoof <pvanhoof gnome org>
* Merged xesam-support with indexer-split
* svn merge -r 1537:1554 ../indexer-split
Modified:
branches/xesam-support/ChangeLog
branches/xesam-support/src/tracker-indexer/tracker-indexer-db.c
branches/xesam-support/src/tracker-indexer/tracker-indexer-db.h
branches/xesam-support/src/tracker-indexer/tracker-indexer.c
Modified: branches/xesam-support/src/tracker-indexer/tracker-indexer-db.c
==============================================================================
--- branches/xesam-support/src/tracker-indexer/tracker-indexer-db.c (original)
+++ branches/xesam-support/src/tracker-indexer/tracker-indexer-db.c Mon Jun 2 07:50:55 2008
@@ -584,6 +584,25 @@
return TRUE;
}
+void
+tracker_db_set_metadata (TrackerDBInterface *iface,
+ guint32 id,
+ TrackerField *field,
+ const gchar *value)
+{
+ gchar *id_str;
+
+ id_str = tracker_guint32_to_string (id);
+
+ /* FIXME: determine metadata type */
+ tracker_db_interface_execute_procedure (iface, NULL, "SetMetadataKeyword",
+ id_str,
+ tracker_field_get_id (field),
+ value,
+ NULL);
+ g_free (id_str);
+}
+
/* sqlite utf-8 user defined collation sequence */
static int
utf8_collation_func (gchar *str1,
Modified: branches/xesam-support/src/tracker-indexer/tracker-indexer-db.h
==============================================================================
--- branches/xesam-support/src/tracker-indexer/tracker-indexer-db.h (original)
+++ branches/xesam-support/src/tracker-indexer/tracker-indexer-db.h Mon Jun 2 07:50:55 2008
@@ -38,6 +38,10 @@
TrackerService *service,
const gchar *path,
GHashTable *metadata);
+void tracker_db_set_metadata (TrackerDBInterface *iface,
+ guint32 id,
+ TrackerField *field,
+ const gchar *value);
G_END_DECLS
Modified: branches/xesam-support/src/tracker-indexer/tracker-indexer.c
==============================================================================
--- branches/xesam-support/src/tracker-indexer/tracker-indexer.c (original)
+++ branches/xesam-support/src/tracker-indexer/tracker-indexer.c Mon Jun 2 07:50:55 2008
@@ -94,6 +94,8 @@
struct MetadataForeachData {
TrackerIndex *index;
+ TrackerDBInterface *db;
+
TrackerLanguage *language;
TrackerConfig *config;
TrackerService *service;
@@ -391,6 +393,8 @@
tracker_field_get_weight (field));
}
+ tracker_db_set_metadata (data->db, data->id, field, (gchar *) value);
+
g_strfreev (arr);
}
@@ -406,6 +410,7 @@
priv = TRACKER_INDEXER_GET_PRIVATE (indexer);
data.index = priv->index;
+ data.db = priv->metadata;
data.language = priv->language;
data.config = priv->config;
data.service = service;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]