org.ocap.media.MediaAccessAuthorization Maven / Gradle / Ivy
package org.ocap.media;
import org.davic.mpeg.ElementaryStream;
import java.util.Enumeration;
/**
* A {@link MediaAccessAuthorization}
* object represents the presentation authorization
* given by a registered MediaAccessHandler for a specific A/V content.
* When the {@link MediaAccessHandler}
is
* triggered by the OCAP implementation, it returns a
* {@link MediaAccessAuthorization}
to indicate
* which service components should not be presented, if any, with a list of reasons
* for denied access (use constant defined in AlternativeMediaPresentationReason
)
* per service component.
*
* @see MediaAccessHandler
* @see AlternativeMediaPresentationReason
*/
public interface MediaAccessAuthorization {
/**
* Returns true if the presentation of all service components is authorized. False otherwise.
* @return true if the presentation of all service components is authorized. False otherwise.
*/
public boolean isFullAuthorization();
/**
* Returns the list of service components whose presentation has not been authorized
* by the {@link MediaAccessHandler}
.
* @return an Enumeration of {@link org.davic.mpeg.ElementaryStream}
whose
* presentation has not been authorized by the {@link MediaAccessHandler}
.
*/
public Enumeration getDeniedElementaryStreams();
/**
* Return a bit mask of denial reasons for the given service component.
* Denial reasons are defined in {@link AlternativeMediaPresentationReason}
* @param es the service component the {@link MediaAccessHandler}
refused presentation.
* @return a bit mask of reasons for the denial. This bit mask is made of
* {@link AlternativeMediaPresentationReason}
.
*/
public int getDenialReasons(ElementaryStream es);
}