|
YAACC - UPNP Client and Server
|
The YXC calls of one device (the HTTP/JSON control API of Yamaha MusicCast devices) as methods that return small immutable values. More...

Public Member Functions | |
| YxcClient (YxcTransport transport) | |
| YxcDeviceInfo | getDeviceInfo () throws YxcException |
| YxcFeatures | getFeatures () throws YxcException |
| YxcFuncStatus | getFuncStatus () throws YxcException |
| YxcZoneStatus | getZoneStatus (String zone) throws YxcException |
| YxcDistributionInfo | getDistributionInfo () throws YxcException |
| YxcNameText | getNameText () throws YxcException |
| The names of zones, inputs and sound programs as the owner set them. | |
| YxcPlayInfo | getPlayInfo () throws YxcException |
| YxcTunerInfo | getTunerPlayInfo () throws YxcException |
| What the tuner plays; only meaningful while the zone input is the tuner. | |
| void | setPower (String zone, boolean on) throws YxcException |
| void | setVolume (String zone, int volume) throws YxcException |
Sets the volume of a zone to a value of the device's own scale (0 to the max_volume of the status). | |
| void | setMute (String zone, boolean muted) throws YxcException |
| void | setSoundProgram (String zone, String program) throws YxcException |
| void | setSleep (String zone, int minutes) throws YxcException |
| void | setEqualizerMode (String zone, String mode) throws YxcException |
| void | setEqualizerBand (String zone, String band, int value) throws YxcException |
| Sets one band of the equalizer. | |
| void | setLinkControl (String zone, String control) throws YxcException |
| void | setLinkAudioDelay (String zone, String delay) throws YxcException |
| void | setLinkAudioQuality (String zone, String mode) throws YxcException |
| void | setInput (String zone, String inputId, String mode) throws YxcException |
| void | setDimmer (int value) throws YxcException |
| void | setAutoPowerStandby (boolean enabled) throws YxcException |
| void | setPlayback (String playback) throws YxcException |
| void | setRepeat (String mode) throws YxcException |
| void | setShuffle (String mode) throws YxcException |
| void | seekFm (boolean up) throws YxcException |
Starts the FM seek: the tuner scans up or down by itself until it finds a station (play info auto_scan). | |
| void | stepFm (boolean up) throws YxcException |
| Steps the FM frequency by one step (50 kHz on the measured device); the tuner also switches to FM if it was on DAB. | |
| void | cancelFmScan () throws YxcException |
| Stops an FM scan that is running; the tuner stays on the station it reached. | |
| void | setTunerBand (String band) throws YxcException |
| void | stepDabService (boolean next) throws YxcException |
| Switches the DAB tuner to the next or previous service. | |
| List< YxcPresets.Entry > | getNetPresets () throws YxcException |
| The presets of the network source; the position in the list is the preset number. | |
| List< YxcPresets.Entry > | getRecentItems () throws YxcException |
| The recently played radio stations and streaming entries (the tracks of UPnP servers are left out). | |
| List< YxcPresets.Entry > | getTunerPresets (String band) throws YxcException |
| void | recallNetPreset (int number) throws YxcException |
| void | recallRecentItem (int number) throws YxcException |
| void | recallTunerPreset (String band, int number) throws YxcException |
| void | setServerInfo (String groupId, String zone, YxcClientListAction action, List< String > clientIps) throws YxcException |
| Makes the zone of this device the server of a group, or adds / removes clients of the group it serves. | |
| void | clearServerInfo () throws YxcException |
| Ends the server role of this device; its group id returns to zeros. | |
| void | setClientInfo (String groupId, String zone, String serverIp) throws YxcException |
| Makes a zone of this device a client of the group of a server. | |
| void | clearClientInfo () throws YxcException |
| Ends the client role of this device; its group id returns to zeros. | |
| void | startDistribution (int num) throws YxcException |
| void | stopDistribution () throws YxcException |
| void | setGroupName (String name) throws YxcException |
Static Public Attributes | |
| static final int | MAX_CLIENT_ADDRESSES = 64 |
A sanity bound on the client addresses of one setServerInfo call, so that a request stays small. | |
The YXC calls of one device (the HTTP/JSON control API of Yamaha MusicCast devices) as methods that return small immutable values.
Unlike the open-source libraries it checks every answer: an HTTP status outside 200..299 or a response_code other than 0 is a YxcException. Thread-safe if the transport is.
| List< YxcPresets.Entry > de.yaacc.yxc.YxcClient.getTunerPresets | ( | String | band | ) | throws YxcException |
| band | fm or dab |
Referenced by de.yaacc.yxc.YxcPresetActions.load(), and de.yaacc.yxc.YxcPresetActions.recall().

| YxcZoneStatus de.yaacc.yxc.YxcClient.getZoneStatus | ( | String | zone | ) | throws YxcException |
| zone | main, zone2, zone3 or zone4 |
Referenced by de.yaacc.yxc.YxcSourceActions.perform(), de.yaacc.yxc.YxcVolumeAccess.readMute(), de.yaacc.yxc.YxcVolumeAccess.readPercent(), and de.yaacc.yxc.YxcPresetActions.recall().

| void de.yaacc.yxc.YxcClient.recallNetPreset | ( | int | number | ) | throws YxcException |
| number | the position in the list of getNetPresets() (1 to 100) |
Referenced by de.yaacc.yxc.YxcPresetActions.recall().

| void de.yaacc.yxc.YxcClient.recallRecentItem | ( | int | number | ) | throws YxcException |
| number | the position in the list of getRecentItems() as the device lists it (1 to 100) |
Referenced by de.yaacc.yxc.YxcPresetActions.recall().

| void de.yaacc.yxc.YxcClient.recallTunerPreset | ( | String | band, |
| int | number ) throws YxcException |
| band | fm or dab; the tuner switches to that band |
Referenced by de.yaacc.yxc.YxcPresetActions.recall().

| void de.yaacc.yxc.YxcClient.setClientInfo | ( | String | groupId, |
| String | zone, | ||
| String | serverIp ) throws YxcException |
Makes a zone of this device a client of the group of a server.
The zone goes as a list, the server as a string. The device refuses this while it is a server itself.
| void de.yaacc.yxc.YxcClient.setDimmer | ( | int | value | ) | throws YxcException |
| value | the display brightness, inside the dimmer range of the system features (-1 is automatic where listed) |
Referenced by de.yaacc.yxc.YxcSettingsWriter.setDimmer().

| void de.yaacc.yxc.YxcClient.setEqualizerBand | ( | String | zone, |
| String | band, | ||
| int | value ) throws YxcException |
Sets one band of the equalizer.
| band | low, mid or high |
Referenced by de.yaacc.yxc.YxcSettingsWriter.setEqualizerBand().

| void de.yaacc.yxc.YxcClient.setEqualizerMode | ( | String | zone, |
| String | mode ) throws YxcException |
| mode | an id from the zone's equalizer_mode_list |
| void de.yaacc.yxc.YxcClient.setGroupName | ( | String | name | ) | throws YxcException |
| name | UTF-8, at most 128 bytes; empty selects the default name |
Referenced by de.yaacc.yxc.YxcGroupService.rename().

| void de.yaacc.yxc.YxcClient.setInput | ( | String | zone, |
| String | inputId, | ||
| String | mode ) throws YxcException |
| mode | the mode word, empty for none (the open-source clients send the parameter empty) |
Referenced by de.yaacc.yxc.YxcPresetActions.recall(), and de.yaacc.yxc.YxcSettingsWriter.setInput().

| void de.yaacc.yxc.YxcClient.setLinkAudioDelay | ( | String | zone, |
| String | delay ) throws YxcException |
| delay | an id from the zone's link_audio_delay_list |
| void de.yaacc.yxc.YxcClient.setLinkAudioQuality | ( | String | zone, |
| String | mode ) throws YxcException |
| mode | an id from the zone's link_audio_quality_list |
| void de.yaacc.yxc.YxcClient.setLinkControl | ( | String | zone, |
| String | control ) throws YxcException |
| control | an id from the zone's link_control_list |
| void de.yaacc.yxc.YxcClient.setPlayback | ( | String | playback | ) | throws YxcException |
| playback | play, pause, stop, previous or next |
| void de.yaacc.yxc.YxcClient.setRepeat | ( | String | mode | ) | throws YxcException |
| mode | a value of the play info's repeat_available: off, one or all |
| void de.yaacc.yxc.YxcClient.setServerInfo | ( | String | groupId, |
| String | zone, | ||
| YxcClientListAction | action, | ||
| List< String > | clientIps ) throws YxcException |
Makes the zone of this device the server of a group, or adds / removes clients of the group it serves.
| groupId | 32 hex digits |
| zone | the zone that serves the group |
| clientIps | one to MAX_CLIENT_ADDRESSES addresses of the other devices |
| void de.yaacc.yxc.YxcClient.setShuffle | ( | String | mode | ) | throws YxcException |
| mode | a value of the play info's shuffle_available: off or on |
| void de.yaacc.yxc.YxcClient.setSleep | ( | String | zone, |
| int | minutes ) throws YxcException |
| minutes | 0 (off), 30, 60, 90 or 120 |
Referenced by de.yaacc.yxc.YxcSettingsWriter.setSleep().

| void de.yaacc.yxc.YxcClient.setSoundProgram | ( | String | zone, |
| String | program ) throws YxcException |
| program | an id from the zone's sound_program_list |
| void de.yaacc.yxc.YxcClient.setTunerBand | ( | String | band | ) | throws YxcException |
| band | fm or dab: the tuner changes its band (the zone input stays the tuner) |
| void de.yaacc.yxc.YxcClient.setVolume | ( | String | zone, |
| int | volume ) throws YxcException |
Sets the volume of a zone to a value of the device's own scale (0 to the max_volume of the status).
The devices of a group keep their own volumes, so this changes only this device.
| void de.yaacc.yxc.YxcClient.startDistribution | ( | int | num | ) | throws YxcException |
| num | the distribution number (what the device does with it is not known; see docs/tech.md) |
|
static |
A sanity bound on the client addresses of one setServerInfo call, so that a request stays small.
The limit of a device is distribution.client_max of its features (9 or 19 on devices seen); the group service checks it.