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

/*
 * 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
 *
 */

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


#define FSO_FRAMEWORK_TYPE_ABSTRACT_DBUS_RESOURCE (fso_framework_abstract_dbus_resource_get_type ())
#define FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_FRAMEWORK_TYPE_ABSTRACT_DBUS_RESOURCE, FsoFrameworkAbstractDBusResource))
#define FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_FRAMEWORK_TYPE_ABSTRACT_DBUS_RESOURCE, FsoFrameworkAbstractDBusResourceClass))
#define FSO_FRAMEWORK_IS_ABSTRACT_DBUS_RESOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_FRAMEWORK_TYPE_ABSTRACT_DBUS_RESOURCE))
#define FSO_FRAMEWORK_IS_ABSTRACT_DBUS_RESOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_FRAMEWORK_TYPE_ABSTRACT_DBUS_RESOURCE))
#define FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_FRAMEWORK_TYPE_ABSTRACT_DBUS_RESOURCE, FsoFrameworkAbstractDBusResourceClass))

typedef struct _FsoFrameworkAbstractDBusResource FsoFrameworkAbstractDBusResource;
typedef struct _FsoFrameworkAbstractDBusResourceClass FsoFrameworkAbstractDBusResourceClass;
typedef struct _FsoFrameworkAbstractDBusResourcePrivate FsoFrameworkAbstractDBusResourcePrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _fso_framework_abstract_dbus_resource_registerWithUsageData fso_framework_abstract_dbus_resource_registerWithUsageData;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _FsoFrameworkAbstractDbusResourceDependenciesData FsoFrameworkAbstractDbusResourceDependenciesData;
typedef struct _FsoFrameworkAbstractDbusResourceDisableData FsoFrameworkAbstractDbusResourceDisableData;
typedef struct _FsoFrameworkAbstractDbusResourceEnableData FsoFrameworkAbstractDbusResourceEnableData;
typedef struct _FsoFrameworkAbstractDbusResourceResumeData FsoFrameworkAbstractDbusResourceResumeData;
typedef struct _FsoFrameworkAbstractDbusResourceSuspendData FsoFrameworkAbstractDbusResourceSuspendData;
typedef struct _FsoFrameworkAbstractDbusResourceGetDependenciesData FsoFrameworkAbstractDbusResourceGetDependenciesData;
typedef struct _FsoFrameworkAbstractDbusResourceGetDefaultPolicyData FsoFrameworkAbstractDbusResourceGetDefaultPolicyData;

struct _FsoFrameworkAbstractDBusResource {
	FsoFrameworkAbstractObject parent_instance;
	FsoFrameworkAbstractDBusResourcePrivate * priv;
};

struct _FsoFrameworkAbstractDBusResourceClass {
	FsoFrameworkAbstractObjectClass parent_class;
	void (*enableResource) (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*enableResource_finish) (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_, GError** error);
	void (*disableResource) (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*disableResource_finish) (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_);
	void (*suspendResource) (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*suspendResource_finish) (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_);
	void (*resumeResource) (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*resumeResource_finish) (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_);
	void (*dependencies) (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GHashTable* (*dependencies_finish) (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_);
	FreeSmartphoneUsageResourcePolicy (*default_policy) (FsoFrameworkAbstractDBusResource* self);
};

struct _FsoFrameworkAbstractDBusResourcePrivate {
	FsoFrameworkDBusSubsystem* subsystem;
	FreeSmartphoneUsage* usage;
	char* path;
	FsoFrameworkDBusServiceNotifier* dbusnotifier;
	gboolean resourceRegistrationPending;
	gboolean resourceRegistered;
	gchar* _name;
};

struct _fso_framework_abstract_dbus_resource_registerWithUsageData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoFrameworkAbstractDBusResource* self;
	FsoFrameworkDBusSubsystem* _tmp0_;
	GDBusConnection* _tmp1_;
	GDBusConnection* conn;
	GDBusConnection* _tmp2_;
	GDBusConnection* _tmp3_;
	const char* _tmp4_;
	GDBusConnection* _tmp5_;
	FreeSmartphoneUsage* _tmp6_;
	FreeSmartphoneUsage* _tmp7_;
	FreeSmartphoneUsage* _tmp8_;
	const gchar* _tmp9_;
	const char* _tmp10_;
	FsoFrameworkLogger* _tmp11_;
	GError* e1;
	FsoFrameworkLogger* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	GError* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gboolean _tmp20_;
	GError* e2;
	FsoFrameworkLogger* _tmp21_;
	GError* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	GError * _inner_error_;
};

struct _FsoFrameworkAbstractDbusResourceDependenciesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoFrameworkAbstractDBusResource* self;
	GHashTable* result;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
};

struct _FsoFrameworkAbstractDbusResourceDisableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoFrameworkAbstractDBusResource* self;
	FsoFrameworkLogger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
};

struct _FsoFrameworkAbstractDbusResourceEnableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoFrameworkAbstractDBusResource* self;
	FsoFrameworkLogger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
	GError * _inner_error_;
};

struct _FsoFrameworkAbstractDbusResourceResumeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoFrameworkAbstractDBusResource* self;
	FsoFrameworkLogger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
};

struct _FsoFrameworkAbstractDbusResourceSuspendData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoFrameworkAbstractDBusResource* self;
	FsoFrameworkLogger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
};

struct _FsoFrameworkAbstractDbusResourceGetDependenciesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoFrameworkAbstractDBusResource* self;
	GHashTable* result;
	FsoFrameworkLogger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
	GHashTable* _tmp6_;
	GHashTable* _result_;
};

struct _FsoFrameworkAbstractDbusResourceGetDefaultPolicyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoFrameworkAbstractDBusResource* self;
	FreeSmartphoneUsageResourcePolicy result;
	FsoFrameworkLogger* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
	FreeSmartphoneUsageResourcePolicy _tmp6_;
	FreeSmartphoneUsageResourcePolicy _result_;
};


static gpointer fso_framework_abstract_dbus_resource_parent_class = NULL;
static FreeSmartphoneResourceIface* fso_framework_abstract_dbus_resource_free_smartphone_resource_parent_iface = NULL;

GType fso_framework_abstract_dbus_resource_get_type (void) G_GNUC_CONST;
#define FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FSO_FRAMEWORK_TYPE_ABSTRACT_DBUS_RESOURCE, FsoFrameworkAbstractDBusResourcePrivate))
enum  {
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_DUMMY_PROPERTY,
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_NAME
};
static void fso_framework_abstract_dbus_resource_onUsageServiceAppearing (FsoFrameworkAbstractDBusResource* self, const gchar* busname);
const gchar* fso_framework_abstract_dbus_resource_get_name (FsoFrameworkAbstractDBusResource* self);
static gboolean ___lambda2_ (FsoFrameworkAbstractDBusResource* self);
void fso_framework_abstract_dbus_resource_registerWithUsage (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_framework_abstract_dbus_resource_registerWithUsage_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_);
static gboolean ____lambda2__gsource_func (gpointer self);
static void fso_framework_abstract_dbus_resource_onUsageServiceDisappearing (FsoFrameworkAbstractDBusResource* self, const gchar* busname);
FsoFrameworkAbstractDBusResource* fso_framework_abstract_dbus_resource_construct (GType object_type, const gchar* name, FsoFrameworkSubsystem* subsystem);
static void fso_framework_abstract_dbus_resource_set_name (FsoFrameworkAbstractDBusResource* self, const gchar* value);
static void _fso_framework_abstract_dbus_resource_onUsageServiceAppearing_fso_framework_dbus_service_event_func (const gchar* busname, gpointer self);
static void _fso_framework_abstract_dbus_resource_onUsageServiceDisappearing_fso_framework_dbus_service_event_func (const gchar* busname, gpointer self);
static gboolean __lambda3_ (FsoFrameworkAbstractDBusResource* self);
static gboolean ___lambda3__gsource_func (gpointer self);
static gchar* fso_framework_abstract_dbus_resource_real_repr (FsoFrameworkAbstractObject* base);
static void fso_framework_abstract_dbus_resource_registerWithUsage_data_free (gpointer _data);
static gboolean fso_framework_abstract_dbus_resource_registerWithUsage_co (fso_framework_abstract_dbus_resource_registerWithUsageData* _data_);
static void fso_framework_abstract_dbus_resource_registerWithUsage_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void fso_framework_abstract_dbus_resource_enableResource (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_framework_abstract_dbus_resource_enableResource_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_, GError** error);
void fso_framework_abstract_dbus_resource_disableResource (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_framework_abstract_dbus_resource_disableResource_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_);
void fso_framework_abstract_dbus_resource_suspendResource (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_framework_abstract_dbus_resource_suspendResource_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_);
void fso_framework_abstract_dbus_resource_resumeResource (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_framework_abstract_dbus_resource_resumeResource_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_);
static void fso_framework_abstract_dbus_resource_real_dependencies_data_free (gpointer _data);
static void fso_framework_abstract_dbus_resource_real_dependencies (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_framework_abstract_dbus_resource_dependencies (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
GHashTable* fso_framework_abstract_dbus_resource_dependencies_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_);
static gboolean fso_framework_abstract_dbus_resource_real_dependencies_co (FsoFrameworkAbstractDbusResourceDependenciesData* _data_);
static void _g_free0_ (gpointer var);
static void _g_variant_unref0_ (gpointer var);
FreeSmartphoneUsageResourcePolicy fso_framework_abstract_dbus_resource_default_policy (FsoFrameworkAbstractDBusResource* self);
static FreeSmartphoneUsageResourcePolicy fso_framework_abstract_dbus_resource_real_default_policy (FsoFrameworkAbstractDBusResource* self);
static void fso_framework_abstract_dbus_resource_real_disable_data_free (gpointer _data);
static void fso_framework_abstract_dbus_resource_real_disable (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_framework_abstract_dbus_resource_real_disable_co (FsoFrameworkAbstractDbusResourceDisableData* _data_);
static void fso_framework_abstract_dbus_resource_disable_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_framework_abstract_dbus_resource_real_enable_data_free (gpointer _data);
static void fso_framework_abstract_dbus_resource_real_enable (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_framework_abstract_dbus_resource_real_enable_co (FsoFrameworkAbstractDbusResourceEnableData* _data_);
static void fso_framework_abstract_dbus_resource_enable_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_framework_abstract_dbus_resource_real_resume_data_free (gpointer _data);
static void fso_framework_abstract_dbus_resource_real_resume (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_framework_abstract_dbus_resource_real_resume_co (FsoFrameworkAbstractDbusResourceResumeData* _data_);
static void fso_framework_abstract_dbus_resource_resume_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_framework_abstract_dbus_resource_real_suspend_data_free (gpointer _data);
static void fso_framework_abstract_dbus_resource_real_suspend (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_framework_abstract_dbus_resource_real_suspend_co (FsoFrameworkAbstractDbusResourceSuspendData* _data_);
static void fso_framework_abstract_dbus_resource_suspend_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_framework_abstract_dbus_resource_real_get_dependencies_data_free (gpointer _data);
static void fso_framework_abstract_dbus_resource_real_get_dependencies (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_framework_abstract_dbus_resource_real_get_dependencies_co (FsoFrameworkAbstractDbusResourceGetDependenciesData* _data_);
static void fso_framework_abstract_dbus_resource_get_dependencies_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_framework_abstract_dbus_resource_real_get_default_policy_data_free (gpointer _data);
static void fso_framework_abstract_dbus_resource_real_get_default_policy (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_framework_abstract_dbus_resource_real_get_default_policy_co (FsoFrameworkAbstractDbusResourceGetDefaultPolicyData* _data_);
static void fso_framework_abstract_dbus_resource_finalize (GObject* obj);
static void _vala_fso_framework_abstract_dbus_resource_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_fso_framework_abstract_dbus_resource_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static const gchar* string_to_string (const gchar* self) {
	const gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}


static gboolean ___lambda2_ (FsoFrameworkAbstractDBusResource* self) {
	gboolean result = FALSE;
	fso_framework_abstract_dbus_resource_registerWithUsage (self, NULL, NULL);
	result = FALSE;
	return result;
}


static gboolean ____lambda2__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda2_ (self);
	return result;
}


static void fso_framework_abstract_dbus_resource_onUsageServiceAppearing (FsoFrameworkAbstractDBusResource* self, const gchar* busname) {
	const gchar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (busname != NULL);
	_tmp0_ = busname;
	if (g_strcmp0 (_tmp0_, FSO_FRAMEWORK_USAGE_ServiceDBusName) != 0) {
		return;
	}
	_tmp2_ = self->priv->resourceRegistered;
	if (!_tmp2_) {
		gboolean _tmp3_;
		_tmp3_ = self->priv->resourceRegistrationPending;
		_tmp1_ = !_tmp3_;
	} else {
		_tmp1_ = FALSE;
	}
	_tmp4_ = _tmp1_;
	if (_tmp4_) {
		FsoFrameworkLogger* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_ = NULL;
		const gchar* _tmp8_;
		const gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_;
		gboolean _tmp12_ = FALSE;
		_tmp5_ = ((FsoFrameworkAbstractObject*) self)->logger;
		_tmp6_ = busname;
		_tmp7_ = string_to_string (_tmp6_);
		_tmp8_ = self->priv->_name;
		_tmp9_ = string_to_string (_tmp8_);
		_tmp10_ = g_strconcat (_tmp7_, " service appeared. Registering resource '", _tmp9_, "' ...", NULL);
		_tmp11_ = _tmp10_;
		_tmp12_ = fso_framework_logger_debug (_tmp5_, _tmp11_);
		g_assert (_tmp12_);
		_g_free0 (_tmp11_);
		self->priv->resourceRegistrationPending = TRUE;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ____lambda2__gsource_func, g_object_ref (self), g_object_unref);
	}
}


static void fso_framework_abstract_dbus_resource_onUsageServiceDisappearing (FsoFrameworkAbstractDBusResource* self, const gchar* busname) {
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (busname != NULL);
	_tmp0_ = busname;
	if (g_strcmp0 (_tmp0_, FSO_FRAMEWORK_USAGE_ServiceDBusName) != 0) {
		return;
	}
	self->priv->resourceRegistered = FALSE;
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void _fso_framework_abstract_dbus_resource_onUsageServiceAppearing_fso_framework_dbus_service_event_func (const gchar* busname, gpointer self) {
	fso_framework_abstract_dbus_resource_onUsageServiceAppearing (self, busname);
}


static void _fso_framework_abstract_dbus_resource_onUsageServiceDisappearing_fso_framework_dbus_service_event_func (const gchar* busname, gpointer self) {
	fso_framework_abstract_dbus_resource_onUsageServiceDisappearing (self, busname);
}


static gboolean __lambda3_ (FsoFrameworkAbstractDBusResource* self) {
	gboolean result = FALSE;
	fso_framework_abstract_dbus_resource_registerWithUsage (self, NULL, NULL);
	result = FALSE;
	return result;
}


static gboolean ___lambda3__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda3_ (self);
	return result;
}


FsoFrameworkAbstractDBusResource* fso_framework_abstract_dbus_resource_construct (GType object_type, const gchar* name, FsoFrameworkSubsystem* subsystem) {
	FsoFrameworkAbstractDBusResource * self = NULL;
	const gchar* _tmp0_;
	FsoFrameworkSubsystem* _tmp1_;
	FsoFrameworkDBusSubsystem* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	char* _tmp6_;
	FsoFrameworkDBusServiceNotifier* _tmp7_;
	FsoFrameworkDBusServiceNotifier* _tmp8_;
	FsoFrameworkDBusServiceNotifier* _tmp9_;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (subsystem != NULL, NULL);
	self = (FsoFrameworkAbstractDBusResource*) fso_framework_abstract_object_construct (object_type);
	_tmp0_ = name;
	fso_framework_abstract_dbus_resource_set_name (self, _tmp0_);
	_tmp1_ = subsystem;
	_tmp2_ = _g_object_ref0 (FSO_FRAMEWORK_IS_DBUS_SUBSYSTEM (_tmp1_) ? ((FsoFrameworkDBusSubsystem*) _tmp1_) : NULL);
	_g_object_unref0 (self->priv->subsystem);
	self->priv->subsystem = _tmp2_;
	_tmp3_ = name;
	_tmp4_ = g_strdup_printf ("%s/%s", FSO_FRAMEWORK_RESOURCE_ServicePathPrefix, _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup (_tmp5_);
	_g_free0 (self->priv->path);
	self->priv->path = _tmp6_;
	_g_free0 (_tmp5_);
	_tmp7_ = fso_framework_dbus_service_notifier_new ();
	_g_object_unref0 (self->priv->dbusnotifier);
	self->priv->dbusnotifier = _tmp7_;
	_tmp8_ = self->priv->dbusnotifier;
	fso_framework_dbus_service_notifier_notifyAppearing (_tmp8_, FSO_FRAMEWORK_USAGE_ServiceDBusName, _fso_framework_abstract_dbus_resource_onUsageServiceAppearing_fso_framework_dbus_service_event_func, self);
	_tmp9_ = self->priv->dbusnotifier;
	fso_framework_dbus_service_notifier_notifyDisappearing (_tmp9_, FSO_FRAMEWORK_USAGE_ServiceDBusName, _fso_framework_abstract_dbus_resource_onUsageServiceDisappearing_fso_framework_dbus_service_event_func, self);
	self->priv->resourceRegistrationPending = TRUE;
	self->priv->resourceRegistered = FALSE;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda3__gsource_func, g_object_ref (self), g_object_unref);
	return self;
}


static gchar* fso_framework_abstract_dbus_resource_real_repr (FsoFrameworkAbstractObject* base) {
	FsoFrameworkAbstractDBusResource * self;
	gchar* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	self = (FsoFrameworkAbstractDBusResource*) base;
	_tmp0_ = self->priv->_name;
	_tmp1_ = string_to_string (_tmp0_);
	_tmp2_ = g_strconcat ("<", _tmp1_, ">", NULL);
	result = _tmp2_;
	return result;
}


static void fso_framework_abstract_dbus_resource_registerWithUsage_data_free (gpointer _data) {
	fso_framework_abstract_dbus_resource_registerWithUsageData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (fso_framework_abstract_dbus_resource_registerWithUsageData, _data_);
}


void fso_framework_abstract_dbus_resource_registerWithUsage (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	fso_framework_abstract_dbus_resource_registerWithUsageData* _data_;
	FsoFrameworkAbstractDBusResource* _tmp0_;
	_data_ = g_slice_new0 (fso_framework_abstract_dbus_resource_registerWithUsageData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_framework_abstract_dbus_resource_registerWithUsage);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_framework_abstract_dbus_resource_registerWithUsage_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_framework_abstract_dbus_resource_registerWithUsage_co (_data_);
}


void fso_framework_abstract_dbus_resource_registerWithUsage_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_) {
	fso_framework_abstract_dbus_resource_registerWithUsageData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_framework_abstract_dbus_resource_registerWithUsage_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_framework_abstract_dbus_resource_registerWithUsageData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_framework_abstract_dbus_resource_registerWithUsage_co (_data_);
}


static gboolean fso_framework_abstract_dbus_resource_registerWithUsage_co (fso_framework_abstract_dbus_resource_registerWithUsageData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->subsystem;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = fso_framework_dbus_subsystem_dbusConnection (_data_->_tmp0_);
	_data_->conn = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->conn;
	g_assert (_data_->_tmp2_ != NULL);
	{
		_data_->_tmp3_ = _data_->conn;
		_data_->_tmp4_ = _data_->self->priv->path;
		free_smartphone_resource_register_object ((FreeSmartphoneResource*) _data_->self, _data_->_tmp3_, (const gchar*) _data_->_tmp4_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->conn;
		_data_->_state_ = 1;
		g_async_initable_new_async (FREE_SMARTPHONE_TYPE_USAGE_PROXY, 0, NULL, fso_framework_abstract_dbus_resource_registerWithUsage_ready, _data_, "g-flags", 0, "g-name", FSO_FRAMEWORK_USAGE_ServiceDBusName, "g-connection", _data_->_tmp5_, "g-object-path", FSO_FRAMEWORK_USAGE_ServicePathPrefix, "g-interface-name", "org.freesmartphone.Usage", NULL);
		return FALSE;
		_state_1:
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp7_ = (FreeSmartphoneUsage*) _data_->_tmp6_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
		_g_object_unref0 (_data_->self->priv->usage);
		_data_->self->priv->usage = _data_->_tmp7_;
		_data_->_tmp8_ = _data_->self->priv->usage;
		_data_->_tmp9_ = _data_->self->priv->_name;
		_data_->_tmp10_ = _data_->self->priv->path;
		_data_->_state_ = 2;
		free_smartphone_usage_register_resource (_data_->_tmp8_, _data_->_tmp9_, _data_->_tmp10_, fso_framework_abstract_dbus_resource_registerWithUsage_ready, _data_);
		return FALSE;
		_state_2:
		free_smartphone_usage_register_resource_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
		_data_->_tmp11_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
		fso_framework_logger_info (_data_->_tmp11_, "Ok. Registered with org.freesmartphone.ousaged");
		_data_->self->priv->resourceRegistered = TRUE;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e1 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp12_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
		_data_->_tmp13_ = _data_->self->priv->_name;
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = string_to_string (_data_->_tmp13_);
		_data_->_tmp15_ = _data_->e1;
		_data_->_tmp16_ = _data_->_tmp15_->message;
		_data_->_tmp17_ = NULL;
		_data_->_tmp17_ = string_to_string (_data_->_tmp16_);
		_data_->_tmp18_ = NULL;
		_data_->_tmp18_ = g_strconcat ("Could not register ", _data_->_tmp14_, " with ousaged: ", _data_->_tmp17_, "; trying to enable the resource unconditionally", NULL);
		_data_->_tmp19_ = _data_->_tmp18_;
		fso_framework_logger_error (_data_->_tmp12_, _data_->_tmp19_);
		_g_free0 (_data_->_tmp19_);
		_g_error_free0 (_data_->e1);
	}
	__finally0:
	if (_data_->_inner_error_ != NULL) {
		_g_object_unref0 (_data_->conn);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_data_->_tmp20_ = _data_->self->priv->resourceRegistered;
	if (!_data_->_tmp20_) {
		{
			_data_->_state_ = 3;
			fso_framework_abstract_dbus_resource_enableResource (_data_->self, fso_framework_abstract_dbus_resource_registerWithUsage_ready, _data_);
			return FALSE;
			_state_3:
			fso_framework_abstract_dbus_resource_enableResource_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
			if (_data_->_inner_error_ != NULL) {
				goto __catch1_g_error;
			}
		}
		goto __finally1;
		__catch1_g_error:
		{
			_data_->e2 = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp21_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
			_data_->_tmp22_ = _data_->e2;
			_data_->_tmp23_ = _data_->_tmp22_->message;
			_data_->_tmp24_ = NULL;
			_data_->_tmp24_ = string_to_string (_data_->_tmp23_);
			_data_->_tmp25_ = NULL;
			_data_->_tmp25_ = g_strconcat ("Can't enable the resource: ", _data_->_tmp24_, NULL);
			_data_->_tmp26_ = _data_->_tmp25_;
			fso_framework_logger_error (_data_->_tmp21_, _data_->_tmp26_);
			_g_free0 (_data_->_tmp26_);
			_g_error_free0 (_data_->e2);
		}
		__finally1:
		if (_data_->_inner_error_ != NULL) {
			_g_object_unref0 (_data_->conn);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->self->priv->resourceRegistrationPending = FALSE;
	_g_object_unref0 (_data_->conn);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


void fso_framework_abstract_dbus_resource_enableResource (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->enableResource (self, _callback_, _user_data_);
}


void fso_framework_abstract_dbus_resource_enableResource_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_, GError** error) {
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->enableResource_finish (self, _res_, error);
}


void fso_framework_abstract_dbus_resource_disableResource (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->disableResource (self, _callback_, _user_data_);
}


void fso_framework_abstract_dbus_resource_disableResource_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_) {
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->disableResource_finish (self, _res_);
}


void fso_framework_abstract_dbus_resource_suspendResource (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->suspendResource (self, _callback_, _user_data_);
}


void fso_framework_abstract_dbus_resource_suspendResource_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_) {
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->suspendResource_finish (self, _res_);
}


void fso_framework_abstract_dbus_resource_resumeResource (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->resumeResource (self, _callback_, _user_data_);
}


void fso_framework_abstract_dbus_resource_resumeResource_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_) {
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->resumeResource_finish (self, _res_);
}


static void fso_framework_abstract_dbus_resource_real_dependencies_data_free (gpointer _data) {
	FsoFrameworkAbstractDbusResourceDependenciesData* _data_;
	_data_ = _data;
	_g_hash_table_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoFrameworkAbstractDbusResourceDependenciesData, _data_);
}


static void fso_framework_abstract_dbus_resource_real_dependencies (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoFrameworkAbstractDbusResourceDependenciesData* _data_;
	FsoFrameworkAbstractDBusResource* _tmp0_;
	_data_ = g_slice_new0 (FsoFrameworkAbstractDbusResourceDependenciesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_framework_abstract_dbus_resource_real_dependencies);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_framework_abstract_dbus_resource_real_dependencies_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_framework_abstract_dbus_resource_real_dependencies_co (_data_);
}


static GHashTable* fso_framework_abstract_dbus_resource_real_dependencies_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_) {
	GHashTable* result;
	FsoFrameworkAbstractDbusResourceDependenciesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


/**
     * This method has a default implementation for backwards compatibility,
     * subclasses need to override this.
     **/
static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static void _g_variant_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
}


static gboolean fso_framework_abstract_dbus_resource_real_dependencies_co (FsoFrameworkAbstractDbusResourceDependenciesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_str_hash;
	_data_->_tmp1_ = g_str_equal;
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, _g_variant_unref0_);
	_data_->result = _data_->_tmp2_;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


void fso_framework_abstract_dbus_resource_dependencies (FsoFrameworkAbstractDBusResource* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->dependencies (self, _callback_, _user_data_);
}


GHashTable* fso_framework_abstract_dbus_resource_dependencies_finish (FsoFrameworkAbstractDBusResource* self, GAsyncResult* _res_) {
	return FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->dependencies_finish (self, _res_);
}


static FreeSmartphoneUsageResourcePolicy fso_framework_abstract_dbus_resource_real_default_policy (FsoFrameworkAbstractDBusResource* self) {
	FreeSmartphoneUsageResourcePolicy result = 0;
	result = FREE_SMARTPHONE_USAGE_RESOURCE_POLICY_AUTO;
	return result;
}


FreeSmartphoneUsageResourcePolicy fso_framework_abstract_dbus_resource_default_policy (FsoFrameworkAbstractDBusResource* self) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_CLASS (self)->default_policy (self);
}


static void fso_framework_abstract_dbus_resource_real_disable_data_free (gpointer _data) {
	FsoFrameworkAbstractDbusResourceDisableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoFrameworkAbstractDbusResourceDisableData, _data_);
}


static void fso_framework_abstract_dbus_resource_real_disable (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoFrameworkAbstractDBusResource * self;
	FsoFrameworkAbstractDbusResourceDisableData* _data_;
	FsoFrameworkAbstractDBusResource* _tmp0_;
	self = (FsoFrameworkAbstractDBusResource*) base;
	_data_ = g_slice_new0 (FsoFrameworkAbstractDbusResourceDisableData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_framework_abstract_dbus_resource_real_disable);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_framework_abstract_dbus_resource_real_disable_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_framework_abstract_dbus_resource_real_disable_co (_data_);
}


static void fso_framework_abstract_dbus_resource_real_disable_finish (FreeSmartphoneResource* base, GAsyncResult* _res_, GError** error) {
	FsoFrameworkAbstractDbusResourceDisableData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_framework_abstract_dbus_resource_disable_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoFrameworkAbstractDbusResourceDisableData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_framework_abstract_dbus_resource_real_disable_co (_data_);
}


static gboolean fso_framework_abstract_dbus_resource_real_disable_co (FsoFrameworkAbstractDbusResourceDisableData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp1_ = ((FsoFrameworkAbstractObject*) _data_->self)->classname;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = string_to_string (_data_->_tmp1_);
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strconcat ("Disabling resource ", _data_->_tmp2_, "...", NULL);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = FALSE;
	_data_->_tmp5_ = fso_framework_logger_debug (_data_->_tmp0_, _data_->_tmp4_);
	g_assert (_data_->_tmp5_);
	_g_free0 (_data_->_tmp4_);
	_data_->_state_ = 1;
	fso_framework_abstract_dbus_resource_disableResource (_data_->self, fso_framework_abstract_dbus_resource_disable_ready, _data_);
	return FALSE;
	_state_1:
	fso_framework_abstract_dbus_resource_disableResource_finish (_data_->self, _data_->_res_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void fso_framework_abstract_dbus_resource_real_enable_data_free (gpointer _data) {
	FsoFrameworkAbstractDbusResourceEnableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoFrameworkAbstractDbusResourceEnableData, _data_);
}


static void fso_framework_abstract_dbus_resource_real_enable (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoFrameworkAbstractDBusResource * self;
	FsoFrameworkAbstractDbusResourceEnableData* _data_;
	FsoFrameworkAbstractDBusResource* _tmp0_;
	self = (FsoFrameworkAbstractDBusResource*) base;
	_data_ = g_slice_new0 (FsoFrameworkAbstractDbusResourceEnableData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_framework_abstract_dbus_resource_real_enable);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_framework_abstract_dbus_resource_real_enable_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_framework_abstract_dbus_resource_real_enable_co (_data_);
}


static void fso_framework_abstract_dbus_resource_real_enable_finish (FreeSmartphoneResource* base, GAsyncResult* _res_, GError** error) {
	FsoFrameworkAbstractDbusResourceEnableData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_framework_abstract_dbus_resource_enable_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoFrameworkAbstractDbusResourceEnableData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_framework_abstract_dbus_resource_real_enable_co (_data_);
}


static gboolean fso_framework_abstract_dbus_resource_real_enable_co (FsoFrameworkAbstractDbusResourceEnableData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp1_ = ((FsoFrameworkAbstractObject*) _data_->self)->classname;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = string_to_string (_data_->_tmp1_);
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strconcat ("Enabling resource ", _data_->_tmp2_, "...", NULL);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = FALSE;
	_data_->_tmp5_ = fso_framework_logger_debug (_data_->_tmp0_, _data_->_tmp4_);
	g_assert (_data_->_tmp5_);
	_g_free0 (_data_->_tmp4_);
	_data_->_state_ = 1;
	fso_framework_abstract_dbus_resource_enableResource (_data_->self, fso_framework_abstract_dbus_resource_enable_ready, _data_);
	return FALSE;
	_state_1:
	fso_framework_abstract_dbus_resource_enableResource_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
	if (_data_->_inner_error_ != NULL) {
		if (((_data_->_inner_error_->domain == FREE_SMARTPHONE_RESOURCE_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) || (_data_->_inner_error_->domain == G_IO_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void fso_framework_abstract_dbus_resource_real_resume_data_free (gpointer _data) {
	FsoFrameworkAbstractDbusResourceResumeData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoFrameworkAbstractDbusResourceResumeData, _data_);
}


static void fso_framework_abstract_dbus_resource_real_resume (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoFrameworkAbstractDBusResource * self;
	FsoFrameworkAbstractDbusResourceResumeData* _data_;
	FsoFrameworkAbstractDBusResource* _tmp0_;
	self = (FsoFrameworkAbstractDBusResource*) base;
	_data_ = g_slice_new0 (FsoFrameworkAbstractDbusResourceResumeData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_framework_abstract_dbus_resource_real_resume);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_framework_abstract_dbus_resource_real_resume_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_framework_abstract_dbus_resource_real_resume_co (_data_);
}


static void fso_framework_abstract_dbus_resource_real_resume_finish (FreeSmartphoneResource* base, GAsyncResult* _res_, GError** error) {
	FsoFrameworkAbstractDbusResourceResumeData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_framework_abstract_dbus_resource_resume_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoFrameworkAbstractDbusResourceResumeData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_framework_abstract_dbus_resource_real_resume_co (_data_);
}


static gboolean fso_framework_abstract_dbus_resource_real_resume_co (FsoFrameworkAbstractDbusResourceResumeData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp1_ = ((FsoFrameworkAbstractObject*) _data_->self)->classname;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = string_to_string (_data_->_tmp1_);
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strconcat ("Resuming resource ", _data_->_tmp2_, "...", NULL);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = FALSE;
	_data_->_tmp5_ = fso_framework_logger_debug (_data_->_tmp0_, _data_->_tmp4_);
	g_assert (_data_->_tmp5_);
	_g_free0 (_data_->_tmp4_);
	_data_->_state_ = 1;
	fso_framework_abstract_dbus_resource_resumeResource (_data_->self, fso_framework_abstract_dbus_resource_resume_ready, _data_);
	return FALSE;
	_state_1:
	fso_framework_abstract_dbus_resource_resumeResource_finish (_data_->self, _data_->_res_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void fso_framework_abstract_dbus_resource_real_suspend_data_free (gpointer _data) {
	FsoFrameworkAbstractDbusResourceSuspendData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoFrameworkAbstractDbusResourceSuspendData, _data_);
}


static void fso_framework_abstract_dbus_resource_real_suspend (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoFrameworkAbstractDBusResource * self;
	FsoFrameworkAbstractDbusResourceSuspendData* _data_;
	FsoFrameworkAbstractDBusResource* _tmp0_;
	self = (FsoFrameworkAbstractDBusResource*) base;
	_data_ = g_slice_new0 (FsoFrameworkAbstractDbusResourceSuspendData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_framework_abstract_dbus_resource_real_suspend);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_framework_abstract_dbus_resource_real_suspend_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_framework_abstract_dbus_resource_real_suspend_co (_data_);
}


static void fso_framework_abstract_dbus_resource_real_suspend_finish (FreeSmartphoneResource* base, GAsyncResult* _res_, GError** error) {
	FsoFrameworkAbstractDbusResourceSuspendData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_framework_abstract_dbus_resource_suspend_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoFrameworkAbstractDbusResourceSuspendData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_framework_abstract_dbus_resource_real_suspend_co (_data_);
}


static gboolean fso_framework_abstract_dbus_resource_real_suspend_co (FsoFrameworkAbstractDbusResourceSuspendData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp1_ = ((FsoFrameworkAbstractObject*) _data_->self)->classname;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = string_to_string (_data_->_tmp1_);
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strconcat ("Suspending resource ", _data_->_tmp2_, "...", NULL);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = FALSE;
	_data_->_tmp5_ = fso_framework_logger_debug (_data_->_tmp0_, _data_->_tmp4_);
	g_assert (_data_->_tmp5_);
	_g_free0 (_data_->_tmp4_);
	_data_->_state_ = 1;
	fso_framework_abstract_dbus_resource_suspendResource (_data_->self, fso_framework_abstract_dbus_resource_suspend_ready, _data_);
	return FALSE;
	_state_1:
	fso_framework_abstract_dbus_resource_suspendResource_finish (_data_->self, _data_->_res_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void fso_framework_abstract_dbus_resource_real_get_dependencies_data_free (gpointer _data) {
	FsoFrameworkAbstractDbusResourceGetDependenciesData* _data_;
	_data_ = _data;
	_g_hash_table_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoFrameworkAbstractDbusResourceGetDependenciesData, _data_);
}


static void fso_framework_abstract_dbus_resource_real_get_dependencies (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoFrameworkAbstractDBusResource * self;
	FsoFrameworkAbstractDbusResourceGetDependenciesData* _data_;
	FsoFrameworkAbstractDBusResource* _tmp0_;
	self = (FsoFrameworkAbstractDBusResource*) base;
	_data_ = g_slice_new0 (FsoFrameworkAbstractDbusResourceGetDependenciesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_framework_abstract_dbus_resource_real_get_dependencies);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_framework_abstract_dbus_resource_real_get_dependencies_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_framework_abstract_dbus_resource_real_get_dependencies_co (_data_);
}


static GHashTable* fso_framework_abstract_dbus_resource_real_get_dependencies_finish (FreeSmartphoneResource* base, GAsyncResult* _res_, GError** error) {
	GHashTable* result;
	FsoFrameworkAbstractDbusResourceGetDependenciesData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void fso_framework_abstract_dbus_resource_get_dependencies_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoFrameworkAbstractDbusResourceGetDependenciesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_framework_abstract_dbus_resource_real_get_dependencies_co (_data_);
}


static gboolean fso_framework_abstract_dbus_resource_real_get_dependencies_co (FsoFrameworkAbstractDbusResourceGetDependenciesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp1_ = ((FsoFrameworkAbstractObject*) _data_->self)->classname;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = string_to_string (_data_->_tmp1_);
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strconcat ("Inquiring dependencies for ", _data_->_tmp2_, "...", NULL);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = FALSE;
	_data_->_tmp5_ = fso_framework_logger_debug (_data_->_tmp0_, _data_->_tmp4_);
	g_assert (_data_->_tmp5_);
	_g_free0 (_data_->_tmp4_);
	_data_->_state_ = 1;
	fso_framework_abstract_dbus_resource_dependencies (_data_->self, fso_framework_abstract_dbus_resource_get_dependencies_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = fso_framework_abstract_dbus_resource_dependencies_finish (_data_->self, _data_->_res_);
	_data_->_result_ = _data_->_tmp6_;
	_data_->result = _data_->_result_;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_hash_table_unref0 (_data_->_result_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void fso_framework_abstract_dbus_resource_real_get_default_policy_data_free (gpointer _data) {
	FsoFrameworkAbstractDbusResourceGetDefaultPolicyData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoFrameworkAbstractDbusResourceGetDefaultPolicyData, _data_);
}


static void fso_framework_abstract_dbus_resource_real_get_default_policy (FreeSmartphoneResource* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoFrameworkAbstractDBusResource * self;
	FsoFrameworkAbstractDbusResourceGetDefaultPolicyData* _data_;
	FsoFrameworkAbstractDBusResource* _tmp0_;
	self = (FsoFrameworkAbstractDBusResource*) base;
	_data_ = g_slice_new0 (FsoFrameworkAbstractDbusResourceGetDefaultPolicyData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_framework_abstract_dbus_resource_real_get_default_policy);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_framework_abstract_dbus_resource_real_get_default_policy_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_framework_abstract_dbus_resource_real_get_default_policy_co (_data_);
}


static FreeSmartphoneUsageResourcePolicy fso_framework_abstract_dbus_resource_real_get_default_policy_finish (FreeSmartphoneResource* base, GAsyncResult* _res_, GError** error) {
	FreeSmartphoneUsageResourcePolicy result;
	FsoFrameworkAbstractDbusResourceGetDefaultPolicyData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return 0;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static gboolean fso_framework_abstract_dbus_resource_real_get_default_policy_co (FsoFrameworkAbstractDbusResourceGetDefaultPolicyData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp1_ = ((FsoFrameworkAbstractObject*) _data_->self)->classname;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = string_to_string (_data_->_tmp1_);
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strconcat ("Inquiring default policy for ", _data_->_tmp2_, "...", NULL);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = FALSE;
	_data_->_tmp5_ = fso_framework_logger_debug (_data_->_tmp0_, _data_->_tmp4_);
	g_assert (_data_->_tmp5_);
	_g_free0 (_data_->_tmp4_);
	_data_->_tmp6_ = 0;
	_data_->_tmp6_ = fso_framework_abstract_dbus_resource_default_policy (_data_->self);
	_data_->_result_ = _data_->_tmp6_;
	_data_->result = _data_->_result_;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


const gchar* fso_framework_abstract_dbus_resource_get_name (FsoFrameworkAbstractDBusResource* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}


static void fso_framework_abstract_dbus_resource_set_name (FsoFrameworkAbstractDBusResource* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_name);
	self->priv->_name = _tmp1_;
	g_object_notify ((GObject *) self, "name");
}


static void fso_framework_abstract_dbus_resource_class_init (FsoFrameworkAbstractDBusResourceClass * klass) {
	fso_framework_abstract_dbus_resource_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FsoFrameworkAbstractDBusResourcePrivate));
	FSO_FRAMEWORK_ABSTRACT_OBJECT_CLASS (klass)->repr = fso_framework_abstract_dbus_resource_real_repr;
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_CLASS (klass)->dependencies = fso_framework_abstract_dbus_resource_real_dependencies;
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_CLASS (klass)->dependencies_finish = fso_framework_abstract_dbus_resource_real_dependencies_finish;
	FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_CLASS (klass)->default_policy = fso_framework_abstract_dbus_resource_real_default_policy;
	G_OBJECT_CLASS (klass)->get_property = _vala_fso_framework_abstract_dbus_resource_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_fso_framework_abstract_dbus_resource_set_property;
	G_OBJECT_CLASS (klass)->finalize = fso_framework_abstract_dbus_resource_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void fso_framework_abstract_dbus_resource_free_smartphone_resource_interface_init (FreeSmartphoneResourceIface * iface) {
	fso_framework_abstract_dbus_resource_free_smartphone_resource_parent_iface = g_type_interface_peek_parent (iface);
	iface->disable = (void (*)(FreeSmartphoneResource*, GError**)) fso_framework_abstract_dbus_resource_real_disable;
	iface->disable_finish = fso_framework_abstract_dbus_resource_real_disable_finish;
	iface->enable = (void (*)(FreeSmartphoneResource*, GError**)) fso_framework_abstract_dbus_resource_real_enable;
	iface->enable_finish = fso_framework_abstract_dbus_resource_real_enable_finish;
	iface->resume = (void (*)(FreeSmartphoneResource*, GError**)) fso_framework_abstract_dbus_resource_real_resume;
	iface->resume_finish = fso_framework_abstract_dbus_resource_real_resume_finish;
	iface->suspend = (void (*)(FreeSmartphoneResource*, GError**)) fso_framework_abstract_dbus_resource_real_suspend;
	iface->suspend_finish = fso_framework_abstract_dbus_resource_real_suspend_finish;
	iface->get_dependencies = (GHashTable* (*)(FreeSmartphoneResource*, GError**)) fso_framework_abstract_dbus_resource_real_get_dependencies;
	iface->get_dependencies_finish = fso_framework_abstract_dbus_resource_real_get_dependencies_finish;
	iface->get_default_policy = (FreeSmartphoneUsageResourcePolicy (*)(FreeSmartphoneResource*, GError**)) fso_framework_abstract_dbus_resource_real_get_default_policy;
	iface->get_default_policy_finish = fso_framework_abstract_dbus_resource_real_get_default_policy_finish;
}


static void fso_framework_abstract_dbus_resource_instance_init (FsoFrameworkAbstractDBusResource * self) {
	self->priv = FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_GET_PRIVATE (self);
	self->priv->resourceRegistrationPending = FALSE;
	self->priv->resourceRegistered = FALSE;
}


static void fso_framework_abstract_dbus_resource_finalize (GObject* obj) {
	FsoFrameworkAbstractDBusResource * self;
	self = FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE (obj);
	_g_object_unref0 (self->priv->subsystem);
	_g_object_unref0 (self->priv->usage);
	_g_free0 (self->priv->path);
	_g_object_unref0 (self->priv->dbusnotifier);
	_g_free0 (self->priv->_name);
	G_OBJECT_CLASS (fso_framework_abstract_dbus_resource_parent_class)->finalize (obj);
}


/**
 * AbstractSimpleResource: A DBus Resource API service object
 */
GType fso_framework_abstract_dbus_resource_get_type (void) {
	static volatile gsize fso_framework_abstract_dbus_resource_type_id__volatile = 0;
	if (g_once_init_enter (&fso_framework_abstract_dbus_resource_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoFrameworkAbstractDBusResourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_framework_abstract_dbus_resource_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoFrameworkAbstractDBusResource), 0, (GInstanceInitFunc) fso_framework_abstract_dbus_resource_instance_init, NULL };
		static const GInterfaceInfo free_smartphone_resource_info = { (GInterfaceInitFunc) fso_framework_abstract_dbus_resource_free_smartphone_resource_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType fso_framework_abstract_dbus_resource_type_id;
		fso_framework_abstract_dbus_resource_type_id = g_type_register_static (FSO_FRAMEWORK_TYPE_ABSTRACT_OBJECT, "FsoFrameworkAbstractDBusResource", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (fso_framework_abstract_dbus_resource_type_id, FREE_SMARTPHONE_TYPE_RESOURCE, &free_smartphone_resource_info);
		g_once_init_leave (&fso_framework_abstract_dbus_resource_type_id__volatile, fso_framework_abstract_dbus_resource_type_id);
	}
	return fso_framework_abstract_dbus_resource_type_id__volatile;
}


static void _vala_fso_framework_abstract_dbus_resource_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	FsoFrameworkAbstractDBusResource * self;
	self = FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE (object);
	switch (property_id) {
		case FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_NAME:
		g_value_set_string (value, fso_framework_abstract_dbus_resource_get_name (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_fso_framework_abstract_dbus_resource_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	FsoFrameworkAbstractDBusResource * self;
	self = FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE (object);
	switch (property_id) {
		case FSO_FRAMEWORK_ABSTRACT_DBUS_RESOURCE_NAME:
		fso_framework_abstract_dbus_resource_set_name (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



