void smartcard_device_disconnect(SpiceCharDeviceInstance *char_device) { SmartCardDeviceState *st = SPICE_CONTAINEROF(char_device->st, SmartCardDeviceState, base); smartcard_device_state_free(st); }
SpiceCharDeviceState *smartcard_device_connect(SpiceCharDeviceInstance *char_device) { SmartCardDeviceState *st; st = smartcard_device_state_new(char_device); if (smartcard_char_device_add_to_readers(char_device) == -1) { smartcard_device_state_free(st); return NULL; } return st->chardev_st; }
int smartcard_device_connect(SpiceCharDeviceInstance *char_device) { SmartCardDeviceState *st; st = smartcard_device_state_new(); char_device->st = &st->base; if (smartcard_char_device_add_to_readers(char_device) == -1) { smartcard_device_state_free(st); return -1; } return 0; }
void smartcard_device_disconnect(SpiceCharDeviceInstance *char_device) { SmartCardDeviceState *st = spice_char_device_state_opaque_get(char_device->st); smartcard_device_state_free(st); }