org.jmythapi.protocol.request
Class AMythCommand

java.lang.Object
  extended by org.jmythapi.protocol.request.AMythCommand
All Implemented Interfaces:
IVersionable, IMythCommand

public class AMythCommand
extends Object
implements IMythCommand, IVersionable

The implementation of a MythTV-protocol command.


Field Summary
 
Fields inherited from interface org.jmythapi.protocol.request.IMythCommand
ALLOW_SHUTDOWN, ANN, ANN_FILE_TRANSFER, ANN_MEDIASERVER, ANN_MONITOR, ANN_PLAYBACK, ANN_RING_BUFFER, ANN_SLAVEBACKEND, BACKEND_MESSAGE, BACKEND_MESSAGE_ASK_RECORDING, BACKEND_MESSAGE_CLEAR_SETTINGS_CACHE, BACKEND_MESSAGE_COMMFLAG_START, BACKEND_MESSAGE_DONE_RECORDING, BACKEND_MESSAGE_DOWNLOAD_FILE, BACKEND_MESSAGE_GENERATED_PIXMAP, BACKEND_MESSAGE_LIVETV_CHAIN, BACKEND_MESSAGE_LIVETV_WATCH, BACKEND_MESSAGE_MASTER_UPDATE_PROG_INFO, BACKEND_MESSAGE_QUIT_LIVETV, BACKEND_MESSAGE_RECORDING_LIST_CHANGE, BACKEND_MESSAGE_RESET_IDLETIME, BACKEND_MESSAGE_SCHEDULE_CHANGE, BACKEND_MESSAGE_SHUTDOWN_COUNTDOWN, BACKEND_MESSAGE_SHUTDOWN_NOW, BACKEND_MESSAGE_SIGNAL, BACKEND_MESSAGE_SYSTEM_EVENT, BACKEND_MESSAGE_UPDATE_FILE_SIZE, BACKEND_MESSAGE_UPDATE_PROG_INFO, BACKEND_MESSAGE_VIDEO_LIST_CHANGE, BACKEND_MESSAGE_VIDEO_LIST_NO_CHANGE, BLOCK_SHUTDOWN, CHECK_RECORDING, DELETE_FAILED_RECORDING, DELETE_FILE, DELETE_RECORDING, DONE, DOWNLOAD_FILE, DOWNLOAD_FILE_NOW, FILL_PROGRAM_INFO, FORCE_DELETE_RECORDING, FORGET_RECORDING, FREE_TUNER, GET_FREE_RECORDER, GET_FREE_RECORDER_COUNT, GET_FREE_RECORDER_LIST, GET_NEXT_FREE_RECORDER, GET_RECORDER_FROM_NUM, GET_RECORDER_NUM, GO_TO_SLEEP, LOCK_TUNER, MESSAGE, MYTH_PROTO_VERSION, OK, QUERY_ACTIVE_BACKENDS, QUERY_BOOKMARK, QUERY_CHECKFILE, QUERY_COMMBREAK, QUERY_CUTLIST, QUERY_FILE_EXISTS, QUERY_FILE_HASH, QUERY_FILETRANSFER, QUERY_FILETRANSFER_DONE, QUERY_FILETRANSFER_IS_OPEN, QUERY_FILETRANSFER_REOPEN, QUERY_FILETRANSFER_REQUEST_BLOCK, QUERY_FILETRANSFER_SEEK, QUERY_FILETRANSFER_SET_TIMEOUT, QUERY_FILETRANSFER_WRITE_BLOCK, QUERY_FREE_SPACE, QUERY_FREE_SPACE_LIST, QUERY_FREE_SPACE_SUMMARY, QUERY_FREESPACE, QUERY_GENPIXMAP, QUERY_GENPIXMAP2, QUERY_GETALLPENDING, QUERY_GETALLSCHEDULED, QUERY_GETCONFLICTING, QUERY_GETEXPIRING, QUERY_GUIDEDATATHROUGH, QUERY_HOSTNAME, QUERY_IS_ACTIVE_BACKEND, QUERY_ISRECORDING, QUERY_LOAD, QUERY_MEMSTATS, QUERY_PIXMAP_GET_IF_MODIFIED, QUERY_PIXMAP_LASTMODIFIED, QUERY_RECORDER, QUERY_RECORDER_CANCEL_NEXT_RECORDING, QUERY_RECORDER_CHANGE_BRIGHTNESS, QUERY_RECORDER_CHANGE_CHANNEL, QUERY_RECORDER_CHANGE_COLOUR, QUERY_RECORDER_CHANGE_CONTRAST, QUERY_RECORDER_CHANGE_HUE, QUERY_RECORDER_CHECK_CHANNEL, QUERY_RECORDER_CHECK_CHANNEL_PREFIX, QUERY_RECORDER_DONE_RINGBUF, QUERY_RECORDER_FILL_DURATION_MAP, QUERY_RECORDER_FILL_POSITION_MAP, QUERY_RECORDER_FINISH_RECORDING, QUERY_RECORDER_FRONTEND_READY, QUERY_RECORDER_GET_BRIGHTNESS, QUERY_RECORDER_GET_CHANNEL_INFO, QUERY_RECORDER_GET_COLOUR, QUERY_RECORDER_GET_CONNECTED_INPUTS, QUERY_RECORDER_GET_CONTRAST, QUERY_RECORDER_GET_CURRENT_RECORDING, QUERY_RECORDER_GET_FILE_POSITION, QUERY_RECORDER_GET_FRAMERATE, QUERY_RECORDER_GET_FRAMES_WRITTEN, QUERY_RECORDER_GET_FREE_INPUTS, QUERY_RECORDER_GET_FREE_SPACE, QUERY_RECORDER_GET_HUE, QUERY_RECORDER_GET_INPUT, QUERY_RECORDER_GET_INPUT_NAME, QUERY_RECORDER_GET_KEYFRAME_POS, QUERY_RECORDER_GET_MAX_BITRATE, QUERY_RECORDER_GET_NEXT_PROGRAM_INFO, QUERY_RECORDER_GET_PROGRAM_INFO, QUERY_RECORDER_GET_RECORDING, QUERY_RECORDER_IS_RECORDING, QUERY_RECORDER_PAUSE, QUERY_RECORDER_PAUSE_RECORDER, QUERY_RECORDER_REQUEST_BLOCK_RINGBUF, QUERY_RECORDER_SEEK_RINGBUF, QUERY_RECORDER_SET_CHANNEL, QUERY_RECORDER_SET_INPUT, QUERY_RECORDER_SET_LIVE_RECORDING, QUERY_RECORDER_SET_SIGNAL_MONITORING_RATE, QUERY_RECORDER_SETUP_RING_BUFFER, QUERY_RECORDER_SHOULD_SWITCH_CARD, QUERY_RECORDER_SPAWN_LIVETV, QUERY_RECORDER_STOP_LIVETV, QUERY_RECORDER_STOP_PLAYING, QUERY_RECORDER_TOGGLE_CHANNEL_FAVORITE, QUERY_RECORDER_TOGGLE_INPUTS, QUERY_RECORDER_UNPAUSE, QUERY_RECORDING, QUERY_RECORDING_BASENAME, QUERY_RECORDING_TIMESLOT, QUERY_RECORDINGS, QUERY_REMOTEENCODER, QUERY_REMOTEENCODER_CANCEL_NEXT_RECORDING, QUERY_REMOTEENCODER_GET_CURRENT_RECORDING, QUERY_REMOTEENCODER_GET_FLAGS, QUERY_REMOTEENCODER_GET_FREE_INPUTS, QUERY_REMOTEENCODER_GET_MAX_BITRATE, QUERY_REMOTEENCODER_GET_RECORDING_STATUS, QUERY_REMOTEENCODER_GET_SLEEPSTATUS, QUERY_REMOTEENCODER_GET_STATE, QUERY_REMOTEENCODER_IS_BUSY, QUERY_REMOTEENCODER_MATCHES_RECORDING, QUERY_REMOTEENCODER_RECORD_PENDING, QUERY_REMOTEENCODER_START_RECORDING, QUERY_REMOTEENCODER_STOP_RECORDING, QUERY_SETTING, QUERY_SG_FILEQUERY, QUERY_SG_GETFILELIST, QUERY_TIME_ZONE, QUERY_UPTIME, QUEUE_TRANSCODE, QUEUE_TRANSCODE_CUTLIST, QUEUE_TRANSCODE_STOP, REACTIVATE_RECORDING, REFRESH_BACKEND, RESCHEDULE_RECORDINGS, SCAN_VIDEOS, SET_BOOKMARK, SET_CHANNEL_INFO, SET_NEXT_LIVETV_DIR, SET_SETTING, SHUTDOWN_NOW, STOP_RECORDING, UNDELETE_RECORDING, UNKNOWN_COMMAND
 
Constructor Summary
AMythCommand(ProtocolVersion protoVersion, String commandName)
           
AMythCommand(ProtocolVersion protoVersion, String commandName, List<String> commandArgs)
           
AMythCommand(ProtocolVersion protoVersion, String commandName, String... commandArgs)
           
 
Method Summary
 String getCommandArgument(int idx)
          Returns the command argument at the given position.
 List<String> getCommandArguments()
          Gets the arguments of this command.
 int getCommandArgumentsLength()
          Gets the amount of available command arguments
 String getName()
          Gets the name of this command.
 ProtocolVersion getVersionNr()
          Gets the protocol-version of an object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AMythCommand

public AMythCommand(ProtocolVersion protoVersion,
                    String commandName)

AMythCommand

public AMythCommand(ProtocolVersion protoVersion,
                    String commandName,
                    String... commandArgs)

AMythCommand

public AMythCommand(ProtocolVersion protoVersion,
                    String commandName,
                    List<String> commandArgs)
Method Detail

getName

public String getName()
Description copied from interface: IMythCommand
Gets the name of this command.

Specified by:
getName in interface IMythCommand
Returns:
the name of the command, e.g. MYTH_PROTO_VERSION

getCommandArguments

public List<String> getCommandArguments()
Description copied from interface: IMythCommand
Gets the arguments of this command.

Specified by:
getCommandArguments in interface IMythCommand
Returns:
the command arguments, e.g. Playback sycamore 0

getCommandArgument

public String getCommandArgument(int idx)
Description copied from interface: IMythCommand
Returns the command argument at the given position. If e.g. the whole command is ANN Playback sycamore 0, getCommandArgument(0) returns Playback.

Specified by:
getCommandArgument in interface IMythCommand
Parameters:
idx - the position of the requested argument.
Returns:
the command argument at the given position.

getCommandArgumentsLength

public int getCommandArgumentsLength()
Description copied from interface: IMythCommand
Gets the amount of available command arguments

Specified by:
getCommandArgumentsLength in interface IMythCommand
Returns:
the amount of command arguments

toString

public String toString()
Overrides:
toString in class Object

getVersionNr

public ProtocolVersion getVersionNr()
Description copied from interface: IVersionable
Gets the protocol-version of an object.

Specified by:
getVersionNr in interface IVersionable
Returns:
the version a given object was created for.


Copyright © 2008-2013. All Rights Reserved.