Documentation
¶
Overview ¶
Package musicservices is a generated MusicServices package.
Index ¶
- Constants
- type GetSessionIdArgs
- type GetSessionIdResponse
- type ListAvailableServicesArgs
- type ListAvailableServicesResponse
- type Property
- type Service
- func (s *Service) Client() *http.Client
- func (s *Service) ControlEndpoint() *url.URL
- func (s *Service) EventEndpoint() *url.URL
- func (s *Service) GetSessionId(args *GetSessionIdArgs) (*GetSessionIdResponse, error)
- func (s *Service) ListAvailableServices(args *ListAvailableServicesArgs) (*ListAvailableServicesResponse, error)
- func (s *Service) Location() *url.URL
- func (zp *Service) ParseEvent(body []byte) []interface{}
- func (s *Service) UpdateAvailableServices(args *UpdateAvailableServicesArgs) (*UpdateAvailableServicesResponse, error)
- type ServiceListVersion
- type ServiceOption
- type UpdateAvailableServicesArgs
- type UpdateAvailableServicesResponse
- type UpnpEvent
Constants ¶
const ( ServiceURN = "urn:schemas-upnp-org:service:MusicServices:1" EncodingSchema = "http://schemas.xmlsoap.org/soap/encoding/" EnvelopeSchema = "http://schemas.xmlsoap.org/soap/envelope/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetSessionIdArgs ¶
type GetSessionIdArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
ServiceId uint32 `xml:"ServiceId"`
Username string `xml:"Username"`
}
GetSessionId Argument type.
type GetSessionIdResponse ¶
type GetSessionIdResponse struct {
SessionId string `xml:"SessionId"`
}
GetSessionId Response type.
type ListAvailableServicesArgs ¶
type ListAvailableServicesArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
}
ListAvailableServices Argument type.
type ListAvailableServicesResponse ¶
type ListAvailableServicesResponse struct {
AvailableServiceDescriptorList string `xml:"AvailableServiceDescriptorList"`
AvailableServiceTypeList string `xml:"AvailableServiceTypeList"`
AvailableServiceListVersion string `xml:"AvailableServiceListVersion"`
}
ListAvailableServices Response type.
type Property ¶
type Property struct {
XMLName xml.Name `xml:"property"`
ServiceListVersion *ServiceListVersion `xml:"ServiceListVersion"`
}
Property represents a single property in a UPnP event notification.
type Service ¶
type Service struct {
ServiceListVersion *ServiceListVersion
// contains filtered or unexported fields
}
Service represents MusicServices service.
func NewService ¶
func NewService(opts ...ServiceOption) *Service
NewService creates a new instance of the MusicServices service. You must provide at least a location URL and an HTTP client using the options.
func (*Service) ControlEndpoint ¶
ControlEndpoint returns the control endpoint URL of the service. This is usually a URL relative to the device's base URL.
func (*Service) EventEndpoint ¶
EventEndpoint returns the event endpoint URL of the service. This is usually a URL relative to the device's base URL.
func (*Service) GetSessionId ¶
func (s *Service) GetSessionId(args *GetSessionIdArgs) (*GetSessionIdResponse, error)
GetSessionId calls the GetSessionId action on the service.
func (*Service) ListAvailableServices ¶
func (s *Service) ListAvailableServices(args *ListAvailableServicesArgs) (*ListAvailableServicesResponse, error)
ListAvailableServices calls the ListAvailableServices action on the service.
func (*Service) ParseEvent ¶
ParseEvent parses a UPnP event notification and updates the service's state variables accordingly. It returns a slice of updated state variable values.
func (*Service) UpdateAvailableServices ¶
func (s *Service) UpdateAvailableServices(args *UpdateAvailableServicesArgs) (*UpdateAvailableServicesResponse, error)
UpdateAvailableServices calls the UpdateAvailableServices action on the service.
type ServiceOption ¶
type ServiceOption func(*Service)
func WithClient ¶
func WithClient(c *http.Client) ServiceOption
func WithLocation ¶
func WithLocation(u *url.URL) ServiceOption
type UpdateAvailableServicesArgs ¶
type UpdateAvailableServicesArgs struct {
Xmlns string `xml:"xmlns:u,attr"`
}
UpdateAvailableServices Argument type.
type UpdateAvailableServicesResponse ¶
type UpdateAvailableServicesResponse struct {
}
UpdateAvailableServices Response type.