summaryrefslogtreecommitdiffstats
path: root/scd/apdu.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-10-14 20:18:21 +0200
committerWerner Koch <wk@gnupg.org>2008-10-14 20:18:21 +0200
commitd0ca9530146bea3764bf87f8a01e897c2e88448c (patch)
tree6e37e741dccd468bcd9ee8e1018a9dbf0b5aed1d /scd/apdu.h
parentAdd --delete-keys as alias for --delete-key. (diff)
downloadgnupg2-d0ca9530146bea3764bf87f8a01e897c2e88448c.tar.xz
gnupg2-d0ca9530146bea3764bf87f8a01e897c2e88448c.zip
SCD changes for PC/SC under W32.
Diffstat (limited to 'scd/apdu.h')
-rw-r--r--scd/apdu.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/scd/apdu.h b/scd/apdu.h
index 361dfdead..007bda767 100644
--- a/scd/apdu.h
+++ b/scd/apdu.h
@@ -65,13 +65,20 @@ enum {
SW_HOST_GENERAL_ERROR = 0x1000b,
SW_HOST_NO_READER = 0x1000c,
SW_HOST_ABORTED = 0x1000d,
- SW_HOST_NO_KEYPAD = 0x1000e
+ SW_HOST_NO_KEYPAD = 0x1000e,
+ SW_HOST_ALREADY_CONNECTED = 0x1000f
};
#define SW_EXACT_LENGTH_P(a) (((a)&~0xff) == SW_EXACT_LENGTH)
+/* Bit flags for the card status. */
+#define APDU_CARD_USABLE (1) /* Card is present and ready for use. */
+#define APDU_CARD_PRESENT (2) /* Card is just present. */
+#define APDU_CARD_ACTIVE (4) /* Card is active. */
+
+
/* Note , that apdu_open_reader returns no status word but -1 on error. */
int apdu_open_reader (const char *portstr);
int apdu_open_remote_reader (const char *portstr,
@@ -92,7 +99,10 @@ unsigned char *apdu_get_atr (int slot, size_t *atrlen);
const char *apdu_strerror (int rc);
-/* These apdu functions do return status words. */
+/* These APDU functions return status words. */
+
+int apdu_connect (int slot);
+int apdu_disconnect (int slot);
int apdu_activate (int slot);
int apdu_reset (int slot);