Documentation ¶
Overview ¶
Package upnp contains common objects and values that defined in UPnP specification. They will be used in device & service implementations.
Index ¶
Constants ¶
View Source
const ( DeviceTypeMediaServer1 = "urn:schemas-upnp-org:device:MediaServer:1" DeviceTypeMediaRenderer1 = "urn:schemas-upnp-org:device:MediaRenderer:1" )
View Source
const ( // Advertisement, UPnP DeviceArchitecture v1.0 - 1.1 MethodNotify = "NOTIFY" // Search, UPnP DeviceArchitecture v1.0 - 1.2 MethodSearch = "M-SEARCH" // Search, UPnP DeviceArchitecture v1.0 - 4.1, 4.2 MethodSubscribe = "SUBSCRIBE" // Search, UPnP DeviceArchitecture v1.0 - 4.3 MethodUnsubscribe = "UNSUBSCRIBE" )
View Source
const ( ServiceTypeConnectionManager1 = "urn:schemas-upnp-org:service:ConnectionManager:1" ServiceTypeContentDirectory1 = "urn:schemas-upnp-org:service:ContentDirectory:1" ServiceIdConnectionManager = "urn:upnp-org:serviceId:ConnectionManager" ServiceIdContentDirectory = "urn:upnp-org:serviceId:ContentDirectory" )
Variables ¶
View Source
var ( //go:embed desc/ConnectionManager1.xml ConnectionManager1Desc []byte //go:embed desc/ContentDirectory1.xml ContentDirectory1Desc []byte )
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device interface { // DeviceType returns UPnP device type that device impled. DeviceType() string // USN returns unique service name of this device. DeviceUSN() string // GetDeviceDescURL returns device desc URL on given ip. GetDeviceDescURL(ip string) string }
Device interface should be impled by an UPnP device.
type Service ¶
type Service interface { // DeviceType returns UPnP service type that the service impled. ServiceType() string // ServiceId returns UPnP service id of the service. ServiceId() string // ServiceDescURL returns desc URL of the service. ServiceDescURL() string // ServiceDescURL returns control URL of the service. ServiceControlURL() string // ServiceDescURL returns event URL of the service. ServiceEventURL() string }
Service interface should be impled by an UPnP service.
Click to show internal directories.
Click to hide internal directories.