From bdca252fb00469fed288be239e29f57019a33194 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Thu, 9 Dec 2010 13:31:58 +0100 Subject: 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 --- pySim/transport/__init__.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'pySim/transport/__init__.py') diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py index c9715fc..dd04bba 100644 --- a/pySim/transport/__init__.py +++ b/pySim/transport/__init__.py @@ -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) """ -- cgit v1.2.3