[vala] Add gudev-1.0 bindings.



commit d665fb1011182af8b947d94e0b12fe7dd25f5905
Author: Jim Nelson <jim yorba org>
Date:   Mon Mar 22 11:17:35 2010 +0100

    Add gudev-1.0 bindings.
    
    Fixes bug 606172.

 vapi/Makefile.am                            |    1 +
 vapi/gudev-1.0.vapi                         |   96 +++++++++
 vapi/packages/gudev-1.0/gudev-1.0.defines   |    3 +
 vapi/packages/gudev-1.0/gudev-1.0.files     |    2 +
 vapi/packages/gudev-1.0/gudev-1.0.gi        |  299 +++++++++++++++++++++++++++
 vapi/packages/gudev-1.0/gudev-1.0.metadata  |   19 ++
 vapi/packages/gudev-1.0/gudev-1.0.namespace |    1 +
 7 files changed, 421 insertions(+), 0 deletions(-)
---
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
index e39ed44..ea69931 100644
--- a/vapi/Makefile.am
+++ b/vapi/Makefile.am
@@ -91,6 +91,7 @@ dist_vapi_DATA = \
 	gtkmozembed.vapi \
 	gtksourceview-2.0.deps \
 	gtksourceview-2.0.vapi \
+	gudev-1.0.vapi \
 	hal.deps \
 	hal.vapi \
 	hildon-1.deps \
diff --git a/vapi/gudev-1.0.vapi b/vapi/gudev-1.0.vapi
new file mode 100644
index 0000000..515d028
--- /dev/null
+++ b/vapi/gudev-1.0.vapi
@@ -0,0 +1,96 @@
+/* gudev-1.0.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "GUdev", lower_case_cprefix = "g_udev_")]
+namespace GUdev {
+	[CCode (cheader_filename = "gudev/gudev.h")]
+	public class Client : GLib.Object {
+		[CCode (has_construct_function = false)]
+		public Client ([CCode (array_length = false)] string[]? subsystems);
+		public unowned GUdev.Device? query_by_device_file (string device_file);
+		public unowned GUdev.Device? query_by_device_number (GUdev.DeviceType type, GUdev.DeviceNumber number);
+		public GLib.List query_by_subsystem (string? subsystem);
+		public unowned GUdev.Device? query_by_subsystem_and_name (string subsystem, string name);
+		public unowned GUdev.Device? query_by_sysfs_path (string sysfs_path);
+		[NoWrapper]
+		public virtual void reserved1 ();
+		[NoWrapper]
+		public virtual void reserved2 ();
+		[NoWrapper]
+		public virtual void reserved3 ();
+		[NoWrapper]
+		public virtual void reserved4 ();
+		[NoWrapper]
+		public virtual void reserved5 ();
+		[NoWrapper]
+		public virtual void reserved6 ();
+		[NoWrapper]
+		public virtual void reserved7 ();
+		[NoWrapper]
+		public virtual void reserved8 ();
+		[NoAccessorMethod]
+		[CCode (array_length = false, array_null_terminated = true)]
+		public string[] subsystems { owned get; construct; }
+		public virtual signal void uevent (string action, GUdev.Device device);
+	}
+	[CCode (cheader_filename = "gudev/gudev.h")]
+	public class Device : GLib.Object {
+		public unowned string get_action ();
+		public unowned string? get_device_file ();
+		[CCode (array_length = false)]
+		public unowned string[] get_device_file_symlinks ();
+		public unowned GUdev.DeviceNumber get_device_number ();
+		public GUdev.DeviceType get_device_type ();
+		public unowned string get_devtype ();
+		public unowned string? get_driver ();
+		public unowned string get_name ();
+		public unowned string get_number ();
+		public unowned GUdev.Device? get_parent ();
+		public unowned GUdev.Device? get_parent_with_subsystem (string subsystem, string? devtype);
+		public unowned string? get_property (string key);
+		public bool get_property_as_boolean (string key);
+		public double get_property_as_double (string key);
+		public int get_property_as_int (string key);
+		[CCode (array_length = false)]
+		public unowned string?[] get_property_as_strv (string key);
+		public uint64 get_property_as_uint64 (string key);
+		[CCode (array_length = false)]
+		public unowned string?[] get_property_keys ();
+		public uint64 get_seqnum ();
+		public unowned string get_subsystem ();
+		public unowned string? get_sysfs_attr (string name);
+		public bool get_sysfs_attr_as_boolean (string name);
+		public double get_sysfs_attr_as_double (string name);
+		public int get_sysfs_attr_as_int (string name);
+		[CCode (array_length = false)]
+		public unowned string?[] get_sysfs_attr_as_strv (string name);
+		public uint64 get_sysfs_attr_as_uint64 (string name);
+		public unowned string get_sysfs_path ();
+		public bool has_property (string key);
+		[NoWrapper]
+		public virtual void reserved1 ();
+		[NoWrapper]
+		public virtual void reserved2 ();
+		[NoWrapper]
+		public virtual void reserved3 ();
+		[NoWrapper]
+		public virtual void reserved4 ();
+		[NoWrapper]
+		public virtual void reserved5 ();
+		[NoWrapper]
+		public virtual void reserved6 ();
+		[NoWrapper]
+		public virtual void reserved7 ();
+		[NoWrapper]
+		public virtual void reserved8 ();
+	}
+	[Compact]
+	[CCode (cheader_filename = "gudev/gudev.h")]
+	public class DeviceNumber {
+	}
+	[CCode (cprefix = "G_UDEV_DEVICE_TYPE_", cheader_filename = "gudev/gudev.h")]
+	public enum DeviceType {
+		NONE,
+		BLOCK,
+		CHAR
+	}
+}
diff --git a/vapi/packages/gudev-1.0/gudev-1.0.defines b/vapi/packages/gudev-1.0/gudev-1.0.defines
new file mode 100644
index 0000000..a8d9aa2
--- /dev/null
+++ b/vapi/packages/gudev-1.0/gudev-1.0.defines
@@ -0,0 +1,3 @@
+-DG_UDEV_API_IS_SUBJECT_TO_CHANGE
+-D_GUDEV_COMPILATION
+-D_GUDEV_INSIDE_GUDEV_H
diff --git a/vapi/packages/gudev-1.0/gudev-1.0.files b/vapi/packages/gudev-1.0/gudev-1.0.files
new file mode 100644
index 0000000..67a6bdf
--- /dev/null
+++ b/vapi/packages/gudev-1.0/gudev-1.0.files
@@ -0,0 +1,2 @@
+include/gudev-1.0/
+lib/libgudev-1.0.so
diff --git a/vapi/packages/gudev-1.0/gudev-1.0.gi b/vapi/packages/gudev-1.0/gudev-1.0.gi
new file mode 100644
index 0000000..58e1ee1
--- /dev/null
+++ b/vapi/packages/gudev-1.0/gudev-1.0.gi
@@ -0,0 +1,299 @@
+<?xml version="1.0"?>
+<api version="1.0">
+	<namespace name="GUdev">
+		<struct name="GUdevDeviceNumber">
+		</struct>
+		<enum name="GUdevDeviceType" type-name="GUdevDeviceType" get-type="g_udev_device_type_get_type">
+			<member name="G_UDEV_DEVICE_TYPE_NONE" value="0"/>
+			<member name="G_UDEV_DEVICE_TYPE_BLOCK" value="98"/>
+			<member name="G_UDEV_DEVICE_TYPE_CHAR" value="99"/>
+		</enum>
+		<object name="GUdevClient" parent="GObject" type-name="GUdevClient" get-type="g_udev_client_get_type">
+			<constructor name="new" symbol="g_udev_client_new">
+				<return-type type="GUdevClient*"/>
+				<parameters>
+					<parameter name="subsystems" type="gchar**"/>
+				</parameters>
+			</constructor>
+			<method name="query_by_device_file" symbol="g_udev_client_query_by_device_file">
+				<return-type type="GUdevDevice*"/>
+				<parameters>
+					<parameter name="client" type="GUdevClient*"/>
+					<parameter name="device_file" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="query_by_device_number" symbol="g_udev_client_query_by_device_number">
+				<return-type type="GUdevDevice*"/>
+				<parameters>
+					<parameter name="client" type="GUdevClient*"/>
+					<parameter name="type" type="GUdevDeviceType"/>
+					<parameter name="number" type="GUdevDeviceNumber"/>
+				</parameters>
+			</method>
+			<method name="query_by_subsystem" symbol="g_udev_client_query_by_subsystem">
+				<return-type type="GList*"/>
+				<parameters>
+					<parameter name="client" type="GUdevClient*"/>
+					<parameter name="subsystem" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="query_by_subsystem_and_name" symbol="g_udev_client_query_by_subsystem_and_name">
+				<return-type type="GUdevDevice*"/>
+				<parameters>
+					<parameter name="client" type="GUdevClient*"/>
+					<parameter name="subsystem" type="gchar*"/>
+					<parameter name="name" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="query_by_sysfs_path" symbol="g_udev_client_query_by_sysfs_path">
+				<return-type type="GUdevDevice*"/>
+				<parameters>
+					<parameter name="client" type="GUdevClient*"/>
+					<parameter name="sysfs_path" type="gchar*"/>
+				</parameters>
+			</method>
+			<property name="subsystems" type="GStrv*" readable="1" writable="1" construct="0" construct-only="1"/>
+			<signal name="uevent" when="LAST">
+				<return-type type="void"/>
+				<parameters>
+					<parameter name="client" type="GUdevClient*"/>
+					<parameter name="action" type="char*"/>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</signal>
+			<vfunc name="reserved1">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved2">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved3">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved4">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved5">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved6">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved7">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved8">
+				<return-type type="void"/>
+			</vfunc>
+		</object>
+		<object name="GUdevDevice" parent="GObject" type-name="GUdevDevice" get-type="g_udev_device_get_type">
+			<method name="get_action" symbol="g_udev_device_get_action">
+				<return-type type="gchar*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_device_file" symbol="g_udev_device_get_device_file">
+				<return-type type="gchar*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_device_file_symlinks" symbol="g_udev_device_get_device_file_symlinks">
+				<return-type type="gchar**"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_device_number" symbol="g_udev_device_get_device_number">
+				<return-type type="GUdevDeviceNumber"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_device_type" symbol="g_udev_device_get_device_type">
+				<return-type type="GUdevDeviceType"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_devtype" symbol="g_udev_device_get_devtype">
+				<return-type type="gchar*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_driver" symbol="g_udev_device_get_driver">
+				<return-type type="gchar*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_name" symbol="g_udev_device_get_name">
+				<return-type type="gchar*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_number" symbol="g_udev_device_get_number">
+				<return-type type="gchar*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_parent" symbol="g_udev_device_get_parent">
+				<return-type type="GUdevDevice*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_parent_with_subsystem" symbol="g_udev_device_get_parent_with_subsystem">
+				<return-type type="GUdevDevice*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="subsystem" type="gchar*"/>
+					<parameter name="devtype" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_property" symbol="g_udev_device_get_property">
+				<return-type type="gchar*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="key" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_property_as_boolean" symbol="g_udev_device_get_property_as_boolean">
+				<return-type type="gboolean"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="key" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_property_as_double" symbol="g_udev_device_get_property_as_double">
+				<return-type type="gdouble"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="key" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_property_as_int" symbol="g_udev_device_get_property_as_int">
+				<return-type type="gint"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="key" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_property_as_strv" symbol="g_udev_device_get_property_as_strv">
+				<return-type type="gchar**"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="key" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_property_as_uint64" symbol="g_udev_device_get_property_as_uint64">
+				<return-type type="guint64"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="key" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_property_keys" symbol="g_udev_device_get_property_keys">
+				<return-type type="gchar**"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_seqnum" symbol="g_udev_device_get_seqnum">
+				<return-type type="guint64"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_subsystem" symbol="g_udev_device_get_subsystem">
+				<return-type type="gchar*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="get_sysfs_attr" symbol="g_udev_device_get_sysfs_attr">
+				<return-type type="gchar*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="name" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_sysfs_attr_as_boolean" symbol="g_udev_device_get_sysfs_attr_as_boolean">
+				<return-type type="gboolean"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="name" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_sysfs_attr_as_double" symbol="g_udev_device_get_sysfs_attr_as_double">
+				<return-type type="gdouble"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="name" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_sysfs_attr_as_int" symbol="g_udev_device_get_sysfs_attr_as_int">
+				<return-type type="gint"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="name" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_sysfs_attr_as_strv" symbol="g_udev_device_get_sysfs_attr_as_strv">
+				<return-type type="gchar**"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="name" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_sysfs_attr_as_uint64" symbol="g_udev_device_get_sysfs_attr_as_uint64">
+				<return-type type="guint64"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="name" type="gchar*"/>
+				</parameters>
+			</method>
+			<method name="get_sysfs_path" symbol="g_udev_device_get_sysfs_path">
+				<return-type type="gchar*"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+				</parameters>
+			</method>
+			<method name="has_property" symbol="g_udev_device_has_property">
+				<return-type type="gboolean"/>
+				<parameters>
+					<parameter name="device" type="GUdevDevice*"/>
+					<parameter name="key" type="gchar*"/>
+				</parameters>
+			</method>
+			<vfunc name="reserved1">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved2">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved3">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved4">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved5">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved6">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved7">
+				<return-type type="void"/>
+			</vfunc>
+			<vfunc name="reserved8">
+				<return-type type="void"/>
+			</vfunc>
+		</object>
+	</namespace>
+</api>
diff --git a/vapi/packages/gudev-1.0/gudev-1.0.metadata b/vapi/packages/gudev-1.0/gudev-1.0.metadata
new file mode 100644
index 0000000..0db19c2
--- /dev/null
+++ b/vapi/packages/gudev-1.0/gudev-1.0.metadata
@@ -0,0 +1,19 @@
+GUdev cheader_filename="gudev/gudev.h" lower_case_cprefix="g_udev_"
+g_udev_client_new.subsystems is_array="1" no_array_length="1" nullable="1"
+g_udev_client_query_by_subsystem.subsystem nullable="1"
+g_udev_client_query_by_subsystem transfer_ownership="1"
+g_udev_client_query_by_device_number nullable="1"
+g_udev_client_query_by_device_file nullable="1"
+g_udev_client_query_by_sysfs_path nullable="1"
+g_udev_client_query_by_subsystem_and_name nullable="1"
+g_udev_device_get_driver nullable="1"
+g_udev_device_get_device_file nullable="1"
+g_udev_device_get_device_file_symlinks transfer_ownership="0" is_array="1" no_array_length="1"
+g_udev_device_get_parent nullable="1"
+g_udev_device_get_parent_with_subsystem.devtype nullable="1"
+g_udev_device_get_parent_with_subsystem nullable="1"
+g_udev_device_get_property_keys nullable="1" transfer_ownership="0" is_array="1" no_array_length="1"
+g_udev_device_get_property nullable="1" transfer_ownership="0"
+g_udev_device_get_property_as_strv nullable="1" transfer_ownership="0" is_array="1" no_array_length="1"
+g_udev_device_get_sysfs_attr nullable="1" transfer_ownership="0"
+g_udev_device_get_sysfs_attr_as_strv nullable="1" transfer_ownership="0" is_array="1" no_array_length="1"
diff --git a/vapi/packages/gudev-1.0/gudev-1.0.namespace b/vapi/packages/gudev-1.0/gudev-1.0.namespace
new file mode 100644
index 0000000..bff9b63
--- /dev/null
+++ b/vapi/packages/gudev-1.0/gudev-1.0.namespace
@@ -0,0 +1 @@
+GUdev



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]