[Pcsclite-cvs-commit] r4499 - /trunk/Drivers/ccid/src/ifdhandler.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Sun Oct 18 10:03:32 UTC 2009


Author: rousseau
Date: Sun Oct 18 10:03:32 2009
New Revision: 4499

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4499
Log:
FDHGetCapabilities(): add support of SCARD_ATTR_ICC_PRESENCE

Required to support the Windows middleware that's used for French
Healthcar cards.

Thanks to David Markowitz for the patch.

Modified:
    trunk/Drivers/ccid/src/ifdhandler.c

Modified: trunk/Drivers/ccid/src/ifdhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ifdhandler.c?rev=4499&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c (original)
+++ trunk/Drivers/ccid/src/ifdhandler.c Sun Oct 18 10:03:32 2009
@@ -391,6 +391,23 @@
 				*Value = 0;
 			break;
 
+		case SCARD_ATTR_ICC_PRESENCE:
+			*Length = 1;
+			/* Single byte indicating smart card presence:
+			 * 0 = not present
+			 * 1 = card present but not swallowed (applies only if
+			 *     reader supports smart card swallowing)
+			 * 2 = card present (and swallowed if reader supports smart
+			 *     card swallowing)
+			 * 4 = card confiscated. */
+			if (IFD_ICC_PRESENT == IFDHICCPresence(Lun))
+				/* Card present */
+				*Value = 2;
+			else
+				/* Not present */
+				*Value = 0;
+			break;
+			
 #ifdef HAVE_PTHREAD
 		case TAG_IFD_SIMULTANEOUS_ACCESS:
 			if (*Length >= 1)




More information about the Pcsclite-cvs-commit mailing list