|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmythapi.impl.AData<E> org.jmythapi.protocol.response.impl.AMythResponse<E> org.jmythapi.protocol.response.impl.ARecordings<E>
public abstract class ARecordings<E extends Enum<E>>
Field Summary |
---|
Fields inherited from class org.jmythapi.impl.AData |
---|
logger, propsClass, protoVersion, respArgs |
Constructor Summary | |
---|---|
ARecordings(Class<E> propsClass,
IMythPacket packet)
|
|
ARecordings(ProtocolVersion protoVersion,
Class<E> propsClass,
List<String> responseArgs)
|
Method Summary | |
---|---|
protected int |
getExpectedSize(List<String> responseArgs)
This function returns the expected size of the response-argument-list. |
IProgramInfoList |
getProgramInfoList()
Gets a list of contained recordings. |
IProgramInfoList |
getProgramInfoList(IProgramInfoFilter filter)
Gets the list of contained recordings. |
protected abstract int |
getSizePropertyIndex()
|
boolean |
isEmpty()
Checks if the recordings-list contains a recording. |
Iterator<IProgramInfo> |
iterator()
Gets an iterator to loop through all available recordings. |
Iterator<IProgramInfo> |
iterator(IProgramInfoFilter filter)
Gets an iterator to loop through all recordings matching the given filter. |
int |
size()
Gets the amount of recordings contained in the list. |
String |
toString()
Returns the content of this data object as a formatted string. |
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.IVersionable |
---|
getVersionNr |
Methods inherited from interface org.jmythapi.IPropertyAware |
---|
getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject |
Constructor Detail |
---|
public ARecordings(Class<E> propsClass, IMythPacket packet)
public ARecordings(ProtocolVersion protoVersion, Class<E> propsClass, List<String> responseArgs)
Method Detail |
---|
protected int getExpectedSize(List<String> responseArgs)
AMythResponse
This function returns the expected size of the response-argument-list.
The expected size may be different depending on the current MythTV-protocol-version.EnumUtils#getEnumLength(Class, int)
to determine the expected size of the argument-list.
getExpectedSize
in class AMythResponse<E extends Enum<E>>
responseArgs
- the response-argument-listprotected abstract int getSizePropertyIndex()
public IProgramInfoList getProgramInfoList()
IRecordings
getProgramInfoList
in interface IRecordings
public IProgramInfoList getProgramInfoList(IProgramInfoFilter filter)
IRecordings
WILL_RECORD
.
// query pending recordings IRecordingsPending pendingRecords = backend.queryAllPending(); // creating the program filter IProgramInfoFilter filter = ProgramInfoFilters.recordingStatus(IProgramRecordingStatus.Status.WILL_RECORD); // loop through the filtered list for (IProgramInfo program : pendingRecords.getProgramInfoList(filter)) { System.out.println(String.format( "%1$tF %1$tT- %2$s (%3$s)", program.getStartTime(), program.getTitle(), program.getChannelSign() )); }
This function internally uses IProgramInfoList.filter(IProgramInfoFilter)
to filter the programs.
getProgramInfoList
in interface IRecordings
filter
- the filter that should be applied, or null
if no filtering should be done.
public Iterator<IProgramInfo> iterator()
IRecordings
iterator
in interface Iterable<IProgramInfo>
iterator
in interface IRecordings
Iterable.iterator()
public Iterator<IProgramInfo> iterator(IProgramInfoFilter filter)
IRecordings
iterator
in interface IRecordings
filter
- the filter that should be applied or null
if no filtering should be done.
public int size()
IRecordings
size
in interface IRecordings
ProgramInfoList
public boolean isEmpty()
IRecordings
isEmpty
in interface IRecordings
false
if there is at least one recordingpublic String toString()
AData
Returns the content of this data object as a formatted string.
E.g.<0>TOTAL_RAM_MB: 1002 | <1>FREE_RAM_MB: 474 | <2>TOTAL_VM_MB: 853 | <3>FREE_VM_MB: 853
toString
in class AData<E extends Enum<E>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |