summaryrefslogtreecommitdiff
path: root/gusb/gusb-source.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-08-10 10:11:08 +0200
committerHans de Goede <hdegoede@redhat.com>2011-08-10 20:09:38 +0200
commit2bf9da55c137caa022007b457705948695b5d9a4 (patch)
treec0843a479d8983aa05587bbf7253baf0e3ed84dc /gusb/gusb-source.h
parentc2b1690bb1b877bc1317a437069e7bb36166dba0 (diff)
downloadgusb-2bf9da55c137caa022007b457705948695b5d9a4.tar.gz
Rename libgusb to gusb
So that we can include our headers from other headers in the form of: include <gusb/gusb-foo.h> And still have a working local build.
Diffstat (limited to 'gusb/gusb-source.h')
-rw-r--r--gusb/gusb-source.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/gusb/gusb-source.h b/gusb/gusb-source.h
new file mode 100644
index 0000000..39b03ea
--- /dev/null
+++ b/gusb/gusb-source.h
@@ -0,0 +1,56 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2010-2011 Richard Hughes <richard@hughsie.com>
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __GUSB_SOURCE_H__
+#define __GUSB_SOURCE_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+#define G_USB_SOURCE_ERROR (g_usb_source_error_quark ())
+
+typedef struct _GUsbSource GUsbSource;
+
+/**
+ * GUsbSourceError:
+ *
+ * The error code.
+ **/
+typedef enum {
+ G_USB_SOURCE_ERROR_INTERNAL
+} GUsbSourceError;
+
+GQuark g_usb_source_error_quark (void);
+GUsbSource *g_usb_source_new (GMainContext *main_ctx,
+ GUsbContext *gusb_ctx,
+ GError **error);
+void g_usb_source_destroy (GUsbSource *source);
+
+void g_usb_source_set_callback (GUsbSource *source,
+ GSourceFunc func,
+ gpointer data,
+ GDestroyNotify notify);
+
+G_END_DECLS
+
+#endif /* __GUSB_SOURCE_H__ */