initial commit
[arib_std_b25.git] / src / b_cas_card.h
blob5c65c72f2789c33c2e8aeec1ea51e12071f94f72
1 #ifndef B_CAS_CARD_H
2 #define B_CAS_CARD_H
4 #include "portable.h"
6 typedef struct {
7 uint8_t system_key[32];
8 uint8_t init_cbc[8];
9 int64_t bcas_card_id;
10 int32_t card_status;
11 int32_t ca_system_id;
12 } B_CAS_INIT_STATUS;
14 typedef struct {
15 int64_t *data;
16 int32_t count;
17 } B_CAS_ID;
19 typedef struct {
21 int32_t s_yy; /* start date : year */
22 int32_t s_mm; /* start date : month */
23 int32_t s_dd; /* start date : day */
25 int32_t l_yy; /* limit date : year */
26 int32_t l_mm; /* limit date : month */
27 int32_t l_dd; /* limit date : day */
29 int32_t hold_time; /* in hour unit */
31 int32_t broadcaster_group_id;
33 int32_t network_id;
34 int32_t transport_id;
36 } B_CAS_PWR_ON_CTRL;
38 typedef struct {
39 B_CAS_PWR_ON_CTRL *data;
40 int32_t count;
41 } B_CAS_PWR_ON_CTRL_INFO;
43 typedef struct {
44 uint8_t scramble_key[16];
45 uint32_t return_code;
46 } B_CAS_ECM_RESULT;
48 typedef struct {
50 void *private_data;
52 void (* release)(void *bcas);
54 int (* init)(void *bcas);
56 int (* get_init_status)(void *bcas, B_CAS_INIT_STATUS *stat);
57 int (* get_id)(void *bcas, B_CAS_ID *dst);
58 int (* get_pwr_on_ctrl)(void *bcas, B_CAS_PWR_ON_CTRL_INFO *dst);
60 int (* proc_ecm)(void *bcas, B_CAS_ECM_RESULT *dst, uint8_t *src, int len);
61 int (* proc_emm)(void *bcas, uint8_t *src, int len);
63 } B_CAS_CARD;
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
69 extern B_CAS_CARD *create_b_cas_card();
71 #ifdef __cplusplus
73 #endif
75 #endif /* B_CAS_CARD_H */