backendgupnp

package
v0.0.0-...-366e4d7 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2016 License: GPL-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package backendgupnp provides interaction with UPnP ressources on the network using the C gupnp backend.

Index

Constants

View Source
const (
	SchemaAVTransport      = "urn:schemas-upnp-org:service:AVTransport"
	SchemaRenderingControl = "urn:schemas-upnp-org:service:RenderingControl"
	SchemaContentDirectory = "urn:schemas-upnp-org:service:ContentDirectory"
	SchemaMediaRenderer    = "urn:schemas-upnp-org:device:MediaRenderer:1"
	SchemaMediaServer      = "urn:schemas-upnp-org:device:MediaServer:1"
)

UPnP schemas names.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlPoint

type ControlPoint struct {
	// contains filtered or unexported fields
}

ControlPoint handles UPnP devices on the network.

func NewControlPoint

func NewControlPoint() *ControlPoint

NewControlPoint creates an UPnP devices manager.

func (*ControlPoint) Rescan

func (cp *ControlPoint) Rescan()

Rescan network for servers and renderers.

func (*ControlPoint) SetEvents

func (cp *ControlPoint) SetEvents(events upnptype.ControlPointEvents)

SetEvents sets the manager callbacks.

type Renderer

type Renderer struct {
	Current int // current timer position in seconds.
	// contains filtered or unexported fields
}

func (*Renderer) AddMultipleURIsToQueue

func (rend *Renderer) AddMultipleURIsToQueue(instanceID uint32, req *upnptype.AddMultipleURIsToQueueIn) (*upnptype.AddMultipleURIsToQueueOut, error)

func (*Renderer) AddURIToQueue

func (rend *Renderer) AddURIToQueue(instanceId uint32, req *upnptype.AddURIToQueueIn) (*upnptype.AddURIToQueueOut, error)

AddURIToQueue is TODO.

func (*Renderer) CompareProxy

func (rend *Renderer) CompareProxy(utest upnptype.UDNer) bool

func (*Renderer) DisplayCurrentTime

func (rend *Renderer) DisplayCurrentTime()

func (*Renderer) Duration

func (rend *Renderer) Duration() int

func (*Renderer) Events

func (rend *Renderer) Events() *upnptype.RendererEvents

func (*Renderer) GetCurrentTime

func (rend *Renderer) GetCurrentTime() int

func (*Renderer) GetCurrentTransportActions

func (rend *Renderer) GetCurrentTransportActions(instanceID uint32) ([]string, error)

func (*Renderer) GetIconFile

func (rend *Renderer) GetIconFile(filename string) string

func (*Renderer) GetMediaInfo

func (rend *Renderer) GetMediaInfo(instanceID uint32) (*upnptype.MediaInfo, error)

func (*Renderer) GetMute

func (rend *Renderer) GetMute(instanceId uint32, channel string) (bool, error)

func (*Renderer) GetPositionInfo

func (rend *Renderer) GetPositionInfo(instanceID uint32) (*upnptype.PositionInfo, error)

TODO: need to complete it.

func (*Renderer) GetTransportInfo

func (rend *Renderer) GetTransportInfo(instanceID uint32) (*upnptype.TransportInfo, error)

func (*Renderer) GetVolume

func (rend *Renderer) GetVolume(instanceId uint32, channel string) (uint16, error)

func (*Renderer) Icon

func (rend *Renderer) Icon() string

func (*Renderer) Name

func (rend *Renderer) Name() string

func (*Renderer) Next

func (rend *Renderer) Next(instanceID uint32) error

func (*Renderer) Pause

func (rend *Renderer) Pause(instanceId uint32) error

func (*Renderer) Play

func (rend *Renderer) Play(instanceId uint32, speed string) error

func (*Renderer) PlayPause

func (rend *Renderer) PlayPause(instanceId uint32, speed string) error

func (*Renderer) Previous

func (rend *Renderer) Previous(instanceID uint32) error

func (*Renderer) Seek

func (rend *Renderer) Seek(instanceId uint32, unit, target string) error

unit: ABS_TIME (REL_TIME don't work on my TV)

func (*Renderer) SetAVTransportURI

func (rend *Renderer) SetAVTransportURI(instanceId uint32, currentURI, currentURIMetaData string) error

func (*Renderer) SetIcon

func (rend *Renderer) SetIcon(icon string)

func (*Renderer) SetMute

func (rend *Renderer) SetMute(instanceId uint32, channel string, desiredMute bool) error

func (*Renderer) SetNextAVTransportURI

func (rend *Renderer) SetNextAVTransportURI(instanceID uint32, nextURI, nextURIMetaData string) error

func (*Renderer) SetRelativeVolume

func (rend *Renderer) SetRelativeVolume(instanceId uint32, channel string, adjustment int32) (newVolume uint16, e error)

func (*Renderer) SetVolume

func (rend *Renderer) SetVolume(instanceId uint32, channel string, vol uint16) error

func (*Renderer) Stop

func (rend *Renderer) Stop(instanceId uint32) error

func (*Renderer) UDN

func (rend *Renderer) UDN() string

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) Browse

func (s *Server) Browse(req *upnptype.BrowseRequest) (browseResult *upnptype.BrowseResult, err error)

func (*Server) BrowseMetadata

func (s *Server) BrowseMetadata(container string, startingIndex, requestedCount uint) ([]upnptype.Container, []upnptype.Item, string)

func (*Server) CompareProxy

func (srv *Server) CompareProxy(utest upnptype.UDNer) bool

func (*Server) GetIconFile

func (srv *Server) GetIconFile(filename string) string

func (*Server) Icon

func (srv *Server) Icon() string

func (*Server) Name

func (srv *Server) Name() string

func (*Server) SetIcon

func (srv *Server) SetIcon(icon string)

func (*Server) UDN

func (srv *Server) UDN() string

Jump to

Keyboard shortcuts

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