upnp

package
v0.0.0-...-241c36b Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2015 License: BSD-2-Clause Imports: 16 Imported by: 1

Documentation

Overview

An implementation of the Sonos Universal Plug and Play API.

Index

Constants

View Source
const (
	State_PLAYING         = "PLAYING"
	State_PAUSED_PLAYBACK = "PAUSED_PLAYBACK"
	State_STOPPED         = "STOPPED"
)

Legal values for TransportInfo.CurrentTransportState

View Source
const (
	// Seek to the beginning of the specified track
	SeekMode_TRACK_NR = "TRACK_NR"
	// Seek to the given offset in the current track
	SeekMode_REL_TIME = "REL_TIME"
	// Seek to the specified section (not tested)
	SeekMode_SECTION = "SECTION"
)

Legal values for @unit in calls to Seek.

View Source
const (
	// Play sequentially from the beginning of the queue to the end
	PlayMode_NORMAL = "NORMAL"
	// Begin again at the first track of the queue after reaching the last
	PlayMode_REPEAT_ALL = "REPEAT_ALL"
	// Play tracks out of order, with repeat
	PlayMode_SHUFFLE_NOREPEAT = "SHUFFLE_NOREPEAT"
	// Play through tracks out of order once
	PlayMode_SHUFFLE = "SHUFFLE"
)

Valid values for PlayMode in SetPlayMode and TransportSettings.

View Source
const (
	Recurrence_ONCE     = "ONCE"
	Recurrence_WEEKDAYS = "WEEKDAYS"
	Recurrence_WEEKENDS = "WEEKENDS"
	Recurrence_DAILY    = "DAILY"
)
View Source
const (
	AlarmPlayMode_NORMAL           = "NORMAL"
	AlarmPlayMode_REPEAT_ALL       = "REPEAT_ALL"
	AlarmPlayMode_SHUFFLE_NOREPEAT = "SHUFFLE_NOREPEAT"
	AlarmPlayMode_SHUFFLE          = "SHUFFLE"
)
View Source
const (
	Direction_Input  = "Input"
	Direction_Output = "Output"
)
View Source
const (
	Status_OK                    = "OK"
	Status_ContentFormatMismatch = "ContentFormatMismatch"
	Status_InsufficientBandwidth = "InsufficientBandwidth"
	Status_UnreliableChannel     = "UnreliableChannel"
	Status_Unknown               = "Unknown"
)
View Source
const (
	BrowseFlag_BrowseMetadata       = "BrowseMetadata"
	BrowseFlag_BrowseDirectChildren = "BrowseDirectChildren"
)
View Source
const (
	LEDState_On  = "On"
	LEDState_Off = "Off"
)
View Source
const (
	Channel_Master = "Master"
	Channel_RF     = "RF"
	Channel_LF     = "LF"
)
View Source
const (
	RampType_SleepTimer = "SLEEP_TIMER_RAMP_TYPE"
	RampType_Alarm      = "ALARM_RAMP_TYPE"
	RampType_Autoplay   = "AUTOPLAY_RAMP_TYPE"
)
View Source
const (
	ALL      = "All"
	SOFTWARE = "Software"
)
View Source
const (
	REMOVE                        = "Remove"
	VERIFY_THEN_REMOVE_SYSTEMWIDE = "VerifyThenRemoveSystemwide"
)
View Source
const (
	BrowseFilter_All = "*"
)
View Source
const (
	BrowseObjectID_Root = "0"
)
View Source
const (
	BrowseSortCriteria_None = ""
)
View Source
const PlaySpeed_1 = "1"

Playback at normal speed

Variables

View Source
var (
	AVTransport_EventType = registerEventType("AVTransport")
)
View Source
var (
	AlarmClock_EventType = registerEventType("AlarmClock")
)
View Source
var (
	ConnectionManager_EventType = registerEventType("ConnectionManager")
)
View Source
var (
	ContentDirectory_EventType = registerEventType("ContentDirectory")
)
View Source
var (
	DeviceProperties_EventType = registerEventType("DeviceProperties")
)
View Source
var (
	GroupManagement_EventType = registerEventType("GroupManagement")
)
View Source
var (
	MusicServices_EventType = registerEventType("MusicServices")
)
View Source
var (
	RenderingControl_EventType = registerEventType("RenderingControl")
)
View Source
var (
	SystemProperties_EventType = registerEventType("SystemProperties")
)
View Source
var (
	ZoneGroupTopology_EventType = registerEventType("ZoneGroupTopology")
)

Functions

This section is empty.

Types

type AVTransport

type AVTransport struct {
	AVTransportState
	Svc *Service
}

func (*AVTransport) AddMultipleURIsToQueue

func (this *AVTransport) AddMultipleURIsToQueue(instanceId uint32, req *AddMultipleURIsToQueueIn) (*AddMultipleURIsToQueueOut, error)

Add multiple tracks to the queue (Q:0). This method does not seem to be a standard part of AVTransport:1, but rather a Sonos extension. As such it is not entirely clear how it should be used.

For Sonos @instanceId should always be 0; @UpdateID should be 0; @NumberOfURIs should be the number of tracks to be added by the request; @EnqueuedURIs is a space-separated list of URIs (as given by the Res() method of the model.Object class); @EnqueuedURIMetData is a space-separated list of DIDL-Lite documents describing the resources to be added; @ContainerURI should be the ContentDirectory URI for A:TRACK, when adding tracks; @ContainerMetaData should be a DIDL-Lite document describing A:TRACK. Other arguments have the same meaning as in @AddURIToQueue.

Note that the number of DIDL-Lite documents in @EnqueuedURIsMetaData must match the number of URIs in @EnqueuedURIs. These DIDL-Lite documents can be empty, but must be present. @ContainerMetaData must be a string of non-zero length, but need not be a valid DIDL-Lite document.

func (*AVTransport) AddURIToQueue

func (this *AVTransport) AddURIToQueue(instanceId uint32, req *AddURIToQueueIn) (*AddURIToQueueOut, error)

Add a single track to the queue (Q:0). For Sonos @instanceId will always be 0. See @AddURIToQueueIn for a discussion of the input parameters and @AddURIToQueueOut for a discussion of the output parameters.

func (*AVTransport) AddURIToSavedQueue

func (this *AVTransport) AddURIToSavedQueue(instanceId uint32, req *AddURIToSavedQueueIn) (*AddURIToSavedQueueOut, error)

func (*AVTransport) BackupQueue

func (this *AVTransport) BackupQueue(instanceId uint32) (err error)

func (*AVTransport) BecomeCoordinatorOfStandaloneGroup

func (this *AVTransport) BecomeCoordinatorOfStandaloneGroup(instanceId uint32) (err error)

func (*AVTransport) BecomeGroupCoordinator

func (this *AVTransport) BecomeGroupCoordinator(instanceId uint32, req *BecomeGroupCoordinatorRequest) (err error)

func (*AVTransport) BecomeGroupCoordinatorAndSource

func (this *AVTransport) BecomeGroupCoordinatorAndSource(instanceId uint32, req *BecomeGroupCoordinatorAndSourceRequest) (err error)

func (*AVTransport) BeginSet

func (this *AVTransport) BeginSet(svc *Service, channel chan Event)

func (*AVTransport) ChangeCoordinator

func (this *AVTransport) ChangeCoordinator(instanceId uint32, req *ChangeCoordinatorRequest) (err error)

func (*AVTransport) ChangeTransportSettings

func (this *AVTransport) ChangeTransportSettings(instanceId uint32, newTransportSettings, currentAVTransportURI string) (err error)

func (*AVTransport) ConfigureSleepTimer

func (this *AVTransport) ConfigureSleepTimer(instanceId uint32, newSleepTimerDuration string) (err error)

func (*AVTransport) CreateSavedQueue

func (this *AVTransport) CreateSavedQueue(instanceId uint32, req *CreateSavedQueueIn) (*CreateSavedQueueOut, error)

func (*AVTransport) DelegateGroupCoordinationTo

func (this *AVTransport) DelegateGroupCoordinationTo(instanceId uint32, newCoordinator string, rejoinGroup bool) error

func (*AVTransport) EndSet

func (this *AVTransport) EndSet(svc *Service, channel chan Event)

func (*AVTransport) GetCrossfadeMode

func (this *AVTransport) GetCrossfadeMode(instanceId uint32) (bool, error)

Returns true if crossfade mode is active; false otherwise. For Sonos @instanceId should always be 0.

func (*AVTransport) GetCurrentTransportActions

func (this *AVTransport) GetCurrentTransportActions(instanceId uint32) ([]string, error)

Returns a list of the actions that are valid at this time. The list consists of human-readable strings, such as "Play", and "Stop". For Sonos @instanceId will always be 0.

func (*AVTransport) GetDeviceCapabilities

func (this *AVTransport) GetDeviceCapabilities(instanceId uint32) (*DeviceCapabilities, error)

Return the device capabilities, sources of input media, recording media, and recoding quality modes. For Sonos @instanceId should always be 0, and the record-related fields are unsupported.

func (*AVTransport) GetMediaInfo

func (this *AVTransport) GetMediaInfo(instanceId uint32) (*MediaInfo, error)

Gets information about the currently selected media, its URI, length in tracks, and recording status, if any. For Sonos @instanceId should always be 0 and most of the fields are unsupported.

func (*AVTransport) GetPositionInfo

func (this *AVTransport) GetPositionInfo(instanceId uint32) (*PositionInfo, error)

Get information about the track that is currently playing, its URI, position in the queue (Q:0), and elapsed time. For Sonos @instanceId should always be 0.

func (*AVTransport) GetRemainingSleepTimerDuration

func (this *AVTransport) GetRemainingSleepTimerDuration(instanceId uint32) (remainingSleepTimerDuration string,
	currentSleepTimerGeneration uint32, err error)

func (*AVTransport) GetRunningAlarmProperties

func (this *AVTransport) GetRunningAlarmProperties(instanceId uint32) (alarmId uint32, groupId, loggedStartTime string, err error)

func (*AVTransport) GetTransportInfo

func (this *AVTransport) GetTransportInfo(instanceId uint32) (*TransportInfo, error)

Return the current state of the transport (playing, stopped, paused), its status, and playback speed. For Sonos @instanceId should always be 0.

func (*AVTransport) GetTransportSettings

func (this *AVTransport) GetTransportSettings(instanceId uint32) (*TransportSettings, error)

Return the current transport settings; the playback mode (NORMAL, REPEAT_ALL, SHUFFLE, etc.); and the recoding quality (not support on Sonos). For Sonos @instanceId will always with 0.

func (*AVTransport) HandleProperty

func (this *AVTransport) HandleProperty(svc *Service, value string, channel chan Event) error

func (*AVTransport) Next

func (this *AVTransport) Next(instanceId uint32) error

Skip ahead to the next track in the queue (Q:). For Sonos @instanceId should always be 0. This method returns an error 711 if the current track is the last track in the queue.

func (*AVTransport) NextProgrammedRadioTracks

func (this *AVTransport) NextProgrammedRadioTracks(instanceId uint32) (err error)

func (*AVTransport) NextSection

func (this *AVTransport) NextSection(instanceId uint32) error

Advance one section in the current track. For Sonos @instanceId will always be zero. Experimentally this method returns 711 if the current track does not contain multiple sections.

func (*AVTransport) NotifyDeletedURI

func (this *AVTransport) NotifyDeletedURI(instanceId uint32, deletedURI string) (err error)

func (*AVTransport) Pause

func (this *AVTransport) Pause(instanceId uint32) error

Pause playback, prepared to resume at the current position. For Sonos @instanceId should always be 0.

func (*AVTransport) Play

func (this *AVTransport) Play(instanceId uint32, speed string) error

Starts or resumes playback at the given speed. For Sonos @instanceId should always be 0; @speed is a fraction relative to normal speed (e.g. "1" or "1/2").

func (*AVTransport) Previous

func (this *AVTransport) Previous(instanceId uint32) error

Move to a previous track in the queue (Q:0). For Sonos @instanceId should always be 0. This method returns error 711 if the current track is the first track in the queue.

func (*AVTransport) PreviousSection

func (this *AVTransport) PreviousSection(instanceId int) error

Retreat one section in the current track. For Sonos @instanceId will always be zero. Experimentally this method returns 711 if the current track does not contain multiple sections.

func (*AVTransport) RemoveAllTracksFromQueue

func (this *AVTransport) RemoveAllTracksFromQueue(instanceId uint32) error

Remove all tracks from the queue (Q:0). For Sonos @instanceId will always be 0. Emptying an already empty queue is not an error.

func (*AVTransport) RemoveTrackFromQueue

func (this *AVTransport) RemoveTrackFromQueue(instanceId uint32, objectId string, updateId uint32) error

Remove a single track from the queue (Q:0). For Sonos @instanceId will always be 0; @objectId will be the identifier of the item to be removed from the queue (e.g. "Q:0/5" for the fifth element in the queue); @updateId will always be 0.

func (*AVTransport) RemoveTrackRangeFromQueue

func (this *AVTransport) RemoveTrackRangeFromQueue(instanceId, updateId, startingIndex, numberOfTracks uint32) (uint32, error)

Remove a continguous range of tracks from the queue (Q:0). For Sonos @instanceId will always be 0; @updateId should be 0; @startingIndex is the first track to remove where the first track is 1; @numberOfTracks is the number of tracks to remove. Returns the new @updateId.

This method fails with 402 if either @startingIndex or @numberOfTracks is out of range.

func (*AVTransport) ReorderTracksInQueue

func (this *AVTransport) ReorderTracksInQueue(instanceId, startingIndex, numberOfTracks, insertBefore, updateId uint32) error

Move a contiguous range of tracks to a given point in the queue. For Sonos @instanceId will always be 0; @startingIndex is the first track in the range to be moved, where the first track in the queue is track 1; @numberOfTracks is the length of the range; @insertBefore set the destination position in the queue; @updateId should be 0.

Note that to move tracks to the end of the queue @insertBefore must be set to the number of tracks in the queue plus 1. This method fails with 402 if @startingndex, @numberOfTracks, or @insertBefore are out of range.

func (*AVTransport) ReorderTracksInSavedQueue

func (this *AVTransport) ReorderTracksInSavedQueue(instanceId uint32, req *ReorderTracksInSavedQueueIn) (*ReorderTracksInSavedQueueOut, error)

func (*AVTransport) RunAlarm

func (this *AVTransport) RunAlarm(instanceId uint32, req *RunAlarmRequest) (err error)

func (*AVTransport) SaveQueue

func (this *AVTransport) SaveQueue(instanceId uint32, title, objectId string) (string, error)

Create a new named queue (SQ:n) from the contents of the current queue (Q:0). For Sonos @instanceId should always be 0; @title is the display name of the new named queue; @objectId should be left blank. This method returns the objectId of the newly created queue.

func (*AVTransport) Seek

func (this *AVTransport) Seek(instanceId uint32, unit, target string) error

A general function to seek within the playback queue (Q:0). For Sonos @instanceId should always be 0; @unit should be one of the values given for seek mode (TRACK_NR, REL_TIME, or SECTION); and @target should give the track, time offset, or section where playback should resume.

For TRACK_NR the integer track number relative to the start of the queue is supplied to @target. For REL_TIME a duration in the format HH:MM:SS is given as @target. SECTION is not tested.

func (*AVTransport) SetAVTransportURI

func (this *AVTransport) SetAVTransportURI(instanceId uint32, currentURI, currentURIMetaData string) error

Set the current playback URI, where @currentURI will be a valid URI as given by the Res() attribute of a ContentDirectory object. For Sonos @instanceId will always be 0; @currentURIMetaData can be empty.

Use this method to, for example, resume playback from a queue after playback from a radio station or other source.

func (*AVTransport) SetCrossfadeMode

func (this *AVTransport) SetCrossfadeMode(instanceId uint32, crossfadeMode bool) error

Toggle crossfade mode on or off. For Sonos @instanceId should always be 0. If @crossfadeMode is true crossfade mode will be enabled; otherwise disabled.

func (*AVTransport) SetNextAVTransportURI

func (this *AVTransport) SetNextAVTransportURI(instanceId uint32, nextURI, nextURIMetaData string) error

func (*AVTransport) SetPlayMode

func (this *AVTransport) SetPlayMode(instanceId uint32, newPlayMode string) error

Set the current playback mode where @newPlayMode is one of the values given for PlayMode above. For Sonos @instanceId should always be 0. This method returns 712 if an invalid @newPlayMode is supplied.

func (*AVTransport) SnoozeAlarm

func (this *AVTransport) SnoozeAlarm(instanceId uint32, duration string) (err error)

func (*AVTransport) StartAutoplay

func (this *AVTransport) StartAutoplay(instanceId uint32, req *StartAutoplayRequest) (err error)

func (*AVTransport) Stop

func (this *AVTransport) Stop(instanceId uint32) error

Stops playback and return to the beginning of the queue (Q:1). For Sonos @instanceId should always be 0.

type AVTransportEvent

type AVTransportEvent struct {
	AVTransportState
	Svc *Service
}

func (AVTransportEvent) Service

func (this AVTransportEvent) Service() *Service

func (AVTransportEvent) Type

func (this AVTransportEvent) Type() int

type AVTransportState

type AVTransportState struct {
	LastChange avTransport_Event_XML
}

type A_ARG_TYPE_AccountCredential

type A_ARG_TYPE_AccountCredential string

type A_ARG_TYPE_AccountID

type A_ARG_TYPE_AccountID string

type A_ARG_TYPE_AccountNickname

type A_ARG_TYPE_AccountNickname string

type A_ARG_TYPE_AccountPassword

type A_ARG_TYPE_AccountPassword string

type A_ARG_TYPE_AccountType

type A_ARG_TYPE_AccountType uint32

type A_ARG_TYPE_AccountUDN

type A_ARG_TYPE_AccountUDN string

type A_ARG_TYPE_OAuthDeviceID

type A_ARG_TYPE_OAuthDeviceID string

type AddMultipleURIsToQueueIn

type AddMultipleURIsToQueueIn struct {
	// UpdateID (in), can be 0
	UpdateID uint32
	// The number of URIs to be added in this request
	NumberOfURIs uint32
	// A list of @NumberOfURIs URIs, separated by a space
	EnqueuedURIs string
	// A list of @NumberOfURIs DIDL-Lite documents, separated by a space
	EnqueuedURIsMetaData string
	// URI of a container in the ContentDirectory containing the
	// URIs to be added.  If adding tracks this should be the URI for
	// the A:TRACK entry in the directory.
	ContainerURI string
	// A DIDL-Lite document describing the resource given by @ContainerURI
	ContainerMetaData string
	// This field should be 0 to insert the new item at the end
	// of the queue.  If non-zero the new track will be inserted at
	// this location, and later tracks will see their track numbers
	// incremented.
	DesiredFirstTrackNumberEnqueued uint32
	// ???? (possibly unsupported)
	EnqueueAsNext bool
}

Input parameters for AddMultipleURIsToQueue.

type AddMultipleURIsToQueueOut

type AddMultipleURIsToQueueOut struct {
	// The starting position int the queue (Q:0) of the newly added tracks
	FirstTrackNumberEnqueued uint32
	// The number of tracks added by the request
	NumTracksAdded uint32
	// The length of the queue after the request was complete
	NewQueueLength uint32
	// The new UpdateID
	NewUpdateID uint32
}

Output parameters for AddMultipleURIsToQueue.

type AddURIToQueueIn

type AddURIToQueueIn struct {
	// The URI of the track to be added to the queue, corresponding
	// the to <res> tag in a DIDL-Lite description (@see dldl,
	// @ContentDirectory, etc) e.g.:
	//     "x-file-cifs://servername/path/to/track.mp3"
	EnqueuedURI string
	// A DIDL-Lite document describing the the resource given by @EnqueuedURI
	EnqueuedURIMetaData string
	// This field should be 0 to insert the new item at the end
	// of the queue.  If non-zero the new track will be inserted at
	// this location, and later tracks will see their track numbers
	// incremented.
	DesiredFirstTrackNumberEnqueued uint32
	// ???? (possibly unsupported)
	EnqueueAsNext bool
}

Input parameters for AddURIToQueue.

type AddURIToQueueOut

type AddURIToQueueOut struct {
	// The track number of the newly added track.
	FirstTrackNumberEnqueued uint32
	// The number of tracks added by this request (always 1).
	NumTracksAdded uint32
	// The length of the queue now that this track has been added
	NewQueueLength uint32
}

Output parameters for AddURIToQueue

type AddURIToSavedQueueIn

type AddURIToSavedQueueIn struct {
	ObjectID            string
	UpdateID            uint32
	EnqueuedURI         string
	EnqueuedURIMetaData string
	AddAtIndex          uint32
}

type AddURIToSavedQueueOut

type AddURIToSavedQueueOut struct {
	NumTracksAdded uint32
	NewQueueLength uint32
	NewUpdateID    uint32
}

type AlarmClock

type AlarmClock struct {
	AlarmClockState
	Svc *Service
}

func (*AlarmClock) BeginSet

func (this *AlarmClock) BeginSet(svc *Service, channel chan Event)

func (*AlarmClock) CreateAlarm

func (this *AlarmClock) CreateAlarm(req *CreateAlarmRequest) (assignedId uint32, err error)

func (*AlarmClock) DestroyAlarm

func (this *AlarmClock) DestroyAlarm(id uint32) (err error)

func (*AlarmClock) EndSet

func (this *AlarmClock) EndSet(svc *Service, channel chan Event)

func (*AlarmClock) GetDailyIndexRefreshTime

func (this *AlarmClock) GetDailyIndexRefreshTime() (currentDailyIndexRefreshTime string, err error)

func (*AlarmClock) GetFormat

func (this *AlarmClock) GetFormat() (currentTimeFormat, currentDateFormat string, err error)

func (*AlarmClock) GetHouseholdTimeAtStamp

func (this *AlarmClock) GetHouseholdTimeAtStamp(timeStamp string) (householdUTCTime string, err error)

func (*AlarmClock) GetTimeNow

func (this *AlarmClock) GetTimeNow() (getTimeNowResponse *GetTimeNowResponse, err error)

func (*AlarmClock) GetTimeServer

func (this *AlarmClock) GetTimeServer() (currentTimeServer string, err error)

func (*AlarmClock) GetTimeZone

func (this *AlarmClock) GetTimeZone() (index int32, autoAdjustDst bool, err error)

func (*AlarmClock) GetTimeZoneAndRule

func (this *AlarmClock) GetTimeZoneAndRule() (index int32, autoAdjustDst bool, timeZone string, err error)

func (*AlarmClock) GetTimeZoneRule

func (this *AlarmClock) GetTimeZoneRule(index int32) (timeZone string, err error)

func (*AlarmClock) HandleProperty

func (this *AlarmClock) HandleProperty(svc *Service, value string, channel chan Event) error

func (*AlarmClock) ListAlarms

func (this *AlarmClock) ListAlarms() (currentAlarmList, currentAlarmListVersion string, err error)

func (*AlarmClock) SetDailyIndexRefreshTime

func (this *AlarmClock) SetDailyIndexRefreshTime(desiredDailyIndexRefreshTime string) (err error)

func (*AlarmClock) SetFormat

func (this *AlarmClock) SetFormat(desiredTimeFormat, desiredDateFormat string) (err error)

func (*AlarmClock) SetTimeNow

func (this *AlarmClock) SetTimeNow(desiredTime, timeZoneForDesiredTime string) (err error)

func (*AlarmClock) SetTimeServer

func (this *AlarmClock) SetTimeServer(desiredTimeServer string) (err error)

func (*AlarmClock) SetTimeZone

func (this *AlarmClock) SetTimeZone(index int32, autoAdjustDst bool) (err error)

func (*AlarmClock) UpdateAlarm

func (this *AlarmClock) UpdateAlarm(id uint32, req *UpdateAlarmRequest) (err error)

type AlarmClockEvent

type AlarmClockEvent struct {
	AlarmClockState
	Svc *Service
}

func (AlarmClockEvent) Service

func (this AlarmClockEvent) Service() *Service

func (AlarmClockEvent) Type

func (this AlarmClockEvent) Type() int

type AlarmClockState

type AlarmClockState struct {
	TimeZone              string
	TimeServer            string
	TimeGeneration        uint32
	AlarmListVersion      string
	DailyIndexRefreshTime string
	TimeFormat            string
	DateFormat            string
}

type Arg

type Arg struct {
	Key   string
	Value interface{}
}

type Args

type Args []Arg

type BasicEQ

type BasicEQ struct {
	Bass        int16
	Treble      int16
	Loudness    bool
	LeftVolume  uint16
	RightVolume uint16
}

type BecomeGroupCoordinatorAndSourceRequest

type BecomeGroupCoordinatorAndSourceRequest struct {
	CurrentCoordinator    string
	CurrentGroupID        string
	OtherMembers          string
	CurrentURI            string
	CurrentURIMetaData    string
	SleepTimerState       string
	AlarmState            string
	StreamRestartState    string
	CurrentAVTTrackList   string
	CurrentQueueTrackList string
	CurrentSourceState    string
	ResumePlayback        bool
}

type BecomeGroupCoordinatorRequest

type BecomeGroupCoordinatorRequest struct {
	CurrentCoordinator    string
	CurrentGroupID        string
	OtherMembers          string
	TransportSettings     string
	CurrentURI            string
	CurrentURIMetaData    string
	SleepTimerState       string
	AlarmState            string
	StreamRestartState    string
	CurrentQueueTrackList string
}

type BrowseRequest

type BrowseRequest struct {
	ObjectID      string
	BrowseFlag    string
	Filter        string
	StartingIndex uint32
	RequestCount  uint32
	SortCriteria  string
}

type BrowseResult

type BrowseResult struct {
	NumberReturned int32
	TotalMatches   int32
	UpdateID       int32
	Doc            *didl.Lite
}

type ChangeCoordinatorRequest

type ChangeCoordinatorRequest struct {
	CurrentCoordinator   string
	NewCoordinator       string
	NewTransportSettings string
}

type ConnectionInfo

type ConnectionInfo struct {
	RcsID                 int32
	AVTransportID         int32
	ProtocolInfo          string
	PeerConnectionManager string
	PeerConnectionID      int32
	Direction             string
	Status                string
}

type ConnectionManager

type ConnectionManager struct {
	ConnectionManagerState
	Svc *Service
}

func (*ConnectionManager) BeginSet

func (this *ConnectionManager) BeginSet(svc *Service, channel chan Event)

func (*ConnectionManager) EndSet

func (this *ConnectionManager) EndSet(svc *Service, channel chan Event)

func (*ConnectionManager) GetCurrentConnectionIDs

func (this *ConnectionManager) GetCurrentConnectionIDs() (connectionIds string, err error)

func (*ConnectionManager) GetCurrentConnectionInfo

func (this *ConnectionManager) GetCurrentConnectionInfo(connectionId int32) (connectionInfo *ConnectionInfo, err error)

func (*ConnectionManager) GetProtocolInfo

func (this *ConnectionManager) GetProtocolInfo() (source, sink string, err error)

func (*ConnectionManager) HandleProperty

func (this *ConnectionManager) HandleProperty(svc *Service, value string, channel chan Event) error

type ConnectionManagerEvent

type ConnectionManagerEvent struct {
	ConnectionManagerState
	Svc *Service
}

func (ConnectionManagerEvent) Service

func (this ConnectionManagerEvent) Service() *Service

func (ConnectionManagerEvent) Type

func (this ConnectionManagerEvent) Type() int

type ConnectionManagerState

type ConnectionManagerState struct {
	SourceProtocolInfo   string
	SinkProtocolInfo     string
	CurrentConnectionIDs string
}

type ContentDirectory

type ContentDirectory struct {
	ContentDirectoryState
	Svc *Service
}

func (*ContentDirectory) BeginSet

func (this *ContentDirectory) BeginSet(svc *Service, channel chan Event)

func (*ContentDirectory) Browse

func (this *ContentDirectory) Browse(req *BrowseRequest) (browseResult *BrowseResult, err error)

func (*ContentDirectory) CreateObject

func (this *ContentDirectory) CreateObject(container, elements string) (objectId, result string, err error)

func (*ContentDirectory) DestroyObject

func (this *ContentDirectory) DestroyObject(objectId string) error

Remove the directory object given by @objectId (e.g. "SQ:11", to remove a saved queue). A 701 error is returned if an invalid @objectId is specified.

func (*ContentDirectory) EndSet

func (this *ContentDirectory) EndSet(svc *Service, channel chan Event)

func (*ContentDirectory) FindPrefix

func (this *ContentDirectory) FindPrefix(objectId, prefix string) (startingIndex, updateId uint32, err error)

func (*ContentDirectory) GetAlbumArtistDisplayOption

func (this *ContentDirectory) GetAlbumArtistDisplayOption() (albumArtistDisplayOption string, err error)

func (*ContentDirectory) GetAllPrefixLocations

func (this *ContentDirectory) GetAllPrefixLocations(objectId string) (prefixLocations *PrefixLocations, err error)

func (*ContentDirectory) GetBrowseable

func (this *ContentDirectory) GetBrowseable() (isBrowseable bool, err error)

func (*ContentDirectory) GetLastIndexChange

func (this *ContentDirectory) GetLastIndexChange() (lastIndexChange string, err error)

func (*ContentDirectory) GetSearchCapabilities

func (this *ContentDirectory) GetSearchCapabilities() (searchCaps string, err error)

func (*ContentDirectory) GetShareIndexInProgress

func (this *ContentDirectory) GetShareIndexInProgress() (isIndexing bool, err error)

func (*ContentDirectory) GetSortCapabilities

func (this *ContentDirectory) GetSortCapabilities() (sortCaps string, err error)

func (*ContentDirectory) GetSystemUpdateID

func (this *ContentDirectory) GetSystemUpdateID() (id uint32, err error)

func (*ContentDirectory) HandleProperty

func (this *ContentDirectory) HandleProperty(svc *Service, value string, channel chan Event) error

func (*ContentDirectory) RefreshShareIndex

func (this *ContentDirectory) RefreshShareIndex(albumArtistDisplayOption string) (err error)

func (*ContentDirectory) RefreshShareList

func (this *ContentDirectory) RefreshShareList() (err error)

func (*ContentDirectory) RequestResort

func (this *ContentDirectory) RequestResort(sortOrder string) (err error)

func (*ContentDirectory) SetBrowseable

func (this *ContentDirectory) SetBrowseable(browseable bool) (err error)

func (*ContentDirectory) UpdateObject

func (this *ContentDirectory) UpdateObject(objectId, currentTagValue, newTagValue string) (err error)

type ContentDirectoryEvent

type ContentDirectoryEvent struct {
	ContentDirectoryState
	Svc *Service
}

func (ContentDirectoryEvent) Service

func (this ContentDirectoryEvent) Service() *Service

func (ContentDirectoryEvent) Type

func (this ContentDirectoryEvent) Type() int

type ContentDirectoryState

type ContentDirectoryState struct {
	SystemUpdateID          uint32
	ContainerUpdateIDs      string
	ShareListRefreshState   string
	ShareIndexInProgress    bool
	ShareIndexLastError     string
	UserRadioUpdateID       string
	SavedQueuesUpdateID     string
	ShareListUpdateID       string
	RecentlyPlayedUpdateID  string
	Browseable              bool
	RadioFavoritesUpdateID  uint32
	RadioLocationUpdateID   uint32
	FavoritesUpdateID       string
	FavoritePresetsUpdateID string
}

type CreateAlarmRequest

type CreateAlarmRequest struct {
	StartLocalTime     string
	Duration           string
	Recurrence         string
	Enabled            bool
	RoomUUID           string
	ProgramURI         string
	ProgramMetaData    string
	PlayMode           string
	Volume             uint16
	IncludeLinkedZones bool
}

type CreateSavedQueueIn

type CreateSavedQueueIn struct {
	Title               string
	EnqueuedURI         string
	EnqueuedURIMetaData string
}

type CreateSavedQueueOut

type CreateSavedQueueOut struct {
	NumTracksAdded   uint32
	NewQueueLength   uint32
	AssignedObjectID string
	NewUpdateID      uint32
}

type DeviceCapabilities

type DeviceCapabilities struct {
	// Configured sources of media
	PlayMedia string
	// ???? (possibly unsupported)
	RecMedia string
	// ???? (possibly unsupported)
	RecQualityModes string
}

The return type of the GetDeviceCapabilities method

type DeviceProperties

type DeviceProperties struct {
	DevicePropertiesState
	Svc *Service
}

func (*DeviceProperties) AddBondedZones

func (this *DeviceProperties) AddBondedZones(channelMapSet string) (err error)

func (*DeviceProperties) AddHTSatellite

func (this *DeviceProperties) AddHTSatellite(htSatChanMapSet string) error

func (*DeviceProperties) BeginSet

func (this *DeviceProperties) BeginSet(svc *Service, channel chan Event)

func (*DeviceProperties) CreateStereoPair

func (this *DeviceProperties) CreateStereoPair(channelMapSet string) (err error)

func (*DeviceProperties) EndSet

func (this *DeviceProperties) EndSet(svc *Service, channel chan Event)

func (*DeviceProperties) GetAutoplayLinkedZones

func (this *DeviceProperties) GetAutoplayLinkedZones() (includeLinkedZones bool, err error)

func (*DeviceProperties) GetAutoplayRoomUUID

func (this *DeviceProperties) GetAutoplayRoomUUID() (roomUUID string, err error)

func (*DeviceProperties) GetAutoplayVolume

func (this *DeviceProperties) GetAutoplayVolume() (currentVolume uint16, err error)

func (*DeviceProperties) GetHouseholdID

func (this *DeviceProperties) GetHouseholdID() (currentHouseholdId string, err error)

func (*DeviceProperties) GetInvisible

func (this *DeviceProperties) GetInvisible() (currentInvisible bool, err error)

func (*DeviceProperties) GetLEDState

func (this *DeviceProperties) GetLEDState() (currentLEDState string, err error)

func (*DeviceProperties) GetUseAutoplayVolume

func (this *DeviceProperties) GetUseAutoplayVolume() (useVolume bool, err error)

func (*DeviceProperties) GetZoneAttributes

func (this *DeviceProperties) GetZoneAttributes() (currentZoneName, currentIcon string, err error)

func (*DeviceProperties) GetZoneInfo

func (this *DeviceProperties) GetZoneInfo() (*ZoneInfo, error)

Fetches basic properties of the appliance including IP address, MAC address, and relevant hardware and software version.

func (*DeviceProperties) HandleProperty

func (this *DeviceProperties) HandleProperty(svc *Service, value string, channel chan Event) error

func (*DeviceProperties) ImportSetting

func (this *DeviceProperties) ImportSetting(settingID uint32, settingURI string) (err error)

func (*DeviceProperties) RemoveBondedZones

func (this *DeviceProperties) RemoveBondedZones(channelMapSet string) (err error)

func (*DeviceProperties) RemoveHTSatellite

func (this *DeviceProperties) RemoveHTSatellite(satRoomUUID string) error

func (*DeviceProperties) SeparateStereoPair

func (this *DeviceProperties) SeparateStereoPair(channelMapSet string) (err error)

func (*DeviceProperties) SetAutoplayLinkedZones

func (this *DeviceProperties) SetAutoplayLinkedZones(includeLinkedZones bool) (err error)

func (*DeviceProperties) SetAutoplayRoomUUID

func (this *DeviceProperties) SetAutoplayRoomUUID(roomUUID string) (err error)

func (*DeviceProperties) SetAutoplayVolume

func (this *DeviceProperties) SetAutoplayVolume(volume uint16) (err error)

func (*DeviceProperties) SetInvisible

func (this *DeviceProperties) SetInvisible(desiredInvisible bool) (err error)

func (*DeviceProperties) SetLEDState

func (this *DeviceProperties) SetLEDState(desiredLEDState string) (err error)

func (*DeviceProperties) SetUseAutoplayVolume

func (this *DeviceProperties) SetUseAutoplayVolume(useVolume bool) (err error)

func (*DeviceProperties) SetZoneAttributes

func (this *DeviceProperties) SetZoneAttributes(desiredZoneName, desiredIcon string) (err error)

type DevicePropertiesEvent

type DevicePropertiesEvent struct {
	DevicePropertiesState
	Svc *Service
}

func (DevicePropertiesEvent) Service

func (this DevicePropertiesEvent) Service() *Service

func (DevicePropertiesEvent) Type

func (this DevicePropertiesEvent) Type() int

type DevicePropertiesState

type DevicePropertiesState struct {
	SettingsReplicationState string
	ZoneName                 string
	Icon                     string
	Configuration            string
	Invisible                bool
	IsZoneBridge             bool
	ChannelMapSet            string
	HTSatChanMapSet          string
	HTFreq                   uint32
}

type ErrorResponse

type ErrorResponse struct {
	FaultCode   string `xml:"faultcode"`
	FaultString string `xml:"faultstring"`
	Detail      struct {
		XMLName   xml.Name
		UPnPError struct {
			XMLName   xml.Name
			ErrorCode string `xml:"errorCode"`
		} `xml:"urn:schemas-upnp-org:control-1-0 UPnPError"`
	} `xml:"detail"`
}

func (*ErrorResponse) Error

func (this *ErrorResponse) Error() (err error)

type Event

type Event interface {
	Service() *Service
	Type() int
}

type EventFactory

type EventFactory interface {
	BeginSet(svc *Service, channel chan Event)
	HandleProperty(svc *Service, value string, channel chan Event) error
	EndSet(svc *Service, channel chan Event)
}

type GetTimeNowResponse

type GetTimeNowResponse struct {
	CurrentUTCTime        string
	CurrentLocalTime      string
	CurrentTimeZone       string
	CurrentTimeGeneration uint32
}

type GroupManagement

type GroupManagement struct {
	GroupManagementState
	Svc *Service
}

func (*GroupManagement) AddMember

func (this *GroupManagement) AddMember(memberId string) (memberInfo *MemberInfo, err error)

func (*GroupManagement) BeginSet

func (this *GroupManagement) BeginSet(svc *Service, channel chan Event)

func (*GroupManagement) EndSet

func (this *GroupManagement) EndSet(svc *Service, channel chan Event)

func (*GroupManagement) HandleProperty

func (this *GroupManagement) HandleProperty(svc *Service, value string, channel chan Event) error

func (*GroupManagement) RemoveMember

func (this *GroupManagement) RemoveMember(memberId string) (err error)

func (*GroupManagement) ReportTrackBufferingResult

func (this *GroupManagement) ReportTrackBufferingResult(memberId string, resultCode int32) (err error)

type GroupManagementEvent

type GroupManagementEvent struct {
	GroupManagementState
	Svc *Service
}

func (GroupManagementEvent) Service

func (this GroupManagementEvent) Service() *Service

func (GroupManagementEvent) Type

func (this GroupManagementEvent) Type() int

type GroupManagementState

type GroupManagementState struct {
	GroupCoordinatorIsLocal bool
	LocalGroupUUID          string
	ResetVolumeAfter        bool
	VolumeAVTransportURI    string
}

type MediaInfo

type MediaInfo struct {
	// The number of tracks in the queue (Q:0)
	NrTracks uint32
	// ???? (possibly not supported)
	MediaDuration string
	// The URI of the queue
	CurrentURI string
	// ????
	CurrentURIMetaData string
	// ???? (possibly not supported)
	NextURI string
	// ???? (possibly not supported)
	NextURIMetaData string
	// ????
	PlayMedium string
	// ???? (possibly not supported)
	RecordMedium string
	// ???? (possibly not supported)
	WriteStatus string
}

The return type of the GetMediaInfo method

type MemberInfo

type MemberInfo struct {
	CurrentTransportSettings string
	GroupUUIDJoined          string
	ResetVolumeAfter         bool
	VolumeAVTransportURI     string
}

type MusicServices

type MusicServices struct {
	MusicServicesState
	Svc *Service
}

func (*MusicServices) BeginSet

func (this *MusicServices) BeginSet(svc *Service, channel chan Event)

func (*MusicServices) EndSet

func (this *MusicServices) EndSet(svc *Service, channel chan Event)

func (*MusicServices) GetSessionId

func (this *MusicServices) GetSessionId(serviceId int16, username string) (sessionId string, err error)

func (*MusicServices) HandleProperty

func (this *MusicServices) HandleProperty(svc *Service, value string, channel chan Event) error

func (*MusicServices) ListAvailableServices

func (this *MusicServices) ListAvailableServices() (err error)

func (*MusicServices) UpdateAvailableServices

func (this *MusicServices) UpdateAvailableServices() (err error)

type MusicServicesEvent

type MusicServicesEvent struct {
	MusicServicesState
	Svc *Service
}

func (MusicServicesEvent) Service

func (this MusicServicesEvent) Service() *Service

func (MusicServicesEvent) Type

func (this MusicServicesEvent) Type() int

type MusicServicesState

type MusicServicesState struct {
	ServiceListVersion string
}

type PositionInfo

type PositionInfo struct {
	// Track number relative to the beginning of the queue (not the containing album).
	Track uint32
	// Total length of the track in HH:MM:SS format
	TrackDuration string
	// The DIDL-Lite document describing this item in the ContentDirectory
	TrackMetaData string
	// The URI of the track, corresponding // the to <res> tag in
	// a DIDL-Lite description (@see dldl, @ContentDirectory, etc) e.g.:
	//     "x-file-cifs://servername/path/to/track.mp3"
	TrackURI string
	// The number of elapsed seconds into the track in HH:MM:SS format
	RelTime string
	// ???? (possibly unsupported)
	AbsTime string
	// ???? (possibly unsupported)
	RelCount uint32
	// ???? (possibly unsupported)
	AbsCount uint32
}

The return type of the GetPositionInfo method

type PrefixLocations

type PrefixLocations struct {
	TotalPrefixes     uint32
	PrefixAndIndexCSV string
	UpdateID          uint32
}

type RampRequest

type RampRequest struct {
	RampType         string
	DesiredVolume    uint16
	ResetVolumeAfter bool
	ProgramURI       string
}

type Reactor

type Reactor interface {
	Init(port int)
	Subscribe(svc *Service, factory EventFactory) error
	Channel() chan Event
}

func MakeReactor

func MakeReactor() Reactor

type RenderingControl

type RenderingControl struct {
	RenderingControlState
	Svc *Service
}

func (*RenderingControl) BeginSet

func (this *RenderingControl) BeginSet(svc *Service, channel chan Event)

func (*RenderingControl) EndSet

func (this *RenderingControl) EndSet(svc *Service, channel chan Event)

func (*RenderingControl) GetBass

func (this *RenderingControl) GetBass(instanceId uint32) (currentBass int16, err error)

func (*RenderingControl) GetEQ

func (this *RenderingControl) GetEQ(instanceId uint32, eqType string) (currentValue int16, err error)

func (*RenderingControl) GetHeadphoneConnected

func (this *RenderingControl) GetHeadphoneConnected(instanceId uint32) (currentHeadphoneConnected bool, err error)

func (*RenderingControl) GetLoudness

func (this *RenderingControl) GetLoudness(instanceId uint32, channel string) (loudness bool, err error)

func (*RenderingControl) GetMute

func (this *RenderingControl) GetMute(instanceId uint32, channel string) (currentMute bool, err error)

func (*RenderingControl) GetOutputFixed

func (this *RenderingControl) GetOutputFixed(instanceId uint32) (currentFixed bool, err error)

func (*RenderingControl) GetSupportsOutputFixed

func (this *RenderingControl) GetSupportsOutputFixed(instanceId uint32) (currentSupportsFixed bool, err error)

func (*RenderingControl) GetTreble

func (this *RenderingControl) GetTreble(instanceId uint32) (currentTreble int16, err error)

func (*RenderingControl) GetVolume

func (this *RenderingControl) GetVolume(instanceId uint32, channel string) (currentVolume uint16, err error)

func (*RenderingControl) GetVolumeDB

func (this *RenderingControl) GetVolumeDB(instanceId uint32, channel string) (currentVolume int16, err error)

func (*RenderingControl) GetVolumeDBRange

func (this *RenderingControl) GetVolumeDBRange(instanceId uint32, channel string) (min, max int16, err error)

func (*RenderingControl) HandleProperty

func (this *RenderingControl) HandleProperty(svc *Service, value string, channel chan Event) error

func (*RenderingControl) ListPresets

func (this *RenderingControl) ListPresets(instanceId uint32) (presets string, err error)

Reciva

func (*RenderingControl) RampToVolume

func (this *RenderingControl) RampToVolume(instanceId uint32, channel, req RampRequest) (rampTime uint32, err error)

func (*RenderingControl) ResetBasicEQ

func (this *RenderingControl) ResetBasicEQ(instanceId uint32) (basicEQ *BasicEQ, err error)

func (*RenderingControl) ResetExtEQ

func (this *RenderingControl) ResetExtEQ(instanceId uint32, eqType string) (err error)

func (*RenderingControl) RestoreVolumePriorToRamp

func (this *RenderingControl) RestoreVolumePriorToRamp(instanceId uint32, channel string) (err error)

func (*RenderingControl) SelectPreset

func (this *RenderingControl) SelectPreset(instanceId uint32, presetName string) error

Reciva

func (*RenderingControl) SetBass

func (this *RenderingControl) SetBass(instanceId, desiredBass int16) (err error)

func (*RenderingControl) SetChannelMap

func (this *RenderingControl) SetChannelMap(instanceId uint32, channelMap string) (err error)

func (*RenderingControl) SetEQ

func (this *RenderingControl) SetEQ(instanceId uint32, eqType string, desiredValue int16) (err error)

func (*RenderingControl) SetLoudness

func (this *RenderingControl) SetLoudness(instanceId uint32, channel string, loudness bool) (err error)

func (*RenderingControl) SetMute

func (this *RenderingControl) SetMute(instanceId uint32, channel string, desiredMute bool) (err error)

func (*RenderingControl) SetOutputFixed

func (this *RenderingControl) SetOutputFixed(instanceId uint32, desiredFixed bool) (err error)

func (*RenderingControl) SetRelativeVolume

func (this *RenderingControl) SetRelativeVolume(instanceId uint32, channel string, adjustment int32) (newVolume uint16, err error)

func (*RenderingControl) SetTreble

func (this *RenderingControl) SetTreble(instanceId, desiredTreble int16) (err error)

func (*RenderingControl) SetVolume

func (this *RenderingControl) SetVolume(instanceId uint32, channel string, volume uint16) error

Set the playback volume. For Sonos @instanceId will always be 0; @channel is one of the constants given in this file (e.g. Channel_Master); @volume is an integer between 0 and 100, where 100 is the loudest.

func (*RenderingControl) SetVolumeDB

func (this *RenderingControl) SetVolumeDB(instanceId uint32, channel string, volume int16) (err error)

type RenderingControlEvent

type RenderingControlEvent struct {
	RenderingControlState
	Svc *Service
}

func (RenderingControlEvent) Service

func (this RenderingControlEvent) Service() *Service

func (RenderingControlEvent) Type

func (this RenderingControlEvent) Type() int

type RenderingControlState

type RenderingControlState struct {
	LastChange renderingControl_Event_XML
}

type ReorderTracksInSavedQueueIn

type ReorderTracksInSavedQueueIn struct {
	ObjectID        string
	UpdateID        uint32
	TrackList       string // dunno anything about A_ARG_TYPE_TrackList
	NewPositionList string // dunno anything about A_ARG_TYPE_TrackList
}

type ReorderTracksInSavedQueueOut

type ReorderTracksInSavedQueueOut struct {
	QueueLengthChange uint32
	NewQueueLength    uint32
	NewUpdateID       uint32
}

type RunAlarmRequest

type RunAlarmRequest struct {
	AlarmID            uint32
	LoggedStartTime    string
	Duration           string
	ProgramURI         string
	ProgramMetaData    string
	PlayMode           string
	Volume             uint32
	IncludeLinkedZones bool
}

type Service

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

func (*Service) Actions

func (this *Service) Actions() (actions []string)

func (*Service) Call

func (this *Service) Call(action string, args Args) (response string)

func (*Service) CallVa

func (this *Service) CallVa(action string, va_list ...interface{}) (response string)

func (*Service) Describe

func (this *Service) Describe() (err error)

type ServiceMap

type ServiceMap map[string][]*Service

func Describe

func Describe(uri ssdp.Location) (svc_map ServiceMap, err error)

type StartAutoplayRequest

type StartAutoplayRequest struct {
	ProgramURI         string
	ProgramMetaData    string
	Volume             uint32
	IncludeLinkedZones bool
	ResetVolumeAfter   bool
}

type SystemProperties

type SystemProperties struct {
	SystemPropertiesState
	Svc *Service
}

func (*SystemProperties) AddAccountWithCredentialsX

func (this *SystemProperties) AddAccountWithCredentialsX(accountType uint32, accountToken, accountKey string) (err error)

func (*SystemProperties) AddAccountX

func (this *SystemProperties) AddAccountX(accountType uint32, accountId, accountPassword string) (err error)

func (*SystemProperties) AddOAuthAccountX

func (this *SystemProperties) AddOAuthAccountX(accountType A_ARG_TYPE_AccountType, accountToken, accountKey A_ARG_TYPE_AccountCredential,
	oauthDeviceID A_ARG_TYPE_OAuthDeviceID) (accountUDN A_ARG_TYPE_AccountUDN, err error)

func (*SystemProperties) ApplyRDMDefaultSettings

func (this *SystemProperties) ApplyRDMDefaultSettings() error

func (*SystemProperties) BeginSet

func (this *SystemProperties) BeginSet(svc *Service, channel chan Event)

func (*SystemProperties) DoPostUpdateTasks

func (this *SystemProperties) DoPostUpdateTasks() (err error)

func (*SystemProperties) EditAccountMd

func (this *SystemProperties) EditAccountMd(accountType uint32, accountId, accountMd string) (err error)

func (*SystemProperties) EditAccountPasswordX

func (this *SystemProperties) EditAccountPasswordX(accountType uint32, accountId, newAccountPassword string) (err error)

func (*SystemProperties) EnableRDM

func (this *SystemProperties) EnableRDM(rdmValue bool) error

func (*SystemProperties) EndSet

func (this *SystemProperties) EndSet(svc *Service, channel chan Event)

func (*SystemProperties) GetRDM

func (this *SystemProperties) GetRDM() (rdmValue bool, err error)

func (*SystemProperties) GetString

func (this *SystemProperties) GetString(variableName string) (stringValue string, err error)

func (*SystemProperties) GetStringX

func (this *SystemProperties) GetStringX(variableName string) (stringValue string, err error)

func (*SystemProperties) GetWebCode

func (this *SystemProperties) GetWebCode(accountType uint32) (webCode string, err error)

func (*SystemProperties) HandleProperty

func (this *SystemProperties) HandleProperty(svc *Service, value string, channel chan Event) error

func (*SystemProperties) MigrateTrialAccountX

func (this *SystemProperties) MigrateTrialAccountX(accountType uint32, accountId, accountPassword string) (err error)

func (*SystemProperties) ProvisionCredentialedTrialAccountX

func (this *SystemProperties) ProvisionCredentialedTrialAccountX(accountType uint32, accountId, accountPassword string) (isExpired bool,
	err error)

func (*SystemProperties) ProvisionTrialAccount

func (this *SystemProperties) ProvisionTrialAccount(accountType uint32) (err error)

func (*SystemProperties) RefreshAccountCredentialsX

func (this *SystemProperties) RefreshAccountCredentialsX(accountType uint32, accountToken, accountKey string) error

func (*SystemProperties) Remove

func (this *SystemProperties) Remove(variableName string) (err error)

func (*SystemProperties) RemoveAccount

func (this *SystemProperties) RemoveAccount(accountType uint32, accountId string) (err error)

func (*SystemProperties) RemoveX

func (this *SystemProperties) RemoveX(variableName string) error

func (*SystemProperties) ReplaceAccountX

func (this *SystemProperties) ReplaceAccountX(accountUDN A_ARG_TYPE_AccountUDN, newAccountID A_ARG_TYPE_AccountID,
	newAccountPassword A_ARG_TYPE_AccountPassword) (newAccountUDN A_ARG_TYPE_AccountUDN, err error)

func (*SystemProperties) ResetThirdPartyCredentials

func (this *SystemProperties) ResetThirdPartyCredentials() (err error)

func (*SystemProperties) SetAccountNicknameX

func (this *SystemProperties) SetAccountNicknameX(accountUDN A_ARG_TYPE_AccountUDN, accountNickname A_ARG_TYPE_AccountNickname) error

func (*SystemProperties) SetString

func (this *SystemProperties) SetString(variableName, stringValue string) (err error)

func (*SystemProperties) SetStringX

func (this *SystemProperties) SetStringX(variableName, stringValue string) (err error)

type SystemPropertiesEvent

type SystemPropertiesEvent struct {
	SystemPropertiesState
	Svc *Service
}

func (SystemPropertiesEvent) Service

func (this SystemPropertiesEvent) Service() *Service

func (SystemPropertiesEvent) Type

func (this SystemPropertiesEvent) Type() int

type SystemPropertiesState

type SystemPropertiesState struct {
}

type TransportInfo

type TransportInfo struct {
	// Indicates whether the device is playing, paused, or stopped
	CurrentTransportState string
	// Indicates if an error condition exists ("OK" otherwise)
	CurrentTransportStatus string
	// Playback speed relative to normal playback speed (e.g. "1" or "1/2")
	CurrentSpeed string
}

The return type for the GetTransportInfo method

type TransportSettings

type TransportSettings struct {
	// The current play mode (NORMAL, REPEAT_ALL, SHUFFLE, etc.)
	PlayMode string
	// The record quality (not supported in Sonos)
	RecQualityMode string
}

The return value for GetTransportSettings

type UpdateAlarmRequest

type UpdateAlarmRequest CreateAlarmRequest

type UpdateItem

type UpdateItem struct {
	Type         string `xml:"Type,attr"`
	Version      string `xml:"Version,attr"`
	UpdateURL    string `xml:"UpdateURL,attr"`
	DownloadSize string `xml:"DownloadSize,attr"`
	ManifestURL  string `xml:"ManifestURL,attr"`
}

type UpdateType

type UpdateType string

type ZoneGroup

type ZoneGroup struct {
	XMLName         xml.Name
	Coordinator     string `xml:"Coordinator,attr"`
	ID              string `xml:"ID,attr"`
	ZoneGroupMember []ZoneGroupMember
}

type ZoneGroupAttributes

type ZoneGroupAttributes struct {
	CurrentZoneGroupName   string
	CurrentZoneGroupID     string
	ZonePlayerUUIDsInGroup string
}

type ZoneGroupMember

type ZoneGroupMember struct {
	XMLName              xml.Name
	UUID                 string `xml:"UUID,attr"`
	Location             string `xml:"Location,attr"`
	ZoneName             string `xml:"ZoneName,attr"`
	Icon                 string `xml:"Icon,attr"`
	Configuration        string `xml:"Configuration,attr"`
	Invisible            string `xml:"Invisible,attr"`
	IsZoneBridge         string `xml:"IsZoneBridge,attr"`
	SoftwareVersion      string `xml:"SoftwareVersion,attr"`
	MinCompatibleVersion string `xml:"MinCompatibleVersion,attr"`
	BootSeq              string `xml:"BootSeq,attr"`
}

type ZoneGroupTopology

type ZoneGroupTopology struct {
	ZoneGroupTopologyState
	Svc *Service
}

func (*ZoneGroupTopology) BeginSet

func (this *ZoneGroupTopology) BeginSet(svc *Service, channel chan Event)

func (*ZoneGroupTopology) BeginSoftwareUpdate

func (this *ZoneGroupTopology) BeginSoftwareUpdate(updateURL string, flags uint32) (err error)

func (*ZoneGroupTopology) CheckForUpdate

func (this *ZoneGroupTopology) CheckForUpdate(updateType UpdateType, cachedOnly bool, version string) (updateItem *UpdateItem, err error)

func (*ZoneGroupTopology) EndSet

func (this *ZoneGroupTopology) EndSet(svc *Service, channel chan Event)

func (*ZoneGroupTopology) GetZoneGroupAttributes

func (this *ZoneGroupTopology) GetZoneGroupAttributes() (*ZoneGroupAttributes, error)

func (*ZoneGroupTopology) GetZoneGroupState

func (this *ZoneGroupTopology) GetZoneGroupState() (*ZoneGroups, error)

func (*ZoneGroupTopology) HandleProperty

func (this *ZoneGroupTopology) HandleProperty(svc *Service, value string, channel chan Event) error

func (*ZoneGroupTopology) RegisterMobileDevice

func (this *ZoneGroupTopology) RegisterMobileDevice(deviceName, deviceUDN, deviceAddress string) (err error)

func (*ZoneGroupTopology) ReportAlarmStartedRunning

func (this *ZoneGroupTopology) ReportAlarmStartedRunning() (err error)

func (*ZoneGroupTopology) ReportUnresponsiveDevice

func (this *ZoneGroupTopology) ReportUnresponsiveDevice(deviceUUID string, desiredAction string) (err error)

func (*ZoneGroupTopology) SubmitDiagnostics

func (this *ZoneGroupTopology) SubmitDiagnostics() (diagnosticId string, err error)

type ZoneGroupTopologyEvent

type ZoneGroupTopologyEvent struct {
	ZoneGroupTopologyState
	Svc *Service
}

func (ZoneGroupTopologyEvent) Service

func (this ZoneGroupTopologyEvent) Service() *Service

func (ZoneGroupTopologyEvent) Type

func (this ZoneGroupTopologyEvent) Type() int

type ZoneGroupTopologyState

type ZoneGroupTopologyState struct {
	ZoneGroupState          string
	ThirdPartyMediaServersX string
	AvailableSoftwareUpdate string // TODO: Unpack
	AlarmRunSequence        string
	ZoneGroupName           string
	ZoneGroupID             string
	ZonePlayerUUIDsInGroup  string
}

type ZoneGroups

type ZoneGroups struct {
	XMLName   xml.Name
	ZoneGroup []ZoneGroup
}

type ZoneInfo

type ZoneInfo struct {
	// Appliance serial number
	SerialNumber string
	// Software version string
	SoftwareVersion string
	// Display software version string
	DisplaySoftwareVersion string
	// Hardware version
	HardwareVersion string
	// the IP address of the appliance
	IPAddress string
	// The hardware MAC address of the appliance
	MACAddress string
	// The Sonos Copyright statement
	CopyrightInfo string
	// ???
	ExtraInfo string
}

The return value for the GetZoneInfo method

Jump to

Keyboard shortcuts

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