/* plugin.c generated by valac, the Vala compiler
 * generated from plugin.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <stdio.h>


#define TYPE_TEST_PLUGIN (test_plugin_get_type ())
#define TEST_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEST_PLUGIN, TestPlugin))
#define IS_TEST_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEST_PLUGIN))
#define TEST_PLUGIN_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_TEST_PLUGIN, TestPluginIface))

typedef struct _TestPlugin TestPlugin;
typedef struct _TestPluginIface TestPluginIface;

#define TYPE_MY_PLUGIN (my_plugin_get_type ())
#define MY_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MY_PLUGIN, MyPlugin))
#define MY_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MY_PLUGIN, MyPluginClass))
#define IS_MY_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MY_PLUGIN))
#define IS_MY_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MY_PLUGIN))
#define MY_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MY_PLUGIN, MyPluginClass))

typedef struct _MyPlugin MyPlugin;
typedef struct _MyPluginClass MyPluginClass;
typedef struct _MyPluginPrivate MyPluginPrivate;

struct _TestPluginIface {
	GTypeInterface parent_iface;
	void (*hello) (TestPlugin* self);
};

struct _MyPlugin {
	GObject parent_instance;
	MyPluginPrivate * priv;
};

struct _MyPluginClass {
	GObjectClass parent_class;
};


static gpointer my_plugin_parent_class = NULL;
static TestPluginIface* my_plugin_test_plugin_parent_iface = NULL;
static GType my_plugin_type_id = 0;

GType test_plugin_get_type (void);
GType test_plugin_register_type (GTypeModule * module);
GType my_plugin_get_type (void);
GType my_plugin_register_type (GTypeModule * module);
enum  {
	MY_PLUGIN_DUMMY_PROPERTY
};
static void my_plugin_real_hello (TestPlugin* base);
MyPlugin* my_plugin_new (void);
MyPlugin* my_plugin_construct (GType object_type);
GType register_plugin (GTypeModule* module);



static void my_plugin_real_hello (TestPlugin* base) {
	MyPlugin * self;
	self = (MyPlugin*) base;
	fprintf (stdout, "Hello world!\n");
}


MyPlugin* my_plugin_construct (GType object_type) {
	MyPlugin * self;
	self = (MyPlugin*) g_object_new (object_type, NULL);
	return self;
}


MyPlugin* my_plugin_new (void) {
	return my_plugin_construct (TYPE_MY_PLUGIN);
}


static void my_plugin_class_init (MyPluginClass * klass) {
	my_plugin_parent_class = g_type_class_peek_parent (klass);
}


static void my_plugin_test_plugin_interface_init (TestPluginIface * iface) {
	my_plugin_test_plugin_parent_iface = g_type_interface_peek_parent (iface);
	iface->hello = my_plugin_real_hello;
}


static void my_plugin_instance_init (MyPlugin * self) {
}


GType my_plugin_get_type (void) {
	return my_plugin_type_id;
}


GType my_plugin_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (MyPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) my_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MyPlugin), 0, (GInstanceInitFunc) my_plugin_instance_init, NULL };
	static const GInterfaceInfo test_plugin_info = { (GInterfaceInitFunc) my_plugin_test_plugin_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	my_plugin_type_id = g_type_module_register_type (module, G_TYPE_OBJECT, "MyPlugin", &g_define_type_info, 0);
	g_type_module_add_interface (module, my_plugin_type_id, TYPE_TEST_PLUGIN, &test_plugin_info);
	return my_plugin_type_id;
}


GType register_plugin (GTypeModule* module) {
	GType result = 0UL;
	g_return_val_if_fail (module != NULL, 0UL);
	test_plugin_register_type (module);
	my_plugin_register_type (module);
	result = TYPE_MY_PLUGIN;
	return result;
}




