From f0508f43937f1ec8b46d1428602c333f615aa607 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Thu, 12 Jul 2018 19:29:40 +0300 Subject: Add all basic XML messages --- src/notify.rs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/notify.rs (limited to 'src') diff --git a/src/notify.rs b/src/notify.rs new file mode 100644 index 0000000..60821cd --- /dev/null +++ b/src/notify.rs @@ -0,0 +1,37 @@ +const SOAP_ACTION_PREFIX: &'static str = "urn:schemas-upnp-org:service:AVTransport:1#"; +const ACTION_SET_URI: &'static str = "SetAVTransportURI"; +const ACTION_PLAY: &'static str = "Play"; +const ACTION_PAUSE: &'static str = "Pause"; +const ACTION_STOP: &'static str = "Stop"; + +const BODY_SET_URI: &'static str = r#" + + + + 0 + http://10.5.1.243:51497/0 + <DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sec="http://www.sec.co.kr/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"><item id="0" parentID="-1" restricted="false"><upnp:class>object.item.videoItem.movie</upnp:class><dc:title>dlnanow</dc:title><res protocolInfo="http-get:*:video/mp4:*">http://10.5.1.243:51497/0</res></item></DIDL-Lite> + + +"#; + +const BODY_PLAY: &'static str = r#" + + + + + 0 + 1 + + +"#; + +const BODY_STOP: &'static str = r#" + + + + + 0 + + +"#; -- cgit v1.3.1