sonos

package module
v0.0.0-...-0565850 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2017 License: BSD-2-Clause Imports: 9 Imported by: 3

README

go-sonos

A Go-language library for accessing UPnP AV devices

Documentation

Overview

A go-language implementation of the Sonos UPnP API.

Index

Constants

View Source
const (
	ObjectID_Attributes    = "A:"
	ObjectID_MusicShares   = "S:"
	ObjectID_Queues        = "Q:"
	ObjectID_SavedQueues   = "SQ:"
	ObjectID_InternetRadio = "R:"
	ObjectID_EntireNetwork = "EN:"
	//
	ObjectID_Queue_AVT_Instance_0 = "Q:0"
	//
	ObjectID_Attribute_Genres    = "A:GENRE"
	ObjectID_Attribute_Album     = "A:ALBUM"
	ObjectID_Attribute_Artist    = "A:ARTIST"
	ObjectID_Attribute_Composers = "A:COMPOSER"
)
View Source
const (
	SVC_ALARM_CLOCK         = 1
	SVC_AV_TRANSPORT        = SVC_ALARM_CLOCK << 1
	SVC_CONNECTION_MANAGER  = SVC_AV_TRANSPORT << 1
	SVC_CONTENT_DIRECTORY   = SVC_CONNECTION_MANAGER << 1
	SVC_DEVICE_PROPERTIES   = SVC_CONTENT_DIRECTORY << 1
	SVC_GROUP_MANAGEMENT    = SVC_DEVICE_PROPERTIES << 1
	SVC_MUSIC_SERVICES      = SVC_GROUP_MANAGEMENT << 1
	SVC_RENDERING_CONTROL   = SVC_MUSIC_SERVICES << 1
	SVC_SYSTEM_PROPERTIES   = SVC_RENDERING_CONTROL << 1
	SVC_ZONE_GROUP_TOPOLOGY = SVC_SYSTEM_PROPERTIES << 1
	//
	SVC_ALL = SVC_ALARM_CLOCK |
		SVC_AV_TRANSPORT |
		SVC_CONNECTION_MANAGER |
		SVC_CONTENT_DIRECTORY |
		SVC_DEVICE_PROPERTIES |
		SVC_GROUP_MANAGEMENT |
		SVC_MUSIC_SERVICES |
		SVC_RENDERING_CONTROL |
		SVC_SYSTEM_PROPERTIES |
		SVC_ZONE_GROUP_TOPOLOGY
)
View Source
const MUSIC_SERVICES = "schemas-upnp-org-MusicServices"
View Source
const RADIO = "Radio"
View Source
const RECIVA_RADIO = "reciva-com-RecivaRadio"
View Source
const SONOS = "Sonos"

Variables

This section is empty.

Functions

func Coverage

func Coverage(s interface{})

func Discover

func Discover(ifiname, port string) (mgr ssdp.Manager, err error)

func MakeReactor

func MakeReactor(ifiname, port string) upnp.Reactor

Types

type Reciva

type Reciva struct {
	upnp.AVTransport
	upnp.ConnectionManager
	upnp.RenderingControl
	reciva.RecivaSimpleRemote
	reciva.RecivaRadio
	linn.Playlist
}

func ConnectAnyReciva

func ConnectAnyReciva(mgr ssdp.Manager, reactor upnp.Reactor, flags int) (reciva []*Reciva)

func ConnectReciva

func ConnectReciva(dev ssdp.Device, reactor upnp.Reactor, flags int) (reciva *Reciva)

func MakeReciva

func MakeReciva(svc_map upnp.ServiceMap, reactor upnp.Reactor, flags int) (reciva *Reciva)

type Sonos

func Connect

func Connect(dev ssdp.Device, reactor upnp.Reactor, flags int) (sonos *Sonos)

func ConnectAny

func ConnectAny(mgr ssdp.Manager, reactor upnp.Reactor, flags int) (sonos []*Sonos)

func MakeSonos

func MakeSonos(svc_map upnp.ServiceMap, reactor upnp.Reactor, flags int) (sonos *Sonos)

func (*Sonos) GetAlbumTracks

func (this *Sonos) GetAlbumTracks(album string) ([]model.Object, error)

func (*Sonos) GetAllComposers

func (this *Sonos) GetAllComposers() (objects []model.Object, err error)

func (*Sonos) GetAllGenres

func (this *Sonos) GetAllGenres() (objects []model.Object, err error)

func (*Sonos) GetArtistAlbums

func (this *Sonos) GetArtistAlbums(artist string) (objects []model.Object, err error)

func (*Sonos) GetDirectChildren

func (this *Sonos) GetDirectChildren(objectId string) (objects []model.Object, err error)

func (*Sonos) GetGenreArtists

func (this *Sonos) GetGenreArtists(genre string) ([]model.Object, error)

func (*Sonos) GetMetadata

func (this *Sonos) GetMetadata(objectId string) (objects []model.Object, err error)

func (*Sonos) GetQueueContents

func (this *Sonos) GetQueueContents() (objects []model.Object, err error)

func (*Sonos) GetRootLevelChildren

func (this *Sonos) GetRootLevelChildren() (objects []model.Object, err error)

func (*Sonos) GetTrackFromAlbum

func (this *Sonos) GetTrackFromAlbum(album, track string) ([]model.Object, error)

func (*Sonos) ListAttributes

func (this *Sonos) ListAttributes() (objects []model.Object, err error)

func (*Sonos) ListChildren

func (this *Sonos) ListChildren(objectId string) (objects []model.Object, err error)

func (*Sonos) ListInternetRadio

func (this *Sonos) ListInternetRadio() (objects []model.Object, err error)

func (*Sonos) ListMusicShares

func (this *Sonos) ListMusicShares() (objects []model.Object, err error)

func (*Sonos) ListQueues

func (this *Sonos) ListQueues() (objects []model.Object, err error)

func (*Sonos) ListSavedQueues

func (this *Sonos) ListSavedQueues() (objects []model.Object, err error)

Directories

Path Synopsis
A module to support bookmarking discovered UPnP devices.
A module to support bookmarking discovered UPnP devices.
A client to demonstrate controlling Sonos from the command line.
A client to demonstrate controlling Sonos from the command line.
A server to demonstrate controlling Sonos from a web browser.
A server to demonstrate controlling Sonos from a web browser.
A minimal implementation of the Digital Item Declaration Language (DIDL).
A minimal implementation of the Digital Item Declaration Language (DIDL).
examples
browse
go-sonos ======== Copyright (c) 2012-2015, Ian T. Richards <ianr@panix.com> All rights reserved.
go-sonos ======== Copyright (c) 2012-2015, Ian T. Richards <ianr@panix.com> All rights reserved.
composers
go-sonos ======== Copyright (c) 2012-2015, Ian T. Richards <ianr@panix.com> All rights reserved.
go-sonos ======== Copyright (c) 2012-2015, Ian T. Richards <ianr@panix.com> All rights reserved.
devices
go-sonos ======== Copyright (c) 2012-2015, Ian T. Richards <ianr@panix.com> All rights reserved.
go-sonos ======== Copyright (c) 2012-2015, Ian T. Richards <ianr@panix.com> All rights reserved.
discovery
go-sonos ======== Copyright (c) 2012-2015, Ian T. Richards <ianr@panix.com> All rights reserved.
go-sonos ======== Copyright (c) 2012-2015, Ian T. Richards <ianr@panix.com> All rights reserved.
googletv
go-sonos ======== Copyright (c) 2012-2015, Ian T. Richards <ianr@panix.com> All rights reserved.
go-sonos ======== Copyright (c) 2012-2015, Ian T. Richards <ianr@panix.com> All rights reserved.
A collection of object classes used in message passing in go-sonos.
A collection of object classes used in message passing in go-sonos.
A client implementation of the SSDP protocol.
A client implementation of the SSDP protocol.
An implementation of the Sonos Universal Plug and Play API.
An implementation of the Sonos Universal Plug and Play API.

Jump to

Keyboard shortcuts

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