-
Notifications
You must be signed in to change notification settings - Fork 63
/
interface.h
20 lines (17 loc) · 696 Bytes
/
interface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
#include <inttypes.h>
struct euicc_ctx;
struct euicc_apdu_interface
{
int (*connect)(struct euicc_ctx *ctx);
void (*disconnect)(struct euicc_ctx *ctx);
int (*logic_channel_open)(struct euicc_ctx *ctx, const uint8_t *aid, uint8_t aid_len);
void (*logic_channel_close)(struct euicc_ctx *ctx, uint8_t channel);
int (*transmit)(struct euicc_ctx *ctx, uint8_t **rx, uint32_t *rx_len, const uint8_t *tx, uint32_t tx_len);
void *userdata;
};
struct euicc_http_interface
{
int (*transmit)(struct euicc_ctx *ctx, const char *url, uint32_t *rcode, uint8_t **rx, uint32_t *rx_len, const uint8_t *tx, uint32_t tx_len, const char **headers);
void *userdata;
};