Class: LIBUSB::Context::HotplugCallback

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/libusb/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



76
77
78
# File 'lib/libusb/context.rb', line 76

def context
  @context
end

Instance Method Details

#deregisterObject

Deregisters the hotplug callback.

Deregister a callback from a LIBUSB::Context. This function is safe to call from within a hotplug callback.

Since libusb version 1.0.16.



92
93
94
95
# File 'lib/libusb/context.rb', line 92

def deregister
  Call.libusb_hotplug_deregister_callback(@ctx, self[:handle])
  @callbacks.delete(self[:handle])
end