transport: Mark more methods as abstractmethod

Change-Id: Ied3dbd07fdd0d3fa9bbe2dd7dd674700cf13bf63
This commit is contained in:
Harald Welte
2021-05-03 22:58:53 +02:00
parent daf2b392f0
commit 903bdaaca8

View File

@@ -52,6 +52,7 @@ class LinkBase(abc.ABC):
"""Set an (optional) status word interpreter.""" """Set an (optional) status word interpreter."""
self.sw_interpreter = interp self.sw_interpreter = interp
@abc.abstractmethod
def wait_for_card(self, timeout:int=None, newcardonly:bool=False): def wait_for_card(self, timeout:int=None, newcardonly:bool=False):
"""Wait for a card and connect to it """Wait for a card and connect to it
@@ -59,22 +60,21 @@ class LinkBase(abc.ABC):
timeout : Maximum wait time in seconds (None=no timeout) timeout : Maximum wait time in seconds (None=no timeout)
newcardonly : Should we wait for a new card, or an already inserted one ? newcardonly : Should we wait for a new card, or an already inserted one ?
""" """
pass
@abc.abstractmethod
def connect(self): def connect(self):
"""Connect to a card immediately """Connect to a card immediately
""" """
pass
@abc.abstractmethod
def disconnect(self): def disconnect(self):
"""Disconnect from card """Disconnect from card
""" """
pass
@abc.abstractmethod
def reset_card(self): def reset_card(self):
"""Resets the card (power down/up) """Resets the card (power down/up)
""" """
pass
def send_apdu_raw(self, pdu:str): def send_apdu_raw(self, pdu:str):
"""Sends an APDU with minimal processing """Sends an APDU with minimal processing