summaryrefslogtreecommitdiff
path: root/vreader.h
diff options
context:
space:
mode:
authorRobert Relyea <rrelyea@redhat.com>2010-10-03 14:34:43 +0200
committerAlon Levy <alevy@redhat.com>2010-10-03 14:36:55 +0200
commita256875a5947dbea1d6a066698e2948071519714 (patch)
tree47a5100e5df60178ab4eb5b41a1beb83498fafe6 /vreader.h
parentb1a3c160735ccbf0ba5539e957d400660ebb6ec3 (diff)
passthru and multiple reader support.
New Features, library: - added passthru mode: pass thru can be used either as a card_type and an existing emulator, or as it's own emulator. When used as it's own emulator, only the passhthru card type is supported. Enabling Passhtru is a compile time option (you can build without it). It is still selected for at run-time - added argument parsing code for the NSS emulator. This allows the argument structure to move back to the emulator dependent directory. (This allows other emulators to be implemented without the application needing to know about emulator specific stuff. - added functions to get the reader name and id, and have the caller set the reader id. - added vevent_get_next_vevent() - non-blocking event grabber. - added string arguments to the card_type_init functions (currently not used). - added VCARD_DIRECT card type which passes all the apdus the the card type's last applet. - added function to optionally get the ATR from the card type emul instead of the emulator. NOTE: apps should now call vcard_get_atr rather than vcard_emul_get_atr. - Fixed the VCARD_ATR_PREFIX to take a constant signifying the number of additional historical bytes for the card emulator. - added usage statment. New Features, vscclient.c - vscclient now handles multiple readers, assuming multiple readers are defined in qemu. - vscclient now calls the emul to parse the command line arguments. - vscclient has an option to enable passthru - vscclient now passes the real reader name to qemu - vscclient has 2 new commands: debug [level] -- sets the various levels of debugging output on the fly. list -- lists all the active readers, their card state and their name.
Diffstat (limited to 'vreader.h')
-rw-r--r--vreader.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/vreader.h b/vreader.h
index 9c96975..e8f9092 100644
--- a/vreader.h
+++ b/vreader.h
@@ -20,13 +20,19 @@ VReaderStatus vreader_xfr_bytes(VReader *reader, unsigned char *send_buf,
VReaderList *vreader_get_reader_list();
/* constructor */
-VReader *vreader_new(VReaderEmul *emul_private, VReaderEmulFree private_free);
+VReader *vreader_new(const char *readerName, VReaderEmul *emul_private,
+ VReaderEmulFree private_free);
/* get a new reference to a reader */
VReader *vreader_reference(VReader *reader);
/* "destructor" (readers are reference counted) */
void vreader_free(VReader *reader);
+
+/* accessors */
VReaderEmul *vreader_get_private(VReader *);
VReaderStatus vreader_card_is_present(VReader *reader);
+const char *vreader_get_name(VReader *reader);
+VReaderID vreader_get_id(VReader *reader);
+VReaderStatus vreader_set_id(VReader *reader, VReaderID id);
/* list operations */
VReaderList *vreader_get_reader_list();
@@ -34,6 +40,8 @@ void vreader_list_delete(VReaderList *list);
VReader *vreader_list_get_reader(VReaderListEntry *entry);
VReaderListEntry *vreader_list_get_first(VReaderList *list);
VReaderListEntry *vreader_list_get_next(VReaderListEntry *list);
+VReader *vreader_get_reader_by_id(VReaderID id);
+VReader *vreader_get_reader_by_name(const char *name);
/*
* list tools for vcard_emul