HbbTv  17.9.0
Open source HBBTV engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Typedefs | Functions | Variables
oipf_drm_agent.c File Reference

Oipf DRM agent object. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "techtype.h"
#include "hbbtv.h"
#include "hbbtv_js.h"
#include "hbbtv_sif_os.h"
#include "object.h"
#include "queue.h"
#include "hbbtv_control.h"
#include "hbbtv_string.h"
#include "hbbtv_internal.h"
#include "debug.h"

Macros

#define DRM_MESSAGE_TYPE   "application/vnd.oipf.cspg-hexbinary"
 

Typedefs

typedef struct s_drm_system S_DRM_SYSTEM
 

Functions

void * HBBTV_JSOipfDRMAgent_sendDRMMessage (void *obj, S_HBBTV_STRING *type, S_HBBTV_STRING *message, S_HBBTV_STRING *drm_system_id)
 String sendDRMMessage( String msgType, String msg, String DRMSystemID ), section 7.6.1.2. More...
 
E_HBBTV_ERR HBBTV_DRMRegister (U16BIT ca_system_id, F_HBBTV_DRM_SEND send_function, void *user_data)
 Registers a DRM system with the HbbTV engine. Registering a new DRM system will also change the capability string returned to the HbbTV application by xmlCapabilities (Section 7.15.3.1) as specified by section 9.3.10. More...
 
void HBBTV_DRMUnregister (U16BIT ca_system_id)
 Unregisters a DRM system with the HbbTV engine. Unegistering a new DRM system will also change the capability string returned to the HbbTV application by xmlCapabilities (Section 7.15.3.1) as specified by section 9.3.10. More...
 
void HBBTV_OipfDrmAgent_onDRMMessageResult (S_QUE_DRM_PARAMS *params)
 
void HBBTV_OipfDrmAgent_onDRMSystemMessage (S_QUE_DRM_PARAMS *params)
 
void HBBTV_OipfDrmAgentInitialise (void)
 
void HBBTV_OipfDrmAgentTerminate (void)
 
U8BIT HBBTV_OipfDrmAgentGetDrmSystems (U16BIT **ca_system_ids)
 Retrieves an array of registered ca_system_ids. More...
 

Variables

void * JS_OIPF_DRM_AGENT_CLASS = &s_vtab
 

Detailed Description

Oipf DRM agent object.

Date
April 2014
Author
Sergio Panseri

Function Documentation

E_HBBTV_ERR HBBTV_DRMRegister ( U16BIT  ca_system_id,
F_HBBTV_DRM_SEND  send_function,
void *  user_data 
)

Registers a DRM system with the HbbTV engine. Registering a new DRM system will also change the capability string returned to the HbbTV application by xmlCapabilities (Section 7.15.3.1) as specified by section 9.3.10.

Parameters
ca_system_idCA system ID handled by the registering DRM system.
send_functionPointer to the function that the HbbTV engine will use to forward messages addressing this DRM system from the HbbTV application.
user_dataPointer that will be passed to send_function
Returns
HBBTV_ERR_COMP_NOT_OPEN if the engine has not been initialised, HBBTV_ERR_BAD_PARAMETER if the ca_system_id has already been registered, HBBTV_IGNORED_REQUEST if the engine has not been initialised with the DRM capability, HBBTV_OK otherwise.
void HBBTV_DRMUnregister ( U16BIT  ca_system_id)

Unregisters a DRM system with the HbbTV engine. Unegistering a new DRM system will also change the capability string returned to the HbbTV application by xmlCapabilities (Section 7.15.3.1) as specified by section 9.3.10.

Parameters
ca_system_idCA system ID handled by the DRM system to be unregistered.
void* HBBTV_JSOipfDRMAgent_sendDRMMessage ( void *  obj,
S_HBBTV_STRING type,
S_HBBTV_STRING message,
S_HBBTV_STRING drm_system_id 
)

String sendDRMMessage( String msgType, String msg, String DRMSystemID ), section 7.6.1.2.

Returns
String object
U8BIT HBBTV_OipfDrmAgentGetDrmSystems ( U16BIT **  ca_system_ids)

Retrieves an array of registered ca_system_ids.

Parameters
ca_system_idsPointer to the array allocated and returned by the function. The array is valid must be freed with HBBTV_OSFree, only if the value returned is > 0. This pointer can be NULL, in which case only the number of CA system IDs is returned.
Returns
Number of CA system IDs in the returned array