/* umockdev-1.0.vapi generated by valac 0.56.19, do not modify. */

[CCode (gir_namespace = "UMockdev", gir_version = "1.0")]
namespace UMockdev {
	[CCode (cheader_filename = "umockdev.h")]
	public class IoctlBase : GLib.Object {
		public IoctlBase ();
		public virtual bool handle_ioctl (UMockdev.IoctlClient client);
		public virtual bool handle_read (UMockdev.IoctlClient client);
		public virtual bool handle_write (UMockdev.IoctlClient client);
		public virtual signal void client_connected (UMockdev.IoctlClient client);
		public virtual signal void client_vanished (UMockdev.IoctlClient client);
	}
	[CCode (cheader_filename = "umockdev.h")]
	public class IoctlClient : GLib.Object {
		public void abort ();
		public void complete (long res, int errno_);
		public int execute (out int errno_) throws GLib.IOError;
		[Description (blurb = "The ioctl argument, for read/write the passed buffer", nick = "argument")]
		public UMockdev.IoctlData arg { get; }
		[Description (blurb = "Whether the client is still connected", nick = "connected")]
		public bool connected { get; }
		[Description (blurb = "The device node the client opened", nick = "device node")]
		public string devnode { get; }
		[Description (blurb = "The current ioctl request", nick = "request")]
		public ulong request { get; }
	}
	[CCode (cheader_filename = "umockdev.h")]
	public class IoctlData : GLib.Object {
		public ulong client_addr;
		[CCode (array_length_cname = "data_len")]
		public uint8[] data;
		[CCode (cname = "umockdev_ioctl_data_ref")]
		public new UMockdev.IoctlData? compat_ref ();
		[CCode (cname = "umockdev_ioctl_data_unref")]
		public new void compat_unref ();
		public bool reload () throws GLib.IOError;
		public UMockdev.IoctlData? resolve (size_t offset, size_t len) throws GLib.IOError;
		public void retrieve (out uint8[] read_data);
		public bool set_ptr (size_t offset, UMockdev.IoctlData child);
		public void update (size_t offset, uint8[] new_data);
	}
	[CCode (cheader_filename = "umockdev.h")]
	public class Testbed : GLib.Object {
		public Testbed ();
		public string? add_device (string subsystem, string name, string? parent, ...);
		public string? add_devicev (string subsystem, string name, string? parent, [CCode (array_length = false, array_null_terminated = true)] string[] attributes, [CCode (array_length = false, array_null_terminated = true)] string[] properties);
		public bool add_from_file (string path) throws UMockdev.Error, GLib.FileError;
		public bool add_from_string (string data) throws UMockdev.Error;
		public bool attach_ioctl (string dev, UMockdev.IoctlBase handler) throws GLib.Error;
		public void clear ();
		public bool detach_ioctl (string dev) throws GLib.Error;
		public void disable ();
		public void enable ();
		public int get_dev_fd (string devnode);
		public new string? get_property (string devpath, string name);
		public string get_root_dir ();
		public string get_sys_dir ();
		public bool load_evemu_events (string? dev, string eventsfile) throws GLib.Error, GLib.FileError, GLib.IOError, GLib.RegexError;
		public bool load_evemu_events_from_string (string? dev, string events) throws GLib.Error, GLib.FileError, GLib.IOError, GLib.RegexError;
		public bool load_ioctl (string? dev, string recordfile) throws GLib.Error, GLib.FileError, GLib.IOError, GLib.RegexError;
		public bool load_pcap (string sysfs, string recordfile) throws GLib.Error, GLib.FileError, GLib.IOError, GLib.RegexError;
		public bool load_script (string? dev, string recordfile) throws GLib.Error, GLib.FileError, GLib.IOError, GLib.RegexError;
		public bool load_script_from_string (string? dev, string script) throws GLib.Error, GLib.IOError, GLib.RegexError;
		public bool load_socket_script (string path, int type, string recordfile) throws GLib.FileError;
		public void remove_device (string syspath);
		public void set_attribute (string devpath, string name, string value);
		public void set_attribute_binary (string devpath, string name, uint8[] value);
		public void set_attribute_hex (string devpath, string name, uint value);
		public void set_attribute_int (string devpath, string name, int value);
		public void set_attribute_link (string devpath, string name, string value);
		public new void set_property (string devpath, string name, string value);
		public void set_property_hex (string devpath, string name, uint value);
		public void set_property_int (string devpath, string name, int value);
		public void uevent (string devpath, string action);
		public bool wait_script (string dev) throws GLib.FileError;
	}
	[CCode (cheader_filename = "umockdev.h")]
	public errordomain Error {
		PARSE,
		VALUE
	}
	[CCode (cheader_filename = "umockdev.h")]
	public static bool in_mock_environment ();
}
