Grabba Driver for Android
Unified driver for Grabba devices on the Android operating system
SmartcardInterface Interface Reference

Description

Interface class for Grabba contact smart card reader events.

Objects which implement this interface may receive callbacks when these events occur, via delegation from a SmartcardListener object.

Note that this interface need not be directly implemented; it may be simpler to subclass SmartcardListener and thereby receive the events directly.

Thread safety: This interface is intended to be thread-safe; any classes deriving from it should ensure that the relevant methods are callable from any thread.

See also
SmartcardAPI for related API functions, and SmartcardListener for more detailed descriptions of each event.
Inheritance diagram for SmartcardInterface:
SmartcardListener

Public Member Functions

void APDU_Event (@NonNull SmartcardInterfaceID iface, @NonNull ResponseAPDU response)
 Callback which is invoked when an asynchronous APDU exchange operation completes successfully. More...
 
void errorEvent (@NonNull SmartcardInterfaceID iface, @NonNull ErrorCode error)
 Callback which is invoked when an asynchronous contact smart card operation fails, regardless of reasons. More...
 
void insertEvent (@NonNull SmartcardInterfaceID iface)
 Callback which is invoked when a contact smart card is inserted into a reader slot on the Grabba device. More...
 
void powerDownEvent (@NonNull SmartcardInterfaceID iface)
 Callback which is invoked when a contact smart card is powered down, regardless of reasons. More...
 
void powerUpEvent (@NonNull SmartcardInterfaceID iface, @NonNull byte[] ATR)
 Callback which is invoked when a contact smart card is powered up. More...
 
void PPS_Event (@NonNull SmartcardInterfaceID iface, @NonNull SmartcardProtocol T, @NonNull SmartcardClock F, @NonNull SmartcardBaud D)
 Callback which is invoked when a PPS exchange operation completes successfully. More...
 
void removeEvent (@NonNull SmartcardInterfaceID iface)
 Callback which is invoked when a contact smart card is removed from a reader slot on the Grabba device. More...
 

Member Function Documentation

◆ APDU_Event()

void APDU_Event ( @NonNull SmartcardInterfaceID  iface,
@NonNull ResponseAPDU  response 
)

Callback which is invoked when an asynchronous APDU exchange operation completes successfully.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
ifaceID of the interface in which the operation occurred
responseAPDU received by the Grabba device from the smart card

Implemented in SmartcardListener.

◆ errorEvent()

void errorEvent ( @NonNull SmartcardInterfaceID  iface,
@NonNull ErrorCode  error 
)

Callback which is invoked when an asynchronous contact smart card operation fails, regardless of reasons.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
ifaceID of the interface in which the operation failed
errorInformation about the error condition which caused the operation to fail

Implemented in SmartcardListener.

◆ insertEvent()

void insertEvent ( @NonNull SmartcardInterfaceID  iface)

Callback which is invoked when a contact smart card is inserted into a reader slot on the Grabba device.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
ifaceID of the interface into which the card was inserted

Implemented in SmartcardListener.

◆ powerDownEvent()

void powerDownEvent ( @NonNull SmartcardInterfaceID  iface)

Callback which is invoked when a contact smart card is powered down, regardless of reasons.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
ifaceID of the interface for which the card has been powered down

Implemented in SmartcardListener.

◆ powerUpEvent()

void powerUpEvent ( @NonNull SmartcardInterfaceID  iface,
@NonNull byte []  ATR 
)

Callback which is invoked when a contact smart card is powered up.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
ifaceID of the interface for which the card has been powered up
ATRAnswer-to-Reset (ATR) data received from the card

Implemented in SmartcardListener.

◆ PPS_Event()

void PPS_Event ( @NonNull SmartcardInterfaceID  iface,
@NonNull SmartcardProtocol  T,
@NonNull SmartcardClock  F,
@NonNull SmartcardBaud  D 
)

Callback which is invoked when a PPS exchange operation completes successfully.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
ifaceID of the interface in which the operation occurred
TSelected protocol (T) - should match that of the request
FClock rate conversion integer and associated maximum frequency - should match that of the request
DBaud rate adjustment integer - should match that of the request

Implemented in SmartcardListener.

◆ removeEvent()

void removeEvent ( @NonNull SmartcardInterfaceID  iface)

Callback which is invoked when a contact smart card is removed from a reader slot on the Grabba device.

Note
Implementations of this method are required to be thread-safe; no guarantees are made about which thread(s) they will be called from.
Parameters
ifaceID of the interface from which the card was removed

Implemented in SmartcardListener.