|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jmythapi.impl.AData<E>
org.jmythapi.protocol.response.impl.AMythResponse<E>
org.jmythapi.protocol.response.impl.ARecordings<IRecordingsPending.Props>
org.jmythapi.protocol.response.impl.RecordingsPending
public class RecordingsPending
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jmythapi.protocol.response.IRecordingsPending |
|---|
IRecordingsPending.Props |
| Field Summary |
|---|
| Fields inherited from class org.jmythapi.impl.AData |
|---|
logger, propsClass, protoVersion, respArgs |
| Constructor Summary | |
|---|---|
RecordingsPending(IMythPacket packet)
|
|
RecordingsPending(ProtocolVersion protoVersion,
List<String> responseArgs)
|
|
| Method Summary | |
|---|---|
static RecordingsPending |
emptyList(ProtocolVersion protoVersion)
Creates a new empty list |
int |
getConflictsCount()
Gets the amount of conflicts between all pending recordings. |
int |
getMinutesToNextRecording()
Gets the minutes to the next pending recording. |
Date |
getNextPendingRecordingDate()
Gets the date of the next pending recording. |
Map<Integer,IProgramInfo> |
getNextPendingRecordings()
This function returns the earliest pending recording for each recorder. |
Map<Integer,Date> |
getNextPendingRecordingsDates()
This function returns the earliest recording-start time for each recorder. |
protected int |
getSizePropertyIndex()
|
boolean |
hasConflicts()
Checks if there are any conflicts between all pending recordings. |
static RecordingsPending |
valueOf(IProgramInfoList programs)
Creates a new pending recordings list from a program list. |
| Methods inherited from class org.jmythapi.protocol.response.impl.ARecordings |
|---|
getExpectedSize, getProgramInfoList, getProgramInfoList, isEmpty, iterator, iterator, size, toString |
| Methods inherited from class org.jmythapi.protocol.response.impl.AMythResponse |
|---|
checkSize, decodeProperty, encodeProperty, getPacket, getProperties, getProperty, getPropertyIndex |
| Methods inherited from class org.jmythapi.impl.AData |
|---|
clone, equals, getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValueObject, getPropertyValues, getVersionNr, hashCode, init, postProcessArguments, setPropertyValue, setPropertyValue, setPropertyValueObject |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jmythapi.protocol.response.IRecordings |
|---|
getProgramInfoList, getProgramInfoList, isEmpty, iterator, iterator, size |
| Methods inherited from interface org.jmythapi.IVersionable |
|---|
getVersionNr |
| Methods inherited from interface org.jmythapi.IPropertyAware |
|---|
getProperties, getProperty, getPropertyClass, getPropertyCount, getPropertyIndex, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject |
| Constructor Detail |
|---|
public RecordingsPending(IMythPacket packet)
public RecordingsPending(ProtocolVersion protoVersion,
List<String> responseArgs)
| Method Detail |
|---|
public boolean hasConflicts()
IRecordingsPending
hasConflicts in interface IRecordingsPendingtrue if there are any conflictspublic int getConflictsCount()
IRecordingsPending
getConflictsCount in interface IRecordingsPendingprotected int getSizePropertyIndex()
getSizePropertyIndex in class ARecordings<IRecordingsPending.Props>public Map<Integer,IProgramInfo> getNextPendingRecordings()
IRecordingsPending
getNextPendingRecordings in interface IRecordingsPendingpublic Map<Integer,Date> getNextPendingRecordingsDates()
IRecordingsPending
Usage example:
IBackend backend = ....; // an already connected backend // get all pending recordings IRecordingsPending pendingRecords = backend.queryAllPending(); // get next recording start times Map<Integer,Date> nextRecordingDates = pendingRecords.getNextPendingRecordingDates(); for(Entry<Integer,Date> nextRecordingDate : nextRecordingDates.entrySet()) { System.out.println(String.format( "Recorder %02d will start a recording at %2$tF %2$tT.", nextRecordingDate.getKey(), nextRecordingDate.getValue() )); }
getNextPendingRecordingsDates in interface IRecordingsPendingIRecordingsPending.getNextPendingRecordings()public Date getNextPendingRecordingDate()
IRecordingsPending
getNextPendingRecordingDate in interface IRecordingsPendingnull if there is no pending recording.public int getMinutesToNextRecording()
IRecordingsPending
getMinutesToNextRecording in interface IRecordingsPending-1 if there is no pending recording.public static final RecordingsPending valueOf(IProgramInfoList programs)
programs - the program list
public static final RecordingsPending emptyList(ProtocolVersion protoVersion)
protoVersion - the protocol version to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||