Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
EmbProcessor.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | EMB (Extended Marlin Broadcast) Processor
4 |
5 | $Id: EmbProcessor.h 2017-10-03
6 | Original author: Kiran Kumar G
7 |
8 | This software is provided to you pursuant to your agreement
9 | with Intertrust Technologies Corporation ("Intertrust").
10 | This software may be used only in accordance with the terms
11 | of the agreement.
12 |
13 | Copyright (c) 2017-2018 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _EMB_PROCESSOR_H_
22 #define _EMB_PROCESSOR_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "EmbTypes.h"
28 #include "EmbConfig.h"
29 
30 /*----------------------------------------------------------------------
31 | constants
32 +---------------------------------------------------------------------*/
33 #define EMB_GROUP_TABLES 13
34 #define EMB_COEFF_LENGTH 16
35 #define EMB_MASK_LENGTH 16
36 #define EMB_EMM_MIN_GROUP_ID 0
37 #define EMB_EMM_MAX_GROUP_ID 1247
38 #define EMB_CONTENT_ID_HASH_LENGTH 20
39 #define EMB_INVALID_PACKAGE_ID (EMB_UInt32)(-1)
40 #define EMB_INVALID_GROUP_ID (EMB_Int32)(-1)
41 
42 /*----------------------------------------------------------------------
43 | types
44 +---------------------------------------------------------------------*/
53 typedef struct {
58 
62  const EMB_UInt8* data;
64 
68 typedef struct {
78 
82 typedef struct {
87 
93 
97 typedef struct {
102 
108 
114 typedef enum {
118 
122 
126 
129 
134 typedef struct {
137 
145 typedef struct {
146  /* Event base */
148 
149  /* data contains raw message */
150  const EMB_UInt8* data;
151 
152  /* attains the length of decoded message */
154 
155  /* the emm_id or transaction_id */
158 
166 typedef struct {
167  /* Event base */
169 
170  /* The EPL item id which was inserted/modified/deleted in the store.
171  * This item id can be passed to the EMB_Storage_GetItemByItemId API to get more details about it.
172  */
175 
183 typedef struct {
184  /* Event base */
186 
187  /* The GKO item id which was inserted/modified/deleted in the store.
188  * This item id can be passed to the EMB_Storage_GetItemByItemId API to get more details about it.
189  */
192 
200 typedef struct {
201  /* Event base */
203 
204  /* The package id which was inserted/modified/deleted in the store.
205  * This item id can be passed to the EPD_Storage_GetPackageById API to get more details about it.
206  */
209 
210 /*
211  * Listener (callback) to provide feedback on the EMM being processed and let
212  * further processing happen.
213  *
214  * For an EMM that modifies the set of group ids the device belongs to, further
215  * processing may consist in acquiring the definition of the HW filters.
216  *
217  * For an EMM carrying an OPM (Operator Message), the listener should copy the
218  * OPM for further processing.
219  *
220  * instance: is an opaque data type to pass closure-like data to the listener.
221  * event: @ see EMB_Processor_Event
222  */
223 typedef struct {
224  void* instance;
225  void (*handler)(void* instance, const EMB_Processor_Event* event);
227 
231 typedef struct SHI_Data SHI_Data;
232 
238 
244 
245 /*----------------------------------------------------------------------
246 | functions
247 +---------------------------------------------------------------------*/
248 #if defined(__cplusplus)
249 extern "C" {
250 #endif
251 
264  EMB_Processor** processor);
265 
307  EMB_HardwareFilter* device_filter);
308 
436  EMB_GroupFilters* group_filters);
437 
456 
519  EMB_Processor_MediaInfo* media_info,
520  WSB_KeyManager* key_manager);
521 
529 
532 #if defined(__cplusplus)
533 }
534 #endif /* __cplusplus */
535 
536 #endif /* _EMB_PROCESSOR_H_ */
EMB_Processor_EventType type
Definition: EmbProcessor.h:135
EMB_EXPORT EMB_Result EMB_Processor_Destroy(EMB_Processor *processor)
Destroys the EMB_Processor object.
OPM Notification event.
Definition: EmbProcessor.h:145
Definition: EmbProcessor.h:124
EMB_Processor_Event base
Definition: EmbProcessor.h:185
void * instance
Definition: EmbProcessor.h:224
EMB_EXPORT EMB_Result EMB_Processor_GetGroupFilters(EMB_Processor *processor, EMB_GroupFilters *group_filters)
Get the group filters suitable to set hardware filter(s) to obtain EMMs targeting at group(s)...
unsigned char EMB_UInt8
An unsigned 8-bit byte.
Definition: EmbTypes.h:43
Definition: EmbProcessor.h:223
EMBB Result.
EMB_EXPORT EMB_Result EMB_Processor_Create(EMB_Processor_EventListener listener, EMB_Processor **processor)
Create EMB (Extended Marlin Broadband) processor to process EMM (Entitlement Management Message)...
const EMB_UInt8 * data
Definition: EmbProcessor.h:150
#define EMB_MASK_LENGTH
Definition: EmbProcessor.h:35
#define EMB_COEFF_LENGTH
Definition: EmbProcessor.h:34
const EMB_Int64 item_id
Definition: EmbProcessor.h:173
EMB_UInt32 use_table_count
Number of group tables used for group hardware filtering.
Definition: EmbProcessor.h:86
Group hardware filters.
Definition: EmbProcessor.h:82
Definition: EmbProcessor.h:123
Definition: EmbProcessor.h:115
EMB_UInt32 content_id_count
Number of content ids.
Definition: EmbProcessor.h:101
const EMB_Int64 item_id
Definition: EmbProcessor.h:190
EMB_Size data_size
Definition: EmbProcessor.h:153
EMB_Processor_Event base
Definition: EmbProcessor.h:147
int EMB_Result
Signed integer value representing a function or method result (return value).
Definition: EmbTypes.h:38
Definition: EmbProcessor.h:119
EMB_EXPORT EMB_Result EMB_Processor_GetDeviceFilter(EMB_Processor *processor, EMB_HardwareFilter *device_filter)
Get the filter suitable to set hardware filter to obtain EMMs targeting at the device.
EMB_Processor_EventType
Identifiers for event types.
Definition: EmbProcessor.h:114
Definition: EmbProcessor.h:117
EMB_UInt32 package_id
Definition: EmbProcessor.h:207
Definition: EmbProcessor.h:121
EMB_Size data_size
Number of bytes in the array.
Definition: EmbProcessor.h:57
EMB_Processor_Event base
Definition: EmbProcessor.h:202
EMB_UInt32 EMB_Size
An unsigned integer used to represent a measurable quantity (e.g., the size of an EMBB packet)...
Definition: EmbTypes.h:69
const EMB_UInt8 * data
Pointer to the bytes in the array.
Definition: EmbProcessor.h:62
Definition: EmbProcessor.h:127
EMB_UInt64 emm_id
Definition: EmbProcessor.h:156
#define EMB_GROUP_TABLES
Definition: EmbProcessor.h:33
EPD Notification event.
Definition: EmbProcessor.h:200
long long int EMB_Int64
A signed 64-bit integer.
Definition: EmbTypes.h:63
GKO Notification event.
Definition: EmbProcessor.h:183
Definition: EmbProcessor.h:116
EMB_ByteArray * content_ids
Pointer to the EMB_ByteArray structure.
Definition: EmbProcessor.h:106
struct WSB_KeyManager WSB_KeyManager
A WSB_KeyManager object can be used to register (set) and get content keys for a playback session...
Definition: EmbProcessor.h:237
unsigned long long EMB_UInt64
An unsigned 64-bit integer.
Definition: EmbTypes.h:58
EMB_EXPORT EMB_Result EMB_Processor_ProcessPacket(EMB_Processor *processor, EMB_ByteArray *packet)
Process incoming EMM of the following payload types:
Hardware filter.
Definition: EmbProcessor.h:68
struct SHI_Data SHI_Data
A SHI_Data object represents a typed data object.
Definition: EmbProcessor.h:231
Definition: EmbProcessor.h:125
unsigned int EMB_UInt32
An unsigned 32-bit integer.
Definition: EmbTypes.h:53
An array of bytes.
Definition: EmbProcessor.h:53
EMB_Processor_Event base
Definition: EmbProcessor.h:168
Definition: EmbProcessor.h:120
Media info with content ids.
Definition: EmbProcessor.h:97
EPL Notification event.
Definition: EmbProcessor.h:166
struct EMB_Processor EMB_Processor
An EMB_Processor object represents information about processing an EMBB packet.
Definition: EmbProcessor.h:243
#define EMB_EXPORT
Definition: EmbConfig.h:25
EMB_EXPORT EMB_Result EMB_Processor_EnableContent(EMB_Processor *processor, EMB_Processor_MediaInfo *media_info, WSB_KeyManager *key_manager)
Enable content with the specified content id(s) to be ready for playback.
Structure used as the base for all event structures.
Definition: EmbProcessor.h:134