[Pcsclite-cvs-commit] r5491 - /trunk/PCSC/UnitaryTests/SCardConnect_DIRECT2.py
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Thu Jan 6 09:49:22 UTC 2011
Author: rousseau
Date: Thu Jan 6 09:49:21 2011
New Revision: 5491
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5491
Log:
Add comments
Modified:
trunk/PCSC/UnitaryTests/SCardConnect_DIRECT2.py
Modified: trunk/PCSC/UnitaryTests/SCardConnect_DIRECT2.py
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/UnitaryTests/SCardConnect_DIRECT2.py?rev=5491&op=diff
==============================================================================
--- trunk/PCSC/UnitaryTests/SCardConnect_DIRECT2.py (original)
+++ trunk/PCSC/UnitaryTests/SCardConnect_DIRECT2.py Thu Jan 6 09:49:21 2011
@@ -23,6 +23,9 @@
# driver should negociate PPS
# Disconnect
# Connect in SCARD_SHARE_DIRECT
+# driver should NOT negociate PPS (the card has not been reset)
+# Disconnect
+# Connect in SCARD_SHARE_SHARED
# driver should NOT negociate PPS (the card has not been reset)
# Disconnect
@@ -53,11 +56,13 @@
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
+# Transmit
hresult, response = SCardTransmit(hcard, SCARD_PCI_T1, SELECT)
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
print response
+# Disconnect
hresult = SCardDisconnect(hcard, SCARD_LEAVE_CARD)
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
@@ -68,6 +73,7 @@
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
+# Disconnect
hresult = SCardDisconnect(hcard, SCARD_LEAVE_CARD)
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
@@ -77,6 +83,8 @@
SCARD_SHARE_SHARED, SCARD_PROTOCOL_ANY)
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
+
+# Transmit
hresult, response = SCardTransmit(hcard, SCARD_PCI_T1, SELECT)
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
@@ -88,6 +96,7 @@
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
+# Disconnect
hresult = SCardDisconnect(hcard, SCARD_LEAVE_CARD)
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
@@ -97,11 +106,14 @@
SCARD_SHARE_SHARED, SCARD_PROTOCOL_ANY)
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
+
+# Transmit
hresult, response = SCardTransmit(hcard, SCARD_PCI_T1, SELECT)
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
print response
+# Disconnect
hresult = SCardDisconnect(hcard, SCARD_LEAVE_CARD)
if hresult != SCARD_S_SUCCESS:
raise BaseSCardException(hresult)
More information about the Pcsclite-cvs-commit
mailing list