tracker r1667 - in branches/xesam-support: . data src/libtracker-common src/libtracker-db src/trackerd
- From: mottela svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1667 - in branches/xesam-support: . data src/libtracker-common src/libtracker-db src/trackerd
- Date: Thu, 12 Jun 2008 17:46:00 +0000 (UTC)
Author: mottela
Date: Thu Jun 12 17:46:00 2008
New Revision: 1667
URL: http://svn.gnome.org/viewvc/tracker?rev=1667&view=rev
Log:
Switched xesam to use standard field and ontology. Bugs in list-type return values fixed.
Removed:
branches/xesam-support/src/libtracker-common/tracker-xesam-field.c
branches/xesam-support/src/libtracker-common/tracker-xesam-field.h
branches/xesam-support/src/libtracker-common/tracker-xesam-ontology.c
branches/xesam-support/src/libtracker-common/tracker-xesam-ontology.h
Modified:
branches/xesam-support/ChangeLog
branches/xesam-support/data/sqlite-stored-procs.sql
branches/xesam-support/data/sqlite-xesam.sql
branches/xesam-support/src/libtracker-common/Makefile.am
branches/xesam-support/src/libtracker-common/tracker-field.h
branches/xesam-support/src/libtracker-db/tracker-db-manager.c
branches/xesam-support/src/trackerd/tracker-crawler.c
branches/xesam-support/src/trackerd/tracker-main.c
branches/xesam-support/src/trackerd/tracker-xesam-live-search.c
Modified: branches/xesam-support/data/sqlite-stored-procs.sql
==============================================================================
--- branches/xesam-support/data/sqlite-stored-procs.sql (original)
+++ branches/xesam-support/data/sqlite-stored-procs.sql Thu Jun 12 17:46:00 2008
@@ -201,14 +201,15 @@
InsertXesamServiceLookup REPLACE INTO XesamServiceLookup (XesamTypeName, TypeName) Values (?, ?);
InsertXesamMetaDataLookup REPLACE INTO XesamMetaDataLookup (XesamMetaName, MetaName) Values (?, ?);
-GetXesamServiceTypes SELECT TypeName, Parents FROM XesamServiceTypes;
+GetXesamServiceParents SELECT TypeName, Parents FROM XesamServiceTypes;
GetXesamServiceChildren SELECT Child FROM XesamServiceChildren WHERE Parent = ?;
GetXesamServiceMappings SELECT TypeName FROM XesamServiceMapping WHERE XesamTypeName = ?;
GetXesamServiceLookups SELECT DISTINCT TypeName FROM XesamServiceLookup WHERE XesamTypeName = ?;
-GetXesamMetaDataTypes SELECT MetaName, Parents FROM XesamMetaDataTypes;
+GetXesamMetaDataParents SELECT MetaName, Parents FROM XesamMetaDataTypes;
GetXesamMetaDataChildren SELECT Child FROM XesamMetaDataChildren WHERE Parent = ?;
GetXesamMetaDataMappings SELECT MetaName FROM XesamMetaDataMapping WHERE XesamMetaName = ?;
GetXesamMetaDataLookups SELECT DISTINCT MetaName FROM XesamMetaDataLookup WHERE XesamMetaName = ?;
-GetXesamMetadataTypes SELECT ID, MetaName, DataTypeID, Parents FROM XesamMetaDataTypes;
\ No newline at end of file
+GetXesamMetaDataTypes SELECT ID, MetaName, DataTypeID, FieldName, Weight, Embedded, MultipleValues, Delimited, Filtered, Abstract FROM XesamMetaDataTypes;
+GetXesamServiceTypes SELECT TypeID, TypeName, Parents, Enabled, Embedded, HasMetadata, HasFullText, HasThumbs, ContentMetadata, Database, ShowServiceFiles, ShowServiceDirectories, KeyMetadata1, KeyMetadata2, KeyMetadata3, KeyMetadata4, KeyMetadata5, KeyMetadata6, KeyMetadata7, KeyMetadata8, KeyMetadata9, KeyMetadata10, KeyMetadata11 FROM XesamServiceTypes;
\ No newline at end of file
Modified: branches/xesam-support/data/sqlite-xesam.sql
==============================================================================
--- branches/xesam-support/data/sqlite-xesam.sql (original)
+++ branches/xesam-support/data/sqlite-xesam.sql Thu Jun 12 17:46:00 2008
@@ -3,8 +3,24 @@
(
ID Integer primary key AUTOINCREMENT not null,
MetaName Text not null COLLATE NOCASE,
- DataTypeID Integer default 0, /* 0=string, 1=float, 2=integer, 3=boolean, 4=dateTime, 5=List of strings, 8=List of Uris, 9=List of Urls */
+ DataTypeID Integer default 0,
+ DisplayName text,
Description text default ' ',
+ Enabled integer default 1, /* used to prevent use of this metadata type */
+ UIVisible integer default 0, /* should this metadata type be visible in a search criteria UI */
+ WriteExec text default ' ', /* used to specify an external program that can write an *embedded* metadata to a file */
+ Alias text default ' ', /* alternate name for this type (XESAM specs?) */
+ FieldName text default ' ', /* filedname if present in the services table */
+ Weight Integer default 1, /* weight of metdata type in ranking */
+ Embedded Integer default 1, /* 1 if metadata extracted from the file by the indexer and is not updateable by the user. 0 - this metadata can be updated by the user and is external to the file */
+ MultipleValues Integer default 0, /* 0= type cannot have multiple values per entity, 1= type can have more than 1 value per entity */
+ Delimited Integer default 0, /* if 1, extra delimiters (hyphen and underscore) are used to break word */
+ Filtered Integer default 1, /* if 1, words are filtered for numerics (if numeric indexing is disabled), stopwords and min length */
+ Abstract Integer default 0, /* if 0, can be used for storing metadata - Abstract type classes cannot store metadata and can only be used for searching its decendants */
+ StemMetadata Integer default 1, /* 1 if metadata should be stemmed */
+ SideCar Integer default 0, /* should this metadata be backed up in an xmp sidecar file */
+ FileName Text default ' ',
+
Categories text default ' ',
Parents text default ' ',
@@ -15,7 +31,63 @@
(
TypeID Integer primary key AUTOINCREMENT not null,
TypeName Text COLLATE NOCASE not null,
+
+ TypeCount Integer default 0,
+
+ DisplayName Text default ' ',
+ Enabled Integer default 1,
+ Embedded Integer default 1, /* service is created by the indexer if embedded. User or app defined services are not embedded */
+ ChildResource Integer default 0, /* service is a child service */
+
+ CreateDesktopFile Integer default 0, /* used by a UI to indicate whether it should create a desktop file for the service if its copied (using the ViewerExec field + uri) */
+
+ /* useful for a UI when determining what actions a hit can have */
+ CanCopy Integer default 1,
+ CanDelete Integer default 1,
+
+ ShowServiceFiles Integer default 0,
+ ShowServiceDirectories Integer default 0,
+
+ HasMetadata Integer default 1,
+ HasFullText Integer default 1,
+ HasThumbs Integer default 1,
+
+ ContentMetadata Text default ' ', /* the content field is the one most likely to be used for showing a search snippet */
+
+ KeyMetadata1 Text default ' ', /* the most commonly requested metadata (especially for tables/grid views) is cached int he services table for extra fast retrieval */
+ KeyMetadata2 Text default ' ',
+ KeyMetadata3 Text default ' ',
+ KeyMetadata4 Text default ' ',
+ KeyMetadata5 Text default ' ',
+ KeyMetadata6 Text default ' ',
+ KeyMetadata7 Text default ' ',
+ KeyMetadata8 Text default ' ',
+ KeyMetadata9 Text default ' ',
+ KeyMetadata10 Text default ' ',
+ KeyMetadata11 Text default ' ',
+
+ UIVisible Integer default 0, /* should service appear in a search GUI? */
+ UITitle Text default ' ', /* title format as displayed in the metadata tile */
+ UIMetadata1 Text default ' ', /*UI fields to show in GUI for a hit - if not set then Name,Path,Mime are used */
+ UIMetadata2 Text default ' ',
+ UIMetadata3 Text default ' ',
+ UIView Text default 'default',
+
Description Text default ' ',
+ Database integer default 0, /* 0 = DB_FILES, 1 = DB_EMAILS, 2 = DB_MISC, 3 = DB_USER */
+ Icon Text default ' ',
+
+ IndexerExec Text default ' ',
+ IndexerOutput Text default 'stdout',
+ ThumbExec Text default ' ',
+ ViewerExec Text default ' ',
+
+ WatchFolders Text default ' ',
+ IncludeGlob Text default ' ',
+ ExcludeGlob Text default ' ',
+
+ FileName Text default ' ',
+
Parents text default ' ',
unique (TypeName)
Modified: branches/xesam-support/src/libtracker-common/Makefile.am
==============================================================================
--- branches/xesam-support/src/libtracker-common/Makefile.am (original)
+++ branches/xesam-support/src/libtracker-common/Makefile.am Thu Jun 12 17:46:00 2008
@@ -53,11 +53,7 @@
tracker-type-utils.c \
tracker-type-utils.h \
tracker-utils.c \
- tracker-utils.h \
- tracker-xesam-field.c \
- tracker-xesam-field.h \
- tracker-xesam-ontology.c \
- tracker-xesam-ontology.h
+ tracker-utils.h
libtracker_common_la_LDFLAGS = -version-info 0:0:0
libtracker_common_la_LIBADD = \
Modified: branches/xesam-support/src/libtracker-common/tracker-field.h
==============================================================================
--- branches/xesam-support/src/libtracker-common/tracker-field.h (original)
+++ branches/xesam-support/src/libtracker-common/tracker-field.h Thu Jun 12 17:46:00 2008
@@ -38,7 +38,7 @@
TRACKER_FIELD_TYPE_DATE,
TRACKER_FIELD_TYPE_BLOB,
TRACKER_FIELD_TYPE_STRUCT,
- TRACKER_FIELD_TYPE_LINK
+ TRACKER_FIELD_TYPE_LINK,
} TrackerFieldType;
GType tracker_field_type_get_type (void) G_GNUC_CONST;
Modified: branches/xesam-support/src/libtracker-db/tracker-db-manager.c
==============================================================================
--- branches/xesam-support/src/libtracker-db/tracker-db-manager.c (original)
+++ branches/xesam-support/src/libtracker-db/tracker-db-manager.c Thu Jun 12 17:46:00 2008
@@ -26,10 +26,8 @@
#include <zlib.h>
#include <libtracker-common/tracker-field.h>
-#include <libtracker-common/tracker-xesam-field.h>
#include <libtracker-common/tracker-nfs-lock.h>
#include <libtracker-common/tracker-ontology.h>
-#include <libtracker-common/tracker-xesam-ontology.h>
#include <libtracker-common/tracker-type-utils.h>
#include <libtracker-common/tracker-utils.h>
@@ -700,11 +698,48 @@
data_id = tracker_string_in_string_list (value, (gchar **) data_types);
if (data_id != -1) {
+ gint mapped_data_id;
+ gboolean list = FALSE;
+
+ /* We map these values to existing field types.
+ FIXME Eventually we should change the config file instead. */
+
+ switch (data_id) {
+ case 0:
+ mapped_data_id = TRACKER_FIELD_TYPE_STRING;
+ break;
+ case 1:
+ mapped_data_id = TRACKER_FIELD_TYPE_DOUBLE;
+ break;
+ case 2:
+ mapped_data_id = TRACKER_FIELD_TYPE_INTEGER;
+ break;
+ case 3:
+ mapped_data_id = TRACKER_FIELD_TYPE_INTEGER;
+ break;
+ case 4:
+ mapped_data_id = TRACKER_FIELD_TYPE_DATE;
+ break;
+ case 5:
+ case 6:
+ case 7:
+ list = TRUE;
+ mapped_data_id = TRACKER_FIELD_TYPE_STRING;
+ break;
+ }
+
sql = g_strdup_printf ("update XesamMetadataTypes set DataTypeID = %d where ID = %s",
- data_id,
+ mapped_data_id,
str_id);
db_exec_no_reply (iface, sql);
g_free (sql);
+
+ if (list) {
+ sql = g_strdup_printf ("update XesamMetadataTypes set MultipleValues = 1 where ID = %s",
+ str_id);
+ db_exec_no_reply (iface, sql);
+ g_free (sql);
+ }
}
} else {
load_service_file_xesam_update (iface,
@@ -951,107 +986,6 @@
return service;
}
-static TrackerXesamField *
-db_row_to_xesam_field_def (TrackerDBResultSet *result_set)
-{
- TrackerXesamField *field_def;
- TrackerFieldType field_type;
- gchar *id_str, *name;
- gint id;
-
- field_def = tracker_xesam_field_new ();
-
- tracker_db_result_set_get (result_set,
- 0, &id,
- 1, &name,
- 2, &field_type,
- -1);
-
- id_str = tracker_int_to_string (id);
-
- tracker_xesam_field_set_id (field_def, id_str);
- tracker_xesam_field_set_name (field_def, name);
- tracker_xesam_field_set_data_type (field_def, field_type);
-
- g_free (id_str);
- g_free (name);
-
- return field_def;
-}
-
-static TrackerService *
-db_row_to_xesam_service (TrackerDBResultSet *result_set)
-{
- TrackerService *service;
- GSList *new_list = NULL;
- gint id, i;
- gchar *name, *parent, *content_metadata;
- gboolean enabled, embedded, has_metadata, has_fulltext;
- gboolean has_thumbs, show_service_files, show_service_directories;
-
- service = tracker_service_new ();
-
- tracker_db_result_set_get (result_set,
- 0, &id,
- 1, &name,
- 2, &parent,
- 3, &enabled,
- 4, &embedded,
- 5, &has_metadata,
- 6, &has_fulltext,
- 7, &has_thumbs,
- 8, &content_metadata,
- 10, &show_service_files,
- 11, &show_service_directories,
- -1);
-
- tracker_service_set_id (service, id);
- tracker_service_set_name (service, name);
- tracker_service_set_parent (service, parent);
- tracker_service_set_enabled (service, enabled);
- tracker_service_set_embedded (service, embedded);
- tracker_service_set_has_metadata (service, has_metadata);
- tracker_service_set_has_full_text (service, has_fulltext);
- tracker_service_set_has_thumbs (service, has_thumbs);
- tracker_service_set_content_metadata (service, content_metadata);
-
- tracker_service_set_show_service_files (service, show_service_files);
- tracker_service_set_show_service_directories (service, show_service_directories);
-
- for (i = 12; i < 23; i++) {
- gchar *metadata;
-
- tracker_db_result_set_get (result_set, i, &metadata, -1);
-
- if (metadata) {
- new_list = g_slist_prepend (new_list, metadata);
- }
- }
-
- /* FIXME: is this necessary? */
-#if 0
- /* Hack to prevent db change late in the cycle, check the
- * service name matches "Applications", then add some voodoo.
- */
- if (strcmp (name, "Applications") == 0) {
- /* These strings should be definitions at the top of
- * this file somewhere really.
- */
- new_list = g_slist_prepend (new_list, g_strdup ("App:DisplayName"));
- new_list = g_slist_prepend (new_list, g_strdup ("App:Exec"));
- new_list = g_slist_prepend (new_list, g_strdup ("App:Icon"));
- }
-#endif
-
- new_list = g_slist_reverse (new_list);
-
- tracker_service_set_key_metadata (service, new_list);
- g_slist_foreach (new_list, (GFunc) g_free, NULL);
- g_slist_free (new_list);
-
- return service;
-}
-
static GSList *
db_mime_query (TrackerDBInterface *iface,
const gchar *stored_proc,
@@ -1612,22 +1546,22 @@
/* Get static xesam metadata info */
result_set = tracker_db_interface_execute_procedure (iface,
NULL,
- "GetXesamMetadataTypes",
+ "GetXesamMetaDataTypes",
NULL);
if (result_set) {
gboolean valid = TRUE;
while (valid) {
- TrackerXesamField *def;
+ TrackerField *def;
- def = db_row_to_xesam_field_def (result_set);
+ def = db_row_to_field_def (result_set);
g_message ("Loading xesam metadata def:'%s' with type:%d",
- tracker_xesam_field_get_name (def),
- tracker_xesam_field_get_data_type (def));
+ tracker_field_get_name (def),
+ tracker_field_get_data_type (def));
- tracker_xesam_ontology_add_field (def);
+ tracker_ontology_add_field (def);
valid = tracker_db_result_set_iter_next (result_set);
}
@@ -1638,7 +1572,7 @@
/* Get static xesam service info */
result_set = tracker_db_interface_execute_procedure (iface,
NULL,
- "GetAllServices",
+ "GetXesamServiceTypes",
NULL);
if (result_set) {
@@ -1667,9 +1601,9 @@
id,
g_slist_length (mimes));
- tracker_xesam_ontology_add_service_type (service,
- mimes,
- mime_prefixes);
+ tracker_ontology_add_service_type (service,
+ mimes,
+ mime_prefixes);
g_slist_free (mimes);
g_slist_free (mime_prefixes);
@@ -2011,7 +1945,7 @@
valid = TRUE;
result_set = db_exec_proc (iface,
- "GetXesamServiceTypes",
+ "GetXesamServiceParents",
NULL);
if (result_set) {
@@ -2046,7 +1980,7 @@
valid = TRUE;
result_set = db_exec_proc (iface,
- "GetXesamMetaDataTypes",
+ "GetXesamMetaDataParents",
NULL);
if (result_set) {
Modified: branches/xesam-support/src/trackerd/tracker-crawler.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-crawler.c (original)
+++ branches/xesam-support/src/trackerd/tracker-crawler.c Thu Jun 12 17:46:00 2008
@@ -893,6 +893,7 @@
const gchar *home;
home = g_get_home_dir ();
+ home = "/foo/bar";
roots = g_slist_prepend (roots, g_strdup (home));
g_message ("No locations are configured to crawl, "
Modified: branches/xesam-support/src/trackerd/tracker-main.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-main.c (original)
+++ branches/xesam-support/src/trackerd/tracker-main.c Thu Jun 12 17:46:00 2008
@@ -826,7 +826,6 @@
tracker_nfs_lock_init (tracker_config_get_nfs_locking (tracker->config));
tracker_ontology_init ();
- tracker_xesam_ontology_init ();
tracker_db_init ();
tracker_db_manager_init (TRUE, data_dir, user_data_dir, sys_tmp_dir); /* Using TRUE=broken */
tracker_xesam_manager_init ();
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 Jun 12 17:46:00 2008
@@ -24,8 +24,6 @@
#include <dbus/dbus-glib-bindings.h>
#include "tracker-xesam-live-search.h"
-#include <libtracker-common/tracker-xesam-field.h>
-#include <libtracker-common/tracker-xesam-ontology.h>
#include "tracker-xesam.h"
#include "tracker-xesam-manager.h"
#include "tracker-xesam-query.h"
@@ -535,7 +533,6 @@
}
}
-
typedef struct {
gint key;
gpointer value;
@@ -629,13 +626,14 @@
field_count = g_strv_length (fields);
while (valid) {
+
guint column;
GPtrArray *row;
GValue value_in = {0, };
gboolean insert = FALSE;
gint key;
- TrackerXesamFieldType data_type;
- TrackerXesamField *field_def;
+ TrackerFieldType data_type;
+ TrackerField *field_def;
_tracker_db_result_set_get_value (result_set, 0, &value_in);
@@ -682,104 +680,78 @@
column,
&cur_value);
- field_def = tracker_xesam_ontology_get_field_def (fields[column-1]);
- data_type = tracker_xesam_field_get_data_type (field_def);
+ field_def = tracker_ontology_get_field_def (fields[column-1]);
+ data_type = tracker_field_get_data_type (field_def);
+
+ if (tracker_field_get_multiple_values (field_def)) {
- switch (data_type) {
- case TRACKER_XESAM_FIELD_TYPE_LIST_OF_URLS:
- case TRACKER_XESAM_FIELD_TYPE_LIST_OF_URIS:
- case TRACKER_XESAM_FIELD_TYPE_LIST_OF_DATETIMES:
- case TRACKER_XESAM_FIELD_TYPE_LIST_OF_STRINGS: {
+ switch (data_type) {
+ case TRACKER_FIELD_TYPE_DATE:
+ case TRACKER_FIELD_TYPE_STRING: {
GValue *variant;
GPtrArray *my_array;
-
+
if (row->len <= (unsigned int) column) {
variant = g_new0 (GValue, 1);
g_value_init (variant,
dbus_g_type_get_collection ("GPtrArray",
- G_TYPE_STRING));
-
+ G_TYPE_STRING));
+
my_array = g_ptr_array_new ();
g_value_set_boxed_take_ownership (variant,
my_array);
-
+
g_ptr_array_add (row, variant);
-
+
} else {
- variant = g_ptr_array_index (row, column);
+ variant = g_ptr_array_index (row, column-1);
my_array = g_value_get_boxed (variant);
}
-
+
g_ptr_array_add (my_array,
- g_value_dup_string (&cur_value));
-
- }
- break;
-
- case TRACKER_XESAM_FIELD_TYPE_LIST_OF_FLOATS: {
- GValue *variant;
- GArray *my_array;
- gfloat float_val;
-
- if (row->len <= (unsigned int) column) {
- variant = g_new0 (GValue, 1);
- g_value_init (variant,
- dbus_g_type_get_collection ("GArray",
- G_TYPE_FLOAT));
-
- my_array = g_array_new (FALSE,
- TRUE,
- sizeof (gfloat));
- g_value_set_boxed_take_ownership (variant, my_array);
-
- g_ptr_array_add (row, variant);
- } else {
- variant = g_ptr_array_index (row, column);
- my_array = g_value_get_boxed (variant);
- }
-
- float_val = g_value_get_float (&cur_value);
- g_array_append_val (my_array, float_val);
+ g_value_dup_string (&cur_value));
+
+ break;
}
- break;
- case TRACKER_XESAM_FIELD_TYPE_LIST_OF_INTEGERS: {
+ case TRACKER_FIELD_TYPE_INTEGER: {
GValue *variant;
GArray *my_array;
gint int_val;
-
+
if (row->len <= (unsigned int) column) {
variant = g_new0 (GValue, 1);
g_value_init (variant,
dbus_g_type_get_collection ("GArray",
- G_TYPE_INT));
-
+ G_TYPE_INT));
+
my_array = g_array_new (FALSE,
TRUE,
- sizeof (gint));
+ sizeof (gfloat));
g_value_set_boxed_take_ownership (variant, my_array);
-
+
g_ptr_array_add (row, variant);
} else {
variant = g_ptr_array_index (row, column);
my_array = g_value_get_boxed (variant);
}
-
+
int_val = g_value_get_int (&cur_value);
- g_array_append_val (my_array, int_val);
- }
- break;
+ g_array_append_val (my_array, int_val);
- case TRACKER_XESAM_FIELD_TYPE_LIST_OF_BOOLEANS: {
- GValue *variant;
- GArray *my_array;
- gboolean bool_val;
+ break;
+ }
+ case TRACKER_FIELD_TYPE_DOUBLE: {
+ GValue *variant;
+ GArray *my_array;
+ gfloat float_val;
+
if (row->len <= (unsigned int) column) {
variant = g_new0 (GValue, 1);
g_value_init (variant,
dbus_g_type_get_collection ("GArray",
- G_TYPE_BOOLEAN));
+ G_TYPE_FLOAT));
my_array = g_array_new (FALSE,
TRUE,
@@ -792,39 +764,35 @@
my_array = g_value_get_boxed (variant);
}
- bool_val = g_value_get_boolean (&cur_value);
- g_array_append_val (my_array, bool_val);
+ float_val = g_value_get_float (&cur_value);
+ g_array_append_val (my_array, float_val);
}
break;
-
- case TRACKER_XESAM_FIELD_TYPE_STRING:
- case TRACKER_XESAM_FIELD_TYPE_FLOAT:
- case TRACKER_XESAM_FIELD_TYPE_INTEGER:
- case TRACKER_XESAM_FIELD_TYPE_BOOLEAN:
- case TRACKER_XESAM_FIELD_TYPE_DATE:
- default: {
- if (insert) {
- GValue *value = g_new0 (GValue, 1);
-
- g_value_init (value,
- G_VALUE_TYPE (&cur_value));
-
- g_value_copy (&cur_value, value);
- g_ptr_array_add (row, value);
- }
-
- /* Else it's a redundant cell (a previous
- * loop-cycle has added this item to the
- * final to-return result already, using
- * the top-row). */
+ default:
+ g_warning ("Unknown type in get_hits: %d", data_type);
}
- break;
+ } else {
+ if (insert) {
+ GValue *value = g_new0 (GValue, 1);
+
+ g_value_init (value,
+ G_VALUE_TYPE (&cur_value));
+
+ g_value_copy (&cur_value, value);
+ g_ptr_array_add (row, value);
+ }
+
+ /* Else it's a redundant cell (a previous
+ * loop-cycle has added this item to the
+ * final to-return result already, using
+ * the top-row). */
+
}
g_value_unset (&cur_value);
}
-
-
+
+
if (insert) {
rows_insert (rows, key, row);
}
@@ -864,8 +832,6 @@
g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
g_return_if_fail (hits != NULL);
- g_debug ("Get_hits called");
-
priv = self->priv;
if (!priv->active)
@@ -950,8 +916,6 @@
iface = tracker_db_manager_get_db_interface (TRACKER_DB_XESAM);
- g_debug ("live_search_get_range_hits");
-
tracker_xesam_session_get_property (session,
"hit.fields",
&value,
@@ -1147,8 +1111,6 @@
TrackerDBInterface *iface;
GArray *hits;
- g_debug ("* * * Activate");
-
iface = tracker_db_manager_get_db_interface (TRACKER_DB_XESAM);
tracker_db_live_search_start (iface,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]