]> www.average.org Git - pam_pcsc_cr.git/commitdiff
Prototype for reader interface
authorEugene Crosser <evgenii.cherkashin@ionos.com>
Tue, 6 Jun 2023 10:34:39 +0000 (12:34 +0200)
committerEugene Crosser <evgenii.cherkashin@ionos.com>
Tue, 6 Jun 2023 10:34:39 +0000 (12:34 +0200)
Signed-off-by: Eugene Crosser <evgenii.cherkashin@ionos.com>
reader.h [new file with mode: 0644]

diff --git a/reader.h b/reader.h
new file mode 100644 (file)
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