0
|
1 #ifndef B_CAS_CARD_H
|
|
2 #define B_CAS_CARD_H
|
|
3
|
|
4 #include "portable.h"
|
|
5
|
|
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 } B_CAS_INIT_STATUS;
|
|
12
|
|
13 typedef struct {
|
|
14 int64_t *data;
|
|
15 int32_t count;
|
|
16 } B_CAS_ID;
|
|
17
|
|
18 typedef struct {
|
|
19
|
|
20 int32_t s_yy; /* start date : year */
|
|
21 int32_t s_mm; /* start date : month */
|
|
22 int32_t s_dd; /* start date : day */
|
|
23
|
|
24 int32_t l_yy; /* limit date : year */
|
|
25 int32_t l_mm; /* limit date : month */
|
|
26 int32_t l_dd; /* limit date : day */
|
|
27
|
|
28 int32_t hold_time; /* in hour unit */
|
|
29
|
|
30 int32_t broadcaster_group_id;
|
|
31
|
|
32 int32_t network_id;
|
|
33 int32_t transport_id;
|
|
34
|
|
35 } B_CAS_PWR_ON_CTRL;
|
|
36
|
|
37 typedef struct {
|
|
38 B_CAS_PWR_ON_CTRL *data;
|
|
39 int32_t count;
|
|
40 } B_CAS_PWR_ON_CTRL_INFO;
|
|
41
|
|
42 typedef struct {
|
|
43 uint8_t scramble_key[16];
|
|
44 uint32_t return_code;
|
|
45 } B_CAS_ECM_RESULT;
|
|
46
|
|
47 typedef struct {
|
|
48
|
|
49 void *private_data;
|
|
50
|
|
51 void (* release)(void *bcas);
|
|
52
|
|
53 int (* init)(void *bcas);
|
|
54
|
|
55 int (* get_init_status)(void *bcas, B_CAS_INIT_STATUS *stat);
|
|
56 int (* get_id)(void *bcas, B_CAS_ID *dst);
|
|
57 int (* get_pwr_on_ctrl)(void *bcas, B_CAS_PWR_ON_CTRL_INFO *dst);
|
|
58
|
|
59 int (* proc_ecm)(void *bcas, B_CAS_ECM_RESULT *dst, uint8_t *src, int len);
|
|
60 int (* proc_emm)(void *bcas, uint8_t *src, int len);
|
|
61
|
|
62 } B_CAS_CARD;
|
|
63
|
|
64 #ifdef __cplusplus
|
|
65 extern "C" {
|
|
66 #endif
|
|
67
|
|
68 extern B_CAS_CARD *create_b_cas_card();
|
|
69
|
|
70 #ifdef __cplusplus
|
|
71 }
|
|
72 #endif
|
|
73
|
|
74 #endif /* B_CAS_CARD_H */
|