Documentation
¶
Index ¶
- func CreateMRstate(uuid string)
- func DeleteMRstate(uuid string)
- func EventNotifyParser(xmlbody string) (string, string, error)
- func GetFriendlyName(dmr string) (string, error)
- func GetSequence(uuid string) (int, error)
- func IncreaseSequence(uuid string)
- func UpdateMRstate(previous, new, uuid string) bool
- type CurrentURIMetaData
- type DIDLLite
- type DIDLLiteItem
- type DMRextracted
- type Device
- type EventCurrentTransportActions
- type EventInstance
- type EventPropertySet
- type EventTransportState
- type GetMuteAction
- type GetMuteBody
- type GetMuteEnvelope
- type GetMuteRespBody
- type GetVolumeAction
- type GetVolumeBody
- type GetVolumeEnvelope
- type GetVolumeRespBody
- type PauseAction
- type PauseBody
- type PauseEnvelope
- type PlayAction
- type PlayBody
- type PlayEnvelope
- type ResNode
- type Root
- type SecCaptionInfo
- type SecCaptionInfoEx
- type Service
- type ServiceList
- type SetAVTransportBody
- type SetAVTransportEnvelope
- type SetAVTransportURI
- type SetMuteAction
- type SetMuteBody
- type SetMuteEnvelope
- type SetVolumeAction
- type SetVolumeBody
- type SetVolumeEnvelope
- type StopAction
- type StopBody
- type StopEnvelope
- type TVPayload
- func (p *TVPayload) GetMuteSoapCall() (string, error)
- func (p *TVPayload) GetVolumeSoapCall() (int, error)
- func (p *TVPayload) RefreshLoopUUIDSoapCall(uuid, timeout string) error
- func (p *TVPayload) SendtoTV(action string) error
- func (p *TVPayload) SetMuteSoapCall(number string) error
- func (p *TVPayload) SetVolumeSoapCall(v string) error
- func (p *TVPayload) SubscribeSoapCall(uuidInput string) error
- func (p *TVPayload) UnsubscribeSoapCall(uuid string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventNotifyParser ¶
EventNotifyParser - Parse the Notify messages from the media renderer.
func GetFriendlyName ¶
GetFriendlyName - Get the friendly name value for a the specific DMR url.
func UpdateMRstate ¶
UpdateMRstate - Update the mediaRenderersStates map with the state. Return true or false to verify that the actual update took place.
Types ¶
type CurrentURIMetaData ¶
type CurrentURIMetaData struct {
XMLName xml.Name `xml:"CurrentURIMetaData"`
Value []byte `xml:",chardata"`
}
CurrentURIMetaData .
type DIDLLite ¶
type DIDLLite struct {
XMLName xml.Name `xml:"DIDL-Lite"`
SchemaDIDL string `xml:"xmlns,attr"`
DC string `xml:"xmlns:dc,attr"`
Sec string `xml:"xmlns:sec,attr"`
SchemaUPNP string `xml:"xmlns:upnp,attr"`
DIDLLiteItem DIDLLiteItem `xml:"item"`
}
DIDLLite .
type DIDLLiteItem ¶
type DIDLLiteItem struct {
SecCaptionInfo SecCaptionInfo `xml:"sec:CaptionInfo"`
SecCaptionInfoEx SecCaptionInfoEx `xml:"sec:CaptionInfoEx"`
XMLName xml.Name `xml:"item"`
Restricted string `xml:"restricted,attr"`
UPNPClass string `xml:"upnp:class"`
DCtitle string `xml:"dc:title"`
ID string `xml:"id,attr"`
ParentID string `xml:"parentID,attr"`
ResNode []ResNode `xml:"res"`
}
DIDLLiteItem .
type DMRextracted ¶
type DMRextracted struct {
AvtransportControlURL string
AvtransportEventSubURL string
RenderingControlURL string
}
DMRextracted .
func DMRextractor ¶
func DMRextractor(dmrurl string) (*DMRextracted, error)
DMRextractor - Get the AVTransport URL from the main DMR xml.
type Device ¶
type Device struct {
XMLName xml.Name `xml:"device"`
ServiceList ServiceList `xml:"serviceList"`
}
Device - device node (we should only expect one?).
type EventCurrentTransportActions ¶
type EventCurrentTransportActions struct {
Value string `xml:"val,attr"`
}
EventCurrentTransportActions .
type EventInstance ¶
type EventInstance struct {
XMLName xml.Name `xml:"InstanceID"`
Value string `xml:"val,attr"`
EventCurrentTransportActions EventCurrentTransportActions `xml:"CurrentTransportActions"`
EventTransportState EventTransportState `xml:"TransportState"`
}
EventInstance .
type EventPropertySet ¶
type EventPropertySet struct {
XMLName xml.Name `xml:"propertyset"`
EventInstance EventInstance `xml:"property>LastChange>Event>InstanceID"`
}
EventPropertySet .
type EventTransportState ¶
type EventTransportState struct {
Value string `xml:"val,attr"`
}
EventTransportState .
type GetMuteAction ¶
type GetMuteAction struct {
XMLName xml.Name `xml:"u:GetMute"`
RenderingControl string `xml:"xmlns:u,attr"`
InstanceID string
Channel string
}
GetMuteAction .
type GetMuteBody ¶
type GetMuteBody struct {
XMLName xml.Name `xml:"s:Body"`
GetMuteAction GetMuteAction `xml:"u:GetMute"`
}
GetMuteBody .
type GetMuteEnvelope ¶
type GetMuteEnvelope struct {
XMLName xml.Name `xml:"s:Envelope"`
Schema string `xml:"xmlns:s,attr"`
Encoding string `xml:"s:encodingStyle,attr"`
GetMuteBody GetMuteBody `xml:"s:Body"`
}
GetMuteEnvelope - As in Play Pause Stop.
type GetMuteRespBody ¶
type GetMuteRespBody struct {
XMLName xml.Name `xml:"Envelope"`
Text string `xml:",chardata"`
EncodingStyle string `xml:"encodingStyle,attr"`
S string `xml:"s,attr"`
Body struct {
Text string `xml:",chardata"`
GetMuteResponse struct {
Text string `xml:",chardata"`
U string `xml:"u,attr"`
CurrentMute string `xml:"CurrentMute"`
} `xml:"GetMuteResponse"`
} `xml:"Body"`
}
GetMuteRespBody - Build the GetMute response body
type GetVolumeAction ¶
type GetVolumeAction struct {
XMLName xml.Name `xml:"u:GetVolume"`
RenderingControl string `xml:"xmlns:u,attr"`
InstanceID string
Channel string
}
GetVolumeAction .
type GetVolumeBody ¶
type GetVolumeBody struct {
XMLName xml.Name `xml:"s:Body"`
GetVolumeAction GetVolumeAction `xml:"u:GetVolume"`
}
GetVolumeBody .
type GetVolumeEnvelope ¶
type GetVolumeEnvelope struct {
XMLName xml.Name `xml:"s:Envelope"`
Schema string `xml:"xmlns:s,attr"`
Encoding string `xml:"s:encodingStyle,attr"`
GetVolumeBody GetVolumeBody `xml:"s:Body"`
}
GetVolumeEnvelope .
type GetVolumeRespBody ¶
type GetVolumeRespBody struct {
XMLName xml.Name `xml:"Envelope"`
Text string `xml:",chardata"`
EncodingStyle string `xml:"encodingStyle,attr"`
S string `xml:"s,attr"`
Body struct {
Text string `xml:",chardata"`
GetVolumeResponse struct {
Text string `xml:",chardata"`
U string `xml:"u,attr"`
CurrentVolume string `xml:"CurrentVolume"`
} `xml:"GetVolumeResponse"`
} `xml:"Body"`
}
GetVolumeRespBody - Build the GetVolume response body
type PauseAction ¶
type PauseAction struct {
XMLName xml.Name `xml:"u:Pause"`
AVTransport string `xml:"xmlns:u,attr"`
InstanceID string
Speed string
}
PauseAction .
type PauseBody ¶
type PauseBody struct {
XMLName xml.Name `xml:"s:Body"`
PauseAction PauseAction `xml:"u:Pause"`
}
PauseBody .
type PauseEnvelope ¶
type PauseEnvelope struct {
XMLName xml.Name `xml:"s:Envelope"`
Schema string `xml:"xmlns:s,attr"`
Encoding string `xml:"s:encodingStyle,attr"`
PauseBody PauseBody `xml:"s:Body"`
}
PauseEnvelope - As in Play Pause Stop.
type PlayAction ¶
type PlayAction struct {
XMLName xml.Name `xml:"u:Play"`
AVTransport string `xml:"xmlns:u,attr"`
InstanceID string
Speed string
}
PlayAction .
type PlayBody ¶
type PlayBody struct {
XMLName xml.Name `xml:"s:Body"`
PlayAction PlayAction `xml:"u:Play"`
}
PlayBody .
type PlayEnvelope ¶
type PlayEnvelope struct {
XMLName xml.Name `xml:"s:Envelope"`
Schema string `xml:"xmlns:s,attr"`
Encoding string `xml:"s:encodingStyle,attr"`
PlayBody PlayBody `xml:"s:Body"`
}
PlayEnvelope - As in Play Pause Stop.
type ResNode ¶
type ResNode struct {
XMLName xml.Name `xml:"res"`
ProtocolInfo string `xml:"protocolInfo,attr"`
Value string `xml:",chardata"`
}
ResNode .
type SecCaptionInfo ¶
type SecCaptionInfo struct {
XMLName xml.Name `xml:"sec:CaptionInfo"`
Type string `xml:"sec:type,attr"`
Value string `xml:",chardata"`
}
SecCaptionInfo .
type SecCaptionInfoEx ¶
type SecCaptionInfoEx struct {
XMLName xml.Name `xml:"sec:CaptionInfoEx"`
Type string `xml:"sec:type,attr"`
Value string `xml:",chardata"`
}
SecCaptionInfoEx .
type Service ¶
type Service struct {
XMLName xml.Name `xml:"service"`
Type string `xml:"serviceType"`
ID string `xml:"serviceId"`
ControlURL string `xml:"controlURL"`
EventSubURL string `xml:"eventSubURL"`
}
Service - service node.
type ServiceList ¶
ServiceList - serviceList node
type SetAVTransportBody ¶
type SetAVTransportBody struct {
XMLName xml.Name `xml:"s:Body"`
SetAVTransportURI SetAVTransportURI `xml:"u:SetAVTransportURI"`
}
SetAVTransportBody .
type SetAVTransportEnvelope ¶
type SetAVTransportEnvelope struct {
XMLName xml.Name `xml:"s:Envelope"`
Schema string `xml:"xmlns:s,attr"`
Encoding string `xml:"s:encodingStyle,attr"`
Body SetAVTransportBody `xml:"s:Body"`
}
SetAVTransportEnvelope .
type SetAVTransportURI ¶
type SetAVTransportURI struct {
XMLName xml.Name `xml:"u:SetAVTransportURI"`
AVTransport string `xml:"xmlns:u,attr"`
InstanceID string
CurrentURI string
CurrentURIMetaData CurrentURIMetaData `xml:"CurrentURIMetaData"`
}
SetAVTransportURI .
type SetMuteAction ¶
type SetMuteAction struct {
XMLName xml.Name `xml:"u:SetMute"`
RenderingControl string `xml:"xmlns:u,attr"`
InstanceID string
Channel string
DesiredMute string
}
SetMuteAction .
type SetMuteBody ¶
type SetMuteBody struct {
XMLName xml.Name `xml:"s:Body"`
SetMuteAction SetMuteAction `xml:"u:SetMute"`
}
SetMuteBody .
type SetMuteEnvelope ¶
type SetMuteEnvelope struct {
XMLName xml.Name `xml:"s:Envelope"`
Schema string `xml:"xmlns:s,attr"`
Encoding string `xml:"s:encodingStyle,attr"`
SetMuteBody SetMuteBody `xml:"s:Body"`
}
SetMuteEnvelope - As in Play Pause Stop.
type SetVolumeAction ¶
type SetVolumeAction struct {
XMLName xml.Name `xml:"u:SetVolume"`
RenderingControl string `xml:"xmlns:u,attr"`
InstanceID string
Channel string
DesiredVolume string
}
SetVolumeAction .
type SetVolumeBody ¶
type SetVolumeBody struct {
XMLName xml.Name `xml:"s:Body"`
SetVolumeAction SetVolumeAction `xml:"u:SetVolume"`
}
SetVolumeBody .
type SetVolumeEnvelope ¶
type SetVolumeEnvelope struct {
XMLName xml.Name `xml:"s:Envelope"`
Schema string `xml:"xmlns:s,attr"`
Encoding string `xml:"s:encodingStyle,attr"`
SetVolumeBody SetVolumeBody `xml:"s:Body"`
}
SetVolumeEnvelope - As in Play Pause Stop.
type StopAction ¶
type StopAction struct {
XMLName xml.Name `xml:"u:Stop"`
AVTransport string `xml:"xmlns:u,attr"`
InstanceID string
Speed string
}
StopAction .
type StopBody ¶
type StopBody struct {
XMLName xml.Name `xml:"s:Body"`
StopAction StopAction `xml:"u:Stop"`
}
StopBody .
type StopEnvelope ¶
type StopEnvelope struct {
XMLName xml.Name `xml:"s:Envelope"`
Schema string `xml:"xmlns:s,attr"`
Encoding string `xml:"s:encodingStyle,attr"`
StopBody StopBody `xml:"s:Body"`
}
StopEnvelope - As in Play Pause Stop.
type TVPayload ¶
type TVPayload struct {
MediaFile interface{}
CurrentTimers map[string]*time.Timer
ControlURL string
SubtitlesURL string
EventURL string
CallbackURL string
RenderingControlURL string
MediaURL string
MediaType string
}
TVPayload - this is the heart of Go2TV.
func (*TVPayload) GetMuteSoapCall ¶
GetMuteSoapCall - Return mute status for target device
func (*TVPayload) GetVolumeSoapCall ¶
GetVolumeSoapCall - Return volume levels for target device
func (*TVPayload) RefreshLoopUUIDSoapCall ¶
RefreshLoopUUIDSoapCall - Refresh the UUID.
func (*TVPayload) SetMuteSoapCall ¶
SetMuteSoapCall - Return true if muted and false if not muted/
func (*TVPayload) SetVolumeSoapCall ¶
SetVolumeSoapCall - Set the desired volume levels
func (*TVPayload) SubscribeSoapCall ¶
SubscribeSoapCall - Subscribe to a media renderer If we explicitly pass the uuid, then we refresh it instead.
func (*TVPayload) UnsubscribeSoapCall ¶
UnsubscribeSoapCall - exported that as we use it for the callback stuff in the httphandlers package.