soapcalls

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMRstate

func CreateMRstate(uuid string)

CreateMRstate .

func DeleteMRstate

func DeleteMRstate(uuid string)

DeleteMRstate .

func EventNotifyParser

func EventNotifyParser(xmlbody string) (string, string, error)

EventNotifyParser - Parse the Notify messages from the media renderer.

func GetFriendlyName

func GetFriendlyName(dmr string) (string, error)

GetFriendlyName - Get the friendly name value for a the specific DMR url.

func GetSequence

func GetSequence(uuid string) (int, error)

GetSequence .

func IncreaseSequence

func IncreaseSequence(uuid string)

IncreaseSequence .

func UpdateMRstate

func UpdateMRstate(previous, new, uuid string) bool

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 Root

type Root struct {
	XMLName xml.Name `xml:"root"`
	Device  Device   `xml:"device"`
}

Root - root node.

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

type ServiceList struct {
	XMLName  xml.Name  `xml:"serviceList"`
	Services []Service `xml:"service"`
}

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

func (p *TVPayload) GetMuteSoapCall() (string, error)

GetMuteSoapCall - Return mute status for target device

func (*TVPayload) GetVolumeSoapCall

func (p *TVPayload) GetVolumeSoapCall() (int, error)

GetVolumeSoapCall - Return volume levels for target device

func (*TVPayload) RefreshLoopUUIDSoapCall

func (p *TVPayload) RefreshLoopUUIDSoapCall(uuid, timeout string) error

RefreshLoopUUIDSoapCall - Refresh the UUID.

func (*TVPayload) SendtoTV

func (p *TVPayload) SendtoTV(action string) error

SendtoTV - Send to TV.

func (*TVPayload) SetMuteSoapCall

func (p *TVPayload) SetMuteSoapCall(number string) error

SetMuteSoapCall - Return true if muted and false if not muted/

func (*TVPayload) SetVolumeSoapCall

func (p *TVPayload) SetVolumeSoapCall(v string) error

SetVolumeSoapCall - Set the desired volume levels

func (*TVPayload) SubscribeSoapCall

func (p *TVPayload) SubscribeSoapCall(uuidInput string) error

SubscribeSoapCall - Subscribe to a media renderer If we explicitly pass the uuid, then we refresh it instead.

func (*TVPayload) UnsubscribeSoapCall

func (p *TVPayload) UnsubscribeSoapCall(uuid string) error

UnsubscribeSoapCall - exported that as we use it for the callback stuff in the httphandlers package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL