Context
Object Hierarchy:
Description:
Namespace: GUsb
Package: gusb
Content:
Properties:
- public int debug_level { get; set; }
- public void* libusb_context { get; }
Static methods:
- public static Quark error_quark ()
Creation methods:
Methods:
- public void enumerate ()
Enumerates all the USB devices and adds them to the context.
- public Device find_by_bus_address (uint8 bus, uint8 address) throws Error
Finds a device based on its bus and address values.
- public Device find_by_platform_id (string platform_id) throws Error
Finds a device based on its platform id value.
- public Device find_by_vid_pid (uint16 vid, uint16 pid) throws Error
Finds a device based on its bus and address values.
- public GenericArray<Device> get_devices ()
- public ContextFlags get_flags ()
Sets the flags to use for the context.
- public uint get_hotplug_poll_interval ()
Gets the poll interval for platforms like Windows that do not support `LIBUSB_CAP_HAS_HOTPLUG`.
- public unowned MainContext get_main_context ()
Gets the internal GMainContext to use for synchronous methods.
- public unowned Source get_source (MainContext main_ctx)
This function does nothing.
- public bool load (Object json_object) throws Error
Loads the context from a JSON object.
- public bool load_with_tag (Object json_object, string tag) throws Error
Loads any devices with a specified tag into the context from a JSON object.
- public bool save (Builder json_builder) throws Error
Saves the context to an existing JSON builder.
- public bool save_with_tag (Builder json_builder, string tag) throws Error
Saves any devices with a specified tag into an existing JSON builder.
- public void set_debug (LogLevelFlags flags)
Sets the debug flags which control what is logged to the console.
- public void set_flags (ContextFlags flags)
Sets the flags to use for the context.
- public void set_hotplug_poll_interval (uint hotplug_poll_interval)
Sets the poll interval for platforms like Windows that do not support `LIBUSB_CAP_HAS_HOTPLUG`.
- public void set_main_context (MainContext main_ctx)
Sets the internal GMainContext to use for synchronous methods.
- public Device wait_for_replug (Device device, uint timeout_ms) throws Error
Waits for the device to be replugged.
Signals:
- public virtual signal void device_added (Device device)
This signal is emitted when a USB device is added.
- public virtual signal void device_changed (Device device)
This signal is emitted when a USB device is changed.
- public virtual signal void device_removed (Device device)
This signal is emitted when a USB device is removed.
Inherited Members:
All known members inherited from class GLib.Object
All known members inherited from interface GLib.Initable