diff options
author | Hans de Goede <hdegoede@redhat.com> | 2011-08-10 09:49:58 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2011-08-10 20:09:38 +0200 |
commit | 6a425f1601fcc60263f5014e5d3bd2e30719da2e (patch) | |
tree | aa83ccde52971d9c8faaeed2d58ab51b6c7c7d23 /gusb/gusb-device-list.h | |
parent | 2bf9da55c137caa022007b457705948695b5d9a4 (diff) | |
download | gusb-6a425f1601fcc60263f5014e5d3bd2e30719da2e.tar.gz |
Add GUsbDeviceList
Diffstat (limited to 'gusb/gusb-device-list.h')
-rw-r--r-- | gusb/gusb-device-list.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/gusb/gusb-device-list.h b/gusb/gusb-device-list.h new file mode 100644 index 0000000..430984f --- /dev/null +++ b/gusb/gusb-device-list.h @@ -0,0 +1,72 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2011 Hans de Goede <hdegoede@redhat.com> + * + * Licensed under the GNU Lesser General Public License Version 2.1 + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __GUSB_DEVICE_LIST_H__ +#define __GUSB_DEVICE_LIST_H__ + +#include <glib-object.h> +#include <gudev/gudev.h> + +#include <gusb/gusb-context.h> +#include <gusb/gusb-device.h> + +G_BEGIN_DECLS + +#define G_USB_TYPE_DEVICE_LIST (g_usb_device_list_get_type ()) +#define G_USB_DEVICE_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_USB_TYPE_DEVICE_LIST, GUsbDeviceList)) +#define G_USB_IS_DEVICE_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_USB_TYPE_DEVICE_LIST)) + +typedef struct _GUsbDeviceListPrivate GUsbDeviceListPrivate; +typedef struct _GUsbDeviceList GUsbDeviceList; +typedef struct _GUsbDeviceListClass GUsbDeviceListClass; + +struct _GUsbDeviceList +{ + GObject parent; + GUsbDeviceListPrivate *priv; +}; + +struct _GUsbDeviceListClass +{ + GObjectClass parent_class; + /* Signals */ + void (*device_added) (GUsbDeviceList *list, + GUsbDevice *device, + GUdevDevice *udev); + void (*device_removed) (GUsbDeviceList *list, + GUsbDevice *device, + GUdevDevice *udev); +}; + +GType g_usb_device_list_get_type (void); + +GUsbDeviceList *g_usb_device_list_new (GUsbContext *context); + +void g_usb_device_list_coldplug (GUsbDeviceList *list); + +GUsbDevice *g_usb_device_list_get_dev_by_bus_n_address ( + GUsbDeviceList *list, + guint8 bus, + guint8 address); + + +G_END_DECLS + +#endif /* __GUSB_DEVICE_LIST_H__ */ |