1
2
3
4
5
6#ifndef VREADER_H
7#define VREADER_H 1
8
9#include "eventt.h"
10#include "vreadert.h"
11#include "vcardt.h"
12
13
14
15
16VReaderStatus vreader_power_on(VReader *reader, unsigned char *atr, int *len);
17VReaderStatus vreader_power_off(VReader *reader);
18VReaderStatus vreader_xfr_bytes(VReader *reader, unsigned char *send_buf,
19 int send_buf_len, unsigned char *receive_buf,
20 int *receive_buf_len);
21
22
23VReader *vreader_new(const char *readerName, VReaderEmul *emul_private,
24 VReaderEmulFree private_free);
25
26VReader *vreader_reference(VReader *reader);
27
28void vreader_free(VReader *reader);
29
30
31VReaderEmul *vreader_get_private(VReader *);
32VReaderStatus vreader_card_is_present(VReader *reader);
33void vreader_queue_card_event(VReader *reader);
34const char *vreader_get_name(VReader *reader);
35vreader_id_t vreader_get_id(VReader *reader);
36VReaderStatus vreader_set_id(VReader *reader, vreader_id_t id);
37
38
39VReaderList *vreader_get_reader_list(void);
40void vreader_list_delete(VReaderList *list);
41VReader *vreader_list_get_reader(VReaderListEntry *entry);
42VReaderListEntry *vreader_list_get_first(VReaderList *list);
43VReaderListEntry *vreader_list_get_next(VReaderListEntry *list);
44VReader *vreader_get_reader_by_id(vreader_id_t id);
45VReader *vreader_get_reader_by_name(const char *name);
46
47
48
49
50void vreader_init(void);
51VReaderStatus vreader_add_reader(VReader *reader);
52VReaderStatus vreader_remove_reader(VReader *reader);
53VReaderStatus vreader_insert_card(VReader *reader, VCard *card);
54
55#endif
56