org.jmythapi.protocol.response
Interface IProgramFlags

All Superinterfaces:
Cloneable, IFlagGroup<IProgramFlags.Flags>, IGroup<IProgramFlags.Flags>, IVersionable
All Known Implementing Classes:
ProgramFlags

public interface IProgramFlags
extends IVersionable, IFlagGroup<IProgramFlags.Flags>

The flags of a recording.

This interface represents the result of the function call IProgramInfo.getProgramFlags().
This interface is a IFlagGroup. See IProgramFlags.Flags for a list of all available flags.

Usage example:

This example shows how a list of recordings can be filtered by program flags.

    // fetch all recordings
    IProgramInfoList allRecordings = backend.queryRecordings();
    
    // filter recordings by flag
    IProgramInfoFilter recordingsFilter = ProgramInfoFilters.flag(IProgramFlags.Flags.FL_AUTOEXP);
    IProgramInfoList filteredRecordingsList = allRecordings.filter(recordingsFilter);
    
    long spaceUsed = 0;
    System.out.println("Expiring records:");
    for(IProgramInfo program : expiringRecords) {
    	 spaceUsed += program.getFileSize().longValue();
       System.out.println("- " + program.getFullTitle());
    }
    System.out.println(String.format(
       "%s used by %d expiring recordings.",
       EncodingUtils.getFormattedFileSize(spaceUsed),
       expiringRecords.size()
    ));
 

See Also:
IProgramInfo.Props.PROGRAM_FLAGS, IProgramInfo.getProgramFlags()

Nested Class Summary
static class IProgramFlags.Flags
          The flags of the PROGRAM_FLAGS property.
 
Method Summary
 
Methods inherited from interface org.jmythapi.protocol.response.IFlagGroup
getActiveFlags, getFlagMap, getInactiveFlags, getSupportedFlags, isSet
 
Methods inherited from interface org.jmythapi.protocol.response.IGroup
getGroupClass, longValue
 
Methods inherited from interface org.jmythapi.IVersionable
getVersionNr
 



Copyright © 2008-2013. All Rights Reserved.