![]() |
![]() |
![]() |
GUsb Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
struct GUsbDeviceList; struct GUsbDeviceListClass; void g_usb_device_list_coldplug (GUsbDeviceList *list
); GUsbDevice * g_usb_device_list_find_by_bus_address (GUsbDeviceList *list
,guint8 bus
,guint8 address
,GError **error
); GUsbDevice * g_usb_device_list_find_by_vid_pid (GUsbDeviceList *list
,guint16 vid
,guint16 pid
,GError **error
); GPtrArray * g_usb_device_list_get_devices (GUsbDeviceList *list
); GUsbDeviceList * g_usb_device_list_new (GUsbContext *context
);
struct GUsbDeviceListClass { GObjectClass parent_class; /* Signals */ void (*device_added) (GUsbDeviceList *list, GUsbDevice *device); void (*device_removed) (GUsbDeviceList *list, GUsbDevice *device); };
void g_usb_device_list_coldplug (GUsbDeviceList *list
);
Finds all the USB devices and adds them to the list.
You only need to call this function once, and any subsequent calls are silently ignored.
|
a GUsbDeviceList |
Since 0.1.0
GUsbDevice * g_usb_device_list_find_by_bus_address (GUsbDeviceList *list
,guint8 bus
,guint8 address
,GError **error
);
Finds a device based on its bus and address values.
|
a GUsbDeviceList |
|
A GError or NULL
|
Returns : |
a new GUsbDevice, or NULL if not found. [transfer full]
|
Since 0.1.0
GUsbDevice * g_usb_device_list_find_by_vid_pid (GUsbDeviceList *list
,guint16 vid
,guint16 pid
,GError **error
);
GPtrArray * g_usb_device_list_get_devices (GUsbDeviceList *list
);
|
a GUsbDeviceList |
Returns : |
a new GPtrArray of GUsbDevice's. [transfer full] |
Since 0.1.0
GUsbDeviceList * g_usb_device_list_new (GUsbContext *context
);
Creates a new device list.
You will need to call g_usb_device_list_coldplug()
to coldplug the
list of devices after creating a device list.
|
a GUsbContext |
Returns : |
a new GUsbDeviceList |
Since 0.1.0
"device-added"
signalvoid user_function (GUsbDeviceList *list,
GUsbDevice *device,
gpointer user_data) : Run Last
This signal is emitted when a USB device is added.
|
the GUsbDeviceList instance that emitted the signal |
|
A GUsbDevice |
|
A GUdevDevice |
|
user data set when the signal handler was connected. |
"device-removed"
signalvoid user_function (GUsbDeviceList *list,
GUsbDevice *device,
gpointer user_data) : Run Last
This signal is emitted when a USB device is removed.
|
the GUsbDeviceList instance that emitted the signal |
|
A GUsbDevice |
|
A GUdevDevice |
|
user data set when the signal handler was connected. |