GUsbDeviceList

GUsbDeviceList — A device list

Functions

Types and Values

Description

A device list that is updated as devices are pluged in and unplugged.

Functions

g_usb_device_list_new ()

GUsbDeviceList *
g_usb_device_list_new (GUsbContext *context);

g_usb_device_list_new is deprecated and should not be used in newly-written code.

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.

Parameters

context

a GUsbContext

 

Returns

a new GUsbDeviceList

Since: 0.1.0


g_usb_device_list_coldplug ()

void
g_usb_device_list_coldplug (GUsbDeviceList *list);

g_usb_device_list_coldplug is deprecated and should not be used in newly-written code.

This function does nothing.

Parameters

list

a GUsbDeviceList

 

Since: 0.1.0


g_usb_device_list_get_devices ()

GPtrArray *
g_usb_device_list_get_devices (GUsbDeviceList *list);

g_usb_device_list_get_devices is deprecated and should not be used in newly-written code.

Parameters

list

a GUsbDeviceList

 

Returns

a new GPtrArray of GUsbDevice's.

[transfer full][element-type GUsbDevice]

Since: 0.1.0


g_usb_device_list_find_by_bus_address ()

GUsbDevice *
g_usb_device_list_find_by_bus_address (GUsbDeviceList *list,
                                       guint8 bus,
                                       guint8 address,
                                       GError **error);

g_usb_device_list_find_by_bus_address is deprecated and should not be used in newly-written code.

Finds a device based on its bus and address values.

Parameters

list

a GUsbDeviceList

 

bus

a bus number

 

address

a bus address

 

error

A GError or NULL

 

Returns

a new GUsbDevice, or NULL if not found.

[transfer full]

Since: 0.1.0


g_usb_device_list_find_by_vid_pid ()

GUsbDevice *
g_usb_device_list_find_by_vid_pid (GUsbDeviceList *list,
                                   guint16 vid,
                                   guint16 pid,
                                   GError **error);

g_usb_device_list_find_by_vid_pid is deprecated and should not be used in newly-written code.

Finds a device based on its bus and address values.

Parameters

list

a GUsbDeviceList

 

vid

a vendor ID

 

pid

a product ID

 

error

A GError or NULL

 

Returns

a new GUsbDevice, or NULL if not found.

[transfer full]

Since: 0.1.0

Types and Values

struct GUsbDeviceList

struct GUsbDeviceList {
	 GObject			 parent;
	 GUsbDeviceListPrivate		*priv;
};

struct GUsbDeviceListClass

struct GUsbDeviceListClass {
	GObjectClass			 parent_class;
	/* Signals */
	void (*device_added)		(GUsbDeviceList		*list,
					 GUsbDevice		*device);
	void (*device_removed)		(GUsbDeviceList		*list,
					 GUsbDevice		*device);
};

GUsbDeviceListPrivate

typedef struct _GUsbDeviceListPrivate GUsbDeviceListPrivate;