queue

package
v0.0.0-...-d57ea70 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package queue is a generated Queue package.

Index

Constants

View Source
const (
	ServiceURN     = "urn:schemas-upnp-org:service:Queue:1"
	EncodingSchema = "http://schemas.xmlsoap.org/soap/encoding/"
	EnvelopeSchema = "http://schemas.xmlsoap.org/soap/envelope/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddMultipleURIsArgs

type AddMultipleURIsArgs struct {
	Xmlns                           string `xml:"xmlns:u,attr"`
	QueueID                         uint32 `xml:"QueueID"`
	UpdateID                        uint32 `xml:"UpdateID"`
	ContainerURI                    string `xml:"ContainerURI"`
	ContainerMetaData               string `xml:"ContainerMetaData"`
	DesiredFirstTrackNumberEnqueued uint32 `xml:"DesiredFirstTrackNumberEnqueued"`
	EnqueueAsNext                   bool   `xml:"EnqueueAsNext"`
	NumberOfURIs                    uint32 `xml:"NumberOfURIs"`
	EnqueuedURIsAndMetaData         string `xml:"EnqueuedURIsAndMetaData"`
}

AddMultipleURIs Argument type.

type AddMultipleURIsResponse

type AddMultipleURIsResponse struct {
	FirstTrackNumberEnqueued uint32 `xml:"FirstTrackNumberEnqueued"`
	NumTracksAdded           uint32 `xml:"NumTracksAdded"`
	NewQueueLength           uint32 `xml:"NewQueueLength"`
	NewUpdateID              uint32 `xml:"NewUpdateID"`
}

AddMultipleURIs Response type.

type AddURIArgs

type AddURIArgs struct {
	Xmlns                           string `xml:"xmlns:u,attr"`
	QueueID                         uint32 `xml:"QueueID"`
	UpdateID                        uint32 `xml:"UpdateID"`
	EnqueuedURI                     string `xml:"EnqueuedURI"`
	EnqueuedURIMetaData             string `xml:"EnqueuedURIMetaData"`
	DesiredFirstTrackNumberEnqueued uint32 `xml:"DesiredFirstTrackNumberEnqueued"`
	EnqueueAsNext                   bool   `xml:"EnqueueAsNext"`
}

AddURI Argument type.

type AddURIResponse

type AddURIResponse struct {
	FirstTrackNumberEnqueued uint32 `xml:"FirstTrackNumberEnqueued"`
	NumTracksAdded           uint32 `xml:"NumTracksAdded"`
	NewQueueLength           uint32 `xml:"NewQueueLength"`
	NewUpdateID              uint32 `xml:"NewUpdateID"`
}

AddURI Response type.

type AttachQueueArgs

type AttachQueueArgs struct {
	Xmlns        string `xml:"xmlns:u,attr"`
	QueueOwnerID string `xml:"QueueOwnerID"`
}

AttachQueue Argument type.

type AttachQueueResponse

type AttachQueueResponse struct {
	QueueID           uint32 `xml:"QueueID"`
	QueueOwnerContext string `xml:"QueueOwnerContext"`
}

AttachQueue Response type.

type BackupArgs

type BackupArgs struct {
	Xmlns string `xml:"xmlns:u,attr"`
}

Backup Argument type.

type BackupResponse

type BackupResponse struct {
}

Backup Response type.

type BrowseArgs

type BrowseArgs struct {
	Xmlns          string `xml:"xmlns:u,attr"`
	QueueID        uint32 `xml:"QueueID"`
	StartingIndex  uint32 `xml:"StartingIndex"`
	RequestedCount uint32 `xml:"RequestedCount"`
}

Browse Argument type.

type BrowseResponse

type BrowseResponse struct {
	Result         string `xml:"Result"`
	NumberReturned uint32 `xml:"NumberReturned"`
	TotalMatches   uint32 `xml:"TotalMatches"`
	UpdateID       uint32 `xml:"UpdateID"`
}

Browse Response type.

type CreateQueueArgs

type CreateQueueArgs struct {
	Xmlns             string `xml:"xmlns:u,attr"`
	QueueOwnerID      string `xml:"QueueOwnerID"`
	QueueOwnerContext string `xml:"QueueOwnerContext"`
	QueuePolicy       string `xml:"QueuePolicy"`
}

CreateQueue Argument type.

type CreateQueueResponse

type CreateQueueResponse struct {
	QueueID uint32 `xml:"QueueID"`
}

CreateQueue Response type.

type LastChange

type LastChange string

State Variables

type Property

type Property struct {
	XMLName    xml.Name    `xml:"property"`
	LastChange *LastChange `xml:"LastChange"`
}

Property represents a single property in a UPnP event notification.

type RemoveAllTracksArgs

type RemoveAllTracksArgs struct {
	Xmlns    string `xml:"xmlns:u,attr"`
	QueueID  uint32 `xml:"QueueID"`
	UpdateID uint32 `xml:"UpdateID"`
}

RemoveAllTracks Argument type.

type RemoveAllTracksResponse

type RemoveAllTracksResponse struct {
	NewUpdateID uint32 `xml:"NewUpdateID"`
}

RemoveAllTracks Response type.

type RemoveTrackRangeArgs

type RemoveTrackRangeArgs struct {
	Xmlns          string `xml:"xmlns:u,attr"`
	QueueID        uint32 `xml:"QueueID"`
	UpdateID       uint32 `xml:"UpdateID"`
	StartingIndex  uint32 `xml:"StartingIndex"`
	NumberOfTracks uint32 `xml:"NumberOfTracks"`
}

RemoveTrackRange Argument type.

type RemoveTrackRangeResponse

type RemoveTrackRangeResponse struct {
	NewUpdateID uint32 `xml:"NewUpdateID"`
}

RemoveTrackRange Response type.

type ReorderTracksArgs

type ReorderTracksArgs struct {
	Xmlns          string `xml:"xmlns:u,attr"`
	QueueID        uint32 `xml:"QueueID"`
	StartingIndex  uint32 `xml:"StartingIndex"`
	NumberOfTracks uint32 `xml:"NumberOfTracks"`
	InsertBefore   uint32 `xml:"InsertBefore"`
	UpdateID       uint32 `xml:"UpdateID"`
}

ReorderTracks Argument type.

type ReorderTracksResponse

type ReorderTracksResponse struct {
	NewUpdateID uint32 `xml:"NewUpdateID"`
}

ReorderTracks Response type.

type ReplaceAllTracksArgs

type ReplaceAllTracksArgs struct {
	Xmlns                   string `xml:"xmlns:u,attr"`
	QueueID                 uint32 `xml:"QueueID"`
	UpdateID                uint32 `xml:"UpdateID"`
	ContainerURI            string `xml:"ContainerURI"`
	ContainerMetaData       string `xml:"ContainerMetaData"`
	CurrentTrackIndex       uint32 `xml:"CurrentTrackIndex"`
	NewCurrentTrackIndices  string `xml:"NewCurrentTrackIndices"`
	NumberOfURIs            uint32 `xml:"NumberOfURIs"`
	EnqueuedURIsAndMetaData string `xml:"EnqueuedURIsAndMetaData"`
}

ReplaceAllTracks Argument type.

type ReplaceAllTracksResponse

type ReplaceAllTracksResponse struct {
	NewQueueLength uint32 `xml:"NewQueueLength"`
	NewUpdateID    uint32 `xml:"NewUpdateID"`
}

ReplaceAllTracks Response type.

type SaveAsSonosPlaylistArgs

type SaveAsSonosPlaylistArgs struct {
	Xmlns    string `xml:"xmlns:u,attr"`
	QueueID  uint32 `xml:"QueueID"`
	Title    string `xml:"Title"`
	ObjectID string `xml:"ObjectID"`
}

SaveAsSonosPlaylist Argument type.

type SaveAsSonosPlaylistResponse

type SaveAsSonosPlaylistResponse struct {
	AssignedObjectID string `xml:"AssignedObjectID"`
}

SaveAsSonosPlaylist Response type.

type Service

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

Service represents Queue service.

func NewService

func NewService(opts ...ServiceOption) *Service

NewService creates a new instance of the Queue service. You must provide at least a location URL and an HTTP client using the options.

func (*Service) AddMultipleURIs

func (s *Service) AddMultipleURIs(args *AddMultipleURIsArgs) (*AddMultipleURIsResponse, error)

AddMultipleURIs calls the AddMultipleURIs action on the service.

func (*Service) AddURI

func (s *Service) AddURI(args *AddURIArgs) (*AddURIResponse, error)

AddURI calls the AddURI action on the service.

func (*Service) AttachQueue

func (s *Service) AttachQueue(args *AttachQueueArgs) (*AttachQueueResponse, error)

AttachQueue calls the AttachQueue action on the service.

func (*Service) Backup

func (s *Service) Backup(args *BackupArgs) (*BackupResponse, error)

Backup calls the Backup action on the service.

func (*Service) Browse

func (s *Service) Browse(args *BrowseArgs) (*BrowseResponse, error)

Browse calls the Browse action on the service.

func (*Service) Client

func (s *Service) Client() *http.Client

Client returns the HTTP client used to communicate with the service.

func (*Service) ControlEndpoint

func (s *Service) ControlEndpoint() *url.URL

ControlEndpoint returns the control endpoint URL of the service. This is usually a URL relative to the device's base URL.

func (*Service) CreateQueue

func (s *Service) CreateQueue(args *CreateQueueArgs) (*CreateQueueResponse, error)

CreateQueue calls the CreateQueue action on the service.

func (*Service) EventEndpoint

func (s *Service) EventEndpoint() *url.URL

EventEndpoint returns the event endpoint URL of the service. This is usually a URL relative to the device's base URL.

func (*Service) Location

func (s *Service) Location() *url.URL

Location returns the base URL of the device hosting the service.

func (*Service) ParseEvent

func (zp *Service) ParseEvent(body []byte) []interface{}

ParseEvent parses a UPnP event notification and updates the service's state variables accordingly. It returns a slice of updated state variable values.

func (*Service) RemoveAllTracks

func (s *Service) RemoveAllTracks(args *RemoveAllTracksArgs) (*RemoveAllTracksResponse, error)

RemoveAllTracks calls the RemoveAllTracks action on the service.

func (*Service) RemoveTrackRange

func (s *Service) RemoveTrackRange(args *RemoveTrackRangeArgs) (*RemoveTrackRangeResponse, error)

RemoveTrackRange calls the RemoveTrackRange action on the service.

func (*Service) ReorderTracks

func (s *Service) ReorderTracks(args *ReorderTracksArgs) (*ReorderTracksResponse, error)

ReorderTracks calls the ReorderTracks action on the service.

func (*Service) ReplaceAllTracks

func (s *Service) ReplaceAllTracks(args *ReplaceAllTracksArgs) (*ReplaceAllTracksResponse, error)

ReplaceAllTracks calls the ReplaceAllTracks action on the service.

func (*Service) SaveAsSonosPlaylist

func (s *Service) SaveAsSonosPlaylist(args *SaveAsSonosPlaylistArgs) (*SaveAsSonosPlaylistResponse, error)

SaveAsSonosPlaylist calls the SaveAsSonosPlaylist action on the service.

type ServiceOption

type ServiceOption func(*Service)

func WithClient

func WithClient(c *http.Client) ServiceOption

func WithLocation

func WithLocation(u *url.URL) ServiceOption

type UpnpEvent

type UpnpEvent struct {
	XMLName      xml.Name   `xml:"propertyset"`
	XMLNameSpace string     `xml:"xmlns:e,attr"`
	Properties   []Property `xml:"property"`
}

UpnpEvent represents a UPnP event notification.

Jump to

Keyboard shortcuts

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