tracker r1551 - in branches/indexer-split: . src/tracker-indexer
- From: carlosg svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1551 - in branches/indexer-split: . src/tracker-indexer
- Date: Fri, 30 May 2008 13:56:00 +0000 (UTC)
Author: carlosg
Date: Fri May 30 13:55:59 2008
New Revision: 1551
URL: http://svn.gnome.org/viewvc/tracker?rev=1551&view=rev
Log:
2008-05-30 Carlos Garnacho <carlos imendio com>
* src/tracker-indexer/tracker-indexer-db.[ch]
(tracker_db_set_metadata): Added, stores metadata values into
Service*MetaData tables.
* src/tracker-indexer/tracker-indexer.c (index_metadata_foreach): use
tracker_db_set_metadata() to store metadata contents.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/tracker-indexer/tracker-indexer-db.c
branches/indexer-split/src/tracker-indexer/tracker-indexer-db.h
branches/indexer-split/src/tracker-indexer/tracker-indexer.c
Modified: branches/indexer-split/src/tracker-indexer/tracker-indexer-db.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-indexer-db.c (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-indexer-db.c Fri May 30 13:55:59 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/indexer-split/src/tracker-indexer/tracker-indexer-db.h
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-indexer-db.h (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-indexer-db.h Fri May 30 13:55:59 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/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 May 30 13:55:59 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]