org.jmythapi
Interface IVersionable

All Known Subinterfaces:
IAskRecording, IBackendConnection, IBasicChannelInfo, IBasicFreeSpace, IBasicInputInfo, IBasicProgramInfo, IClearSettingsCache, IClientErrorEvent, ICommflagStart, IDoneRecording, IDownloadFile<E>, IDownloadFileFinished, IDownloadFileUpdate, IEnumGroup<E>, IFileStatus, IFileTransfer, IFlagGroup<E>, IFreeInputList, IFreeSpace, IFreeSpaceList, IFreeSpaceListEntry, IFreeSpaceSummary, IGroup<E>, IGuideDataThrough, IInputInfo, IInputInfoFree, IInputInfoTuned, IJobCommand, IJobStatus, IJobType, ILiveTvChainUpdate, ILoad, IMemStats, IMythCommand, IMythEvent<E>, IMythPacket, IMythRequest, IMythResponse<E>, IPixmap, IPixmapGenerated, IProgramAudioProperties, IProgramFlags, IProgramInfo, IProgramInfoList, IProgramRecordingDupInType, IProgramRecordingDupMethodType, IProgramRecordingSearchType, IProgramRecordingStatus, IProgramRecordingType, IProgramSubtitleType, IProgramVideoProperties, IRecorder, IRecorderChannelInfo, IRecorderChannelPrefixStatus, IRecorderInfo, IRecorderNextProgramInfo, IRecorderProgramInfo, IRecordingEvent<E>, IRecordingListChange<E>, IRecordingListChangeAdd, IRecordingListChangeDelete, IRecordingListChangeList, IRecordingListChangeSingle<E>, IRecordingListChangeUpdate, IRecordings, IRecordingsConflicting, IRecordingsExpiring, IRecordingsPending, IRecordingsScheduled, IRecordingStatus, IRecordingUpdateEvent<E>, IRemoteEncoder, IRemoteEncoderBusyStatus, IRemoteEncoderFlags, IRemoteEncoderState, IResetIdleTime, IRingBuffer, ISchedule, IScheduleChange, ISetting, IShutdownCountdown, ISleepStatus, IStorageGroupFile, ISystemEvent, ITimezone, ITransferable<E>, ITunerInfo, IUpdateFileSize, IUpdateProgInfo, IUptime, IVideoList<E>, IVideoListChange, IVideoListNoChange
All Known Implementing Classes:
AData, ADatabaseEnumGroup, ADatabaseRow, AEnumGroup, AFlagGroup, AFreeSpace, AMythCommand, AMythEvent, AMythRequest, AMythResponse, AProgramInfo, ARecorderProgramInfo, ARecordings, ASettingsGroup, AskRecording, AVersionableEnumGroup, Backend, BackendConnection, ChannelInfo, ClearSettingsCache, ClientErrorEvent, ClientErrorPacket, CommflagStart, DoneRecording, DownloadFileFinished, DownloadFileUpdate, FileStatus, FileTransfer, FreeInputsList, FreeSpace, FreeSpaceList, FreeSpaceList.Entry, FreeSpaceSummary, GuideDataThrough, GuideDataThrough, InputInfoFree, InputInfoTuned, JobCommands, JobQueue, JobStatus, JobType, LiveTvChainUpdate, Load, MemStats, MythFillDatabaseStatus, MythPacket, MythShutdownStatus, Pixmap, PixmapGenerated, ProgramAudioProperties, ProgramFlags, ProgramInfo, ProgramInfoList, ProgramRecordingDupInType, ProgramRecordingDupMethodType, ProgramRecordingSearchType, ProgramRecordingStatus, ProgramRecordingType, ProgramSubtitleType, ProgramVideoProperties, Recorder, RecorderChannelInfo, RecorderChannelPrefixStatus, RecorderInfo, RecorderInfo, RecorderNextProgramInfo, RecorderNextProgramInfo, RecorderProgramInfo, RecordingListChangeAdd, RecordingListChangeAny, RecordingListChangeDelete, RecordingListChangeUpdate, RecordingsConflicting, RecordingsExpiring, RecordingsPending, RecordingsScheduled, RecordingStatus, RemoteEncoder, RemoteEncoderBusyStatus, RemoteEncoderFlags, RemoteEncoderState, ResetIdleTime, RingBuffer, Schedule, ScheduleChange, Setting, Setting, ShutdownCountdown, SleepStatus, StorageGroupDirectory, StorageGroupFile, StorageGroupFileList, SystemEvent, Timezone, TunerInfo, UpdateFileSize, UpdateProgInfo, Uptime, VideoList, VideoListChange, VideoListNoChange

public interface IVersionable

Marks an object to be MythTv -protocol aware.

Protocol Version:

This interface provides a method to get the MythTv-protocol a given object was created for. Depending on this version, the content of an object may be different, e.g. if properties were introduced or removed in a specific version.

See ProtocolVersion for a list of known protocol versions and a list of changes done between different protocol versions.

Protocol Version Differences:

Because the amount, position or values of protocol command-arguments or response-values may have been changed between different protocol versions, you can not use objects or commands created for one version to communicate with a backend, speaking a different version. The IBackendConnection will check this and will throws an ProtocolException.

Usage example

An example how to get the protocol version of a recorder and how to compare it with a different protocol versions.

    // the connected recorder
    IRecorder recorder = ...;
    
    // switch to the next recorder input
    if(recorder.getVersionNr().compareTo(PROTO_VERSION_27)<0) {
       recorder.toggleInputs();
    } else {
       recorder.switchToNextInput();
    }
 

See Also:
ProtocolVersion

Method Summary
 ProtocolVersion getVersionNr()
          Gets the protocol-version of an object.
 

Method Detail

getVersionNr

ProtocolVersion getVersionNr()
Gets the protocol-version of an object.

Returns:
the version a given object was created for.


Copyright © 2008-2013. All Rights Reserved.