/* errors.c generated by valac 0.56.19, 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 <gio/gio.h>
#include "zeitgeist-datamodel.h"
#include <glib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

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

VALA_EXTERN 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_error0_ = NULL;
	{
		GDBusConnection* _tmp0_;
		GDBusConnection* _tmp1_;
		_tmp0_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error0_);
		_tmp1_ = _tmp0_;
		_g_object_unref0 (_tmp1_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		zeitgeist_vala_bug_workaround ();
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

