pub unsafe trait TKSmartCardTokenDriverDelegate: TKTokenDriverDelegate {
// Provided method
unsafe fn tokenDriver_createTokenForSmartCard_AID_error(
&self,
driver: &TKSmartCardTokenDriver,
smart_card: &TKSmartCard,
aid: Option<&NSData>,
) -> Result<Retained<TKSmartCardToken>, Retained<NSError>>
where Self: Sized + Message { ... }
}Available on crate features
TKSmartCardToken and TKToken only.Expand description
TKSmartCardTokenDriverDelegate is used to implement creation of new token instance according to the SmartCard.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn tokenDriver_createTokenForSmartCard_AID_error(
&self,
driver: &TKSmartCardTokenDriver,
smart_card: &TKSmartCard,
aid: Option<&NSData>,
) -> Result<Retained<TKSmartCardToken>, Retained<NSError>>
Available on crate feature TKSmartCard only.
unsafe fn tokenDriver_createTokenForSmartCard_AID_error( &self, driver: &TKSmartCardTokenDriver, smart_card: &TKSmartCard, aid: Option<&NSData>, ) -> Result<Retained<TKSmartCardToken>, Retained<NSError>>
TKSmartCard only.Called by system when new SmartCard is detected. You must override this method to create a new valid token TKSmartCardToken instance for
smartCard.
Parameter smartCard: Target SmartCard.
Parameter AID: ISO7816-4 AID (application ID) which is already selected on the card. If
com.apple.ctk.aidis not present, no application is selected and this parameter is nil.
Parameter error: Error details if operation fails.
Returns: Newly created token instance representing
smartCard.If an error occurs or driver decides that it does not want to handle specified smartCard as token, return nil.