org.jmythapi.protocol.events
Interface IRecordingListChangeUpdate

All Superinterfaces:
Cloneable, IMythEvent<IRecordingListChangeUpdate.Props>, IPropertyAware<IRecordingListChangeUpdate.Props>, IRecordingEvent<IRecordingListChangeUpdate.Props>, IRecordingListChange<IRecordingListChangeUpdate.Props>, IRecordingListChangeSingle<IRecordingListChangeUpdate.Props>, IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>, ISendable, IVersionable
All Known Implementing Classes:
RecordingListChangeUpdate

public interface IRecordingListChangeUpdate
extends IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>, IRecordingListChangeSingle<IRecordingListChangeUpdate.Props>

Backend Event - Recording - Properties Updated.

This event replaces IUpdateProgInfo.

MythTV protocol example:
447     
BACKEND_MESSAGE[]:[]RECORDING_LIST_CHANGE UPDATE[]:[]TEST[]:[]2013-09-18 07:35:06[]:[][]:[]0[]:[]0[]:[][]:[][]:[]1000[]:[]1[]:[]ORF1[]:[]ORF1[]:[]1000_20130918053500.mpg[]:[]0[]:[]1379482506[]:[]1379482806[]:[]0[]:[]myth77[]:[]0[]:[]0[]:[]0[]:[]-99[]:[]-3[]:[]36[]:[]0[]:[]15[]:[]6[]:[]1379482500[]:[]1379483406[]:[]0[]:[]Default[]:[][]:[][]:[][]:[][]:[]1379482507[]:[]0[]:[][]:[]Default[]:[]0[]:[]0[]:[]Default[]:[]0[]:[]0[]:[]0[]:[]0[]:[]0[]:[]0

Protocol Version Hint:

UTC Support:Starting with 75 dates are delivered with timezone UTC, but are automatically converted into the local timezone by this class.

Since:
55
See Also:
BACKEND_MESSAGE_RECORDING_LIST_CHANGE

Nested Class Summary
static class IRecordingListChangeUpdate.Props
           
 
Method Summary
 Integer getChannelID()
          Gets the channel ID of the recording.
 IProgramInfo getProgramInfo()
          Gets the info object of the changed recording.
 Date getRecordingStartTime()
          Gets the recording start time.
 String getUniqueRecordingID()
          Gets the unique ID of the changed recording.
 EnumMap<IProgramInfo.Props,Object[]> getUpdatedProperties(IProgramInfo oldProgramInfo)
          Compares a previous version of the recording with the changed version.
 
Methods inherited from interface org.jmythapi.protocol.events.IMythEvent
getEventName
 
Methods inherited from interface org.jmythapi.IPropertyAware
getProperties, getProperty, getPropertyClass, getPropertyCount, getPropertyIndex, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject
 
Methods inherited from interface org.jmythapi.IVersionable
getVersionNr
 
Methods inherited from interface org.jmythapi.protocol.ISendable
getPacket
 

Method Detail

getChannelID

Integer getChannelID()
Gets the channel ID of the recording.

Specified by:
getChannelID in interface IRecordingEvent<IRecordingListChangeUpdate.Props>
Specified by:
getChannelID in interface IRecordingListChangeSingle<IRecordingListChangeUpdate.Props>
Specified by:
getChannelID in interface IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>
Returns:
the channel ID.

getRecordingStartTime

Date getRecordingStartTime()
Gets the recording start time.

Specified by:
getRecordingStartTime in interface IRecordingEvent<IRecordingListChangeUpdate.Props>
Specified by:
getRecordingStartTime in interface IRecordingListChangeSingle<IRecordingListChangeUpdate.Props>
Specified by:
getRecordingStartTime in interface IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>
Returns:
the recording start time.

getUniqueRecordingID

String getUniqueRecordingID()
Gets the unique ID of the changed recording.

Specified by:
getUniqueRecordingID in interface IRecordingEvent<IRecordingListChangeUpdate.Props>
Specified by:
getUniqueRecordingID in interface IRecordingListChangeSingle<IRecordingListChangeUpdate.Props>
Specified by:
getUniqueRecordingID in interface IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>
Returns:
the unique recording ID.
See Also:
EncodingUtils.generateId(Integer, Date)

getProgramInfo

IProgramInfo getProgramInfo()
Gets the info object of the changed recording.

Specified by:
getProgramInfo in interface IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>
Returns:
the changed recording

getUpdatedProperties

EnumMap<IProgramInfo.Props,Object[]> getUpdatedProperties(IProgramInfo oldProgramInfo)
Compares a previous version of the recording with the changed version.

This function compares each property of the recordings and returns a map containing all changed properties

Usage Example:


    EnumMap<IProgramInfo.Props,Object[]> diffMap = ((IRecordingListChangeUpdate)event).getUpdatedProperties(oldRecording);
    
    // pring changes
    System.out.println(String.format(
       "%d properties of recording changed:",
       Integer.valueOf(diffMap.size()), recording.getBaseName()
    ));							
    for(Entry<IProgramInfo.Props,Object[]> entry : diffMap.entrySet()) {
       IProgramInfo.Props property = entry.getKey();
       Object[] values = entry.getValue();
       System.out.println(String.format(
          "\r\n   %s: %s -> %s",
          property, values[0],values[1]
       ));
    }						 	
 

Specified by:
getUpdatedProperties in interface IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>
Parameters:
oldProgramInfo - a previous version of the recording
Returns:
a map containing all found differences
See Also:
PropertyAwareUtils.compare(IPropertyAware, IPropertyAware)


Copyright © 2008-2013. All Rights Reserved.