Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

514 B
Raw Blame
package dlna

import (
	"net/http"

	"github.com/anacrolix/dms/upnp"
)

type mediaReceiverRegistrarService struct {
	*server
	upnp.Eventing
}

func (mrrs *mediaReceiverRegistrarService) Handle(action string, argsXML []byte, r *http.Request) ([]soapArg, error) {
	switch action {
	case "IsAuthorized", "IsValidated":
		return soapArgs(
			"Result", "1",
		), nil
	case "RegisterDevice":
		return soapArgs(
			"RegistrationRespMsg", mrrs.RootDeviceUUID,
		), nil
	default:
		return nil, upnp.InvalidActionError
	}
}