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


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


#define FSO_DEVICE_TYPE_BASE_ACCELEROMETER (fso_device_base_accelerometer_get_type ())
#define FSO_DEVICE_BASE_ACCELEROMETER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_DEVICE_TYPE_BASE_ACCELEROMETER, FsoDeviceBaseAccelerometer))
#define FSO_DEVICE_BASE_ACCELEROMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_DEVICE_TYPE_BASE_ACCELEROMETER, FsoDeviceBaseAccelerometerClass))
#define FSO_DEVICE_IS_BASE_ACCELEROMETER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_DEVICE_TYPE_BASE_ACCELEROMETER))
#define FSO_DEVICE_IS_BASE_ACCELEROMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_DEVICE_TYPE_BASE_ACCELEROMETER))
#define FSO_DEVICE_BASE_ACCELEROMETER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_DEVICE_TYPE_BASE_ACCELEROMETER, FsoDeviceBaseAccelerometerClass))

typedef struct _FsoDeviceBaseAccelerometer FsoDeviceBaseAccelerometer;
typedef struct _FsoDeviceBaseAccelerometerClass FsoDeviceBaseAccelerometerClass;
typedef struct _FsoDeviceBaseAccelerometerPrivate FsoDeviceBaseAccelerometerPrivate;

struct _FsoDeviceBaseAccelerometer {
	FsoFrameworkAbstractObject parent_instance;
	FsoDeviceBaseAccelerometerPrivate * priv;
};

struct _FsoDeviceBaseAccelerometerClass {
	FsoFrameworkAbstractObjectClass parent_class;
	void (*start) (FsoDeviceBaseAccelerometer* self);
	void (*stop) (FsoDeviceBaseAccelerometer* self);
};


static gpointer fso_device_base_accelerometer_parent_class = NULL;

GType fso_device_base_accelerometer_get_type (void) G_GNUC_CONST;
enum  {
	FSO_DEVICE_BASE_ACCELEROMETER_DUMMY_PROPERTY
};
void fso_device_base_accelerometer_setThreshold (FsoDeviceBaseAccelerometer* self, gint mg);
void fso_device_base_accelerometer_setRate (FsoDeviceBaseAccelerometer* self, guint ms);
void fso_device_base_accelerometer_start (FsoDeviceBaseAccelerometer* self);
static void fso_device_base_accelerometer_real_start (FsoDeviceBaseAccelerometer* self);
void fso_device_base_accelerometer_stop (FsoDeviceBaseAccelerometer* self);
static void fso_device_base_accelerometer_real_stop (FsoDeviceBaseAccelerometer* self);
static gchar* fso_device_base_accelerometer_real_repr (FsoFrameworkAbstractObject* base);
FsoDeviceBaseAccelerometer* fso_device_base_accelerometer_construct (GType object_type);
static void g_cclosure_user_marshal_VOID__INT_INT_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);


void fso_device_base_accelerometer_setThreshold (FsoDeviceBaseAccelerometer* self, gint mg) {
	g_return_if_fail (self != NULL);
}


void fso_device_base_accelerometer_setRate (FsoDeviceBaseAccelerometer* self, guint ms) {
	g_return_if_fail (self != NULL);
}


static void fso_device_base_accelerometer_real_start (FsoDeviceBaseAccelerometer* self) {
	g_critical ("Type `%s' does not implement abstract method `fso_device_base_accelerometer_start'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}


void fso_device_base_accelerometer_start (FsoDeviceBaseAccelerometer* self) {
	g_return_if_fail (self != NULL);
	FSO_DEVICE_BASE_ACCELEROMETER_GET_CLASS (self)->start (self);
}


static void fso_device_base_accelerometer_real_stop (FsoDeviceBaseAccelerometer* self) {
	g_critical ("Type `%s' does not implement abstract method `fso_device_base_accelerometer_stop'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}


void fso_device_base_accelerometer_stop (FsoDeviceBaseAccelerometer* self) {
	g_return_if_fail (self != NULL);
	FSO_DEVICE_BASE_ACCELEROMETER_GET_CLASS (self)->stop (self);
}


static gchar* fso_device_base_accelerometer_real_repr (FsoFrameworkAbstractObject* base) {
	FsoDeviceBaseAccelerometer * self;
	gchar* result = NULL;
	gchar* _tmp0_;
	self = (FsoDeviceBaseAccelerometer*) base;
	_tmp0_ = g_strdup ("<>");
	result = _tmp0_;
	return result;
}


FsoDeviceBaseAccelerometer* fso_device_base_accelerometer_construct (GType object_type) {
	FsoDeviceBaseAccelerometer * self = NULL;
	self = (FsoDeviceBaseAccelerometer*) fso_framework_abstract_object_construct (object_type);
	return self;
}


static void g_cclosure_user_marshal_VOID__INT_INT_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__INT_INT_INT) (gpointer data1, gint arg_1, gint arg_2, gint arg_3, gpointer data2);
	register GMarshalFunc_VOID__INT_INT_INT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__INT_INT_INT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_int (param_values + 1), g_value_get_int (param_values + 2), g_value_get_int (param_values + 3), data2);
}


static void fso_device_base_accelerometer_class_init (FsoDeviceBaseAccelerometerClass * klass) {
	fso_device_base_accelerometer_parent_class = g_type_class_peek_parent (klass);
	FSO_DEVICE_BASE_ACCELEROMETER_CLASS (klass)->start = fso_device_base_accelerometer_real_start;
	FSO_DEVICE_BASE_ACCELEROMETER_CLASS (klass)->stop = fso_device_base_accelerometer_real_stop;
	FSO_FRAMEWORK_ABSTRACT_OBJECT_CLASS (klass)->repr = fso_device_base_accelerometer_real_repr;
	g_signal_new ("accelerate", FSO_DEVICE_TYPE_BASE_ACCELEROMETER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_INT_INT, G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
}


static void fso_device_base_accelerometer_instance_init (FsoDeviceBaseAccelerometer * self) {
}


/**
 * Copyright (C) 2009-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
 *
 */
GType fso_device_base_accelerometer_get_type (void) {
	static volatile gsize fso_device_base_accelerometer_type_id__volatile = 0;
	if (g_once_init_enter (&fso_device_base_accelerometer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoDeviceBaseAccelerometerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_device_base_accelerometer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoDeviceBaseAccelerometer), 0, (GInstanceInitFunc) fso_device_base_accelerometer_instance_init, NULL };
		GType fso_device_base_accelerometer_type_id;
		fso_device_base_accelerometer_type_id = g_type_register_static (FSO_FRAMEWORK_TYPE_ABSTRACT_OBJECT, "FsoDeviceBaseAccelerometer", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&fso_device_base_accelerometer_type_id__volatile, fso_device_base_accelerometer_type_id);
	}
	return fso_device_base_accelerometer_type_id__volatile;
}



