X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=reader.h;fp=reader.h;h=ea46c0d9a0d00d2b3c96a81b367d86169683287e;hp=0000000000000000000000000000000000000000;hb=711eacf3c2cca6d94287f580091f59f4cc51ed94;hpb=b8fe217710e343b51423c13c8babea267dc8479d diff --git a/reader.h b/reader.h new file mode 100644 index 0000000..ea46c0d --- /dev/null +++ b/reader.h @@ -0,0 +1,20 @@ +#ifndef _READER_H +#define _READER_H + +struct reader_ctx; +struct target_ctx; + +struct reader_interface { + char *name; + struct reader_ctx *(*init_ctx) (void); + int (*parse_option)(struct reader_ctx * ctx, char *key, char *val); + int (*for_each_target)(struct reader_ctx * ctx, + (int *callback)(struct target_ctx * tgt, + void *arg), void *arg); + void (*drop_ctx)(*struct reader_ctx * ctx); + int (*transcieve)(struct target_ctx * tgt, uint8_t * send, + size_t send_size, uint8_t * recv, + size_t *recv_size_p); +}; + +#endif