Documentation ¶
Overview ¶
A collection of object classes used in message passing in go-sonos.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object interface { // The ObjectID of this item or container ID() string // The ObjectID of the parent container of this item or container ParentID() string // When true, the ability to change or delete this item or container is restricted Restricted() bool // The URI of the resource described by this item or container. // For a music track this could be the URI of the disk file on // the storage share. For a playlist the URI may refer to the // queue's ObjectID. Res() string // The display name of the container or item. Title() string // A string giving the type of resource described by this Object, e.g.: // // Containers: // * object.container // * object.container.albumlist // * object.container.album.musicAlbum // * object.container.genre.musicGenre // * object.container.person.musicArtist // * object.container.playlistContainer // * object.container.playlistContainer.sameArtist // // Items: // * object.item.audioItem.musicTrack Class() string // The URI to use to access the artwork for this container or item. AlbumArtURI() string // The display name of the Artist or Album Artist. Creator() string // The display name of the containing album. This field is Valid // for Items only, not Containers. Album() string // The track number of this item in original album sort // order. This field is Valid for Items only, not Containers. OriginalTrackNumber() string // True, if this Object represents a container; false otherwise. IsContainer() bool }
An abstraction of a DIDL-Lite <Container> or <Item> block.
func ObjectStream ¶
Create a list of Objects from a didl.Lite document.
type ObjectMessage ¶
type ObjectMessage struct { ID string ParentID string URI string Title string Class string AlbumArtURI string Creator string Album string }
A flattened structure of exported fields to allow Objects to be passed via XML, JSON, or other encoding relying on reflection. Fields in this struct mirror the usage of like-named methods in the Object interface.
func ObjectMessageStream ¶
func ObjectMessageStream(objs []Object) []*ObjectMessage
Create a list of ObjectMessages from a list of Objects.
type PositionInfo ¶
type PositionInfo struct { Track uint32 TrackDuration time.Duration TrackURI string RelTime time.Duration ProtocolInfo string Title string Class string Creator string Album string OriginalTrackNumber string }
func GetPositionInfoMessage ¶
func GetPositionInfoMessage(in *upnp.PositionInfo) *PositionInfo
type QueueElement ¶
type QueueElement struct { ID string ParentID string TrackURI string Title string Class string AlbumArtURI string Creator string Album string OriginalTrackNumber string }
func GetQueueContentsMessage ¶
func GetQueueContentsMessage(in []Object) []QueueElement
type TransportInfo ¶
type TransportInfo *upnp.TransportInfo
Click to show internal directories.
Click to hide internal directories.