Documentation ¶
Overview ¶
An implementation of the Sonos Universal Plug and Play API.
Index ¶
- Constants
- Variables
- type AVTransport
- func (this *AVTransport) AddMultipleURIsToQueue(instanceId uint32, req *AddMultipleURIsToQueueIn) (*AddMultipleURIsToQueueOut, error)
- func (this *AVTransport) AddURIToQueue(instanceId uint32, req *AddURIToQueueIn) (*AddURIToQueueOut, error)
- func (this *AVTransport) BackupQueue(instanceId uint32) (err error)
- func (this *AVTransport) BecomeCoordinatorOfStandaloneGroup(instanceId uint32) (err error)
- func (this *AVTransport) BecomeGroupCoordinator(instanceId uint32, req *BecomeGroupCoordinatorRequest) (err error)
- func (this *AVTransport) BecomeGroupCoordinatorAndSource(instanceId uint32, req *BecomeGroupCoordinatorAndSourceRequest) (err error)
- func (this *AVTransport) BeginSet(svc *Service, channel chan Event)
- func (this *AVTransport) ChangeCoordinator(instanceId uint32, req *ChangeCoordinatorRequest) (err error)
- func (this *AVTransport) ChangeTransportSettings(instanceId uint32, newTransportSettings, currentAVTransportURI string) (err error)
- func (this *AVTransport) ConfigureSleepTimer(instanceId uint32, newSleepTimerDuration string) (err error)
- func (this *AVTransport) DelegateGroupCoordinationTo(instanceId uint32, newCoordinator string, rejoinGroup bool) error
- func (this *AVTransport) EndSet(svc *Service, channel chan Event)
- func (this *AVTransport) GetCrossfadeMode(instanceId uint32) (bool, error)
- func (this *AVTransport) GetCurrentTransportActions(instanceId uint32) ([]string, error)
- func (this *AVTransport) GetDeviceCapabilities(instanceId uint32) (*DeviceCapabilities, error)
- func (this *AVTransport) GetMediaInfo(instanceId uint32) (*MediaInfo, error)
- func (this *AVTransport) GetPositionInfo(instanceId uint32) (*PositionInfo, error)
- func (this *AVTransport) GetRemainingSleepTimerDuration(instanceId uint32) (remainingSleepTimerDuration string, currentSleepTimerGeneration uint32, ...)
- func (this *AVTransport) GetRunningAlarmProperties(instanceId uint32) (alarmId uint32, groupId, loggedStartTime string, err error)
- func (this *AVTransport) GetTransportInfo(instanceId uint32) (*TransportInfo, error)
- func (this *AVTransport) GetTransportSettings(instanceId uint32) (*TransportSettings, error)
- func (this *AVTransport) HandleProperty(svc *Service, value string, channel chan Event) error
- func (this *AVTransport) Next(instanceId uint32) error
- func (this *AVTransport) NextProgrammedRadioTracks(instanceId uint32) (err error)
- func (this *AVTransport) NextSection(instanceId uint32) error
- func (this *AVTransport) NotifyDeletedURI(instanceId uint32, deletedURI string) (err error)
- func (this *AVTransport) Pause(instanceId uint32) error
- func (this *AVTransport) Play(instanceId uint32, speed string) error
- func (this *AVTransport) Previous(instanceId uint32) error
- func (this *AVTransport) PreviousSection(instanceId int) error
- func (this *AVTransport) RemoveAllTracksFromQueue(instanceId uint32) error
- func (this *AVTransport) RemoveTrackFromQueue(instanceId uint32, objectId string, updateId uint32) error
- func (this *AVTransport) RemoveTrackRangeFromQueue(instanceId, updateId, startingIndex, numberOfTracks uint32) (uint32, error)
- func (this *AVTransport) ReorderTracksInQueue(instanceId, startingIndex, numberOfTracks, insertBefore, updateId uint32) error
- func (this *AVTransport) RunAlarm(instanceId uint32, req *RunAlarmRequest) (err error)
- func (this *AVTransport) SaveQueue(instanceId uint32, title, objectId string) (string, error)
- func (this *AVTransport) Seek(instanceId uint32, unit, target string) error
- func (this *AVTransport) SetAVTransportURI(instanceId uint32, currentURI, currentURIMetaData string) error
- func (this *AVTransport) SetCrossfadeMode(instanceId uint32, crossfadeMode bool) error
- func (this *AVTransport) SetPlayMode(instanceId uint32, newPlayMode string) error
- func (this *AVTransport) SnoozeAlarm(instanceId uint32, duration string) (err error)
- func (this *AVTransport) StartAutoplay(instanceId uint32, req *StartAutoplayRequest) (err error)
- func (this *AVTransport) Stop(instanceId uint32) error
- type AVTransportEvent
- type AVTransportState
- type AddMultipleURIsToQueueIn
- type AddMultipleURIsToQueueOut
- type AddURIToQueueIn
- type AddURIToQueueOut
- type AlarmClock
- func (this *AlarmClock) BeginSet(svc *Service, channel chan Event)
- func (this *AlarmClock) CreateAlarm(req *CreateAlarmRequest) (assignedId uint32, err error)
- func (this *AlarmClock) DestroyAlarm(id uint32) (err error)
- func (this *AlarmClock) EndSet(svc *Service, channel chan Event)
- func (this *AlarmClock) GetDailyIndexRefreshTime() (currentDailyIndexRefreshTime string, err error)
- func (this *AlarmClock) GetFormat() (currentTimeFormat, currentDateFormat string, err error)
- func (this *AlarmClock) GetHouseholdTimeAtStamp(timeStamp string) (householdUTCTime string, err error)
- func (this *AlarmClock) GetTimeNow() (getTimeNowResponse *GetTimeNowResponse, err error)
- func (this *AlarmClock) GetTimeServer() (currentTimeServer string, err error)
- func (this *AlarmClock) GetTimeZone() (index int32, autoAdjustDst bool, err error)
- func (this *AlarmClock) GetTimeZoneAndRule() (index int32, autoAdjustDst bool, timeZone string, err error)
- func (this *AlarmClock) GetTimeZoneRule(index int32) (timeZone string, err error)
- func (this *AlarmClock) HandleProperty(svc *Service, value string, channel chan Event) error
- func (this *AlarmClock) ListAlarms() (currentAlarmList, currentAlarmListVersion string, err error)
- func (this *AlarmClock) SetDailyIndexRefreshTime(desiredDailyIndexRefreshTime string) (err error)
- func (this *AlarmClock) SetFormat(desiredTimeFormat, desiredDateFormat string) (err error)
- func (this *AlarmClock) SetTimeNow(desiredTime, timeZoneForDesiredTime string) (err error)
- func (this *AlarmClock) SetTimeServer(desiredTimeServer string) (err error)
- func (this *AlarmClock) SetTimeZone(index int32, autoAdjustDst bool) (err error)
- func (this *AlarmClock) UpdateAlarm(id uint32, req *UpdateAlarmRequest) (err error)
- type AlarmClockEvent
- type AlarmClockState
- type BasicEQ
- type BecomeGroupCoordinatorAndSourceRequest
- type BecomeGroupCoordinatorRequest
- type BrowseRequest
- type BrowseResult
- type ChangeCoordinatorRequest
- type ConnectionInfo
- type ConnectionManager
- func (this *ConnectionManager) BeginSet(svc *Service, channel chan Event)
- func (this *ConnectionManager) EndSet(svc *Service, channel chan Event)
- func (this *ConnectionManager) GetCurrentConnectionIDs() (connectionIds string, err error)
- func (this *ConnectionManager) GetCurrentConnectionInfo(connectionId int32) (connectionInfo *ConnectionInfo, err error)
- func (this *ConnectionManager) GetProtocolInfo() (source, sink string, err error)
- func (this *ConnectionManager) HandleProperty(svc *Service, value string, channel chan Event) error
- type ConnectionManagerEvent
- type ConnectionManagerState
- type ContentDirectory
- func (this *ContentDirectory) BeginSet(svc *Service, channel chan Event)
- func (this *ContentDirectory) Browse(req *BrowseRequest) (browseResult *BrowseResult, err error)
- func (this *ContentDirectory) CreateObject(container, elements string) (objectId, result string, err error)
- func (this *ContentDirectory) DestroyObject(objectId string) error
- func (this *ContentDirectory) EndSet(svc *Service, channel chan Event)
- func (this *ContentDirectory) FindPrefix(objectId, prefix string) (startingIndex, updateId uint32, err error)
- func (this *ContentDirectory) GetAlbumArtistDisplayOption() (albumArtistDisplayOption string, err error)
- func (this *ContentDirectory) GetAllPrefixLocations(objectId string) (prefixLocations *PrefixLocations, err error)
- func (this *ContentDirectory) GetBrowseable() (isBrowseable bool, err error)
- func (this *ContentDirectory) GetLastIndexChange() (lastIndexChange string, err error)
- func (this *ContentDirectory) GetSearchCapabilities() (searchCaps string, err error)
- func (this *ContentDirectory) GetShareIndexInProgress() (isIndexing bool, err error)
- func (this *ContentDirectory) GetSortCapabilities() (sortCaps string, err error)
- func (this *ContentDirectory) GetSystemUpdateID() (id uint32, err error)
- func (this *ContentDirectory) HandleProperty(svc *Service, value string, channel chan Event) error
- func (this *ContentDirectory) RefreshShareIndex(albumArtistDisplayOption string) (err error)
- func (this *ContentDirectory) RefreshShareList() (err error)
- func (this *ContentDirectory) RequestResort(sortOrder string) (err error)
- func (this *ContentDirectory) SetBrowseable(browseable bool) (err error)
- func (this *ContentDirectory) UpdateObject(objectId, currentTagValue, newTagValue string) (err error)
- type ContentDirectoryEvent
- type ContentDirectoryState
- type CreateAlarmRequest
- type DeviceCapabilities
- type DeviceProperties
- func (this *DeviceProperties) AddBondedZones(channelMapSet string) (err error)
- func (this *DeviceProperties) AddHTSatellite(htSatChanMapSet string) error
- func (this *DeviceProperties) BeginSet(svc *Service, channel chan Event)
- func (this *DeviceProperties) CreateStereoPair(channelMapSet string) (err error)
- func (this *DeviceProperties) EndSet(svc *Service, channel chan Event)
- func (this *DeviceProperties) GetAutoplayLinkedZones() (includeLinkedZones bool, err error)
- func (this *DeviceProperties) GetAutoplayRoomUUID() (roomUUID string, err error)
- func (this *DeviceProperties) GetAutoplayVolume() (currentVolume uint16, err error)
- func (this *DeviceProperties) GetHouseholdID() (currentHouseholdId string, err error)
- func (this *DeviceProperties) GetInvisible() (currentInvisible bool, err error)
- func (this *DeviceProperties) GetLEDState() (currentLEDState string, err error)
- func (this *DeviceProperties) GetUseAutoplayVolume() (useVolume bool, err error)
- func (this *DeviceProperties) GetZoneAttributes() (currentZoneName, currentIcon string, err error)
- func (this *DeviceProperties) GetZoneInfo() (*ZoneInfo, error)
- func (this *DeviceProperties) HandleProperty(svc *Service, value string, channel chan Event) error
- func (this *DeviceProperties) ImportSetting(settingID uint32, settingURI string) (err error)
- func (this *DeviceProperties) RemoveBondedZones(channelMapSet string) (err error)
- func (this *DeviceProperties) RemoveHTSatellite(satRoomUUID string) error
- func (this *DeviceProperties) SeparateStereoPair(channelMapSet string) (err error)
- func (this *DeviceProperties) SetAutoplayLinkedZones(includeLinkedZones bool) (err error)
- func (this *DeviceProperties) SetAutoplayRoomUUID(roomUUID string) (err error)
- func (this *DeviceProperties) SetAutoplayVolume(volume uint16) (err error)
- func (this *DeviceProperties) SetInvisible(desiredInvisible bool) (err error)
- func (this *DeviceProperties) SetLEDState(desiredLEDState string) (err error)
- func (this *DeviceProperties) SetUseAutoplayVolume(useVolume bool) (err error)
- func (this *DeviceProperties) SetZoneAttributes(desiredZoneName, desiredIcon string) (err error)
- type DevicePropertiesEvent
- type DevicePropertiesState
- type Event
- type EventFactory
- type GetTimeNowResponse
- type GroupManagement
- func (this *GroupManagement) AddMember(memberId string) (memberInfo *MemberInfo, err error)
- func (this *GroupManagement) BeginSet(svc *Service, channel chan Event)
- func (this *GroupManagement) EndSet(svc *Service, channel chan Event)
- func (this *GroupManagement) HandleProperty(svc *Service, value string, channel chan Event) error
- func (this *GroupManagement) RemoveMember(memberId string) (err error)
- func (this *GroupManagement) ReportTrackBufferingResult(memberId string, resultCode int32) (err error)
- type GroupManagementEvent
- type GroupManagementState
- type MediaInfo
- type MemberInfo
- type MusicServices
- func (this *MusicServices) BeginSet(svc *Service, channel chan Event)
- func (this *MusicServices) EndSet(svc *Service, channel chan Event)
- func (this *MusicServices) GetSessionId(serviceId int16, username string) (sessionId string, err error)
- func (this *MusicServices) HandleProperty(svc *Service, value string, channel chan Event) error
- func (this *MusicServices) ListAvailableServices() (err error)
- func (this *MusicServices) UpdateAvailableServices() (err error)
- type MusicServicesEvent
- type MusicServicesState
- type PositionInfo
- type PrefixLocations
- type RampRequest
- type Reactor
- type RenderingControl
- func (this *RenderingControl) BeginSet(svc *Service, channel chan Event)
- func (this *RenderingControl) EndSet(svc *Service, channel chan Event)
- func (this *RenderingControl) GetBass(instanceId uint32) (currentBass int16, err error)
- func (this *RenderingControl) GetEQ(instanceId uint32, eqType string) (currentValue int16, err error)
- func (this *RenderingControl) GetHeadphoneConnected(instanceId uint32) (currentHeadphoneConnected bool, err error)
- func (this *RenderingControl) GetLoudness(instanceId uint32, channel string) (loudness bool, err error)
- func (this *RenderingControl) GetMute(instanceId uint32, channel string) (currentMute bool, err error)
- func (this *RenderingControl) GetOutputFixed(instanceId uint32) (currentFixed bool, err error)
- func (this *RenderingControl) GetSupportsOutputFixed(instanceId uint32) (currentSupportsFixed bool, err error)
- func (this *RenderingControl) GetTreble(instanceId uint32) (currentTreble int16, err error)
- func (this *RenderingControl) GetVolume(instanceId uint32, channel string) (currentVolume uint16, err error)
- func (this *RenderingControl) GetVolumeDB(instanceId uint32, channel string) (currentVolume int16, err error)
- func (this *RenderingControl) GetVolumeDBRange(instanceId uint32, channel string) (min, max int16, err error)
- func (this *RenderingControl) HandleProperty(svc *Service, value string, channel chan Event) error
- func (this *RenderingControl) RampToVolume(instanceId uint32, channel, req RampRequest) (rampTime uint32, err error)
- func (this *RenderingControl) ResetBasicEQ(instanceId uint32) (basicEQ *BasicEQ, err error)
- func (this *RenderingControl) ResetExtEQ(instanceId uint32, eqType string) (err error)
- func (this *RenderingControl) RestoreVolumePriorToRamp(instanceId uint32, channel string) (err error)
- func (this *RenderingControl) SetBass(instanceId, desiredBass int16) (err error)
- func (this *RenderingControl) SetChannelMap(instanceId uint32, channelMap string) (err error)
- func (this *RenderingControl) SetEQ(instanceId uint32, eqType string, desiredValue int16) (err error)
- func (this *RenderingControl) SetLoudness(instanceId uint32, channel string, loudness bool) (err error)
- func (this *RenderingControl) SetMute(instanceId uint32, channel string, desiredMute bool) (err error)
- func (this *RenderingControl) SetOutputFixed(instanceId uint32, desiredFixed bool) (err error)
- func (this *RenderingControl) SetRelativeVolume(instanceId uint32, channel string, adjustment int32) (newVolume uint16, err error)
- func (this *RenderingControl) SetTreble(instanceId, desiredTreble int16) (err error)
- func (this *RenderingControl) SetVolume(instanceId uint32, channel string, volume uint16) error
- func (this *RenderingControl) SetVolumeDB(instanceId uint32, channel string, volume int16) (err error)
- type RenderingControlEvent
- type RenderingControlState
- type RunAlarmRequest
- type Service
- type ServiceMap
- type StartAutoplayRequest
- type SystemProperties
- func (this *SystemProperties) AddAccountWithCredentialsX(accountType uint32, accountToken, accountKey string) (err error)
- func (this *SystemProperties) AddAccountX(accountType uint32, accountId, accountPassword string) (err error)
- func (this *SystemProperties) BeginSet(svc *Service, channel chan Event)
- func (this *SystemProperties) DoPostUpdateTasks() (err error)
- func (this *SystemProperties) EditAccountMd(accountType uint32, accountId, accountMd string) (err error)
- func (this *SystemProperties) EditAccountPasswordX(accountType uint32, accountId, newAccountPassword string) (err error)
- func (this *SystemProperties) EndSet(svc *Service, channel chan Event)
- func (this *SystemProperties) GetString(variableName string) (stringValue string, err error)
- func (this *SystemProperties) GetStringX(variableName string) (stringValue string, err error)
- func (this *SystemProperties) GetWebCode(accountType uint32) (webCode string, err error)
- func (this *SystemProperties) HandleProperty(svc *Service, value string, channel chan Event) error
- func (this *SystemProperties) MigrateTrialAccountX(accountType uint32, accountId, accountPassword string) (err error)
- func (this *SystemProperties) ProvisionCredentialedTrialAccountX(accountType uint32, accountId, accountPassword string) (isExpired bool, err error)
- func (this *SystemProperties) ProvisionTrialAccount(accountType uint32) (err error)
- func (this *SystemProperties) Remove(variableName string) (err error)
- func (this *SystemProperties) RemoveAccount(accountType uint32, accountId string) (err error)
- func (this *SystemProperties) RemoveX(variableName string) error
- func (this *SystemProperties) ResetThirdPartyCredentials() (err error)
- func (this *SystemProperties) SetString(variableName, stringValue string) (err error)
- func (this *SystemProperties) SetStringX(variableName, stringValue string) (err error)
- type SystemPropertiesEvent
- type SystemPropertiesState
- type TransportInfo
- type TransportSettings
- type UpdateAlarmRequest
- type UpdateItem
- type UpdateType
- type ZoneGroupAttributes
- type ZoneGroupTopology
- func (this *ZoneGroupTopology) BeginSet(svc *Service, channel chan Event)
- func (this *ZoneGroupTopology) BeginSoftwareUpdate(updateURL string, flags uint32) (err error)
- func (this *ZoneGroupTopology) CheckForUpdate(updateType UpdateType, cachedOnly bool, version string) (updateItem *UpdateItem, err error)
- func (this *ZoneGroupTopology) EndSet(svc *Service, channel chan Event)
- func (this *ZoneGroupTopology) GetZoneGroupAttributes() (*ZoneGroupAttributes, error)
- func (this *ZoneGroupTopology) HandleProperty(svc *Service, value string, channel chan Event) error
- func (this *ZoneGroupTopology) RegisterMobileDevice(deviceName, deviceUDN, deviceAddress string) (err error)
- func (this *ZoneGroupTopology) ReportAlarmStartedRunning() (err error)
- func (this *ZoneGroupTopology) ReportUnresponsiveDevice(deviceUUID string, desiredAction string) (err error)
- func (this *ZoneGroupTopology) SubmitDiagnostics() (diagnosticId string, err error)
- type ZoneGroupTopologyEvent
- type ZoneGroupTopologyState
- type ZoneInfo
Constants ¶
const ( State_PLAYING = "PLAYING" State_PAUSED_PLAYBACK = "PAUSED_PLAYBACK" State_STOPPED = "STOPPED" )
Legal values for TransportInfo.CurrentTransportState
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.
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.
const ( Recurrence_ONCE = "ONCE" Recurrence_WEEKDAYS = "WEEKDAYS" Recurrence_WEEKENDS = "WEEKENDS" Recurrence_DAILY = "DAILY" )
const ( AlarmPlayMode_NORMAL = "NORMAL" AlarmPlayMode_REPEAT_ALL = "REPEAT_ALL" AlarmPlayMode_SHUFFLE_NOREPEAT = "SHUFFLE_NOREPEAT" AlarmPlayMode_SHUFFLE = "SHUFFLE" )
const ( Direction_Input = "Input" Direction_Output = "Output" )
const ( Status_OK = "OK" Status_ContentFormatMismatch = "ContentFormatMismatch" Status_InsufficientBandwidth = "InsufficientBandwidth" Status_UnreliableChannel = "UnreliableChannel" Status_Unknown = "Unknown" )
const ( BrowseFlag_BrowseMetadata = "BrowseMetadata" BrowseFlag_BrowseDirectChildren = "BrowseDirectChildren" )
const ( LEDState_On = "On" LEDState_Off = "Off" )
const ( Channel_Master = "Master" Channel_RF = "RF" Channel_LF = "LF" )
const ( RampType_SleepTimer = "SLEEP_TIMER_RAMP_TYPE" RampType_Alarm = "ALARM_RAMP_TYPE" RampType_Autoplay = "AUTOPLAY_RAMP_TYPE" )
const ( ALL = "All" SOFTWARE = "Software" )
const ( REMOVE = "Remove" VERIFY_THEN_REMOVE_SYSTEMWIDE = "VerifyThenRemoveSystemwide" )
const (
BrowseFilter_All = "*"
)
const (
BrowseObjectID_Root = "0"
)
const (
BrowseSortCriteria_None = ""
)
const PlaySpeed_1 = "1"
Playback at normal speed
Variables ¶
var (
AVTransport_EventType = registerEventType("AVTransport")
)
var (
AlarmClock_EventType = registerEventType("AlarmClock")
)
var (
ConnectionManager_EventType = registerEventType("ConnectionManager")
)
var (
ContentDirectory_EventType = registerEventType("ContentDirectory")
)
var (
DeviceProperties_EventType = registerEventType("DeviceProperties")
)
var (
GroupManagement_EventType = registerEventType("GroupManagement")
)
var (
MusicServices_EventType = registerEventType("MusicServices")
)
var (
RenderingControl_EventType = registerEventType("RenderingControl")
)
var (
SystemProperties_EventType = registerEventType("SystemProperties")
)
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) 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) 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) 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) 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 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 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 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 BrowseRequest ¶
type BrowseResult ¶
type ConnectionInfo ¶
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 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 CreateAlarmRequest ¶
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 EventFactory ¶
type GetTimeNowResponse ¶
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 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 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 RampRequest ¶
type Reactor ¶
type Reactor interface { Init(ifiname, port string) 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) 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) 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 (*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 RunAlarmRequest ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
type ServiceMap ¶
type StartAutoplayRequest ¶
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) 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) EndSet ¶
func (this *SystemProperties) EndSet(svc *Service, channel chan Event)
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) 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) ResetThirdPartyCredentials ¶
func (this *SystemProperties) ResetThirdPartyCredentials() (err 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 UpdateType ¶
type UpdateType string
type ZoneGroupAttributes ¶
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) 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 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