transport: Change transport api to allow for wait_for_card/connect/disconnect

This way, we can re-use the same transport parameters for several
cards for a future batch mode

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut
2010-12-09 13:31:58 +01:00
parent 9c8729a2d1
commit bdca252fb0
4 changed files with 93 additions and 11 deletions

View File

@@ -302,6 +302,9 @@ if __name__ == '__main__':
sl = PcscSimLink(opts.pcsc_dev)
scc = SimCardCommands(transport=sl)
print "Insert Card now"
sl.wait_for_card()
# Detect type if needed
card = None
ctypes = dict([(kls.name, kls) for kls in _cards_classes])