queue

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

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"`
}

type AddMultipleURIsResponse

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

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"`
}

type AddURIResponse

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

type AttachQueueArgs

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

type AttachQueueResponse

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

type BackupArgs

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

type BackupResponse

type BackupResponse struct {
}

type Body

type Body struct {
	XMLName             xml.Name                 `xml:"s:Body"`
	AddURI              *AddURIArgs              `xml:"u:AddURI,omitempty"`
	AddMultipleURIs     *AddMultipleURIsArgs     `xml:"u:AddMultipleURIs,omitempty"`
	AttachQueue         *AttachQueueArgs         `xml:"u:AttachQueue,omitempty"`
	Backup              *BackupArgs              `xml:"u:Backup,omitempty"`
	Browse              *BrowseArgs              `xml:"u:Browse,omitempty"`
	CreateQueue         *CreateQueueArgs         `xml:"u:CreateQueue,omitempty"`
	RemoveAllTracks     *RemoveAllTracksArgs     `xml:"u:RemoveAllTracks,omitempty"`
	RemoveTrackRange    *RemoveTrackRangeArgs    `xml:"u:RemoveTrackRange,omitempty"`
	ReorderTracks       *ReorderTracksArgs       `xml:"u:ReorderTracks,omitempty"`
	ReplaceAllTracks    *ReplaceAllTracksArgs    `xml:"u:ReplaceAllTracks,omitempty"`
	SaveAsSonosPlaylist *SaveAsSonosPlaylistArgs `xml:"u:SaveAsSonosPlaylist,omitempty"`
}

type BodyResponse

type BodyResponse struct {
	XMLName             xml.Name                     `xml:"Body"`
	AddURI              *AddURIResponse              `xml:"AddURIResponse,omitempty"`
	AddMultipleURIs     *AddMultipleURIsResponse     `xml:"AddMultipleURIsResponse,omitempty"`
	AttachQueue         *AttachQueueResponse         `xml:"AttachQueueResponse,omitempty"`
	Backup              *BackupResponse              `xml:"BackupResponse,omitempty"`
	Browse              *BrowseResponse              `xml:"BrowseResponse,omitempty"`
	CreateQueue         *CreateQueueResponse         `xml:"CreateQueueResponse,omitempty"`
	RemoveAllTracks     *RemoveAllTracksResponse     `xml:"RemoveAllTracksResponse,omitempty"`
	RemoveTrackRange    *RemoveTrackRangeResponse    `xml:"RemoveTrackRangeResponse,omitempty"`
	ReorderTracks       *ReorderTracksResponse       `xml:"ReorderTracksResponse,omitempty"`
	ReplaceAllTracks    *ReplaceAllTracksResponse    `xml:"ReplaceAllTracksResponse,omitempty"`
	SaveAsSonosPlaylist *SaveAsSonosPlaylistResponse `xml:"SaveAsSonosPlaylistResponse,omitempty"`
}

type BrowseArgs

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

type BrowseResponse

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

type CreateQueueArgs

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

type CreateQueueResponse

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

type Envelope

type Envelope struct {
	XMLName       xml.Name `xml:"s:Envelope"`
	Xmlns         string   `xml:"xmlns:s,attr"`
	EncodingStyle string   `xml:"s:encodingStyle,attr"`
	Body          Body     `xml:"s:Body"`
}

type EnvelopeResponse

type EnvelopeResponse struct {
	XMLName       xml.Name     `xml:"Envelope"`
	Xmlns         string       `xml:"xmlns:s,attr"`
	EncodingStyle string       `xml:"encodingStyle,attr"`
	Body          BodyResponse `xml:"Body"`
}

type RemoveAllTracksArgs

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

type RemoveAllTracksResponse

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

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"`
}

type RemoveTrackRangeResponse

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

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"`
}

type ReorderTracksResponse

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

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"`
}

type ReplaceAllTracksResponse

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

type SaveAsSonosPlaylistArgs

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

type SaveAsSonosPlaylistResponse

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

type Service

type Service struct {
	ControlEndpoint *url.URL
	EventEndpoint   *url.URL
}

func NewService

func NewService(deviceUrl *url.URL) *Service

func (*Service) AddMultipleURIs

func (s *Service) AddMultipleURIs(httpClient *http.Client, args *AddMultipleURIsArgs) (*AddMultipleURIsResponse, error)

func (*Service) AddURI

func (s *Service) AddURI(httpClient *http.Client, args *AddURIArgs) (*AddURIResponse, error)

func (*Service) AttachQueue

func (s *Service) AttachQueue(httpClient *http.Client, args *AttachQueueArgs) (*AttachQueueResponse, error)

func (*Service) Backup

func (s *Service) Backup(httpClient *http.Client, args *BackupArgs) (*BackupResponse, error)

func (*Service) Browse

func (s *Service) Browse(httpClient *http.Client, args *BrowseArgs) (*BrowseResponse, error)

func (*Service) CreateQueue

func (s *Service) CreateQueue(httpClient *http.Client, args *CreateQueueArgs) (*CreateQueueResponse, error)

func (*Service) RemoveAllTracks

func (s *Service) RemoveAllTracks(httpClient *http.Client, args *RemoveAllTracksArgs) (*RemoveAllTracksResponse, error)

func (*Service) RemoveTrackRange

func (s *Service) RemoveTrackRange(httpClient *http.Client, args *RemoveTrackRangeArgs) (*RemoveTrackRangeResponse, error)

func (*Service) ReorderTracks

func (s *Service) ReorderTracks(httpClient *http.Client, args *ReorderTracksArgs) (*ReorderTracksResponse, error)

func (*Service) ReplaceAllTracks

func (s *Service) ReplaceAllTracks(httpClient *http.Client, args *ReplaceAllTracksArgs) (*ReplaceAllTracksResponse, error)

func (*Service) SaveAsSonosPlaylist

func (s *Service) SaveAsSonosPlaylist(httpClient *http.Client, args *SaveAsSonosPlaylistArgs) (*SaveAsSonosPlaylistResponse, error)

Jump to

Keyboard shortcuts

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