"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
dlna: add connection manager service description
Dan Walterscaf318d4999d
diff --git a/cmd/serve/dlna/cm-service-desc.go b/cmd/serve/dlna/cm-service-desc.gonew file mode 100644index 000000000..8147d0317--- /dev/null+++ b/cmd/serve/dlna/cm-service-desc.go@@ -0,0 +1,184 @@+package dlna++const connectionManagerServiceDescription = `<?xml version="1.0" encoding="UTF-8"?>+<scpd xmlns="urn:schemas-upnp-org:service-1-0">+ <specVersion>+ <major>1</major>+ <minor>0</minor>+ </specVersion>+ <actionList>+ <action>+ <name>GetProtocolInfo</name>+ <argumentList>+ <argument>+ <name>Source</name>+ <direction>out</direction>+ <relatedStateVariable>SourceProtocolInfo</relatedStateVariable>+ </argument>+ <argument>+ <name>Sink</name>+ <direction>out</direction>+ <relatedStateVariable>SinkProtocolInfo</relatedStateVariable>+ </argument>+ </argumentList>+ </action>+ <action>+ <name>PrepareForConnection</name>+ <argumentList>+ <argument>+ <name>RemoteProtocolInfo</name>+ <direction>in</direction>+ <relatedStateVariable>A_ARG_TYPE_ProtocolInfo</relatedStateVariable>+ </argument>+ <argument>+ <name>PeerConnectionManager</name>+ <direction>in</direction>+ <relatedStateVariable>A_ARG_TYPE_ConnectionManager</relatedStateVariable>+ </argument>+ <argument>+ <name>PeerConnectionID</name>+ <direction>in</direction>+ <relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>+ </argument>+ <argument>+ <name>Direction</name>+ <direction>in</direction>+ <relatedStateVariable>A_ARG_TYPE_Direction</relatedStateVariable>+ </argument>+ <argument>+ <name>ConnectionID</name>+ <direction>out</direction>+ <relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>+ </argument>+ <argument>+ <name>AVTransportID</name>+ <direction>out</direction>+ <relatedStateVariable>A_ARG_TYPE_AVTransportID</relatedStateVariable>+ </argument>+ <argument>+ <name>RcsID</name>+ <direction>out</direction>+ <relatedStateVariable>A_ARG_TYPE_RcsID</relatedStateVariable>+ </argument>+ </argumentList>+ </action>+ <action>+ <name>ConnectionComplete</name>+ <argumentList>+ <argument>+ <name>ConnectionID</name>+ <direction>in</direction>+ <relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>+ </argument>+ </argumentList>+ </action>+ <action>+ <name>GetCurrentConnectionIDs</name>+ <argumentList>+ <argument>+ <name>ConnectionIDs</name>+ <direction>out</direction>+ <relatedStateVariable>CurrentConnectionIDs</relatedStateVariable>+ </argument>+ </argumentList>+ </action>+ <action>+ <name>GetCurrentConnectionInfo</name>+ <argumentList>+ <argument>+ <name>ConnectionID</name>+ <direction>in</direction>+ <relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>+ </argument>+ <argument>+ <name>RcsID</name>+ <direction>out</direction>+ <relatedStateVariable>A_ARG_TYPE_RcsID</relatedStateVariable>+ </argument>+ <argument>+ <name>AVTransportID</name>+ <direction>out</direction>+ <relatedStateVariable>A_ARG_TYPE_AVTransportID</relatedStateVariable>+ </argument>+ <argument>+ <name>ProtocolInfo</name>+ <direction>out</direction>+ <relatedStateVariable>A_ARG_TYPE_ProtocolInfo</relatedStateVariable>+ </argument>+ <argument>+ <name>PeerConnectionManager</name>+ <direction>out</direction>+ <relatedStateVariable>A_ARG_TYPE_ConnectionManager</relatedStateVariable>+ </argument>+ <argument>+ <name>PeerConnectionID</name>+ <direction>out</direction>+ <relatedStateVariable>A_ARG_TYPE_ConnectionID</relatedStateVariable>+ </argument>+ <argument>+ <name>Direction</name>+ <direction>out</direction>+ <relatedStateVariable>A_ARG_TYPE_Direction</relatedStateVariable>+ </argument>+ <argument>+ <name>Status</name>+ <direction>out</direction>+ <relatedStateVariable>A_ARG_TYPE_ConnectionStatus</relatedStateVariable>+ </argument>+ </argumentList>+ </action>+ </actionList>+ <serviceStateTable>+ <stateVariable sendEvents="yes">+ <name>SourceProtocolInfo</name>+ <dataType>string</dataType>+ </stateVariable>+ <stateVariable sendEvents="yes">+ <name>SinkProtocolInfo</name>+ <dataType>string</dataType>+ </stateVariable>+ <stateVariable sendEvents="yes">+ <name>CurrentConnectionIDs</name>+ <dataType>string</dataType>+ </stateVariable>+ <stateVariable sendEvents="no">+ <name>A_ARG_TYPE_ConnectionStatus</name>+ <dataType>string</dataType>+ <allowedValueList>+ <allowedValue>OK</allowedValue>+ <allowedValue>ContentFormatMismatch</allowedValue>+ <allowedValue>InsufficientBandwidth</allowedValue>+ <allowedValue>UnreliableChannel</allowedValue>+ <allowedValue>Unknown</allowedValue>+ </allowedValueList>+ </stateVariable>+ <stateVariable sendEvents="no">+ <name>A_ARG_TYPE_ConnectionManager</name>+ <dataType>string</dataType>+ </stateVariable>+ <stateVariable sendEvents="no">+ <name>A_ARG_TYPE_Direction</name>+ <dataType>string</dataType>+ <allowedValueList>+ <allowedValue>Input</allowedValue>+ <allowedValue>Output</allowedValue>+ </allowedValueList>+ </stateVariable>+ <stateVariable sendEvents="no">+ <name>A_ARG_TYPE_ProtocolInfo</name>+ <dataType>string</dataType>+ </stateVariable>+ <stateVariable sendEvents="no">+ <name>A_ARG_TYPE_ConnectionID</name>+ <dataType>i4</dataType>+ </stateVariable>+ <stateVariable sendEvents="no">+ <name>A_ARG_TYPE_AVTransportID</name>+ <dataType>i4</dataType>+ </stateVariable>+ <stateVariable sendEvents="no">+ <name>A_ARG_TYPE_RcsID</name>+ <dataType>i4</dataType>+ </stateVariable>+ </serviceStateTable>+</scpd>`diff --git a/cmd/serve/dlna/dlna.go b/cmd/serve/dlna/dlna.goindex b430634a4..df8dec1bd 100644--- a/cmd/serve/dlna/dlna.go+++ b/cmd/serve/dlna/dlna.go@@ -84,6 +84,14 @@ var services = []*service{},SCPD: contentDirectoryServiceDescription,},+ {+ Service: upnp.Service{+ ServiceType: "urn:schemas-upnp-org:service:ConnectionManager:1",+ ServiceId: "urn:upnp-org:serviceId:ConnectionManager",+ ControlURL: serviceControlURL,+ },+ SCPD: connectionManagerServiceDescription,+ },}func init() {diff --git a/cmd/serve/dlna/dlna_test.go b/cmd/serve/dlna/dlna_test.goindex a2ef03445..8c5492117 100644--- a/cmd/serve/dlna/dlna_test.go+++ b/cmd/serve/dlna/dlna_test.go@@ -59,6 +59,9 @@ func TestRootSCPD(t *testing.T) {// Make sure that the SCPD contains a CDS service.require.Contains(t, string(body),"<serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>")+ // Make sure that the SCPD contains a CM service.+ require.Contains(t, string(body),+ "<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>")// Ensure that the SCPD url is configured.require.Regexp(t, "<SCPDURL>/.*</SCPDURL>", string(body))}