[tracker/libtracker-common-cleanup] libtracker-common: Moved tracker-ontologies.h into libtracker-sparql
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-common-cleanup] libtracker-common: Moved tracker-ontologies.h into libtracker-sparql
- Date: Mon, 13 Oct 2014 09:28:13 +0000 (UTC)
commit 07c02a34bccb65d68e33b0d96115300b2540a6cd
Author: Martyn Russell <martyn lanedo com>
Date: Mon Oct 13 10:25:15 2014 +0100
libtracker-common: Moved tracker-ontologies.h into libtracker-sparql
The Namespace has been cleaned up too, all APIs now start with:
TRACKER_PREFIX_
or
TRACKER_DATASOURCE_
The well known definition for the TrackerMinerFS graph has also been changed
to:
TRACKER_OWN_GRAPH_URN
because it now applies to more than just the TrackerMinerFS, we're using it
in:
tracker-writeback
tracker-miner-apps
tracker-miner-user-guides
...
libtracker-data
It should probably be internal actually.
docs/tools/ontology-graph.c | 33 +++---
src/libtracker-common/Makefile.am | 1 -
src/libtracker-common/tracker-common.h | 1 -
src/libtracker-common/tracker-ontologies.h | 62 ----------
src/libtracker-data/tracker-data-manager.c | 122 +++++++++----------
src/libtracker-data/tracker-data-manager.h | 4 +-
src/libtracker-data/tracker-data-update.c | 37 ++----
src/libtracker-data/tracker-data-update.h | 2 +-
src/libtracker-data/tracker-ontologies.c | 5 +-
src/libtracker-data/tracker-property.c | 14 +-
src/libtracker-miner/Makefile.am | 1 -
src/libtracker-miner/tracker-decorator-fs.c | 8 +-
src/libtracker-miner/tracker-miner-common.h | 25 ----
src/libtracker-miner/tracker-miner-fs.c | 8 +-
src/libtracker-sparql/Makefile.am | 5 +-
src/libtracker-sparql/tracker-ontologies.h | 63 ++++++++++
src/libtracker-sparql/tracker-sparql.h | 1 +
src/miners/apps/tracker-miner-applications.c | 22 ++--
src/miners/fs/tracker-main.c | 10 +--
src/miners/fs/tracker-miner-files.c | 45 +++----
src/miners/fs/tracker-writeback-listener.c | 2 +-
src/miners/user-guides/tracker-miner-user-guides.c | 4 +-
src/tracker-extract/tracker-extract-decorator.c | 13 +-
src/tracker-writeback/tracker-writeback-xmp.c | 48 ++++----
tests/libtracker-fts/tracker-fts-test.c | 7 +-
utils/tracker-sql/tracker-sql.c | 7 +-
26 files changed, 242 insertions(+), 308 deletions(-)
---
diff --git a/docs/tools/ontology-graph.c b/docs/tools/ontology-graph.c
index 0417cef..a9f761b 100644
--- a/docs/tools/ontology-graph.c
+++ b/docs/tools/ontology-graph.c
@@ -23,22 +23,17 @@
#include <libtracker-data/tracker-data.h>
-#define RDF_PREFIX TRACKER_RDF_PREFIX
-#define RDF_PROPERTY RDF_PREFIX "Property"
-#define RDF_TYPE RDF_PREFIX "type"
+#define RDF_PROPERTY TRACKER_PREFIX_RDF "Property"
+#define RDF_TYPE TRACKER_PREFIX_RDF "type"
-#define RDFS_PREFIX TRACKER_RDFS_PREFIX
-#define RDFS_CLASS RDFS_PREFIX "Class"
-#define RDFS_DOMAIN RDFS_PREFIX "domain"
-#define RDFS_RANGE RDFS_PREFIX "range"
-#define RDFS_SUB_CLASS_OF RDFS_PREFIX "subClassOf"
-#define RDFS_SUB_PROPERTY_OF RDFS_PREFIX "subPropertyOf"
+#define RDFS_CLASS TRACKER_PREFIX_RDFS "Class"
+#define RDFS_DOMAIN TRACKER_PREFIX_RDFS "domain"
+#define RDFS_RANGE TRACKER_PREFIX_RDFS "range"
+#define RDFS_SUB_CLASS_OF TRACKER_PREFIX_RDFS "subClassOf"
+#define RDFS_SUB_PROPERTY_OF TRACKER_PREFIX_RDFS "subPropertyOf"
-#define NRL_PREFIX TRACKER_NRL_PREFIX
-#define NRL_INVERSE_FUNCTIONAL_PROPERTY TRACKER_NRL_PREFIX "InverseFunctionalProperty"
-#define NRL_MAX_CARDINALITY NRL_PREFIX "maxCardinality"
-
-#define TRACKER_PREFIX TRACKER_TRACKER_PREFIX
+#define NRL_INVERSE_FUNCTIONAL_PROPERTY TRACKER_PREFIX_NRL "InverseFunctionalProperty"
+#define NRL_MAX_CARDINALITY TRACKER_PREFIX_NRL "maxCardinality"
static gchar *ontology_dir = NULL;
static gchar *output_file = NULL;
@@ -137,7 +132,7 @@ load_ontology_file_from_path (const gchar *ontology_file)
}
tracker_property_set_is_inverse_functional_property (property, TRUE);
- } else if (g_strcmp0 (object, TRACKER_PREFIX "Namespace") == 0) {
+ } else if (g_strcmp0 (object, TRACKER_PREFIX_TRACKER "Namespace") == 0) {
TrackerNamespace *namespace;
if (tracker_ontologies_get_namespace_by_uri (subject) != NULL) {
@@ -228,7 +223,7 @@ load_ontology_file_from_path (const gchar *ontology_file)
if (atoi (object) == 1) {
tracker_property_set_multiple_values (property, FALSE);
}
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "indexed") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "indexed") == 0) {
TrackerProperty *property;
property = tracker_ontologies_get_property_by_uri (subject);
@@ -240,7 +235,7 @@ load_ontology_file_from_path (const gchar *ontology_file)
if (strcmp (object, "true") == 0) {
tracker_property_set_indexed (property, TRUE);
}
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "transient") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "transient") == 0) {
TrackerProperty *property;
property = tracker_ontologies_get_property_by_uri (subject);
@@ -252,7 +247,7 @@ load_ontology_file_from_path (const gchar *ontology_file)
if (g_strcmp0 (object, "true") == 0) {
tracker_property_set_transient (property, TRUE);
}
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "fulltextIndexed") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "fulltextIndexed") == 0) {
TrackerProperty *property;
property = tracker_ontologies_get_property_by_uri (subject);
@@ -264,7 +259,7 @@ load_ontology_file_from_path (const gchar *ontology_file)
if (strcmp (object, "true") == 0) {
tracker_property_set_fulltext_indexed (property, TRUE);
}
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "prefix") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "prefix") == 0) {
TrackerNamespace *namespace;
namespace = tracker_ontologies_get_namespace_by_uri (subject);
diff --git a/src/libtracker-common/Makefile.am b/src/libtracker-common/Makefile.am
index f7e0ddd..a7a4c0c 100644
--- a/src/libtracker-common/Makefile.am
+++ b/src/libtracker-common/Makefile.am
@@ -38,7 +38,6 @@ noinst_HEADERS = \
tracker-common.h \
tracker-date-time.h \
tracker-file-utils.h \
- tracker-ontologies.h \
tracker-sched.h \
tracker-storage.h \
tracker-type-utils.h \
diff --git a/src/libtracker-common/tracker-common.h b/src/libtracker-common/tracker-common.h
index dd3b5ca..a376d41 100644
--- a/src/libtracker-common/tracker-common.h
+++ b/src/libtracker-common/tracker-common.h
@@ -34,7 +34,6 @@
#include "tracker-ioprio.h"
#include "tracker-language.h"
#include "tracker-log.h"
-#include "tracker-ontologies.h"
#include "tracker-os-dependant.h"
#include "tracker-sched.h"
#include "tracker-storage.h"
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 4f452e5..7230f48 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -49,26 +49,19 @@
#include "tracker-sparql-query.h"
#include "tracker-data-query.h"
-#define XSD_PREFIX TRACKER_XSD_PREFIX
-#define RDF_PREFIX TRACKER_RDF_PREFIX
-#define RDF_PROPERTY RDF_PREFIX "Property"
-#define RDF_TYPE RDF_PREFIX "type"
+#define RDF_PROPERTY TRACKER_PREFIX_RDF "Property"
+#define RDF_TYPE TRACKER_PREFIX_RDF "type"
-#define RDFS_PREFIX TRACKER_RDFS_PREFIX
-#define RDFS_CLASS RDFS_PREFIX "Class"
-#define RDFS_DOMAIN RDFS_PREFIX "domain"
-#define RDFS_RANGE RDFS_PREFIX "range"
-#define RDFS_SUB_CLASS_OF RDFS_PREFIX "subClassOf"
-#define RDFS_SUB_PROPERTY_OF RDFS_PREFIX "subPropertyOf"
+#define RDFS_CLASS TRACKER_PREFIX_RDFS "Class"
+#define RDFS_DOMAIN TRACKER_PREFIX_RDFS "domain"
+#define RDFS_RANGE TRACKER_PREFIX_RDFS "range"
+#define RDFS_SUB_CLASS_OF TRACKER_PREFIX_RDFS "subClassOf"
+#define RDFS_SUB_PROPERTY_OF TRACKER_PREFIX_RDFS "subPropertyOf"
-#define NRL_PREFIX TRACKER_NRL_PREFIX
-#define NRL_INVERSE_FUNCTIONAL_PROPERTY TRACKER_NRL_PREFIX "InverseFunctionalProperty"
-#define NRL_MAX_CARDINALITY NRL_PREFIX "maxCardinality"
+#define NRL_INVERSE_FUNCTIONAL_PROPERTY TRACKER_PREFIX_NRL "InverseFunctionalProperty"
+#define NRL_MAX_CARDINALITY TRACKER_PREFIX_NRL "maxCardinality"
-#define NAO_PREFIX TRACKER_NAO_PREFIX
-#define NAO_LAST_MODIFIED NAO_PREFIX "lastModified"
-
-#define TRACKER_PREFIX TRACKER_TRACKER_PREFIX
+#define NAO_LAST_MODIFIED TRACKER_PREFIX_NAO "lastModified"
#define ZLIBBUFSIZ 8192
@@ -96,17 +89,17 @@ static Conversion allowed_cardinality_conversions[] = {
};
static Conversion allowed_range_conversions[] = {
- { XSD_PREFIX "integer", XSD_PREFIX "string" },
- { XSD_PREFIX "integer", XSD_PREFIX "double" },
- { XSD_PREFIX "integer", XSD_PREFIX "boolean" },
+ { TRACKER_PREFIX_XSD "integer", TRACKER_PREFIX_XSD "string" },
+ { TRACKER_PREFIX_XSD "integer", TRACKER_PREFIX_XSD "double" },
+ { TRACKER_PREFIX_XSD "integer", TRACKER_PREFIX_XSD "boolean" },
- { XSD_PREFIX "string", XSD_PREFIX "integer" },
- { XSD_PREFIX "string", XSD_PREFIX "double" },
- { XSD_PREFIX "string", XSD_PREFIX "boolean" },
+ { TRACKER_PREFIX_XSD "string", TRACKER_PREFIX_XSD "integer" },
+ { TRACKER_PREFIX_XSD "string", TRACKER_PREFIX_XSD "double" },
+ { TRACKER_PREFIX_XSD "string", TRACKER_PREFIX_XSD "boolean" },
- { XSD_PREFIX "double", XSD_PREFIX "integer" },
- { XSD_PREFIX "double", XSD_PREFIX "string" },
- { XSD_PREFIX "double", XSD_PREFIX "boolean" },
+ { TRACKER_PREFIX_XSD "double", TRACKER_PREFIX_XSD "integer" },
+ { TRACKER_PREFIX_XSD "double", TRACKER_PREFIX_XSD "string" },
+ { TRACKER_PREFIX_XSD "double", TRACKER_PREFIX_XSD "boolean" },
{ NULL, NULL }
};
@@ -692,7 +685,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
}
tracker_property_set_is_inverse_functional_property (property, TRUE);
- } else if (g_strcmp0 (object, TRACKER_PREFIX "Namespace") == 0) {
+ } else if (g_strcmp0 (object, TRACKER_PREFIX_TRACKER "Namespace") == 0) {
TrackerNamespace *namespace;
if (tracker_ontologies_get_namespace_by_uri (subject) != NULL) {
@@ -707,7 +700,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
tracker_ontologies_add_namespace (namespace);
g_object_unref (namespace);
- } else if (g_strcmp0 (object, TRACKER_PREFIX "Ontology") == 0) {
+ } else if (g_strcmp0 (object, TRACKER_PREFIX_TRACKER "Ontology") == 0) {
TrackerOntology *ontology;
if (tracker_ontologies_get_ontology_by_uri (subject) != NULL) {
@@ -737,7 +730,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
if (is_new != in_update) {
gboolean ignore = FALSE;
/* Detect unsupported ontology change (this needs a journal replay) */
- if (in_update == TRUE && is_new == FALSE && g_strcmp0 (object, RDFS_PREFIX
"Resource") != 0) {
+ if (in_update == TRUE && is_new == FALSE && g_strcmp0 (object, TRACKER_PREFIX_RDFS
"Resource") != 0) {
TrackerClass **super_classes = tracker_class_get_super_classes (class);
gboolean had = FALSE;
@@ -799,7 +792,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
tracker_class_add_super_class (class, super_class);
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "notify") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "notify") == 0) {
TrackerClass *class;
class = tracker_ontologies_get_class_by_uri (subject);
@@ -810,7 +803,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
}
tracker_class_set_notify (class, (strcmp (object, "true") == 0));
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "domainIndex") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "domainIndex") == 0) {
TrackerClass *class;
TrackerProperty *property;
TrackerProperty **properties;
@@ -896,7 +889,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
tracker_property_add_domain_index (property, class);
}
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "writeback") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "writeback") == 0) {
TrackerProperty *property;
property = tracker_ontologies_get_property_by_uri (subject);
@@ -907,7 +900,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
}
tracker_property_set_writeback (property, (strcmp (object, "true") == 0));
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "forceJournal") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "forceJournal") == 0) {
TrackerProperty *property;
property = tracker_ontologies_get_property_by_uri (subject);
@@ -1075,7 +1068,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
tracker_property_set_last_multiple_values (property, TRUE);
}
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "indexed") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "indexed") == 0) {
TrackerProperty *property;
property = tracker_ontologies_get_property_by_uri (subject);
@@ -1085,7 +1078,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
}
tracker_property_set_indexed (property, (strcmp (object, "true") == 0));
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "secondaryIndex") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "secondaryIndex") == 0) {
TrackerProperty *property, *secondary_index;
property = tracker_ontologies_get_property_by_uri (subject);
@@ -1101,7 +1094,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
}
tracker_property_set_secondary_index (property, secondary_index);
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "transient") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "transient") == 0) {
TrackerProperty *property;
gboolean is_new;
@@ -1137,7 +1130,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
if (g_strcmp0 (object, "true") == 0) {
tracker_property_set_transient (property, TRUE);
}
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "fulltextIndexed") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "fulltextIndexed") == 0) {
TrackerProperty *property;
gboolean is_new;
@@ -1170,7 +1163,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
if (strcmp (object, "true") == 0) {
tracker_property_set_fulltext_indexed (property, TRUE);
}
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "defaultValue") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "defaultValue") == 0) {
TrackerProperty *property;
property = tracker_ontologies_get_property_by_uri (subject);
@@ -1180,7 +1173,7 @@ tracker_data_ontology_load_statement (const gchar *ontology_path,
}
tracker_property_set_default_value (property, object);
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "prefix") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "prefix") == 0) {
TrackerNamespace *namespace;
namespace = tracker_ontologies_get_namespace_by_uri (subject);
@@ -1286,7 +1279,7 @@ check_for_deleted_domain_index (TrackerClass *class)
tracker_class_del_domain_index (class, prop);
tracker_data_delete_statement (NULL, tracker_class_get_uri (class),
- TRACKER_PREFIX "domainIndex",
+ TRACKER_PREFIX_TRACKER "domainIndex",
tracker_property_get_uri (prop),
&error);
@@ -1325,7 +1318,7 @@ check_for_deleted_super_classes (TrackerClass *class,
gboolean found = FALSE;
TrackerClass **super_classes;
- if (g_strcmp0 (tracker_class_get_uri (last_super_class), RDFS_PREFIX "Resource") == 0) {
+ if (g_strcmp0 (tracker_class_get_uri (last_super_class), TRACKER_PREFIX_RDFS "Resource") ==
0) {
last_super_classes++;
continue;
}
@@ -1390,11 +1383,12 @@ check_for_max_cardinality_change (TrackerProperty *property,
const gchar *subject = tracker_property_get_uri (property);
if (update_property_value (ontology_path,
- "nrl:maxCardinality",
- subject,
- NRL_PREFIX "maxCardinality",
- NULL, allowed_cardinality_conversions,
- NULL, property, &n_error)) {
+ "nrl:maxCardinality",
+ subject,
+ TRACKER_PREFIX_NRL "maxCardinality",
+ NULL, allowed_cardinality_conversions,
+ NULL, property,
+ &n_error)) {
TrackerClass *class;
class = tracker_property_get_domain(property);
@@ -1459,7 +1453,7 @@ check_for_deleted_super_properties (TrackerProperty *property,
tracker_property_del_super_property (property, prop_to_remove);
tracker_data_delete_statement (NULL, subject,
- RDFS_PREFIX "subPropertyOf",
+ TRACKER_PREFIX_RDFS "subPropertyOf",
object, &n_error);
if (!n_error) {
@@ -1545,14 +1539,14 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
update_property_value (ontology_path,
"tracker:notify",
subject,
- TRACKER_PREFIX "notify",
+ TRACKER_PREFIX_TRACKER "notify",
"true", allowed_boolean_conversions,
class, NULL, &n_error);
} else {
update_property_value (ontology_path,
"tracker:notify",
subject,
- TRACKER_PREFIX "notify",
+ TRACKER_PREFIX_TRACKER "notify",
"false", allowed_boolean_conversions,
class, NULL, &n_error);
}
@@ -1612,14 +1606,14 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
update_property_value (ontology_path,
"tracker:writeback",
subject,
- TRACKER_PREFIX "writeback",
+ TRACKER_PREFIX_TRACKER "writeback",
"true", allowed_boolean_conversions,
NULL, property, &n_error);
} else {
update_property_value (ontology_path,
"tracker:writeback",
subject,
- TRACKER_PREFIX "writeback",
+ TRACKER_PREFIX_TRACKER "writeback",
"false", allowed_boolean_conversions,
NULL, property, &n_error);
}
@@ -1633,7 +1627,7 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
if (update_property_value (ontology_path,
"tracker:indexed",
subject,
- TRACKER_PREFIX "indexed",
+ TRACKER_PREFIX_TRACKER "indexed",
"true", allowed_boolean_conversions,
NULL, property, &n_error)) {
fix_indexed (property, TRUE, &n_error);
@@ -1643,7 +1637,7 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
if (update_property_value (ontology_path,
"tracker:indexed",
subject,
- TRACKER_PREFIX "indexed",
+ TRACKER_PREFIX_TRACKER "indexed",
"false", allowed_boolean_conversions,
NULL, property, &n_error)) {
fix_indexed (property, TRUE, &n_error);
@@ -1662,7 +1656,7 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
if (update_property_value (ontology_path,
"tracker:secondaryIndex",
subject,
- TRACKER_PREFIX "secondaryIndex",
+ TRACKER_PREFIX_TRACKER "secondaryIndex",
tracker_property_get_uri (secondary_index), NULL,
NULL, property, &n_error)) {
if (!indexed_set) {
@@ -1673,7 +1667,7 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
if (update_property_value (ontology_path,
"tracker:secondaryIndex",
subject,
- TRACKER_PREFIX "secondaryIndex",
+ TRACKER_PREFIX_TRACKER "secondaryIndex",
NULL, NULL,
NULL, property, &n_error)) {
if (!indexed_set) {
@@ -1688,7 +1682,7 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
}
if (update_property_value (ontology_path,
- "rdfs:range", subject, RDFS_PREFIX "range",
+ "rdfs:range", subject, TRACKER_PREFIX_RDFS "range",
tracker_class_get_uri (tracker_property_get_range
(property)),
allowed_range_conversions,
NULL, property, &n_error)) {
@@ -1705,7 +1699,7 @@ tracker_data_ontology_process_changes_post_db (GPtrArray *seen_classes,
}
if (update_property_value (ontology_path,
- "tracker:defaultValue", subject, TRACKER_PREFIX
"defaultValue",
+ "tracker:defaultValue", subject, TRACKER_PREFIX_TRACKER
"defaultValue",
tracker_property_get_default_value (property),
NULL, NULL, property, &n_error)) {
TrackerClass *class;
@@ -1820,7 +1814,7 @@ get_ontology_from_path (const gchar *ontology_path)
object = tracker_turtle_reader_get_object (reader);
if (g_strcmp0 (predicate, RDF_TYPE) == 0) {
- if (g_strcmp0 (object, TRACKER_PREFIX "Ontology") == 0) {
+ if (g_strcmp0 (object, TRACKER_PREFIX_TRACKER "Ontology") == 0) {
TrackerOntology *ontology;
ontology = tracker_ontology_new ();
@@ -1923,7 +1917,7 @@ tracker_data_ontology_process_statement (const gchar *graph,
if (prop && tracker_property_get_is_new (prop) != in_update) {
return;
}
- } else if (g_strcmp0 (object, TRACKER_PREFIX "Namespace") == 0) {
+ } else if (g_strcmp0 (object, TRACKER_PREFIX_TRACKER "Namespace") == 0) {
TrackerNamespace *namespace;
namespace = tracker_ontologies_get_namespace_by_uri (subject);
@@ -1931,7 +1925,7 @@ tracker_data_ontology_process_statement (const gchar *graph,
if (namespace && tracker_namespace_get_is_new (namespace) != in_update) {
return;
}
- } else if (g_strcmp0 (object, TRACKER_PREFIX "Ontology") == 0) {
+ } else if (g_strcmp0 (object, TRACKER_PREFIX_TRACKER "Ontology") == 0) {
TrackerOntology *ontology;
ontology = tracker_ontologies_get_ontology_by_uri (subject);
@@ -1952,9 +1946,9 @@ tracker_data_ontology_process_statement (const gchar *graph,
g_strcmp0 (predicate, RDFS_DOMAIN) == 0 ||
g_strcmp0 (predicate, RDFS_RANGE) == 0 ||
/* g_strcmp0 (predicate, NRL_MAX_CARDINALITY) == 0 || */
- g_strcmp0 (predicate, TRACKER_PREFIX "indexed") == 0 ||
- g_strcmp0 (predicate, TRACKER_PREFIX "transient") == 0 ||
- g_strcmp0 (predicate, TRACKER_PREFIX "fulltextIndexed") == 0) {
+ g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "indexed") == 0 ||
+ g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "transient") == 0 ||
+ g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "fulltextIndexed") == 0) {
TrackerProperty *prop;
prop = tracker_ontologies_get_property_by_uri (subject);
@@ -1962,7 +1956,7 @@ tracker_data_ontology_process_statement (const gchar *graph,
if (prop && tracker_property_get_is_new (prop) != in_update) {
return;
}
- } else if (g_strcmp0 (predicate, TRACKER_PREFIX "prefix") == 0) {
+ } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "prefix") == 0) {
TrackerNamespace *namespace;
namespace = tracker_ontologies_get_namespace_by_uri (subject);
diff --git a/src/libtracker-data/tracker-data-manager.h b/src/libtracker-data/tracker-data-manager.h
index bd82feb..4ffecca 100644
--- a/src/libtracker-data/tracker-data-manager.h
+++ b/src/libtracker-data/tracker-data-manager.h
@@ -25,8 +25,8 @@
#include <glib.h>
-#include <libtracker-common/tracker-language.h>
-#include <libtracker-common/tracker-ontologies.h>
+#include <libtracker-common/tracker-common.h>
+#include <libtracker-sparql/tracker-sparql.h>
#include <libtracker-data/tracker-data-update.h>
#include <libtracker-data/tracker-db-interface.h>
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index ac5309d..3057bcb 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -25,12 +25,8 @@
#include <math.h>
#include <time.h>
-#include <libtracker-common/tracker-date-time.h>
-#include <libtracker-common/tracker-file-utils.h>
-#include <libtracker-common/tracker-ontologies.h>
-#include <libtracker-common/tracker-utils.h>
-
-#include <libtracker-miner/tracker-miner-common.h>
+#include <libtracker-common/tracker-common.h>
+#include <libtracker-sparql/tracker-sparql.h>
#include "tracker-class.h"
#include "tracker-data-manager.h"
@@ -43,15 +39,6 @@
#include "tracker-property.h"
#include "tracker-sparql-query.h"
-#define RDF_PREFIX TRACKER_RDF_PREFIX
-#define RDFS_PREFIX TRACKER_RDFS_PREFIX
-#define TRACKER_PREFIX TRACKER_TRACKER_PREFIX
-#define NAO_PREFIX TRACKER_NAO_PREFIX
-#define NAO_LAST_MODIFIED NAO_PREFIX "lastModified"
-#define RDF_PREFIX TRACKER_RDF_PREFIX
-#define RDF_PROPERTY RDF_PREFIX "Property"
-#define RDF_TYPE RDF_PREFIX "type"
-
typedef struct _TrackerDataUpdateBuffer TrackerDataUpdateBuffer;
typedef struct _TrackerDataUpdateBufferResource TrackerDataUpdateBufferResource;
typedef struct _TrackerDataUpdateBufferPredicate TrackerDataUpdateBufferPredicate;
@@ -1811,11 +1798,11 @@ delete_first_object (TrackerProperty *field,
#ifndef DISABLE_JOURNAL
if (!in_journal_replay && change && !tracker_property_get_transient (field)) {
if (!tracker_property_get_force_journal (field) &&
- g_strcmp0 (graph, TRACKER_MINER_FS_GRAPH_URN) == 0) {
+ g_strcmp0 (graph, TRACKER_OWN_GRAPH_URN) == 0) {
/* do not journal this statement extracted from filesystem */
TrackerProperty *damaged;
- damaged = tracker_ontologies_get_property_by_uri (TRACKER_TRACKER_PREFIX
"damaged");
+ damaged = tracker_ontologies_get_property_by_uri (TRACKER_PREFIX_TRACKER
"damaged");
tracker_db_journal_append_insert_statement (graph_id,
resource_buffer->id,
@@ -2082,7 +2069,7 @@ cache_delete_resource_type_full (TrackerClass *class,
if (!single_type) {
if (!HAVE_TRACKER_FTS &&
- strcmp (tracker_class_get_uri (class), RDFS_PREFIX "Resource") == 0 &&
+ strcmp (tracker_class_get_uri (class), TRACKER_PREFIX_RDFS "Resource") == 0 &&
g_hash_table_size (resource_buffer->tables) == 0) {
/* skip subclass query when deleting whole resource
to improve performance */
@@ -2369,7 +2356,7 @@ tracker_data_delete_statement (const gchar *graph,
resource_buffer_switch (graph, 0, subject, subject_id);
- if (object && g_strcmp0 (predicate, RDF_PREFIX "type") == 0) {
+ if (object && g_strcmp0 (predicate, TRACKER_PREFIX_RDF "type") == 0) {
class = tracker_ontologies_get_class_by_uri (object);
if (class != NULL) {
has_persistent = TRUE;
@@ -2423,11 +2410,11 @@ tracker_data_delete_statement (const gchar *graph,
#ifndef DISABLE_JOURNAL
if (!tracker_property_get_force_journal (field) &&
- g_strcmp0 (graph, TRACKER_MINER_FS_GRAPH_URN) == 0) {
+ g_strcmp0 (graph, TRACKER_OWN_GRAPH_URN) == 0) {
/* do not journal this statement extracted from filesystem */
TrackerProperty *damaged;
- damaged = tracker_ontologies_get_property_by_uri
(TRACKER_TRACKER_PREFIX "damaged");
+ damaged = tracker_ontologies_get_property_by_uri
(TRACKER_PREFIX_TRACKER "damaged");
tracker_db_journal_append_insert_statement (graph_id,
resource_buffer->id,
@@ -2854,11 +2841,11 @@ tracker_data_insert_statement_with_string (const gchar *graph,
pred_id = (pred_id != 0) ? pred_id : tracker_data_query_resource_id (predicate);
}
if (!tracker_property_get_force_journal (property) &&
- g_strcmp0 (graph, TRACKER_MINER_FS_GRAPH_URN) == 0) {
+ g_strcmp0 (graph, TRACKER_OWN_GRAPH_URN) == 0) {
/* do not journal this statement extracted from filesystem */
TrackerProperty *damaged;
- damaged = tracker_ontologies_get_property_by_uri (TRACKER_TRACKER_PREFIX "damaged");
+ damaged = tracker_ontologies_get_property_by_uri (TRACKER_PREFIX_TRACKER "damaged");
tracker_db_journal_append_insert_statement (graph_id,
resource_buffer->id,
tracker_property_get_id (damaged),
@@ -3199,11 +3186,11 @@ tracker_data_update_statement_with_string (const gchar *graph,
pred_id = (pred_id != 0) ? pred_id : tracker_data_query_resource_id (predicate);
}
if (!tracker_property_get_force_journal (property) &&
- g_strcmp0 (graph, TRACKER_MINER_FS_GRAPH_URN) == 0) {
+ g_strcmp0 (graph, TRACKER_OWN_GRAPH_URN) == 0) {
/* do not journal this statement extracted from filesystem */
TrackerProperty *damaged;
- damaged = tracker_ontologies_get_property_by_uri (TRACKER_TRACKER_PREFIX "damaged");
+ damaged = tracker_ontologies_get_property_by_uri (TRACKER_PREFIX_TRACKER "damaged");
tracker_db_journal_append_update_statement (graph_id,
resource_buffer->id,
tracker_property_get_id (damaged),
diff --git a/src/libtracker-data/tracker-data-update.h b/src/libtracker-data/tracker-data-update.h
index 9921333..5908b21 100644
--- a/src/libtracker-data/tracker-data-update.h
+++ b/src/libtracker-data/tracker-data-update.h
@@ -24,7 +24,7 @@
#include <glib.h>
#include <gio/gio.h>
-#include <libtracker-common/tracker-ontologies.h>
+#include <libtracker-sparql/tracker-sparql.h>
#include "tracker-db-interface.h"
diff --git a/src/libtracker-data/tracker-ontologies.c b/src/libtracker-data/tracker-ontologies.c
index b581372..118e901 100644
--- a/src/libtracker-data/tracker-ontologies.c
+++ b/src/libtracker-data/tracker-ontologies.c
@@ -27,7 +27,8 @@
#include <gvdb/gvdb-builder.h>
#include <gvdb/gvdb-reader.h>
-#include <libtracker-common/tracker-ontologies.h>
+
+#include <libtracker-sparql/tracker-sparql.h>
#include "tracker-ontologies.h"
@@ -330,7 +331,7 @@ tracker_ontologies_add_property (TrackerProperty *field)
uri = tracker_property_get_uri (field);
- if (g_strcmp0 (uri, TRACKER_RDF_PREFIX "type") == 0) {
+ if (g_strcmp0 (uri, TRACKER_PREFIX_RDF "type") == 0) {
if (rdf_type) {
g_object_unref (rdf_type);
}
diff --git a/src/libtracker-data/tracker-property.c b/src/libtracker-data/tracker-property.c
index f9b05a0..1d19ee2 100644
--- a/src/libtracker-data/tracker-property.c
+++ b/src/libtracker-data/tracker-property.c
@@ -24,18 +24,18 @@
#include <glib.h>
-#include <libtracker-common/tracker-ontologies.h>
+#include <libtracker-sparql/tracker-sparql.h>
#include "tracker-namespace.h"
#include "tracker-ontologies.h"
#include "tracker-property.h"
-#define XSD_BOOLEAN TRACKER_XSD_PREFIX "boolean"
-#define XSD_DATE TRACKER_XSD_PREFIX "date"
-#define XSD_DATETIME TRACKER_XSD_PREFIX "dateTime"
-#define XSD_DOUBLE TRACKER_XSD_PREFIX "double"
-#define XSD_INTEGER TRACKER_XSD_PREFIX "integer"
-#define XSD_STRING TRACKER_XSD_PREFIX "string"
+#define XSD_BOOLEAN TRACKER_PREFIX_XSD "boolean"
+#define XSD_DATE TRACKER_PREFIX_XSD "date"
+#define XSD_DATETIME TRACKER_PREFIX_XSD "dateTime"
+#define XSD_DOUBLE TRACKER_PREFIX_XSD "double"
+#define XSD_INTEGER TRACKER_PREFIX_XSD "integer"
+#define XSD_STRING TRACKER_PREFIX_XSD "string"
#define GET_PRIV(obj) (((TrackerProperty*) obj)->priv)
#define TRACKER_PROPERTY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_PROPERTY,
TrackerPropertyPrivate))
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index d9c7c8d..5df74a3 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -94,7 +94,6 @@ libtracker_minerinclude_HEADERS = \
tracker-enumerator.h \
tracker-indexing-tree.h \
tracker-miner.h \
- tracker-miner-common.h \
tracker-miner-enums.h \
tracker-miner-enum-types.h \
tracker-miner-object.h \
diff --git a/src/libtracker-miner/tracker-decorator-fs.c b/src/libtracker-miner/tracker-decorator-fs.c
index 69d16bc..3e18822 100644
--- a/src/libtracker-miner/tracker-decorator-fs.c
+++ b/src/libtracker-miner/tracker-decorator-fs.c
@@ -20,8 +20,8 @@
#include <glib.h>
-#include <libtracker-common/tracker-ontologies.h>
-#include <libtracker-common/tracker-storage.h>
+#include <libtracker-common/tracker-common.h>
+#include <libtracker-sparql/tracker-sparql.h>
#include "tracker-decorator-fs.h"
#include "tracker-decorator-internal.h"
@@ -178,7 +178,7 @@ mount_point_added_cb (TrackerStorage *storage,
{
gchar *urn;
- urn = g_strdup_printf (TRACKER_DATASOURCE_URN_PREFIX "%s", uuid);
+ urn = g_strdup_printf (TRACKER_PREFIX_DATASOURCE_URN "%s", uuid);
check_files (user_data, urn, TRUE, process_files_cb);
g_free (urn);
}
@@ -191,7 +191,7 @@ mount_point_removed_cb (TrackerStorage *storage,
{
gchar *urn;
- urn = g_strdup_printf (TRACKER_DATASOURCE_URN_PREFIX "%s", uuid);
+ urn = g_strdup_printf (TRACKER_PREFIX_DATASOURCE_URN "%s", uuid);
check_files (user_data, urn, FALSE, remove_files_cb);
g_free (urn);
}
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 847a556..d1f93ca 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1398,8 +1398,8 @@ item_add_or_update_continue (TrackerMinerFS *fs,
" <%s> nie:url ?o"
"}"
"%s",
- TRACKER_MINER_FS_GRAPH_URN, ctxt->urn,
- TRACKER_MINER_FS_GRAPH_URN, ctxt->urn,
+ TRACKER_OWN_GRAPH_URN, ctxt->urn,
+ TRACKER_OWN_GRAPH_URN, ctxt->urn,
ctxt->urn, ctxt->urn,
tracker_sparql_builder_get_result
(ctxt->builder));
@@ -1732,8 +1732,8 @@ item_ignore_next_update (TrackerMinerFS *fs,
" nfo:fileLastAccessed ?unknown3 ; "
" nie:mimeType ?unknown4 ; "
" nie:url \"%s\" } "
- "} %s", TRACKER_MINER_FS_GRAPH_URN,
- TRACKER_MINER_FS_GRAPH_URN, uri,
+ "} %s", TRACKER_OWN_GRAPH_URN,
+ TRACKER_OWN_GRAPH_URN, uri,
tracker_sparql_builder_get_result (sparql));
tracker_sparql_connection_update_async (tracker_miner_get_connection (TRACKER_MINER (fs)),
diff --git a/src/libtracker-sparql/Makefile.am b/src/libtracker-sparql/Makefile.am
index 1947302..44b56e9 100644
--- a/src/libtracker-sparql/Makefile.am
+++ b/src/libtracker-sparql/Makefile.am
@@ -23,7 +23,9 @@ libtracker_sparql_la_SOURCES = \
tracker-cursor.vala \
tracker-utils.vala \
tracker-uri.c \
- tracker-version.c
+ tracker-ontologies.h \
+ tracker-version.c \
+ tracker-version.h
libtracker_sparql_la_LIBADD = \
$(BUILD_LIBS) \
@@ -45,6 +47,7 @@ tracker-sparql-$(TRACKER_API_VERSION).vapi: tracker-sparql.vapi
libtracker_sparqlinclude_HEADERS = \
$(vala_header) \
+ tracker-ontologies.h \
tracker-sparql.h \
tracker-version.h
diff --git a/src/libtracker-sparql/tracker-ontologies.h b/src/libtracker-sparql/tracker-ontologies.h
new file mode 100644
index 0000000..124ffd8
--- /dev/null
+++ b/src/libtracker-sparql/tracker-ontologies.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2006, Jamie McCracken <jamiemcc gnome org>
+ * Copyright (C) 2008, Nokia <ivan frade nokia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __LIBTRACKER_SPARQL_ONTOLOGIES_H__
+#define __LIBTRACKER_SPARQL_ONTOLOGIES_H__
+
+G_BEGIN_DECLS
+
+#if !defined (__LIBTRACKER_SPARQL_INSIDE__) && !defined (TRACKER_COMPILATION)
+#error "only <libtracker-sparql/tracker-sparql.h> must be included directly."
+#endif
+
+/* Core: resources, data types */
+#define TRACKER_PREFIX_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+#define TRACKER_PREFIX_RDFS "http://www.w3.org/2000/01/rdf-schema#"
+#define TRACKER_PREFIX_XSD "http://www.w3.org/2001/XMLSchema#"
+#define TRACKER_PREFIX_TRACKER "http://www.tracker-project.org/ontologies/tracker#"
+#define TRACKER_PREFIX_DC "http://purl.org/dc/elements/1.1/"
+
+/* Our Nepomuk selection */
+#define TRACKER_PREFIX_NRL "http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#"
+#define TRACKER_PREFIX_NMO "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#"
+#define TRACKER_PREFIX_NIE "http://www.semanticdesktop.org/ontologies/2007/01/19/nie#"
+#define TRACKER_PREFIX_NCO "http://www.semanticdesktop.org/ontologies/2007/03/22/nco#"
+#define TRACKER_PREFIX_NAO "http://www.semanticdesktop.org/ontologies/2007/08/15/nao#"
+#define TRACKER_PREFIX_NID3 "http://www.semanticdesktop.org/ontologies/2007/05/10/nid3#"
+#define TRACKER_PREFIX_NFO "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#"
+
+/* Temporary */
+#define TRACKER_PREFIX_SLO "http://www.tracker-project.org/temp/slo#"
+#define TRACKER_PREFIX_NMM "http://www.tracker-project.org/temp/nmm#"
+#define TRACKER_PREFIX_MLO "http://www.tracker-project.org/temp/mlo#"
+#define TRACKER_PREFIX_MFO "http://www.tracker-project.org/temp/mfo#"
+
+/* RDF/SPARQL consistency */
+#define TRACKER_PREFIX_DATASOURCE_URN \
+ "urn:nepomuk:datasource:"
+
+#define TRACKER_DATASOURCE_URN_NON_REMOVABLE_MEDIA \
+ TRACKER_PREFIX_DATASOURCE_URN "9291a450-1d49-11de-8c30-0800200c9a66"
+
+#define TRACKER_OWN_GRAPH_URN "urn:uuid:472ed0cc-40ff-4e37-9c0c-062d78656540"
+
+G_END_DECLS
+
+#endif /* __LIBTRACKER_SPARQL_ONTOLOGY_H__ */
diff --git a/src/libtracker-sparql/tracker-sparql.h b/src/libtracker-sparql/tracker-sparql.h
index 8fde089..8f042d4 100644
--- a/src/libtracker-sparql/tracker-sparql.h
+++ b/src/libtracker-sparql/tracker-sparql.h
@@ -23,6 +23,7 @@
#define __LIBTRACKER_SPARQL_INSIDE__
#include <libtracker-sparql/tracker-version.h>
+#include <libtracker-sparql/tracker-ontologies.h>
#include <libtracker-sparql/tracker-generated.h>
#undef __LIBTRACKER_SPARQL_INSIDE__
diff --git a/src/miners/apps/tracker-miner-applications.c b/src/miners/apps/tracker-miner-applications.c
index 13d65fa..1c9288e 100644
--- a/src/miners/apps/tracker-miner-applications.c
+++ b/src/miners/apps/tracker-miner-applications.c
@@ -319,7 +319,7 @@ process_directory (ProcessApplicationData *data,
uri = g_file_get_uri (data->file);
urn = tracker_sparql_escape_uri_printf ("urn:applications-dir:%s", path);
- tracker_sparql_builder_insert_silent_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_insert_silent_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_iri (sparql, urn);
@@ -426,7 +426,7 @@ process_desktop_file (ProcessApplicationData *data,
gchar *icon = g_key_file_get_string (key_file, GROUP_DESKTOP_ENTRY, "Icon", NULL);
uri = canonical_uri;
- tracker_sparql_builder_insert_silent_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_insert_silent_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_iri (sparql, uri);
tracker_sparql_builder_predicate (sparql, "a");
@@ -459,7 +459,7 @@ process_desktop_file (ProcessApplicationData *data,
is_software = FALSE;
} else if (name && g_ascii_strcasecmp (type, "Application") == 0) {
uri = g_file_get_uri (data->file);
- tracker_sparql_builder_insert_silent_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_insert_silent_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_iri (sparql, APPLICATION_DATASOURCE_URN);
tracker_sparql_builder_predicate (sparql, "a");
@@ -478,7 +478,7 @@ process_desktop_file (ProcessApplicationData *data,
if (url) {
uri = g_file_get_uri (data->file);
- tracker_sparql_builder_insert_silent_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_insert_silent_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_iri (sparql, uri);
tracker_sparql_builder_predicate (sparql, "a");
@@ -557,7 +557,7 @@ process_desktop_file (ProcessApplicationData *data,
} else {
/* Invalid type, all valid types are already listed above */
uri = g_file_get_uri (data->file);
- tracker_sparql_builder_insert_silent_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_insert_silent_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_iri (sparql, APPLICATION_DATASOURCE_URN);
tracker_sparql_builder_predicate (sparql, "a");
@@ -620,13 +620,13 @@ process_desktop_file (ProcessApplicationData *data,
insert_data_from_desktop_file (sparql,
uri,
- TRACKER_NIE_PREFIX "comment",
+ TRACKER_PREFIX_NIE "comment",
key_file,
"Comment",
lang);
insert_data_from_desktop_file (sparql,
uri,
- TRACKER_NFO_PREFIX "softwareCmdLine",
+ TRACKER_PREFIX_NFO "softwareCmdLine",
key_file,
"Exec",
lang);
@@ -872,7 +872,7 @@ miner_applications_reset (TrackerMiner *miner)
sparql = tracker_sparql_builder_new_update ();
/* (a) all elements which are nfo:softwareIcon of a given nfo:Software */
- tracker_sparql_builder_delete_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_delete_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_variable (sparql, "icon");
tracker_sparql_builder_predicate (sparql, "a");
tracker_sparql_builder_object (sparql, "rdfs:Resource");
@@ -888,7 +888,7 @@ miner_applications_reset (TrackerMiner *miner)
tracker_sparql_builder_where_close (sparql);
/* (b) all nfo:Software in our graph (includes both applications and maemo applets) */
- tracker_sparql_builder_delete_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_delete_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_variable (sparql, "software");
tracker_sparql_builder_predicate (sparql, "a");
tracker_sparql_builder_object (sparql, "rdfs:Resource");
@@ -901,7 +901,7 @@ miner_applications_reset (TrackerMiner *miner)
tracker_sparql_builder_where_close (sparql);
/* (c) all elements which are nfo:softwareCategoryIcon of a given nfo:SoftwareCategory */
- tracker_sparql_builder_delete_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_delete_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_variable (sparql, "icon");
tracker_sparql_builder_predicate (sparql, "a");
tracker_sparql_builder_object (sparql, "rdfs:Resource");
@@ -917,7 +917,7 @@ miner_applications_reset (TrackerMiner *miner)
tracker_sparql_builder_where_close (sparql);
/* (d) all nfo:SoftwareCategory in our graph */
- tracker_sparql_builder_delete_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_delete_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_variable (sparql, "category");
tracker_sparql_builder_predicate (sparql, "a");
tracker_sparql_builder_object (sparql, "rdfs:Resource");
diff --git a/src/miners/fs/tracker-main.c b/src/miners/fs/tracker-main.c
index a2ea8f4..7964e52 100644
--- a/src/miners/fs/tracker-main.c
+++ b/src/miners/fs/tracker-main.c
@@ -31,14 +31,8 @@
#include <glib-object.h>
#include <glib/gi18n.h>
-#include <libtracker-common/tracker-dbus.h>
-#include <libtracker-common/tracker-ioprio.h>
-#include <libtracker-common/tracker-log.h>
-#include <libtracker-common/tracker-ontologies.h>
-#include <libtracker-common/tracker-file-utils.h>
-#include <libtracker-common/tracker-sched.h>
-#include <libtracker-common/tracker-enums.h>
-
+#include <libtracker-common/tracker-common.h>
+#include <libtracker-sparql/tracker-sparql.h>
#include <libtracker-miner/tracker-miner.h>
#include <libtracker-data/tracker-db-manager.h>
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 7a03a0e..726ca3f 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -34,19 +34,12 @@
#include <gio/gunixfdlist.h>
#include <gio/gunixinputstream.h>
-#include <libtracker-common/tracker-dbus.h>
-#include <libtracker-common/tracker-date-time.h>
-#include <libtracker-common/tracker-ontologies.h>
-#include <libtracker-common/tracker-type-utils.h>
-#include <libtracker-common/tracker-utils.h>
-#include <libtracker-common/tracker-file-utils.h>
-#include <libtracker-common/tracker-storage.h>
+#include <libtracker-common/tracker-common.h>
+#include <libtracker-sparql/tracker-ontologies.h>
+#include <libtracker-extract/tracker-extract.h>
#include <libtracker-data/tracker-db-manager.h>
-#include <libtracker-extract/tracker-module-manager.h>
-#include <libtracker-extract/tracker-extract-client.h>
-
#include "tracker-power.h"
#include "tracker-miner-files.h"
#include "tracker-config.h"
@@ -684,7 +677,7 @@ ensure_mount_point_exists (TrackerMinerFiles *miner,
/* Create a nfo:Folder for the mount point */
g_string_append_printf (accumulator,
- "INSERT SILENT INTO <" TRACKER_MINER_FS_GRAPH_URN "> {"
+ "INSERT SILENT INTO <" TRACKER_OWN_GRAPH_URN "> {"
" _:file a nfo:FileDataObject, nie:InformationElement, nfo:Folder ; "
" nie:isStoredAs _:file ; "
" nie:url \"%s\" ; "
@@ -924,7 +917,7 @@ init_mount_points (TrackerMinerFiles *miner_files)
/* Make sure the root partition is always set to mounted, as GIO won't
* report it as a proper mount */
g_hash_table_insert (volumes,
- g_strdup (TRACKER_NON_REMOVABLE_MEDIA_DATASOURCE_URN),
+ g_strdup (TRACKER_DATASOURCE_URN_NON_REMOVABLE_MEDIA),
GINT_TO_POINTER (VOLUME_MOUNTED));
while (tracker_sparql_cursor_next (cursor, NULL, NULL)) {
@@ -935,7 +928,7 @@ init_mount_points (TrackerMinerFiles *miner_files)
urn = tracker_sparql_cursor_get_string (cursor, 0, NULL);
- if (strcmp (urn, TRACKER_NON_REMOVABLE_MEDIA_DATASOURCE_URN) == 0) {
+ if (strcmp (urn, TRACKER_DATASOURCE_URN_NON_REMOVABLE_MEDIA) == 0) {
/* Report non-removable media to be mounted by HAL as well */
state |= VOLUME_MOUNTED;
}
@@ -953,7 +946,7 @@ init_mount_points (TrackerMinerFiles *miner_files)
gint state;
uuid = u->data;
- non_removable_device_urn = g_strdup_printf (TRACKER_DATASOURCE_URN_PREFIX "%s", uuid);
+ non_removable_device_urn = g_strdup_printf (TRACKER_PREFIX_DATASOURCE_URN "%s", uuid);
state = GPOINTER_TO_INT (g_hash_table_lookup (volumes, non_removable_device_urn));
state |= VOLUME_MOUNTED;
@@ -973,7 +966,7 @@ init_mount_points (TrackerMinerFiles *miner_files)
gint state;
uuid = u->data;
- removable_device_urn = g_strdup_printf (TRACKER_DATASOURCE_URN_PREFIX "%s", uuid);
+ removable_device_urn = g_strdup_printf (TRACKER_PREFIX_DATASOURCE_URN "%s", uuid);
state = GPOINTER_TO_INT (g_hash_table_lookup (volumes, removable_device_urn));
state |= VOLUME_MOUNTED;
@@ -1000,10 +993,10 @@ init_mount_points (TrackerMinerFiles *miner_files)
/* Note: is there any case where the urn doesn't have our
* datasource prefix? */
- if (g_str_has_prefix (urn, TRACKER_DATASOURCE_URN_PREFIX)) {
+ if (g_str_has_prefix (urn, TRACKER_PREFIX_DATASOURCE_URN)) {
const gchar *uuid;
- uuid = urn + strlen (TRACKER_DATASOURCE_URN_PREFIX);
+ uuid = urn + strlen (TRACKER_PREFIX_DATASOURCE_URN);
mount_point = tracker_storage_get_mount_point_for_uuid (priv->storage, uuid);
type = tracker_storage_get_type_for_uuid (priv->storage, uuid);
}
@@ -1154,7 +1147,7 @@ mount_point_removed_cb (TrackerStorage *storage,
gchar *urn;
GFile *mount_point_file;
- urn = g_strdup_printf (TRACKER_DATASOURCE_URN_PREFIX "%s", uuid);
+ urn = g_strdup_printf (TRACKER_PREFIX_DATASOURCE_URN "%s", uuid);
g_debug ("Mount point removed for URN '%s'", urn);
mount_point_file = g_file_new_for_path (mount_point);
@@ -1190,7 +1183,7 @@ mount_point_added_cb (TrackerStorage *storage,
priv = TRACKER_MINER_FILES_GET_PRIVATE (miner);
- urn = g_strdup_printf (TRACKER_DATASOURCE_URN_PREFIX "%s", uuid);
+ urn = g_strdup_printf (TRACKER_PREFIX_DATASOURCE_URN "%s", uuid);
g_message ("Mount point added for URN '%s'", urn);
if (removable && !priv->index_removable_devices) {
@@ -1952,10 +1945,10 @@ miner_files_add_to_datasource (TrackerMinerFiles *mf,
removable_device_uuid = tracker_storage_get_uuid_for_file (priv->storage, file);
if (removable_device_uuid) {
- removable_device_urn = g_strdup_printf (TRACKER_DATASOURCE_URN_PREFIX "%s",
+ removable_device_urn = g_strdup_printf (TRACKER_PREFIX_DATASOURCE_URN "%s",
removable_device_uuid);
} else {
- removable_device_urn = g_strdup (TRACKER_NON_REMOVABLE_MEDIA_DATASOURCE_URN);
+ removable_device_urn = g_strdup (TRACKER_DATASOURCE_URN_NON_REMOVABLE_MEDIA);
}
urn = miner_files_get_file_urn (mf, file, &is_iri);
@@ -2070,7 +2063,7 @@ sparql_builder_finish (ProcessFileData *data,
GString *queries;
gchar *removable_device_urn, *uri;
- removable_device_urn = g_strdup_printf (TRACKER_DATASOURCE_URN_PREFIX "%s", uuid);
+ removable_device_urn = g_strdup_printf (TRACKER_PREFIX_DATASOURCE_URN "%s", uuid);
uri = g_file_get_uri (G_FILE (data->file));
queries = g_string_new ("");
@@ -2140,7 +2133,7 @@ process_file_cb (GObject *object,
data->mime_type = g_strdup (mime_type);
tracker_sparql_builder_insert_silent_open (sparql, NULL);
- tracker_sparql_builder_graph_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_graph_open (sparql, TRACKER_OWN_GRAPH_URN);
if (is_iri) {
tracker_sparql_builder_subject_iri (sparql, urn);
@@ -2300,7 +2293,7 @@ process_file_attributes_cb (GObject *object,
tracker_sparql_builder_object_variable (sparql, "lastmodified");
tracker_sparql_builder_where_close (sparql);
tracker_sparql_builder_insert_open (sparql, NULL);
- tracker_sparql_builder_graph_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_graph_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_iri (sparql, urn);
time_ = g_file_info_get_attribute_uint64 (file_info, G_FILE_ATTRIBUTE_TIME_MODIFIED);
tracker_sparql_builder_predicate (sparql, "nfo:fileLastModified");
@@ -2320,7 +2313,7 @@ process_file_attributes_cb (GObject *object,
tracker_sparql_builder_object_variable (sparql, "lastaccessed");
tracker_sparql_builder_where_close (sparql);
tracker_sparql_builder_insert_open (sparql, NULL);
- tracker_sparql_builder_graph_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_graph_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_iri (sparql, urn);
time_ = g_file_info_get_attribute_uint64 (file_info, G_FILE_ATTRIBUTE_TIME_ACCESS);
tracker_sparql_builder_predicate (sparql, "nfo:fileLastAccessed");
@@ -2404,7 +2397,7 @@ miner_files_ignore_next_update_file (TrackerMinerFS *fs,
* should NEVER be marked as tracker:writeback in the ontology! (else you break
* the tracker-writeback feature) */
- tracker_sparql_builder_insert_silent_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_insert_silent_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_variable (sparql, "urn");
tracker_sparql_builder_predicate (sparql, "a");
diff --git a/src/miners/fs/tracker-writeback-listener.c b/src/miners/fs/tracker-writeback-listener.c
index 55e1871..c7849b5 100644
--- a/src/miners/fs/tracker-writeback-listener.c
+++ b/src/miners/fs/tracker-writeback-listener.c
@@ -372,7 +372,7 @@ rdf_types_to_uris_cb (GObject *object,
"<%s> a nfo:FileDataObject . "
"<%s> ?predicate ?object ; nie:url ?url . "
"?predicate tracker:writeback true . "
- "FILTER (NOT EXISTS { GRAPH <"TRACKER_MINER_FS_GRAPH_URN"> "
+ "FILTER (NOT EXISTS { GRAPH <" TRACKER_OWN_GRAPH_URN "> "
"{ <%s> ?predicate ?object } }) } ",
subject, subject, subject, subject);
diff --git a/src/miners/user-guides/tracker-miner-user-guides.c
b/src/miners/user-guides/tracker-miner-user-guides.c
index 2ceaeb0..5d8307a 100644
--- a/src/miners/user-guides/tracker-miner-user-guides.c
+++ b/src/miners/user-guides/tracker-miner-user-guides.c
@@ -326,7 +326,7 @@ process_item (ProcessUserguideData *data,
urn = get_file_urn (data->miner, data->file, &is_iri);
tracker_sparql_builder_insert_silent_open (sparql, NULL);
- tracker_sparql_builder_graph_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_graph_open (sparql, TRACKER_OWN_GRAPH_URN);
if (is_iri) {
tracker_sparql_builder_subject_iri (sparql, urn);
@@ -671,7 +671,7 @@ miner_userguides_reset (TrackerMiner *miner)
sparql = tracker_sparql_builder_new_update ();
/* (a) Remove all resources which are a nfo:HelpDocument */
- tracker_sparql_builder_delete_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_delete_open (sparql, TRACKER_OWN_GRAPH_URN);
tracker_sparql_builder_subject_variable (sparql, "userguide");
tracker_sparql_builder_predicate (sparql, "a");
tracker_sparql_builder_object (sparql, "rdfs:Resource");
diff --git a/src/tracker-extract/tracker-extract-decorator.c b/src/tracker-extract/tracker-extract-decorator.c
index 7d0f2d2..82996c0 100644
--- a/src/tracker-extract/tracker-extract-decorator.c
+++ b/src/tracker-extract/tracker-extract-decorator.c
@@ -19,8 +19,9 @@
#include "config.h"
+#include <libtracker-sparql/tracker-sparql.h>
#include <libtracker-extract/tracker-extract.h>
-#include <libtracker-common/tracker-ontologies.h>
+
#include "tracker-extract-decorator.h"
#include "tracker-extract-persistence.h"
#include "tracker-extract-priority-dbus.h"
@@ -29,8 +30,8 @@ enum {
PROP_EXTRACTOR = 1
};
-#define TRACKER_EXTRACT_DATA_SOURCE TRACKER_TRACKER_PREFIX "extractor-data-source"
-#define TRACKER_EXTRACT_FAILURE_DATA_SOURCE TRACKER_TRACKER_PREFIX "extractor-failure-data-source"
+#define TRACKER_EXTRACT_DATA_SOURCE TRACKER_PREFIX_TRACKER "extractor-data-source"
+#define TRACKER_EXTRACT_FAILURE_DATA_SOURCE TRACKER_PREFIX_TRACKER "extractor-failure-data-source"
#define MAX_EXTRACTING_FILES 1
#define TRACKER_EXTRACT_DECORATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o),
TRACKER_TYPE_EXTRACT_DECORATOR, TrackerExtractDecoratorPrivate))
@@ -151,7 +152,7 @@ decorator_save_info (TrackerSparqlBuilder *sparql,
urn = tracker_decorator_info_get_urn (decorator_info);
tracker_sparql_builder_insert_open (sparql, NULL);
- tracker_sparql_builder_graph_open (sparql, TRACKER_MINER_FS_GRAPH_URN);
+ tracker_sparql_builder_graph_open (sparql, TRACKER_OWN_GRAPH_URN);
/* Set tracker-extract data source */
tracker_sparql_builder_subject_iri (sparql, urn);
@@ -297,7 +298,7 @@ decorator_next_item_cb (TrackerDecorator *decorator,
tracker_extract_file (priv->extractor,
tracker_decorator_info_get_url (info),
tracker_decorator_info_get_mimetype (info),
- TRACKER_MINER_FS_GRAPH_URN,
+ TRACKER_OWN_GRAPH_URN,
g_task_get_cancellable (task),
(GAsyncReadyCallback) get_metadata_cb, data);
}
@@ -594,7 +595,7 @@ decorator_ignore_file (GFile *file,
g_message ("Extraction on file '%s' has been attempted too many times, ignoring", uri);
conn = tracker_miner_get_connection (TRACKER_MINER (decorator));
- query = g_strdup_printf ("INSERT { GRAPH <" TRACKER_MINER_FS_GRAPH_URN "> {"
+ query = g_strdup_printf ("INSERT { GRAPH <" TRACKER_OWN_GRAPH_URN "> {"
" ?urn nie:dataSource <" TRACKER_EXTRACT_DATA_SOURCE ">;"
" nie:dataSource <" TRACKER_EXTRACT_FAILURE_DATA_SOURCE ">."
"} WHERE {"
diff --git a/src/tracker-writeback/tracker-writeback-xmp.c b/src/tracker-writeback/tracker-writeback-xmp.c
index 6b614e1..36d3036 100644
--- a/src/tracker-writeback/tracker-writeback-xmp.c
+++ b/src/tracker-writeback/tracker-writeback-xmp.c
@@ -31,8 +31,8 @@
#include <glib-object.h>
#include <gio/gio.h>
-#include <libtracker-common/tracker-ontologies.h>
-#include <libtracker-common/tracker-utils.h>
+#include <libtracker-common/tracker-common.h>
+#include <libtracker-sparql/tracker-sparql.h>
#include "tracker-writeback-file.h"
@@ -159,14 +159,14 @@ writeback_xmp_update_file_metadata (TrackerWritebackFile *wbf,
urn = row[1]; /* The urn is at 1 */
- if (g_strcmp0 (row[2], TRACKER_NIE_PREFIX "title") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NIE "title") == 0) {
xmp_delete_property (xmp, NS_EXIF, "Title");
xmp_set_property (xmp, NS_EXIF, "Title", row[3], 0);
xmp_delete_property (xmp, NS_DC, "title");
xmp_set_property (xmp, NS_DC, "title", row[3], 0);
}
- if (g_strcmp0 (row[2], TRACKER_NCO_PREFIX "creator") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NCO "creator") == 0) {
TrackerSparqlCursor *cursor;
GError *error = NULL;
gchar *query;
@@ -188,7 +188,7 @@ writeback_xmp_update_file_metadata (TrackerWritebackFile *wbf,
g_clear_error (&error);
}
- if (g_strcmp0 (row[2], TRACKER_NCO_PREFIX "contributor") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NCO "contributor") == 0) {
TrackerSparqlCursor *cursor;
GError *error = NULL;
gchar *query;
@@ -209,22 +209,22 @@ writeback_xmp_update_file_metadata (TrackerWritebackFile *wbf,
g_clear_error (&error);
}
- if (g_strcmp0 (row[2], TRACKER_NIE_PREFIX "description") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NIE "description") == 0) {
xmp_delete_property (xmp, NS_DC, "description");
xmp_set_property (xmp, NS_DC, "description", row[3], 0);
}
- if (g_strcmp0 (row[2], TRACKER_NIE_PREFIX "copyright") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NIE "copyright") == 0) {
xmp_delete_property (xmp, NS_EXIF, "Copyright");
xmp_set_property (xmp, NS_EXIF, "Copyright", row[3], 0);
}
- if (g_strcmp0 (row[2], TRACKER_NIE_PREFIX "comment") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NIE "comment") == 0) {
xmp_delete_property (xmp, NS_EXIF, "UserComment");
xmp_set_property (xmp, NS_EXIF, "UserComment", row[3], 0);
}
- if (g_strcmp0 (row[2], TRACKER_NIE_PREFIX "keyword") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NIE "keyword") == 0) {
if (!keywords) {
keywords = g_string_new (row[3]);
} else {
@@ -233,7 +233,7 @@ writeback_xmp_update_file_metadata (TrackerWritebackFile *wbf,
}
- if (g_strcmp0 (row[2], TRACKER_NAO_PREFIX "hasTag") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NAO "hasTag") == 0) {
TrackerSparqlCursor *cursor;
GError *error = NULL;
gchar *query;
@@ -257,32 +257,32 @@ writeback_xmp_update_file_metadata (TrackerWritebackFile *wbf,
g_clear_error (&error);
}
- if (g_strcmp0 (row[2], TRACKER_NIE_PREFIX "contentCreated") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NIE "contentCreated") == 0) {
xmp_delete_property (xmp, NS_EXIF, "Date");
xmp_set_property (xmp, NS_EXIF, "Date", row[3], 0);
xmp_delete_property (xmp, NS_DC, "date");
xmp_set_property (xmp, NS_DC, "date", row[3], 0);
}
- if (g_strcmp0 (row[2], TRACKER_NFO_PREFIX "orientation") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NFO "orientation") == 0) {
xmp_delete_property (xmp, NS_EXIF, "Orientation");
- if (g_strcmp0 (row[3], TRACKER_NFO_PREFIX "orientation-top") == 0) {
+ if (g_strcmp0 (row[3], TRACKER_PREFIX_NFO "orientation-top") == 0) {
xmp_set_property (xmp, NS_EXIF, "Orientation", "top - left", 0);
- } else if (g_strcmp0 (row[3], TRACKER_NFO_PREFIX "orientation-top-mirror") == 0) {
+ } else if (g_strcmp0 (row[3], TRACKER_PREFIX_NFO "orientation-top-mirror") == 0) {
xmp_set_property (xmp, NS_EXIF, "Orientation", "top - right", 0);
- } else if (g_strcmp0 (row[3], TRACKER_NFO_PREFIX "orientation-bottom") == 0) {
+ } else if (g_strcmp0 (row[3], TRACKER_PREFIX_NFO "orientation-bottom") == 0) {
xmp_set_property (xmp, NS_EXIF, "Orientation", "bottom - left", 0);
- } else if (g_strcmp0 (row[3], TRACKER_NFO_PREFIX "orientation-bottom-mirror") == 0) {
+ } else if (g_strcmp0 (row[3], TRACKER_PREFIX_NFO "orientation-bottom-mirror") == 0) {
xmp_set_property (xmp, NS_EXIF, "Orientation", "bottom - right", 0);
- } else if (g_strcmp0 (row[3], TRACKER_NFO_PREFIX "orientation-left-mirror") == 0) {
+ } else if (g_strcmp0 (row[3], TRACKER_PREFIX_NFO "orientation-left-mirror") == 0) {
xmp_set_property (xmp, NS_EXIF, "Orientation", "left - top", 0);
- } else if (g_strcmp0 (row[3], TRACKER_NFO_PREFIX "orientation-right") == 0) {
+ } else if (g_strcmp0 (row[3], TRACKER_PREFIX_NFO "orientation-right") == 0) {
xmp_set_property (xmp, NS_EXIF, "Orientation", "right - top", 0);
- } else if (g_strcmp0 (row[3], TRACKER_NFO_PREFIX "orientation-right-mirror") == 0) {
+ } else if (g_strcmp0 (row[3], TRACKER_PREFIX_NFO "orientation-right-mirror") == 0) {
xmp_set_property (xmp, NS_EXIF, "Orientation", "right - bottom", 0);
- } else if (g_strcmp0 (row[3], TRACKER_NFO_PREFIX "orientation-left") == 0) {
+ } else if (g_strcmp0 (row[3], TRACKER_PREFIX_NFO "orientation-left") == 0) {
xmp_set_property (xmp, NS_EXIF, "Orientation", "left - bottom", 0);
}
}
@@ -398,7 +398,7 @@ writeback_xmp_update_file_metadata (TrackerWritebackFile *wbf,
}
#endif /* SET_TYPICAL_CAMERA_FIELDS */
- if (g_strcmp0 (row[2], TRACKER_NFO_PREFIX "heading") == 0) {
+ if (g_strcmp0 (row[2], TRACKER_PREFIX_NFO "heading") == 0) {
xmp_delete_property (xmp, NS_EXIF, "GPSImgDirection");
xmp_set_property (xmp, NS_EXIF, "GPSImgDirection", row[3], 0);
}
@@ -588,9 +588,9 @@ const gchar * const *
writeback_module_get_rdf_types (void)
{
static const gchar *rdf_types[] = {
- TRACKER_NFO_PREFIX "Image",
- TRACKER_NFO_PREFIX "Audio",
- TRACKER_NFO_PREFIX "Video",
+ TRACKER_PREFIX_NFO "Image",
+ TRACKER_PREFIX_NFO "Audio",
+ TRACKER_PREFIX_NFO "Video",
NULL
};
diff --git a/tests/libtracker-fts/tracker-fts-test.c b/tests/libtracker-fts/tracker-fts-test.c
index 5b301b6..3712cd1 100644
--- a/tests/libtracker-fts/tracker-fts-test.c
+++ b/tests/libtracker-fts/tracker-fts-test.c
@@ -25,13 +25,8 @@
#include <glib/gstdio.h>
#include <gio/gio.h>
-#include <libtracker-common/tracker-ontologies.h>
-
-#include <libtracker-data/tracker-data-manager.h>
-#include <libtracker-data/tracker-data-query.h>
-#include <libtracker-data/tracker-data-update.h>
#include <libtracker-data/tracker-data.h>
-#include <libtracker-data/tracker-sparql-query.h>
+#include <libtracker-sparql/tracker-sparql.h>
typedef struct _TestInfo TestInfo;
diff --git a/utils/tracker-sql/tracker-sql.c b/utils/tracker-sql/tracker-sql.c
index 0737b29..654347b 100644
--- a/utils/tracker-sql/tracker-sql.c
+++ b/utils/tracker-sql/tracker-sql.c
@@ -26,11 +26,8 @@
#include <glib.h>
#include <glib/gi18n.h>
-#include <libtracker-common/tracker-ontologies.h>
-#include <libtracker-data/tracker-data-manager.h>
-#include <libtracker-data/tracker-data-query.h>
-#include <libtracker-data/tracker-data-update.h>
-#include <libtracker-data/tracker-sparql-query.h>
+#include <libtracker-data/tracker-data.h>
+#include <libtracker-sparql/tracker-sparql.h>
static gchar *file;
static gchar *query;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]