service

package
v0.0.0-...-cfeb3e9 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: GPL-3.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DeviceType_MediaServer   = "MediaServer"
	DeviceType_MediaRenderer = "MediaRenderer"

	ServiceName_AVTransport       = "AVTransport"
	ServiceName_ConnectionManager = "ConnectionManager"
	ServiceName_RenderingControl  = "RenderingControl"
)
View Source
const ResponseContentTypeXML = `text/xml; charset="utf-8"`

Variables

This section is empty.

Functions

func DefaultActionHandler

func DefaultActionHandler(input any, output any, ctx *fasthttp.RequestCtx, uuid string) error

func ParseSOAPAction

func ParseSOAPAction(ctx *fasthttp.RequestCtx) (*soap.SoapAction, error)

func ResponseError

func ResponseError(ctx *fasthttp.RequestCtx, e *soap.Error) error

func ServiceNS

func ServiceNS(service string, ver int) string

Types

type Action

type Action struct {
	Handler ActionHandler
	ArgIn   any
	ArgOut  any

	Name string
	// contains filtered or unexported fields
}

func (*Action) SetStateVariables

func (a *Action) SetStateVariables(sv []*scpd.Variable) *Action

type ActionArgumentIn

type ActionArgumentIn interface {
}

type ActionArgumentOut

type ActionArgumentOut interface {
}

type ActionHandler

type ActionHandler func(input any, output any, ctx *fasthttp.RequestCtx, uuid string) error

type Argument

type Argument struct {
	Name            string
	Direction       string
	RelatedStateVar *scpd.Variable
}

type Controller

type Controller struct {
	SpecVersion scpd.SpecVersion
	ServiceName string
	PrefixPath  string

	event.Event

	Actions []*Action

	SCPDHandler    httpHandler
	ControlHandler httpHandler
	EventHandler   httpHandler
	// contains filtered or unexported fields
}

func (*Controller) ControlHttpPath

func (c *Controller) ControlHttpPath(uuid string) string

func (*Controller) DeInit

func (c *Controller) DeInit()

func (*Controller) EventHttpPath

func (c *Controller) EventHttpPath(uuid string) string

func (*Controller) Init

func (c *Controller) Init(ctx context.Context) error

func (*Controller) SCPDHttpPath

func (c *Controller) SCPDHttpPath(uuid string) string

func (*Controller) ServiceId

func (c *Controller) ServiceId(auth string) string

func (*Controller) ServiceURN

func (c *Controller) ServiceURN(auth string) string

type ServiceController

type ServiceController interface {
	Init(ctx context.Context) error
	Deinit()
}

Jump to

Keyboard shortcuts

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