github.com/divyam234/rclone@v1.64.1/cmd/serve/dlna/mrrs.go (about) 1 package dlna 2 3 import ( 4 "net/http" 5 6 "github.com/anacrolix/dms/upnp" 7 ) 8 9 type mediaReceiverRegistrarService struct { 10 *server 11 upnp.Eventing 12 } 13 14 func (mrrs *mediaReceiverRegistrarService) Handle(action string, argsXML []byte, r *http.Request) (map[string]string, error) { 15 switch action { 16 case "IsAuthorized", "IsValidated": 17 return map[string]string{ 18 "Result": "1", 19 }, nil 20 case "RegisterDevice": 21 return map[string]string{ 22 "RegistrationRespMsg": mrrs.RootDeviceUUID, 23 }, nil 24 default: 25 return nil, upnp.InvalidActionError 26 } 27 }