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

/*
 * Copyright (C) 2011-2012 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <fsosystem.h>
#include <stdlib.h>
#include <string.h>




void test_modules_insert (void);
void test_modules_remove (void);
void test_modules_probe (void);
void _vala_main (gchar** args, int args_length1);
static void _test_modules_insert_gcallback (void);
static void _test_modules_remove_gcallback (void);
static void _test_modules_probe_gcallback (void);


void test_modules_insert (void) {
	GError * _inner_error_ = NULL;
	fso_framework_kernel_insertModule ("/lib/modules/2.6.35-23-generic/kernel/drivers/block/floppy.ko", NULL, &_inner_error_);
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


void test_modules_remove (void) {
	GError * _inner_error_ = NULL;
	fso_framework_kernel_removeModule ("/lib/modules/2.6.35-23-generic/kernel/drivers/block/floppy.ko", FALSE, FALSE, &_inner_error_);
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


void test_modules_probe (void) {
	fso_framework_kernel_probeModule ("mtdblock", NULL);
}


static void _test_modules_insert_gcallback (void) {
	test_modules_insert ();
}


static void _test_modules_remove_gcallback (void) {
	test_modules_remove ();
}


static void _test_modules_probe_gcallback (void) {
	test_modules_probe ();
}


void _vala_main (gchar** args, int args_length1) {
	g_test_init (&args_length1, &args, NULL);
	g_test_add_func ("/Modules/Insert", _test_modules_insert_gcallback);
	g_test_add_func ("/Modules/Remove", _test_modules_remove_gcallback);
	g_test_add_func ("/Modules/Probe", _test_modules_probe_gcallback);
	g_test_run ();
}


int main (int argc, char ** argv) {
	g_type_init ();
	_vala_main (argv, argc);
	return 0;
}



