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

/* zeitgeist-daemon.vala
 *
 * Copyright © 2011 Collabora Ltd.
 *             By Siegfried-Angel Gevatter Pujals <siegfried@gevatter.com>
 *
 * This program 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 program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

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

#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

typedef enum  {
	ZEITGEIST_ENGINE_ERROR_BACKUP_FAILED,
	ZEITGEIST_ENGINE_ERROR_DATABASE_BUSY,
	ZEITGEIST_ENGINE_ERROR_DATABASE_CANTOPEN,
	ZEITGEIST_ENGINE_ERROR_DATABASE_CORRUPT,
	ZEITGEIST_ENGINE_ERROR_DATABASE_ERROR,
	ZEITGEIST_ENGINE_ERROR_DATABASE_RETIRE_FAILED,
	ZEITGEIST_ENGINE_ERROR_EXISTING_INSTANCE,
	ZEITGEIST_ENGINE_ERROR_INVALID_ARGUMENT,
	ZEITGEIST_ENGINE_ERROR_INVALID_EVENT,
	ZEITGEIST_ENGINE_ERROR_INVALID_KEY
} ZeitgeistEngineError;
#define ZEITGEIST_ENGINE_ERROR zeitgeist_engine_error_quark ()


GQuark zeitgeist_engine_error_quark (void);
void zeitgeist_vala_bug_workaround (void);

static const GDBusErrorEntry zeitgeist_engine_error_entries[] = {{ZEITGEIST_ENGINE_ERROR_BACKUP_FAILED, "org.gnome.zeitgeist.EngineError.BackupFailed"}, {ZEITGEIST_ENGINE_ERROR_DATABASE_BUSY, "org.gnome.zeitgeist.EngineError.DatabaseBusy"}, {ZEITGEIST_ENGINE_ERROR_DATABASE_CANTOPEN, "org.gnome.zeitgeist.EngineError.DatabaseCantopen"}, {ZEITGEIST_ENGINE_ERROR_DATABASE_CORRUPT, "org.gnome.zeitgeist.EngineError.DatabaseCorrupt"}, {ZEITGEIST_ENGINE_ERROR_DATABASE_ERROR, "org.gnome.zeitgeist.EngineError.DatabaseError"}, {ZEITGEIST_ENGINE_ERROR_DATABASE_RETIRE_FAILED, "org.gnome.zeitgeist.EngineError.DatabaseRetireFailed"}, {ZEITGEIST_ENGINE_ERROR_EXISTING_INSTANCE, "org.gnome.zeitgeist.EngineError.ExistingInstance"}, {ZEITGEIST_ENGINE_ERROR_INVALID_ARGUMENT, "org.gnome.zeitgeist.EngineError.InvalidArgument"}, {ZEITGEIST_ENGINE_ERROR_INVALID_EVENT, "org.gnome.zeitgeist.EngineError.InvalidEvent"}, {ZEITGEIST_ENGINE_ERROR_INVALID_KEY, "org.gnome.zeitgeist.EngineError.InvalidKey"}};

GQuark zeitgeist_engine_error_quark (void) {
	static volatile gsize zeitgeist_engine_error_quark_volatile = 0;
	g_dbus_error_register_error_domain ("zeitgeist_engine_error-quark", &zeitgeist_engine_error_quark_volatile, zeitgeist_engine_error_entries, G_N_ELEMENTS (zeitgeist_engine_error_entries));
	return (GQuark) zeitgeist_engine_error_quark_volatile;
}


void zeitgeist_vala_bug_workaround (void) {
	GError * _inner_error_ = NULL;
	{
		GDBusConnection* _tmp0_ = NULL;
		GDBusConnection* _tmp1_ = NULL;
		_tmp0_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
		_tmp1_ = _tmp0_;
		_g_object_unref0 (_tmp1_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* err = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		zeitgeist_vala_bug_workaround ();
		_g_error_free0 (err);
	}
	__finally0:
	if (G_UNLIKELY (_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;
	}
}



