[tracker] utils: Drop libgee dependency
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] utils: Drop libgee dependency
- Date: Tue, 24 Jan 2017 15:43:50 +0000 (UTC)
commit ab3de04a3d19d0d27424881c7a6eff6555202324
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jan 24 16:40:44 2017 +0100
utils: Drop libgee dependency
It's only used on the tracker-resdump helper, and can be easily
replaced with the GLib counterparts.
configure.ac | 4 +---
utils/tracker-resdump/tracker-resdump.vala | 17 +++++++++--------
2 files changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 48b3363..b11a0cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,7 +230,6 @@ EVO_REQUIRED=2.32.0
EVO_SHELL_REQUIRED=2.32.0
EDS_REQUIRED=2.32.0
CAMEL_REQUIRED=2.32.0
-GEE_REQUIRED=0.3
TAGLIB_REQUIRED=1.6
LIBGRSS_REQUIRED=0.7
NETWORK_MANAGER_REQUIRED=0.8
@@ -342,8 +341,7 @@ TRACKER_REQUIRED="glib-2.0 >= $GLIB_REQUIRED
PKG_CHECK_MODULES(TRACKER, [$TRACKER_REQUIRED])
# Check requirements for tracker-resdump
-TRACKER_RESDUMP_REQUIRED="glib-2.0 >= $GLIB_REQUIRED
- gee-0.8 >= $GEE_REQUIRED"
+TRACKER_RESDUMP_REQUIRED="glib-2.0 >= $GLIB_REQUIRED"
PKG_CHECK_MODULES(TRACKER_RESDUMP, [$TRACKER_RESDUMP_REQUIRED],
[have_tracker_resdump=yes],
diff --git a/utils/tracker-resdump/tracker-resdump.vala b/utils/tracker-resdump/tracker-resdump.vala
index 4d75818..601d46b 100644
--- a/utils/tracker-resdump/tracker-resdump.vala
+++ b/utils/tracker-resdump/tracker-resdump.vala
@@ -18,6 +18,7 @@
*/
using Tracker.Sparql;
+using GLib;
static Connection conn;
@@ -25,18 +26,18 @@ static void usage (string[] args) {
stderr.printf("Usage: %s urn\n", args[0]);
}
-static Gee.Set<string> looked_up_iris;
+static GLib.GenericSet<string> looked_up_iris;
static bool dump_resource (string urn) {
- Gee.List<string> iris_to_lookup = new Gee.ArrayList<string> ();
+ GLib.List<string> iris_to_lookup = new GLib.List<string> ();
looked_up_iris.add (urn);
try {
Cursor cursor = conn.query ("SELECT ?p rdfs:range(?p) ?o {<%s> ?p ?o}".printf (urn));
- Gee.List<string> type_statements = new Gee.ArrayList<string>();
- Gee.List<string> statements = new Gee.ArrayList<string>();
+ GLib.List<string> type_statements = new GLib.List<string>();
+ GLib.List<string> statements = new GLib.List<string>();
while (cursor.next ()) {
// Skip tracker internal stuff
@@ -60,16 +61,16 @@ static bool dump_resource (string urn) {
// Assume resource
unowned string obj = cursor.get_string (2);
if (!looked_up_iris.contains (obj)) {
- iris_to_lookup.add (obj);
+ iris_to_lookup.append (obj);
}
statement += "<%s>".printf (obj);
break;
}
if (cursor.get_string (0) == "http://www.w3.org/1999/02/22-rdf-syntax-ns#type") {
- type_statements.add (statement);
+ type_statements.append (statement);
} else {
- statements.add (statement);
+ statements.append (statement);
}
}
@@ -108,7 +109,7 @@ static int main(string[] args)
return 1;
}
- looked_up_iris = new Gee.HashSet<string>();
+ looked_up_iris = new GLib.GenericSet<string>(GLib.str_hash, GLib.str_equal);
if (dump_resource (args[1])) {
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]