Documentation ¶
Index ¶
- Constants
- Variables
- func FormatUUID(buf []byte) string
- func ParseCallbackURLs(callback string) (ret []*url.URL)
- type Action
- type Argument
- type Device
- type DeviceDesc
- type Error
- type Eventing
- type Icon
- type Property
- type PropertySet
- type SCPD
- type Service
- type ServiceURN
- type SoapAction
- type SpecVersion
- type StateVariable
- type Variable
Constants ¶
View Source
const ( InvalidActionErrorCode = 401 ActionFailedErrorCode = 501 ArgumentValueInvalidErrorCode = 600 )
Variables ¶
View Source
var ( InvalidActionError = Errorf(401, "Invalid Action") ArgumentValueInvalidError = Errorf(600, "The argument value is invalid") )
Functions ¶
func FormatUUID ¶
func ParseCallbackURLs ¶
Parse the CALLBACK HTTP header in an event subscription request. See UPnP Device Architecture 4.1.2.
Types ¶
type Device ¶
type Device struct { DeviceType string `xml:"deviceType"` FriendlyName string `xml:"friendlyName"` Manufacturer string `xml:"manufacturer"` ModelName string `xml:"modelName"` UDN string VendorXML string `xml:",innerxml"` IconList []Icon `xml:"iconList>icon"` ServiceList []Service `xml:"serviceList>service"` PresentationURL string `xml:"presentationURL,omitempty"` }
type DeviceDesc ¶
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 Eventing ¶
type Eventing struct {
// contains filtered or unexported fields
}
Intended to eventually be an embeddable implementation for managing eventing for a service. Not complete.
func (*Eventing) Unsubscribe ¶
type Property ¶
type Property struct { XMLName struct{} `xml:"e:property"` Variable Variable }
propertys provide namespacing to the contained variables.
type PropertySet ¶
type PropertySet struct { XMLName struct{} `xml:"e:propertyset"` Properties []Property // This should be set to `"urn:schemas-upnp-org:event-1-0"`. Space string `xml:"xmlns:e,attr"` }
propertyset is the root element sent in an event callback.
type SCPD ¶
type SCPD struct { XMLName xml.Name `xml:"urn:schemas-upnp-org:service-1-0 scpd"` SpecVersion SpecVersion `xml:"specVersion"` ActionList []Action `xml:"actionList>action"` ServiceStateTable []StateVariable `xml:"serviceStateTable>stateVariable"` }
type ServiceURN ¶
func ParseServiceType ¶
func ParseServiceType(s string) (ret ServiceURN, err error)
func (ServiceURN) String ¶
func (me ServiceURN) String() string
type SoapAction ¶
type SoapAction struct { ServiceURN Action string }
func ParseActionHTTPHeader ¶
func ParseActionHTTPHeader(s string) (ret SoapAction, err error)
type SpecVersion ¶
type StateVariable ¶
Click to show internal directories.
Click to hide internal directories.