[rygel/wip/cablelabs-integration: 6/18] core: Fix use of OCM flag
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/cablelabs-integration: 6/18] core: Fix use of OCM flag
- Date: Thu, 20 Nov 2014 20:38:14 +0000 (UTC)
commit 55413f45098ace20571e2d827a5eccd103a70428
Author: Jens Georg <mail jensge org>
Date: Tue Nov 18 17:10:45 2014 +0100
core: Fix use of OCM flag
Signed-off-by: Jens Georg <mail jensge org>
src/librygel-core/rygel-description-file.vala | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/librygel-core/rygel-description-file.vala b/src/librygel-core/rygel-description-file.vala
index e54e293..26c1407 100644
--- a/src/librygel-core/rygel-description-file.vala
+++ b/src/librygel-core/rygel-description-file.vala
@@ -222,23 +222,28 @@ public class Rygel.DescriptionFile : Object {
} catch (GLib.Error error) { }
if (allow_upload) {
+ bool can_upload = false;
if (PluginCapabilities.IMAGE_UPLOAD in capabilities) {
flags += "image-upload";
+ can_upload = true;
}
if (PluginCapabilities.VIDEO_UPLOAD in capabilities) {
flags += "av-upload";
+ can_upload = true;
}
if (PluginCapabilities.AUDIO_UPLOAD in capabilities) {
flags += "audio-upload";
+ can_upload = true;
}
- }
- if (allow_delete) {
- flags += "create-item-with-OCM-destroy-item";
+ // destroy capablity needs to co-exist with at least one
+ // of the upload caps. DLNA 2014, 7.4.1.8.4.1, Table 26
+ if (allow_delete && can_upload) {
+ flags += "create-item-with-OCM-destroy-item";
+ }
}
-
}
if (PluginCapabilities.TRACK_CHANGES in capabilities) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]