summaryrefslogtreecommitdiff
path: root/vapi/gudev-1.0.vapi
blob: 1d72e54b0678ec5c3db4ccf51c7731736a03e81b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/* gudev-1.0.vapi generated by vapigen, do not modify. */

[CCode (cprefix = "GUdev", gir_namespace = "GUdev", gir_version = "1.0", lower_case_cprefix = "g_udev_")]
namespace GUdev {
	[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, 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", 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, 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 ();
		[Version (since = "165")]
		public bool get_is_initialized ();
		public unowned string get_name ();
		public unowned string get_number ();
		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, 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 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);
		[Version (since = "234")]
		public bool get_sysfs_attr_as_boolean_uncached (string name);
		public double get_sysfs_attr_as_double (string name);
		[Version (since = "234")]
		public double get_sysfs_attr_as_double_uncached (string name);
		public int get_sysfs_attr_as_int (string name);
		[Version (since = "234")]
		public int get_sysfs_attr_as_int_uncached (string name);
		[CCode (array_length = false, array_null_terminated = true)]
		public unowned string[]? get_sysfs_attr_as_strv (string name);
		[CCode (array_length = false, array_null_terminated = true)]
		[Version (since = "234")]
		public unowned string[]? get_sysfs_attr_as_strv_uncached (string name);
		public uint64 get_sysfs_attr_as_uint64 (string name);
		[Version (since = "234")]
		public uint64 get_sysfs_attr_as_uint64_uncached (string name);
		[CCode (array_length = false, array_null_terminated = true)]
		public unowned string[] get_sysfs_attr_keys ();
		[Version (since = "234")]
		public unowned string? get_sysfs_attr_uncached (string name);
		public unowned string get_sysfs_path ();
		[CCode (array_length = false, array_null_terminated = true)]
		[Version (since = "165")]
		public unowned string[] get_tags ();
		[Version (since = "165")]
		public uint64 get_usec_since_initialized ();
		public bool has_property (string key);
		public bool has_sysfs_attr (string key);
		[Version (since = "234")]
		public bool has_sysfs_attr_uncached (string key);
	}
	[CCode (cheader_filename = "gudev/gudev.h", type_id = "g_udev_enumerator_get_type ()")]
	[Version (since = "165")]
	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]
	public struct DeviceNumber : Posix.dev_t {
	}
	[CCode (cheader_filename = "gudev/gudev.h", cprefix = "G_UDEV_DEVICE_TYPE_", type_id = "g_udev_device_type_get_type ()")]
	public enum DeviceType {
		NONE,
		BLOCK,
		CHAR
	}
}