[rygel] tracker: SparqlConnection is a singleton
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] tracker: SparqlConnection is a singleton
- Date: Fri, 27 Jul 2012 21:25:35 +0000 (UTC)
commit ff8b68808d24c6a5f3fb0a7cf25229a4d8a87855
Author: Jens Georg <mail jensge org>
Date: Sat Jul 14 14:43:29 2012 +0200
tracker: SparqlConnection is a singleton
src/plugins/tracker/Makefile.am | 1 -
.../rygel-tracker-category-all-container.vala | 2 +-
.../tracker/rygel-tracker-metadata-values.vala | 6 +---
.../tracker/rygel-tracker-search-container.vala | 2 +-
.../tracker/rygel-tracker-sparql-connection.vala | 38 --------------------
5 files changed, 3 insertions(+), 46 deletions(-)
---
diff --git a/src/plugins/tracker/Makefile.am b/src/plugins/tracker/Makefile.am
index 5d9c8c5..32c00a7 100644
--- a/src/plugins/tracker/Makefile.am
+++ b/src/plugins/tracker/Makefile.am
@@ -40,7 +40,6 @@ librygel_tracker_la_SOURCES = \
rygel-tracker-music-item-factory.vala \
rygel-tracker-picture-item-factory.vala \
rygel-tracker-plugin.vala \
- rygel-tracker-sparql-connection.vala \
rygel-tracker-plugin-factory.vala \
rygel-tracker-interfaces.vala
diff --git a/src/plugins/tracker/rygel-tracker-category-all-container.vala b/src/plugins/tracker/rygel-tracker-category-all-container.vala
index defee80..57eb7bc 100644
--- a/src/plugins/tracker/rygel-tracker-category-all-container.vala
+++ b/src/plugins/tracker/rygel-tracker-category-all-container.vala
@@ -49,7 +49,7 @@ public class Rygel.Tracker.CategoryAllContainer : SearchContainer,
this.search_classes = new ArrayList<string> ();
try {
- this.resources = Connection.get ();
+ this.resources = Sparql.Connection.get ();
} catch (Error io_error) {
critical (_("Failed to create a Tracker connection:: %s"),
io_error.message);
diff --git a/src/plugins/tracker/rygel-tracker-metadata-values.vala b/src/plugins/tracker/rygel-tracker-metadata-values.vala
index 7bcabc8..11407e9 100644
--- a/src/plugins/tracker/rygel-tracker-metadata-values.vala
+++ b/src/plugins/tracker/rygel-tracker-metadata-values.vala
@@ -59,7 +59,7 @@ public abstract class Rygel.Tracker.MetadataValues : Rygel.SimpleContainer {
this.child_class = child_class;
try {
- this.create_proxies ();
+ this.resources = Sparql.Connection.get ();
} catch (Error error) {
critical (_("Failed to create Tracker connection: %s"), error.message);
@@ -194,9 +194,5 @@ public abstract class Rygel.Tracker.MetadataValues : Rygel.SimpleContainer {
private bool is_our_child (string id) {
return id.has_prefix (this.id + ":");
}
-
- private void create_proxies () throws Error {
- this.resources = Connection.get ();
- }
}
diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala
index e8642ad..62d19b2 100644
--- a/src/plugins/tracker/rygel-tracker-search-container.vala
+++ b/src/plugins/tracker/rygel-tracker-search-container.vala
@@ -97,7 +97,7 @@ public class Rygel.Tracker.SearchContainer : SimpleContainer {
order_by);
try {
- this.resources = Connection.get ();
+ this.resources = Sparql.Connection.get ();
this.get_children_count.begin ();
} catch (Error error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]