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

@@ -23,6 +23,25 @@
class LinkBase(object):
def wait_for_card(self, timeout=None, newcardonly=False):
"""wait_for_card(): Wait for a card and connect to it
timeout : Maximum wait time (None=no timeout)
newcardonly : Should we wait for a new card, or an already
inserted one ?
"""
pass
def connect(self):
"""connect(): Connect to a card immediately
"""
pass
def disconnect(self):
"""disconnect(): Disconnect from card
"""
pass
def reset_card(self):
"""reset_card(): Resets the card (power down/up)
"""