tracker r1618 - branches/xesam-support/src/trackerd
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1618 - branches/xesam-support/src/trackerd
- Date: Tue, 10 Jun 2008 09:46:14 +0000 (UTC)
Author: pvanhoof
Date: Tue Jun 10 09:46:14 2008
New Revision: 1618
URL: http://svn.gnome.org/viewvc/tracker?rev=1618&view=rev
Log:
Style fixes
Modified:
branches/xesam-support/src/trackerd/tracker-db.c
Modified: branches/xesam-support/src/trackerd/tracker-db.c
==============================================================================
--- branches/xesam-support/src/trackerd/tracker-db.c (original)
+++ branches/xesam-support/src/trackerd/tracker-db.c Tue Jun 10 09:46:14 2008
@@ -1955,9 +1955,9 @@
if (!def) {
return;
}
-
+
if (!tracker_field_get_embedded (def) &&
- tracker_ontology_service_type_has_embedded (service)) {
+ tracker_ontology_service_type_has_embedded (service)) {
backup_delete_non_embedded_metadata (iface,
id,
tracker_field_get_id (def));
@@ -1987,7 +1987,7 @@
"update Services set KeyMetadata%d = NULL where id = %s",
key_field, id);
}
-
+
/* Perform deletion */
switch (tracker_field_get_data_type (def)) {
case TRACKER_FIELD_TYPE_INDEX:
@@ -2034,7 +2034,7 @@
break;
}
-
+
/* Update fulltext index differentially with old values and NULL */
if (update_index && old_value) {
update_metadata_index (id, service, def, old_value, " ");
@@ -2212,7 +2212,7 @@
query_joins, /* B2 */
where_query ? where_query : "WHERE", /* B3 */
where_query ? "AND " : ""); /* B3 */
-
+
return result_set;
}
@@ -2249,7 +2249,9 @@
return result_set;
}
-// FIXME This function should be moved with other help-functions somewhere. It is used by xesam_live_search parsing.
+/* FIXME This function should be moved with other help-functions somewhere.
+ * It is used by xesam_live_search parsing. */
+
static GList *
add_metadata_field (TrackerDBInterface *iface,
GSList **fields,
@@ -2268,7 +2270,7 @@
valid = TRUE;
/* Do the xesam mapping */
-
+
g_debug ("add metadata field");
result_set = tracker_db_exec_proc (iface, "GetXesamMetaDataMappings",xesam_name, NULL);
@@ -2279,7 +2281,7 @@
while (valid) {
gchar *field_name;
-
+
tracker_db_result_set_get (result_set, 0, &field_name, -1);
/* Check if field is already in list */
@@ -2291,13 +2293,13 @@
if (!this_field_name) {
continue;
}
-
+
if (strcasecmp (this_field_name, field_name) != 0) {
continue;
}
- field_exists = TRUE;
-
+ field_exists = TRUE;
+
break;
}
@@ -2330,23 +2332,24 @@
GStrv field_names)
{
TrackerDBResultSet *result;
- GSList *fields = NULL;
- GSList *l = NULL;
-
- GString *sql_select;
- GString *sql_join;
- int i=0;
+ GSList *fields = NULL;
+ GSList *l = NULL;
+ GString *sql_select;
+ GString *sql_join;
+ gint i = 0;
g_return_val_if_fail (TRACKER_IS_DB_INTERFACE (iface), NULL);
g_return_val_if_fail (search_id != NULL, NULL);
- //g_return_val_if_fail (fields != NULL, NULL);
sql_select = g_string_new ("X.ServiceID, ");
sql_join = g_string_new ("");
while (field_names[i]) {
GList *field_data_list = NULL;
- field_data_list = add_metadata_field (iface, &fields, field_names[i]);
+
+ field_data_list = add_metadata_field (iface,
+ &fields,
+ field_names[i]);
if (!field_data_list) {
g_warning ("Asking for a non-mapped xesam field: %s", field_names[i]);
@@ -2366,7 +2369,7 @@
}
for (l = fields; l; l = l->next) {
- gchar *field_name;
+ gchar *field_name;
field_name = tracker_db_metadata_get_related_names (iface,
tracker_field_data_get_field_name (l->data));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]