[rygel] tracker: Some syntax sugar for UPnPPropertyMap
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Some syntax sugar for UPnPPropertyMap
- Date: Fri, 27 Jul 2012 21:26:15 +0000 (UTC)
commit b5549f8907629f93523984cce5f542dcaaca217e
Author: Jens Georg <mail jensge org>
Date: Tue Jul 17 10:41:25 2012 +0200
tracker: Some syntax sugar for UPnPPropertyMap
.../tracker/rygel-tracker-metadata-values.vala | 4 ++--
.../tracker/rygel-tracker-search-container.vala | 2 +-
.../tracker/rygel-tracker-upnp-property-map.vala | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-metadata-values.vala b/src/plugins/tracker/rygel-tracker-metadata-values.vala
index c715ac8..73be88b 100644
--- a/src/plugins/tracker/rygel-tracker-metadata-values.vala
+++ b/src/plugins/tracker/rygel-tracker-metadata-values.vala
@@ -55,7 +55,7 @@ public abstract class Rygel.Tracker.MetadataValues : MetadataContainer {
var property_map = UPnPPropertyMap.get_property_map ();
var selected = new ArrayList<string> ();
selected.add ("DISTINCT " +
- property_map.map_property (this.property) +
+ property_map[this.property] +
" AS x");
return new SelectionQuery (selected, triplets, null, "?x");
@@ -71,7 +71,7 @@ public abstract class Rygel.Tracker.MetadataValues : MetadataContainer {
// However we constrain the object of our last triplet.
var filters = new ArrayList<string> ();
var property_map = UPnPPropertyMap.get_property_map ();
- var property = property_map.map_property (this.property);
+ var property = property_map[this.property];
var filter = this.create_filter (property, value);
filters.add (filter);
diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala
index 325ddb1..6f83584 100644
--- a/src/plugins/tracker/rygel-tracker-search-container.vala
+++ b/src/plugins/tracker/rygel-tracker-search-container.vala
@@ -83,7 +83,7 @@ public class Rygel.Tracker.SearchContainer : SimpleContainer {
var property_map = UPnPPropertyMap.get_property_map ();
foreach (var property in this.item_factory.properties) {
- variables.add (property_map.map_property (property));
+ variables.add (property_map[property]);
}
var order_by = MODIFIED_PROPERTY +
diff --git a/src/plugins/tracker/rygel-tracker-upnp-property-map.vala b/src/plugins/tracker/rygel-tracker-upnp-property-map.vala
index 4f2d854..ad4ebb8 100644
--- a/src/plugins/tracker/rygel-tracker-upnp-property-map.vala
+++ b/src/plugins/tracker/rygel-tracker-upnp-property-map.vala
@@ -76,7 +76,7 @@ public class Rygel.Tracker.UPnPPropertyMap : Object {
this.add_key_chain ("height", "nfo:height");
}
- public string map_property (string property) {
+ public new string @get (string property) {
var str = SelectionQuery.ITEM_VARIABLE;
if (this.property_map.has_key (property)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]