| 37 | } |
| 38 | |
| 39 | func getCapability() (xmlContent []byte, err error) { |
| 40 | |
| 41 | var capability Capability |
| 42 | var buffer bytes.Buffer |
| 43 | |
| 44 | capability.Xmlns = "urn:schemas-upnp-org:device-1-0" |
| 45 | capability.URLBase = System.ServerProtocol.WEB + "://" + System.Domain |
| 46 | |
| 47 | capability.SpecVersion.Major = 1 |
| 48 | capability.SpecVersion.Minor = 0 |
| 49 | |
| 50 | capability.Device.DeviceType = "urn:schemas-upnp-org:device:MediaServer:1" |
| 51 | capability.Device.FriendlyName = System.Name |
| 52 | capability.Device.Manufacturer = "Silicondust" |
| 53 | capability.Device.ModelName = "HDTC-2US" |
| 54 | capability.Device.ModelNumber = "HDTC-2US" |
| 55 | capability.Device.SerialNumber = "" |
| 56 | capability.Device.UDN = "uuid:" + System.DeviceID |
| 57 | |
| 58 | output, err := xml.MarshalIndent(capability, " ", " ") |
| 59 | if err != nil { |
| 60 | ShowError(err, 1003) |
| 61 | } |
| 62 | |
| 63 | buffer.Write([]byte(xml.Header)) |
| 64 | buffer.Write([]byte(output)) |
| 65 | xmlContent = buffer.Bytes() |
| 66 | |
| 67 | return |
| 68 | } |
| 69 | |
| 70 | func getDiscover() (jsonContent []byte, err error) { |
| 71 | |