org.davic.mpeg
Interface NotAuthorizedInterface

All Known Implementing Classes:
NotAuthorizedException, NotAuthorizedMediaException

public interface NotAuthorizedInterface

NotAuthorizedInterface shall be implemented by classes which can report failure to access broadcast content due to failure to descramble that content. The interface provides an ability for an application to find out some information about the reason for the failure.


Field Summary
static int COMMERCIAL_DIALOG
          Minor reason for POSSIBLE_UNDER_CONDITIONS - user dialog needed for payment
static int ELEMENTARY_STREAM
          The component to which access was refused was an MPEG elementary stream
static int FREE_PREVIEW_DIALOG
          Minor reason for POSSIBLE_UNDER_CONDITIONS - user dialog needed to explain about free preview.
static int GEOGRAPHICAL_BLACKOUT
          Minor reason for NOT_POSSIBLE - not allowed for geographical reasons
static int MATURITY_RATING
          Minor reason for NOT_POSSIBLE - user does not have suitable maturity
static int MATURITY_RATING_DIALOG
          Minor reason for POSSIBLE_UNDER_CONDITIONS - user dialog needed for maturity
static int NO_ENTITLEMENT
          Minor reason for NOT_POSSIBLE - user does not have an entitlement
static int NOT_POSSIBLE
          Major reason - access not possible
static int OTHER
          Minor reason for both POSSIBLE_UNDER_CONDITIONS and NOT_POSSIBLE.
static int POSSIBLE_UNDER_CONDITIONS
          Major reason - access may be possible under certain conditions.
static int SERVICE
          The component to which access was refused was a MPEG Program/DVB Service
static int TECHNICAL
          Minor reason for NOT_POSSIBLE - a technical reason of some kind
static int TECHNICAL_DIALOG
          Minor reason for POSSIBLE_UNDER_CONDITIONS - user dialog needed for technical purposes.
 
Method Summary
 ElementaryStream[] getElementaryStreams()
          If getType() returns ELEMENTARY_STREAM, then this method returns the set of ElementaryStreams that could not be descrambled.
 int[] getReason(int index)
          Returns the reason(s) why descrambling was not possible.
 Service getService()
          If getType() returns SERVICE, then this method returns the Service that could not be descrambled.
 int getType()
           
 

Field Detail

POSSIBLE_UNDER_CONDITIONS

public static final int POSSIBLE_UNDER_CONDITIONS
Major reason - access may be possible under certain conditions.

See Also:
Constant Field Values

NOT_POSSIBLE

public static final int NOT_POSSIBLE
Major reason - access not possible

See Also:
Constant Field Values

COMMERCIAL_DIALOG

public static final int COMMERCIAL_DIALOG
Minor reason for POSSIBLE_UNDER_CONDITIONS - user dialog needed for payment

See Also:
Constant Field Values

MATURITY_RATING_DIALOG

public static final int MATURITY_RATING_DIALOG
Minor reason for POSSIBLE_UNDER_CONDITIONS - user dialog needed for maturity

See Also:
Constant Field Values

TECHNICAL_DIALOG

public static final int TECHNICAL_DIALOG
Minor reason for POSSIBLE_UNDER_CONDITIONS - user dialog needed for technical purposes.

See Also:
Constant Field Values

FREE_PREVIEW_DIALOG

public static final int FREE_PREVIEW_DIALOG
Minor reason for POSSIBLE_UNDER_CONDITIONS - user dialog needed to explain about free preview.

See Also:
Constant Field Values

NO_ENTITLEMENT

public static final int NO_ENTITLEMENT
Minor reason for NOT_POSSIBLE - user does not have an entitlement

See Also:
Constant Field Values

MATURITY_RATING

public static final int MATURITY_RATING
Minor reason for NOT_POSSIBLE - user does not have suitable maturity

See Also:
Constant Field Values

TECHNICAL

public static final int TECHNICAL
Minor reason for NOT_POSSIBLE - a technical reason of some kind

See Also:
Constant Field Values

GEOGRAPHICAL_BLACKOUT

public static final int GEOGRAPHICAL_BLACKOUT
Minor reason for NOT_POSSIBLE - not allowed for geographical reasons

See Also:
Constant Field Values

OTHER

public static final int OTHER
Minor reason for both POSSIBLE_UNDER_CONDITIONS and NOT_POSSIBLE. Another reason.

See Also:
Constant Field Values

SERVICE

public static final int SERVICE
The component to which access was refused was a MPEG Program/DVB Service

See Also:
getType(), Constant Field Values

ELEMENTARY_STREAM

public static final int ELEMENTARY_STREAM
The component to which access was refused was an MPEG elementary stream

See Also:
getType(), Constant Field Values
Method Detail

getType

public int getType()
Returns:
SERVICE or ELEMENTARY_STREAM to indicate that either a service (MPEG program) or one or more elementary streams could not be descrambled.

getService

public Service getService()
If getType() returns SERVICE, then this method returns the Service that could not be descrambled. Otherwise it returns null.

Returns:
either the Service that could not be descrambled or null

getElementaryStreams

public ElementaryStream[] getElementaryStreams()
If getType() returns ELEMENTARY_STREAM, then this method returns the set of ElementaryStreams that could not be descrambled. Otherwise it returns null.

Returns:
either the set of ElementaryStreams that could not be descrambled or null

getReason

public int[] getReason(int index)
                throws java.lang.IndexOutOfBoundsException
Returns the reason(s) why descrambling was not possible.

Parameters:
index - If the component to which access failed is a Service, index shall be 0. Otherwise index shall refer to one stream in the set returnedby getElementaryStreams().
Returns:
an array of length 2 where the first element of the array is the major reason and the second element of the array is the minor reason.
Throws:
java.lang.IndexOutOfBoundsException - If the component to which access failed is a Service, this exception will be thrown if index is non zero. If the component(s) to which access failed was a (set of) elementary streams then this exception will be thrown where index is beyond the size of the array returned by getElementaryStreams.
See Also:
getElementaryStreams()