public abstract class CAModule extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CA0
Constant value for the CA0 (Common Interface) CA module type.
|
static int |
CA1
Constant value for the CA1 (DAVIC specified smart card) CA module type.
|
static int |
ENTITLEMENT_AVAILABLE
Constant value for a return value of queryEntitlement().
|
static int |
ENTITLEMENT_NOT_AVAILABLE
Constant value for a return value of queryEntitlement().
|
static int |
ENTITLEMENT_UNKNOWN
Constant value for a return value of queryEntitlement().
|
static int |
MMI_DIALOGUE_REQUIRED
Constant value for a return value of queryEntitlement().
|
static int |
PROPRIETARY
Constant value for the proprietary CA module types.
|
| Modifier and Type | Method and Description |
|---|---|
int |
buyEntitlement(Locator locator)
Request to buy a specified service or future event (specified by a Locator)
from a conditional access system.
|
void |
closeMessageSession(int session_id)
This method allows an application to close a session to
this module.
|
void |
closeMMI()
Requests the module to leave
the complete tree of the current high-level MMI dialogs.
|
void |
enterApplication()
Requests the module to enter start the application and enter
the main application menu.
|
String |
getApplicationTitle()
Retrieves the Application Title String.
|
int[] |
getCASystemIDs()
Returns all CASystemIDs of this CA module.
|
int |
getModuleType()
Returns the type of this module.
|
int |
getSlotNumber()
Returns the number of the slot where module is connected.
|
boolean |
isConnectable(TransportStream ts)
Returns true if the given transport stream can be connected
to this module
|
boolean |
isDescramblable(ElementaryStream[] streams)
Returns true if the given array of elementary services (which are
components of the same service) can be descrambled by this CAModule.
|
boolean |
isDescramblable(Service s)
Returns true if given service can be descrambled by this CAModule now.
|
String[] |
listEntitlements()
Returns the entitlements present in this module for display
to the end-user.
|
int |
openMessageSession(MessageListener listener)
This method allows an application to open a message session to
this module.
|
int |
queryEntitlement(Locator locator)
Returns if descrambling is possible for specified
service or future event (specified by a Locator).
|
void |
sendToModule(int session_id,
CAMessage msg)
Sends a message to this module.
|
public static final int CA0
getModuleType(),
Constant Field Valuespublic static final int CA1
getModuleType(),
Constant Field Valuespublic static final int PROPRIETARY
getModuleType(),
Constant Field Valuespublic static final int ENTITLEMENT_UNKNOWN
public static final int ENTITLEMENT_AVAILABLE
public static final int ENTITLEMENT_NOT_AVAILABLE
public static final int MMI_DIALOGUE_REQUIRED
public int queryEntitlement(Locator locator) throws CAException, InvalidLocatorException
Return values are specified by constants in this class. In case of DVB Common Interface, this maps onto CI messages as follows:
locator - a Locator that points to a broadcast service or an event
of a serviceNoFreeCapacityException - raised if the CAModule does not
have available capacity to perform
this action nowModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreSecurityException - raised if the application does not have an
instance of CAPermission with the "entitlementInfo" name.InvalidLocatorException - if the locator does not
point to a valid service or event.CAExceptionpublic int buyEntitlement(Locator locator) throws CAException
Returns whether descrambling of the specified service or future event is possible after the user dialogue has been completed. Return values are specified by constants in this class. If a dialog is required to buy an entitlement, this dialog may be started.
In case of DVB Common Interface, this maps onto CI messages as follows:
locator - Locator that points to a broadcast service or an event
of a serviceNoFreeCapacityException - raised if the CAModule does not
have available capacity to perform
this action nowModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreNotTunedException - raised if performing the action would
require being tuned to the transport
stream carrying the service and the receiver
is not currently tuned to itSecurityException - raised if the application does not have an
instance of CAPermission with the "buy" name.CAExceptionpublic String[] listEntitlements() throws CAException
ModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreSecurityException - raised if the application does not have an
instance of CAPermission with the "entitlementInfo" name.CAExceptionpublic boolean isConnectable(TransportStream ts) throws CAException
ModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreNotTunedException - raised if performing the action would
require being tuned to the transport
stream carrying the service and the receiver
is not currently tuned to itCAExceptionpublic int getSlotNumber()
throws CAException
ModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreCAExceptionpublic boolean isDescramblable(Service s) throws CAException
NotTunedException - raised if performing the action would
require being tuned to the transport
stream carrying the service and the receiver
is not currently tuned to itModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreCAExceptionpublic boolean isDescramblable(ElementaryStream[] streams) throws CAException
NotTunedException - raised if performing the action would
require being tuned to the transport
stream carrying the service and the receiver
is not currently tuned to itModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreCAExceptionpublic int[] getCASystemIDs()
throws CAException
ModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreCAExceptionpublic int getModuleType()
throws CAException
ModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreCAExceptionpublic int openMessageSession(MessageListener listener) throws CAException
In systems based on the DVB common interface, messages sessions opened using this method shall be mapped onto the CA pipeline for the module represented by this CAModule instance as defined in section 6.8 of the common interface extensions specification. Neither the module_id or the resource_id of the module are visible to the application. It is the responsibility of the platform to perform the relevant mapping. NOTE:The document referred to as "common interface extensions specification."is TS 101 699.
listener - the listener which will receive the messages related to this
message sessionModuleUnavailableException - raised if the physical CA module
has been removed and is not available any moreModuleBusyException - raised if the module is busy and
is not able to handle a message session at the moment. This is CA system dependant.ModuleResourceNonExistentException - raised if the specified resource is not
present in the module.ModuleResourceVersionTooLowException - raised if the version
of the module resource is too low. NOTE: The ModuleResourceVersionTooLowException shall
never be thrown in this version of the present document.SecurityException - raised if the application does not have an
instance of CAPermission with the "messagePassing" name.CAExceptionpublic void closeMessageSession(int session_id)
throws CAException
session_id - the session identifier returned by the
openMessageSession method.ModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreUnknownSessionException - raised if the specified session does
not existCAExceptionpublic void sendToModule(int session_id,
CAMessage msg)
throws CAException
session_id - the session identifier returned by the
openMessageSession methodmsg - the message to be sent to the moduleModuleUnavailableException - raised if the physical CA module
has been removed and is not
available any moreUnknownSessionException - raised if the specified session does
not existBufferFullException - raised if the message buffer is fullCAExceptionpublic String getApplicationTitle() throws ModuleUnavailableException
ModuleUnavailableException - raised if the physical CA module
has been removed and is not available any morepublic void enterApplication()
throws ModuleUnavailableException
ModuleUnavailableException - raised if the physical CA module
has been removed and is not available any morepublic void closeMMI()
throws ModuleUnavailableException
ModuleUnavailableException - raised if the physical CA module
has been removed and is not available any moreCopyright © 2012 code4tv.com. All Rights Reserved.