Documentation
¶
Index ¶
Constants ¶
View Source
const ( DDDRoute = "ddd" ControlRoute = "control" SCPDRoute = "scpd" IconRoute = "icon" )
View Source
const ( InvalidActionErrorCode = 401 ActionFailedErrorCode = 501 ArgumentValueInvalidErrorCode = 600 )
View Source
const ( ServiceControlPath = "/control" SCPDPath = "/scpd.xml" ServiceSubscribePath = "/subscribe" )
Variables ¶
View Source
var ( InvalidActionError = Errorf(InvalidActionErrorCode, "Invalid Action") ArgumentValueInvalidError = Errorf(ArgumentValueInvalidErrorCode, "The argument value is invalid") )
Functions ¶
func ExpandTypes ¶
Types ¶
type Action ¶
func ActionFunc ¶
type Device ¶
type DeviceSpec ¶
type DeviceSpec struct {
DeviceType string `xml:"deviceType"`
FriendlyName string `xml:"friendlyName"`
Manufacturer string `xml:"manufacturer"`
ManufacturerURL string `xml:"manufacturerURL"`
ModelDescription string `xml:"modelDescription"`
ModelName string `xml:"modelName"`
ModelNumber uint `xml:"modelNumber"`
ModelURL string `xml:"modelURL"`
UDN string
UPC string
LastModified time.Time `xml:"-"`
}
type Error ¶
type Error struct {
XMLName xml.Name `xml:"urn:schemas-upnp-org:control-1-0 UPnPError"`
Code uint `xml:"errorCode"`
Desc string `xml:"errorDescription"`
}
func ConvertError ¶
ConvertError converts any error to an UPNP error
type Service ¶
type Service struct {
XMLName xml.Name `xml:"urn:schemas-upnp-org:service-1-0 scpd"`
SpecVersion specVersion `xml:"specVersion"`
ActionList []actionDesc `xml:"actionList>action"`
ServiceStateTable []stateVariableDesc `xml:"serviceStateTable>stateVariable"`
// contains filtered or unexported fields
}
Service describes an UPNP Service
func (*Service) AddActionFunc ¶
AddActionFunc converts the given function to an action and adds it to the service.
Click to show internal directories.
Click to hide internal directories.