TKSmartCardTokenDriverDelegate

Trait TKSmartCardTokenDriverDelegate 

Source
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§

Source

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 feature 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.

Trait Implementations§

Source§

impl ProtocolType for dyn TKSmartCardTokenDriverDelegate

Source§

const NAME: &'static str = "TKSmartCardTokenDriverDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn TKSmartCardTokenDriverDelegate

Implementations on Foreign Types§

Source§

impl<T> TKSmartCardTokenDriverDelegate for ProtocolObject<T>

Implementors§