private string service_reset_token;
- private string search_caps;
-
public override void constructed () {
base.constructed ();
this.last_change = new LastChange ();
- this.search_caps = RelationalExpression.CAPS;
-
- if (PluginCapabilities.TRACK_CHANGES in plugin.capabilities) {
- this.search_caps += ",upnp:objectUpdateID,upnp:containerUpdateID";
- }
-
this.feature_list =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<Features xmlns=\"urn:schemas-upnp-org:av:avs\" " +
return;
}
+ var plugin = this.root_device.resource_factory as MediaServerPlugin;
+
/* Set action return arguments */
- action.set ("SearchCaps", typeof (string), this.search_caps);
+ action.set ("SearchCaps", typeof (string), plugin.search_caps);
action.return ();
}
private void query_search_capabilities (Service content_dir,
string variable,
ref GLib.Value value) {
+ var plugin = this.root_device.resource_factory as MediaServerPlugin;
+
/* Set action return arguments */
value.init (typeof (string));
- value.set_string (this.search_caps);
+ value.set_string (plugin.search_caps);
}
/* action GetSortCapabilities implementation */
public MediaContainer root_container { get; construct; }
+ private string _search_caps;
+
+ /**
+ * The SearchCapabilities this MediaServer plugin supports.
+ *
+ * Implementations can override this to match their capabilities. If they do,
+ * they should take care to include the change tracking capabilities
+ * (upnp:objectUpdateID, upnp:containerUpdateID) based on
+ * PluginCapabilities.TRACK_CHANGES.
+ */
+ public virtual string search_caps {
+ get {
+ if (this._search_caps == null) {
+ this._search_caps = RelationalExpression.CAPS;
+
+ if (PluginCapabilities.TRACK_CHANGES in this.capabilities) {
+ this._search_caps += ",upnp:objectUpdateID,upnp:containerUpdateID";
+ }
+ }
+
+ return this._search_caps;
+ }
+ }
+
private GLib.List<DLNAProfile> _upload_profiles;
/**