blob: 0a3772bc2de2e467f14ef3f205eb77d1ef21732b [file] [log] [blame]
Harald Welted54c2ee2012-01-17 18:25:50 +01001#ifndef _SIM_INT_H
2
3#include <osmocom/sim/sim.h>
4
5struct osim_decoded_element *
6element_alloc(struct osim_decoded_data *dd, const char *name,
7 enum osim_element_type type, enum osim_element_repr repr);
8
9struct osim_decoded_element *
10element_alloc_sub(struct osim_decoded_element *ee, const char *name,
11 enum osim_element_type type, enum osim_element_repr repr);
12
13extern const struct osim_card_sw ts102221_uicc_sw[0];
14
Harald Welte30115db2014-05-04 16:30:46 +020015int default_decode(struct osim_decoded_data *dd,
16 const struct osim_file_desc *desc,
17 int len, uint8_t *data);
Harald Welted54c2ee2012-01-17 18:25:50 +010018
19void add_filedesc(struct osim_file_desc *root, const struct osim_file_desc *in, int num);
20struct osim_file_desc *alloc_df(void *ctx, uint16_t fid, const char *name);
21struct osim_file_desc *
22add_df_with_ef(struct osim_file_desc *parent,
23 uint16_t fid, const char *name,
24 const struct osim_file_desc *in, int num);
25
26struct osim_file_desc *
27add_adf_with_ef(struct osim_file_desc *parent,
28 const uint8_t *adf_name, uint8_t adf_name_len,
29 const char *name, const struct osim_file_desc *in,
30 int num);
31
32struct osim_reader_ops {
33 const char *name;
Harald Welted83d2962013-03-04 17:52:33 +000034 struct osim_reader_hdl *(*reader_open)(int idx, const char *name, void *ctx);
Harald Welted54c2ee2012-01-17 18:25:50 +010035 struct osim_card_hdl *(*card_open)(struct osim_reader_hdl *rh);
36 int (*transceive)(struct osim_reader_hdl *rh, struct msgb *msg);
37};
38
39const struct osim_reader_ops pcsc_reader_ops;
40
41#endif