com.breeweb.slimconnect.commands
Class PlayerCommand

java.lang.Object
  extended bycom.breeweb.slimconnect.commands.AbstractCommand
      extended bycom.breeweb.slimconnect.commands.PlayerCommand

public class PlayerCommand
extends AbstractCommand

Author:
Bas de Bree

Field Summary
static java.lang.String CMD_ADDRESS
           
static java.lang.String CMD_COUNT
           
static java.lang.String CMD_NAME
           
static java.lang.String CMD_PLAYLIST_CURRENT_TRACK
           
static java.lang.String CMD_PLAYLIST_NR_OF_TRACKS
           
static java.lang.String PLAYER
           
static java.lang.String PLAYLIST
           
 
Method Summary
static AbstractCommand getCurrentTrackInPlaylist()
          Returns the command to get the current track in the playlist.
static PlayerCommand getNrOfPlayers()
          Returns the command to get the number of players connected to the Squeezebox server
static AbstractCommand getNrOfTracksInCurrentList()
          Returns the command to get the number of tracks in the current playlist.
static PlayerCommand getPlayerAddress(int index)
          Returns the command to get the player address for the given index.
static PlayerCommand getPlayerName(int index)
          Gets command for getting the player name for a given index.
 ReturnData getReturnData(java.lang.String aLine, java.lang.String playerPrefix)
          Makes sure the command gets executed, the result will be returned using a ReturnData object
 
Methods inherited from class com.breeweb.slimconnect.commands.AbstractCommand
expectStatus, getAsLine, getResultString, setExpectStatus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLAYER

public static final java.lang.String PLAYER
See Also:
Constant Field Values

CMD_COUNT

public static final java.lang.String CMD_COUNT
See Also:
Constant Field Values

CMD_NAME

public static final java.lang.String CMD_NAME
See Also:
Constant Field Values

CMD_ADDRESS

public static final java.lang.String CMD_ADDRESS
See Also:
Constant Field Values

PLAYLIST

public static final java.lang.String PLAYLIST
See Also:
Constant Field Values

CMD_PLAYLIST_CURRENT_TRACK

public static final java.lang.String CMD_PLAYLIST_CURRENT_TRACK
See Also:
Constant Field Values

CMD_PLAYLIST_NR_OF_TRACKS

public static final java.lang.String CMD_PLAYLIST_NR_OF_TRACKS
See Also:
Constant Field Values
Method Detail

getNrOfPlayers

public static PlayerCommand getNrOfPlayers()
Returns the command to get the number of players connected to the Squeezebox server

Returns:
the command to get the number of players connected to the Squeezebox server

getPlayerName

public static PlayerCommand getPlayerName(int index)
Gets command for getting the player name for a given index.

Parameters:
index - the index represents the index in the player array of the Squeezebox server.
Returns:
the player name for a given index.
See Also:
Slimp3Delegate

getPlayerAddress

public static PlayerCommand getPlayerAddress(int index)
Returns the command to get the player address for the given index. The index represents the index in the player array of the Squeezebox server.

Parameters:
index - the index represents the index in the player array of the Squeezebox server.
Returns:
the command to get the player address for the given index.
See Also:
Slimp3Delegate

getCurrentTrackInPlaylist

public static AbstractCommand getCurrentTrackInPlaylist()
Returns the command to get the current track in the playlist.

Returns:
the command to get the current track in the playlist.
See Also:
Slimp3Delegate

getNrOfTracksInCurrentList

public static AbstractCommand getNrOfTracksInCurrentList()
Returns the command to get the number of tracks in the current playlist.

Returns:
the command to get the number of tracks in the current playlist.
See Also:
Slimp3Delegate

getReturnData

public ReturnData getReturnData(java.lang.String aLine,
                                java.lang.String playerPrefix)
Description copied from class: AbstractCommand
Makes sure the command gets executed, the result will be returned using a ReturnData object

Specified by:
getReturnData in class AbstractCommand
Parameters:
aLine - the command as line.
playerPrefix - the prefix of the player to which this command is targeted.
Returns:
a ReturnData object representing the result of the command.