/* umockdev.h generated by valac 0.56.19, the Vala compiler, do not modify */

#ifndef __UMOCKDEV_H__
#define __UMOCKDEV_H__

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>

G_BEGIN_DECLS

#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define UMOCKDEV_TYPE_TESTBED (umockdev_testbed_get_type ())
#define UMOCKDEV_TESTBED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UMOCKDEV_TYPE_TESTBED, UMockdevTestbed))
#define UMOCKDEV_TESTBED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UMOCKDEV_TYPE_TESTBED, UMockdevTestbedClass))
#define UMOCKDEV_IS_TESTBED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UMOCKDEV_TYPE_TESTBED))
#define UMOCKDEV_IS_TESTBED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UMOCKDEV_TYPE_TESTBED))
#define UMOCKDEV_TESTBED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UMOCKDEV_TYPE_TESTBED, UMockdevTestbedClass))

typedef struct _UMockdevTestbed UMockdevTestbed;
typedef struct _UMockdevTestbedClass UMockdevTestbedClass;
typedef struct _UMockdevTestbedPrivate UMockdevTestbedPrivate;

#define UMOCKDEV_TYPE_ERROR (umockdev_error_get_type ())

#define UMOCKDEV_TYPE_IOCTL_BASE (umockdev_ioctl_base_get_type ())
#define UMOCKDEV_IOCTL_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UMOCKDEV_TYPE_IOCTL_BASE, UMockdevIoctlBase))
#define UMOCKDEV_IOCTL_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UMOCKDEV_TYPE_IOCTL_BASE, UMockdevIoctlBaseClass))
#define UMOCKDEV_IS_IOCTL_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UMOCKDEV_TYPE_IOCTL_BASE))
#define UMOCKDEV_IS_IOCTL_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UMOCKDEV_TYPE_IOCTL_BASE))
#define UMOCKDEV_IOCTL_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UMOCKDEV_TYPE_IOCTL_BASE, UMockdevIoctlBaseClass))

typedef struct _UMockdevIoctlBase UMockdevIoctlBase;
typedef struct _UMockdevIoctlBaseClass UMockdevIoctlBaseClass;

#define UMOCKDEV_TYPE_IOCTL_DATA (umockdev_ioctl_data_get_type ())
#define UMOCKDEV_IOCTL_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UMOCKDEV_TYPE_IOCTL_DATA, UMockdevIoctlData))
#define UMOCKDEV_IOCTL_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UMOCKDEV_TYPE_IOCTL_DATA, UMockdevIoctlDataClass))
#define UMOCKDEV_IS_IOCTL_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UMOCKDEV_TYPE_IOCTL_DATA))
#define UMOCKDEV_IS_IOCTL_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UMOCKDEV_TYPE_IOCTL_DATA))
#define UMOCKDEV_IOCTL_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UMOCKDEV_TYPE_IOCTL_DATA, UMockdevIoctlDataClass))

typedef struct _UMockdevIoctlData UMockdevIoctlData;
typedef struct _UMockdevIoctlDataClass UMockdevIoctlDataClass;
typedef struct _UMockdevIoctlDataPrivate UMockdevIoctlDataPrivate;

#define UMOCKDEV_TYPE_IOCTL_CLIENT (umockdev_ioctl_client_get_type ())
#define UMOCKDEV_IOCTL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UMOCKDEV_TYPE_IOCTL_CLIENT, UMockdevIoctlClient))
#define UMOCKDEV_IOCTL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UMOCKDEV_TYPE_IOCTL_CLIENT, UMockdevIoctlClientClass))
#define UMOCKDEV_IS_IOCTL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UMOCKDEV_TYPE_IOCTL_CLIENT))
#define UMOCKDEV_IS_IOCTL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UMOCKDEV_TYPE_IOCTL_CLIENT))
#define UMOCKDEV_IOCTL_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UMOCKDEV_TYPE_IOCTL_CLIENT, UMockdevIoctlClientClass))

typedef struct _UMockdevIoctlClient UMockdevIoctlClient;
typedef struct _UMockdevIoctlClientClass UMockdevIoctlClientClass;
typedef struct _UMockdevIoctlClientPrivate UMockdevIoctlClientPrivate;
typedef struct _UMockdevIoctlBasePrivate UMockdevIoctlBasePrivate;

struct _UMockdevTestbed {
	GObject parent_instance;
	UMockdevTestbedPrivate * priv;
};

struct _UMockdevTestbedClass {
	GObjectClass parent_class;
};

typedef enum  {
	UMOCKDEV_ERROR_PARSE,
	UMOCKDEV_ERROR_VALUE
} UMockdevError;
#define UMOCKDEV_ERROR umockdev_error_quark ()

struct _UMockdevIoctlData {
	GObject parent_instance;
	guint8* data;
	gint data_len;
	gulong client_addr;
	UMockdevIoctlDataPrivate * priv;
};

struct _UMockdevIoctlDataClass {
	GObjectClass parent_class;
};

struct _UMockdevIoctlClient {
	GObject parent_instance;
	UMockdevIoctlClientPrivate * priv;
};

struct _UMockdevIoctlClientClass {
	GObjectClass parent_class;
};

struct _UMockdevIoctlBase {
	GObject parent_instance;
	UMockdevIoctlBasePrivate * priv;
};

struct _UMockdevIoctlBaseClass {
	GObjectClass parent_class;
	gboolean (*handle_ioctl) (UMockdevIoctlBase* self, UMockdevIoctlClient* client);
	gboolean (*handle_read) (UMockdevIoctlBase* self, UMockdevIoctlClient* client);
	gboolean (*handle_write) (UMockdevIoctlBase* self, UMockdevIoctlClient* client);
	void (*client_connected) (UMockdevIoctlBase* self, UMockdevIoctlClient* client);
	void (*client_vanished) (UMockdevIoctlBase* self, UMockdevIoctlClient* client);
};

VALA_EXTERN GType umockdev_testbed_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UMockdevTestbed, g_object_unref)
VALA_EXTERN UMockdevTestbed* umockdev_testbed_new (void);
VALA_EXTERN UMockdevTestbed* umockdev_testbed_construct (GType object_type);
VALA_EXTERN gchar* umockdev_testbed_get_root_dir (UMockdevTestbed* self);
VALA_EXTERN gchar* umockdev_testbed_get_sys_dir (UMockdevTestbed* self);
VALA_EXTERN void umockdev_testbed_set_attribute (UMockdevTestbed* self,
                                     const gchar* devpath,
                                     const gchar* name,
                                     const gchar* value);
VALA_EXTERN void umockdev_testbed_set_attribute_binary (UMockdevTestbed* self,
                                            const gchar* devpath,
                                            const gchar* name,
                                            guint8* value,
                                            gint value_length1);
VALA_EXTERN void umockdev_testbed_set_attribute_int (UMockdevTestbed* self,
                                         const gchar* devpath,
                                         const gchar* name,
                                         gint value);
VALA_EXTERN void umockdev_testbed_set_attribute_hex (UMockdevTestbed* self,
                                         const gchar* devpath,
                                         const gchar* name,
                                         guint value);
VALA_EXTERN void umockdev_testbed_set_attribute_link (UMockdevTestbed* self,
                                          const gchar* devpath,
                                          const gchar* name,
                                          const gchar* value);
VALA_EXTERN gchar* umockdev_testbed_get_property (UMockdevTestbed* self,
                                      const gchar* devpath,
                                      const gchar* name);
VALA_EXTERN void umockdev_testbed_set_property (UMockdevTestbed* self,
                                    const gchar* devpath,
                                    const gchar* name,
                                    const gchar* value);
VALA_EXTERN void umockdev_testbed_set_property_int (UMockdevTestbed* self,
                                        const gchar* devpath,
                                        const gchar* name,
                                        gint value);
VALA_EXTERN void umockdev_testbed_set_property_hex (UMockdevTestbed* self,
                                        const gchar* devpath,
                                        const gchar* name,
                                        guint value);
VALA_EXTERN gchar* umockdev_testbed_add_devicev (UMockdevTestbed* self,
                                     const gchar* subsystem,
                                     const gchar* name,
                                     const gchar* parent,
                                     gchar** attributes,
                                     gchar** properties);
VALA_EXTERN gchar* umockdev_testbed_add_device (UMockdevTestbed* self,
                                    const gchar* subsystem,
                                    const gchar* name,
                                    const gchar* parent,
                                    ...);
VALA_EXTERN void umockdev_testbed_remove_device (UMockdevTestbed* self,
                                     const gchar* syspath);
VALA_EXTERN GQuark umockdev_error_quark (void);
VALA_EXTERN GType umockdev_error_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gboolean umockdev_testbed_add_from_string (UMockdevTestbed* self,
                                           const gchar* data,
                                           GError** error);
VALA_EXTERN gboolean umockdev_testbed_add_from_file (UMockdevTestbed* self,
                                         const gchar* path,
                                         GError** error);
VALA_EXTERN void umockdev_testbed_uevent (UMockdevTestbed* self,
                              const gchar* devpath,
                              const gchar* action);
VALA_EXTERN GType umockdev_ioctl_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UMockdevIoctlBase, g_object_unref)
VALA_EXTERN gboolean umockdev_testbed_attach_ioctl (UMockdevTestbed* self,
                                        const gchar* dev,
                                        UMockdevIoctlBase* handler,
                                        GError** error);
VALA_EXTERN gboolean umockdev_testbed_detach_ioctl (UMockdevTestbed* self,
                                        const gchar* dev,
                                        GError** error);
VALA_EXTERN gboolean umockdev_testbed_load_ioctl (UMockdevTestbed* self,
                                      const gchar* dev,
                                      const gchar* recordfile,
                                      GError** error);
VALA_EXTERN gboolean umockdev_testbed_load_pcap (UMockdevTestbed* self,
                                     const gchar* sysfs,
                                     const gchar* recordfile,
                                     GError** error);
VALA_EXTERN gboolean umockdev_testbed_load_script (UMockdevTestbed* self,
                                       const gchar* dev,
                                       const gchar* recordfile,
                                       GError** error);
VALA_EXTERN gboolean umockdev_testbed_load_script_from_string (UMockdevTestbed* self,
                                                   const gchar* dev,
                                                   const gchar* script,
                                                   GError** error);
VALA_EXTERN gboolean umockdev_testbed_wait_script (UMockdevTestbed* self,
                                       const gchar* dev,
                                       GError** error);
VALA_EXTERN gboolean umockdev_testbed_load_socket_script (UMockdevTestbed* self,
                                              const gchar* path,
                                              gint type,
                                              const gchar* recordfile,
                                              GError** error);
VALA_EXTERN gboolean umockdev_testbed_load_evemu_events (UMockdevTestbed* self,
                                             const gchar* dev,
                                             const gchar* eventsfile,
                                             GError** error);
VALA_EXTERN gboolean umockdev_testbed_load_evemu_events_from_string (UMockdevTestbed* self,
                                                         const gchar* dev,
                                                         const gchar* events,
                                                         GError** error);
VALA_EXTERN void umockdev_testbed_disable (UMockdevTestbed* self);
VALA_EXTERN void umockdev_testbed_enable (UMockdevTestbed* self);
VALA_EXTERN void umockdev_testbed_clear (UMockdevTestbed* self);
VALA_EXTERN gint umockdev_testbed_get_dev_fd (UMockdevTestbed* self,
                                  const gchar* devnode);
VALA_EXTERN gboolean umockdev_in_mock_environment (void);
VALA_EXTERN GType umockdev_ioctl_data_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UMockdevIoctlData, g_object_unref)
VALA_EXTERN UMockdevIoctlData* umockdev_ioctl_data_ref (UMockdevIoctlData* self);
VALA_EXTERN void umockdev_ioctl_data_unref (UMockdevIoctlData* self);
VALA_EXTERN UMockdevIoctlData* umockdev_ioctl_data_resolve (UMockdevIoctlData* self,
                                                gsize offset,
                                                gsize len,
                                                GError** error);
VALA_EXTERN gboolean umockdev_ioctl_data_set_ptr (UMockdevIoctlData* self,
                                      gsize offset,
                                      UMockdevIoctlData* child);
VALA_EXTERN gboolean umockdev_ioctl_data_reload (UMockdevIoctlData* self,
                                     GError** error);
VALA_EXTERN void umockdev_ioctl_data_update (UMockdevIoctlData* self,
                                 gsize offset,
                                 guint8* new_data,
                                 gint new_data_length1);
VALA_EXTERN void umockdev_ioctl_data_retrieve (UMockdevIoctlData* self,
                                   guint8** read_data,
                                   gint* read_data_length1);
VALA_EXTERN GType umockdev_ioctl_client_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (UMockdevIoctlClient, g_object_unref)
VALA_EXTERN const gchar* umockdev_ioctl_client_get_devnode (UMockdevIoctlClient* self);
VALA_EXTERN gulong umockdev_ioctl_client_get_request (UMockdevIoctlClient* self);
VALA_EXTERN UMockdevIoctlData* umockdev_ioctl_client_get_arg (UMockdevIoctlClient* self);
VALA_EXTERN gboolean umockdev_ioctl_client_get_connected (UMockdevIoctlClient* self);
VALA_EXTERN gint umockdev_ioctl_client_execute (UMockdevIoctlClient* self,
                                    gint* errno_,
                                    GError** error);
VALA_EXTERN void umockdev_ioctl_client_complete (UMockdevIoctlClient* self,
                                     glong res,
                                     gint errno_);
VALA_EXTERN void umockdev_ioctl_client_abort (UMockdevIoctlClient* self);
VALA_EXTERN gboolean umockdev_ioctl_base_handle_ioctl (UMockdevIoctlBase* self,
                                           UMockdevIoctlClient* client);
VALA_EXTERN gboolean umockdev_ioctl_base_handle_read (UMockdevIoctlBase* self,
                                          UMockdevIoctlClient* client);
VALA_EXTERN gboolean umockdev_ioctl_base_handle_write (UMockdevIoctlBase* self,
                                           UMockdevIoctlClient* client);
VALA_EXTERN UMockdevIoctlBase* umockdev_ioctl_base_new (void);
VALA_EXTERN UMockdevIoctlBase* umockdev_ioctl_base_construct (GType object_type);

G_END_DECLS

#endif
