public class DescramblerProxy extends Object implements ResourceProxy
An application instantiates an object of this class to descramble a service or elementary streams of a single service. If an application wants to descramble multiple services simultaneously, it should instantiate multiple objects.
| Constructor and Description |
|---|
DescramblerProxy(ResourceClient c)
Constructor of a resource proxy for a specific resource client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDescramblerListener(DescramblerListener l)
Registers a new descrambler event listener.
|
CAModule |
getCAModule()
Returns the CA module that is associated with
the current descrambling via this proxy.
|
ResourceClient |
getClient()
Returns the resource client associated with this resource proxy.
|
ElementaryStream[] |
getElementaryStreams()
This method returns the elementary streams being descrambled
via this proxy at the moment.
|
void |
removeDescramblerListener(DescramblerListener l)
Removes a registered descrambler event listener.
|
void |
startDescrambling(ElementaryStream[] streams,
CAModule module,
Object requestData)
Stops all existing descrambling initiated by this DescramblerProxy
instance and starts the descrambling of the specified elementary
streams (that shall be part of the same service).
|
CAModule |
startDescrambling(ElementaryStream[] streams,
Object requestData)
Stops all existing descrambling initiated by this DescramblerProxy
instance and starts the descrambling of the specified elementary
streams (that shall be part of the same service).
|
void |
startDescrambling(Service s,
CAModule module,
Object requestData)
Stops all existing descrambling initiated by this DescramblerProxy
instance and starts the descrambling of the specified service.
|
CAModule |
startDescrambling(Service s,
Object requestData)
Stops all existing descrambling initiated by this DescramblerProxy
instance and starts the descrambling of the specified service.
|
void |
startDescramblingDialog(ElementaryStream[] streams)
Requests the CA system to perform any user dialogs needed
before starting to descramble the service.
|
void |
startDescramblingDialog(Service s)
Requests the CA system to perform any user dialogs needed
before starting to descramble the service.
|
void |
stopDescrambling()
Stops descrambling of the service.
|
void |
stopDescrambling(ElementaryStream[] streams)
Stops descrambling of the specified elementary streams of the service.
|
public DescramblerProxy(ResourceClient c)
c - the resource client object representing the application
as a client for the resource managementpublic void startDescramblingDialog(Service s) throws CAException, NotAuthorizedException
This version can be used for descrambling the whole service. In case of CA0 this maps onto ca_pmt with ca_pmt_cmd_id = ok_mmi (Common Interface specification, section 8.4.3.4). In systems based on the DVB common interface,the NotAuthorizedException shall never be thrown. After succesful execution, descrambling can be started with the startDescrambling method.
s - service to be descrambled after the dialogueNoFreeCapacityException - 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 itNotAuthorizedException - raised if the user
is not authorized to
perform this actionCAExceptionpublic void startDescramblingDialog(ElementaryStream[] streams) throws CAException, NotAuthorizedException
This version can be used for descrambling only specified subset of elementary streams of a service. The elementary streams given in the parameter array must belong to the same service. If the parameter array is a zero length array then this method shall have no effect. In case of CA0 this maps onto ca_pmt with ca_pmt_cmd_id = ok_mmi (Common Interface specification, section 8.4.3.4). In systems based on the DVB common interface,the NotAuthorizedException shall never be thrown. After succesful execution, descrambling can be started with the startDescrambling method.
streams - subset of elementary streams of a service to be
descrambled after the dialogueNoFreeCapacityException - 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 itNotAuthorizedException - raised if the user
is not authorized to
perform this actionCAExceptionpublic CAModule startDescrambling(Service s, Object requestData) throws CAException, NotAuthorizedException
The module used for descrambling is returned. If descrambling is not possible, an exception is thrown. This method may result in the CA system requesting an MMI dialog. In systems based on the DVB common interface this maps onto ca_pmt with ca_pmt_cmd_id = ok_descrambling (Common Interface specification,section 8.4.3.4) and the NotAuthorizedException shall never be thrown.
s - service to be descrambledrequestData - Used by the ResourceNotification API in the
requestRelease method of the ResourceClient interface. Usage of
this parameter is optional and a null reference may be supplied.
DescramblerProxy applies from the point of view of one application.
Methods such as startDescrambling and stopDescrambling
apply on a per-application basis and do not impact descrambling on
behalf of other applications, except subject to platform resource limitations.NoFreeCapacityException - 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 itNotAuthorizedException - raised if the user
is not authorized to
perform this actionCAExceptionpublic CAModule startDescrambling(ElementaryStream[] streams, Object requestData) throws CAException, NotAuthorizedException
The module used for descrambling is returned.
If descrambling is not possible, an exception is thrown.
If the streams parameter is a zero length array then the method shall have no effect.
This method may result in the CA system requesting an MMI dialog.
In systems based on the DVB common interface this maps onto ca_pmt with ca_pmt_cmd_id =
ok_descrambling (Common Interface specification,section 8.4.3.4) and the
NotAuthorizedException shall never be thrown.
streams - subset of elementary streams of a service to be
descrambled after the dialoguerequestData - Used by the ResourceNotification API in the
requestRelease method of the ResourceClient interface. Usage of
this parameter is optional and a null reference may be supplied.NoFreeCapacityException - 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 itNotAuthorizedException - raised if the user
is not authorized to
perform this actionCAExceptionpublic void startDescrambling(Service s, CAModule module, Object requestData) throws CAException, NotAuthorizedException
The module to be used for descrambling is indicated as a parameter.
If descrambling is not possible, an exception is thrown.
If the streams parameter is a zero length array then the method shall have no effect.
This method may result in the CA system requesting an MMI dialog.
In systems based on the DVB common interface this maps onto ca_pmt with ca_pmt_cmd_id =
ok_descrambling (Common Interface specification,section 8.4.3.4) and the
NotAuthorizedException shall never be thrown.
s - service to be descrambledmodule - CA module to be used for descramblingrequestData - Used by the ResourceNotification API in the
requestRelease method of the ResourceClient interface. Usage of
this parameter is optional and a null reference may be supplied.NoFreeCapacityException - 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 itNotAuthorizedException - raised if the user
is not authorized to
perform this actionCAExceptionpublic void startDescrambling(ElementaryStream[] streams, CAModule module, Object requestData) throws CAException, NotAuthorizedException
streams - subset of elementary streams of a service to be
descrambled after the dialoguemodule - CA module to be used for descramblingrequestData - Used by the ResourceNotification API in the
requestRelease method of the ResourceClient interface. Usage of
this parameter is optional and a null reference may be supplied.NoFreeCapacityException - 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 itNotAuthorizedException - raised if the user
is not authorized to
perform this actionCAExceptionpublic void stopDescrambling()
throws CAException
ModuleUnavailableException - raised if the physical CA module
has been removed and is not available
any moreCAExceptionpublic void stopDescrambling(ElementaryStream[] streams) throws CAException
streams - the array of ElementaryStreams whose descrambling is to be stopped.ModuleUnavailableException - raised if the physical CA module
has been removed and is not available
any moreCAExceptionpublic void addDescramblerListener(DescramblerListener l)
l - the listener to be registeredpublic void removeDescramblerListener(DescramblerListener l)
l - the listener to be removedpublic CAModule getCAModule()
If there is no descrambling being active via this proxy at the moment, this method returns null.
public ResourceClient getClient()
getClient in interface ResourceProxypublic ElementaryStream[] getElementaryStreams()
Copyright © 2012 code4tv.com. All Rights Reserved.