[vala] gudev-1.0: Switch to GIR



commit f2a8ae81184da2e0ffdbeacc868e61e1c5f8c474
Author: Luca Bruno <lucabru src gnome org>
Date:   Mon Aug 22 17:01:37 2011 +0200

    gudev-1.0: Switch to GIR

 vapi/Makefile.am                            |    2 +-
 vapi/gudev-1.0.vapi                         |   87 ++++-----
 vapi/metadata/GUdev-1.0-custom.vala         |    6 +
 vapi/metadata/GUdev-1.0.metadata            |   12 +
 vapi/packages/gudev-1.0/gudev-1.0.defines   |    3 -
 vapi/packages/gudev-1.0/gudev-1.0.deps      |    1 -
 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  |   20 --
 vapi/packages/gudev-1.0/gudev-1.0.namespace |    1 -
 10 files changed, 57 insertions(+), 376 deletions(-)
---
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
index ba21ee3..ad336c8 100644
--- a/vapi/Makefile.am
+++ b/vapi/Makefile.am
@@ -389,7 +389,7 @@ gtksourceview-3.0:
 	$(GENVAPI) --library $(srcdir)/gtksourceview-3.0 --pkg atk --pkg gdk-3.0 --pkg gdk-pixbuf-2.0 --pkg gio-2.0 --pkg gtk+-3.0 --pkg pango --pkg cairo --metadatadir $(METADATADIR) $(GIRDIR)/GtkSource-3.0.gir
 
 gudev-1.0:
-	$(GENVAPI) --library $(srcdir)/gudev-1.0 $(PACKAGESDIR)/gudev-1.0/gudev-1.0.gi
+	$(GENVAPI) --library $(srcdir)/gudev-1.0 --metadatadir $(METADATADIR) $(METADATADIR)/GUdev-1.0-custom.vala $(GIRDIR)/GUdev-1.0.gir
 
 hildon-1:
 	$(GENVAPI) --library $(srcdir)/hildon-1 $(PACKAGESDIR)/hildon-1/hildon-1-custom.vala $(PACKAGESDIR)/hildon-1/hildon-1.gi
diff --git a/vapi/gudev-1.0.vapi b/vapi/gudev-1.0.vapi
index fff0368..c21e15e 100644
--- a/vapi/gudev-1.0.vapi
+++ b/vapi/gudev-1.0.vapi
@@ -1,89 +1,78 @@
 /* gudev-1.0.vapi generated by vapigen, do not modify. */
 
-[CCode (lower_case_cprefix = "g_udev_")]
+[CCode (cprefix = "GUdev", gir_namespace = "GUdev", gir_version = "1.0", lower_case_cprefix = "g_udev_")]
 namespace GUdev {
-	[CCode (cheader_filename = "gudev/gudev.h")]
+	[CCode (cheader_filename = "gudev/gudev.h", type_id = "g_udev_client_get_type ()")]
 	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<GUdev.Device> 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 ();
+		public Client ([CCode (array_length = false, array_null_terminated = true)] string[]? subsystems);
+		public GUdev.Device? query_by_device_file (string device_file);
+		public GUdev.Device? query_by_device_number (GUdev.DeviceType type, GUdev.DeviceNumber number);
+		public GLib.List<GUdev.Device>? query_by_subsystem (string? subsystem);
+		public GUdev.Device? query_by_subsystem_and_name (string subsystem, string name);
+		public GUdev.Device? query_by_sysfs_path (string sysfs_path);
 		[CCode (array_length = false, array_null_terminated = true)]
 		[NoAccessorMethod]
 		public string[] subsystems { owned get; construct; }
 		public virtual signal void uevent (string action, GUdev.Device device);
 	}
-	[CCode (cheader_filename = "gudev/gudev.h")]
+	[CCode (cheader_filename = "gudev/gudev.h", type_id = "g_udev_device_get_type ()")]
 	public class Device : GLib.Object {
 		[CCode (has_construct_function = false)]
 		protected Device ();
 		public unowned string get_action ();
 		public unowned string? get_device_file ();
-		[CCode (array_length = false)]
+		[CCode (array_length = false, array_null_terminated = true)]
 		public unowned string[] get_device_file_symlinks ();
 		public GUdev.DeviceNumber get_device_number ();
 		public GUdev.DeviceType get_device_type ();
 		public unowned string get_devtype ();
 		public unowned string? get_driver ();
+		public bool get_is_initialized ();
 		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 GUdev.Device? get_parent ();
+		public 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);
+		[CCode (array_length = false, array_null_terminated = true)]
+		public unowned string[]? get_property_as_strv (string key);
 		public uint64 get_property_as_uint64 (string key);
 		[CCode (array_length = false, array_null_terminated = true)]
-		public unowned string?[] get_property_keys ();
+		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);
+		[CCode (array_length = false, array_null_terminated = true)]
+		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 ();
+		[CCode (array_length = false, array_null_terminated = true)]
+		public unowned string[] get_tags ();
+		public uint64 get_usec_since_initialized ();
 		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 ();
+	}
+	[CCode (cheader_filename = "gudev/gudev.h", type_id = "g_udev_enumerator_get_type ()")]
+	public class Enumerator : GLib.Object {
+		[CCode (has_construct_function = false)]
+		public Enumerator (GUdev.Client client);
+		public unowned GUdev.Enumerator add_match_is_initialized ();
+		public unowned GUdev.Enumerator add_match_name (string name);
+		public unowned GUdev.Enumerator add_match_property (string name, string value);
+		public unowned GUdev.Enumerator add_match_subsystem (string subsystem);
+		public unowned GUdev.Enumerator add_match_sysfs_attr (string name, string value);
+		public unowned GUdev.Enumerator add_match_tag (string tag);
+		public unowned GUdev.Enumerator add_nomatch_subsystem (string subsystem);
+		public unowned GUdev.Enumerator add_nomatch_sysfs_attr (string name, string value);
+		public unowned GUdev.Enumerator add_sysfs_path (string sysfs_path);
+		public GLib.List<GUdev.Device> execute ();
+		[NoAccessorMethod]
+		public GUdev.Client client { owned get; construct; }
 	}
 	[CCode (cheader_filename = "gudev/gudev.h")]
 	[SimpleType]
diff --git a/vapi/metadata/GUdev-1.0-custom.vala b/vapi/metadata/GUdev-1.0-custom.vala
new file mode 100644
index 0000000..13337d2
--- /dev/null
+++ b/vapi/metadata/GUdev-1.0-custom.vala
@@ -0,0 +1,6 @@
+namespace GUdev {
+	[CCode (cheader_filename = "gudev/gudev.h")]
+	[SimpleType]
+	public struct DeviceNumber : Posix.dev_t {
+	}
+}
diff --git a/vapi/metadata/GUdev-1.0.metadata b/vapi/metadata/GUdev-1.0.metadata
new file mode 100644
index 0000000..a8bf2b7
--- /dev/null
+++ b/vapi/metadata/GUdev-1.0.metadata
@@ -0,0 +1,12 @@
+// Report upstream
+GUdev cheader_filename="gudev/gudev.h"
+Client.query_by* nullable
+Device
+	.get_device_file nullable
+	.get_driver nullable
+	.get_parent* skip=false nullable unowned=false
+	.get_property nullable
+	.get_property_as_strv nullable
+	.get_sysfs_attr nullable
+	.get_sysfs_attr_as_strv nullable
+DeviceNumber skip



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