dlna

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Set(key interface{}, value interface{})
	Get(key interface{}) (value interface{}, ok bool)
}

type Config

type Config interface {
	GetDLNAInterfaces() []string
	GetDLNAServerName() string
	GetDLNADefaultIPWhitelist() []string
}

type Icon

type Icon struct {
	Width, Height, Depth int
	Mimetype             string
	io.ReadSeeker
}

type Server

type Server struct {
	HTTPConn     net.Listener
	FriendlyName string
	Interfaces   []net.Interface

	RootObjectPath string

	LogHeaders bool
	Icons      []Icon
	// Stall event subscription requests until they drop. A workaround for
	// some bad clients.
	StallEventSubscribe bool
	// Time interval between SSPD announces
	NotifyInterval time.Duration
	// contains filtered or unexported fields
}

func (*Server) Close

func (me *Server) Close() (err error)

func (*Server) Serve

func (me *Server) Serve() (err error)

type Service

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

func NewService

func NewService(txnManager models.TransactionManager, cfg Config, sceneServer sceneServer) *Service

NewService initialises and returns a new DLNA service.

func (*Service) AddTempDLNAIP

func (s *Service) AddTempDLNAIP(pattern string, duration *time.Duration)

func (*Service) IsRunning

func (s *Service) IsRunning() bool

IsRunning returns true if the DLNA service is running.

func (*Service) RemoveTempDLNAIP

func (s *Service) RemoveTempDLNAIP(pattern string) bool

func (*Service) Start

func (s *Service) Start(duration *time.Duration) error

Start starts the DLNA service. If duration is provided, then the service is stopped after the duration has elapsed.

func (*Service) Status

func (s *Service) Status() *models.DLNAStatus

func (*Service) Stop

func (s *Service) Stop(duration *time.Duration)

Stop stops the DLNA service. If duration is provided, then the service is started after the duration has elapsed.

type UPnPService

type UPnPService interface {
	Handle(action string, argsXML []byte, r *http.Request) (respArgs map[string]string, err error)
	Subscribe(callback []*url.URL, timeoutSeconds int) (sid string, actualTimeout int, err error)
	Unsubscribe(sid string) error
}

UPnP SOAP service.

Jump to

Keyboard shortcuts

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