libaribb25/aribb25/arib_std_b25.h

71 lines
1.5 KiB
C

#ifndef ARIB_STD_B25_H
#define ARIB_STD_B25_H
#include "arib25_api.h"
#include "portable.h"
#include "b_cas_card.h"
typedef struct {
uint8_t *data;
uint32_t size;
} ARIB_STD_B25_BUFFER;
typedef struct {
int32_t program_number; /* channel */
int32_t ecm_unpurchased_count;
int32_t last_ecm_error_code;
int32_t padding;
int64_t total_packet_count;
int64_t undecrypted_packet_count;
} ARIB_STD_B25_PROGRAM_INFO;
typedef struct {
void *private_data;
void (* release)(void *std_b25);
int (* set_multi2_round)(void *std_b25, int32_t round);
int (* set_strip)(void *std_b25, int32_t strip);
int (* set_emm_proc)(void *std_b25, int32_t on);
int (* set_simd_mode)(void *std_b25, int32_t instructin);
int32_t (* get_simd_mode)(void *std_b25);
int (* set_b_cas_card)(void *std_b25, B_CAS_CARD *bcas);
int (* set_unit_size)(void *std_b25, int size);
int (* reset)(void *std_b25);
int (* flush)(void *std_b25);
int (* put)(void *std_b25, ARIB_STD_B25_BUFFER *buf);
int (* get)(void *std_b25, ARIB_STD_B25_BUFFER *buf);
int (* get_program_count)(void *std_b25);
int (* get_program_info)(void *std_b25, ARIB_STD_B25_PROGRAM_INFO *info, int32_t idx);
int (*withdraw)(void *std_b25, ARIB_STD_B25_BUFFER *buf);
} ARIB_STD_B25;
#ifdef __cplusplus
extern "C" {
#endif
extern ARIB_STD_B25 *create_arib_std_b25(void);
#ifdef USE_BENCHMARK
extern int test_multi2_decryption(void *std_b25, int64_t *time, int32_t instructin, int32_t round);
#endif
#ifdef __cplusplus
}
#endif
#endif /* ARIB_STD_B25_H */