/* PermissionStore.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from PermissionStore.vala, do not modify */

/*
 * SPDX-License-Identifier: LGPL-3.0-or-later
 * SPDX-FileCopyrightText: 2023 elementary, Inc. (https://elementary.io)
 */

#include "security-privacy.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.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

enum  {
	SECURITY_PRIVACY_PERMISSION_STORE_CHANGED_SIGNAL,
	SECURITY_PRIVACY_PERMISSION_STORE_NUM_SIGNALS
};
static guint security_privacy_permission_store_signals[SECURITY_PRIVACY_PERMISSION_STORE_NUM_SIGNALS] = {0};
typedef GDBusProxy SecurityPrivacyPermissionStoreProxy;
typedef GDBusProxyClass SecurityPrivacyPermissionStoreProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

static void g_cclosure_user_marshal_VOID__STRING_STRING_BOOLEAN_VARIANT_VARIANT (GClosure * closure,
                                                                          GValue * return_value,
                                                                          guint n_param_values,
                                                                          const GValue * param_values,
                                                                          gpointer invocation_hint,
                                                                          gpointer marshal_data);
static GType security_privacy_permission_store_get_type_once (void);
static void security_privacy_permission_store_proxy_g_signal (GDBusProxy* proxy,
                                                       const gchar* sender_name,
                                                       const gchar* signal_name,
                                                       GVariant* parameters);
static void _dbus_handle_security_privacy_permission_store_changed (SecurityPrivacyPermissionStore* self,
                                                             GVariant* parameters);
static void security_privacy_permission_store_proxy_lookup (SecurityPrivacyPermissionStore* self,
                                                     const gchar* table,
                                                     const gchar* id,
                                                     GVariant** permissions,
                                                     GVariant** data,
                                                     GError** error);
static void security_privacy_permission_store_proxy_set (SecurityPrivacyPermissionStore* self,
                                                  const gchar* table,
                                                  gboolean create,
                                                  const gchar* id,
                                                  GVariant* app_permissions,
                                                  GVariant* data,
                                                  GError** error);
static void security_privacy_permission_store_proxy_delete (SecurityPrivacyPermissionStore* self,
                                                     const gchar* table,
                                                     const gchar* id,
                                                     GError** error);
static void security_privacy_permission_store_proxy_set_value (SecurityPrivacyPermissionStore* self,
                                                        const gchar* table,
                                                        gboolean create,
                                                        const gchar* id,
                                                        GVariant* data,
                                                        GError** error);
static void security_privacy_permission_store_proxy_set_permission (SecurityPrivacyPermissionStore* self,
                                                             const gchar* table,
                                                             gboolean create,
                                                             const gchar* id,
                                                             const gchar* app,
                                                             gchar** permissions,
                                                             gint permissions_length1,
                                                             GError** error);
static void security_privacy_permission_store_proxy_delete_permission (SecurityPrivacyPermissionStore* self,
                                                                const gchar* table,
                                                                const gchar* id,
                                                                const gchar* app,
                                                                GError** error);
static gchar** security_privacy_permission_store_proxy_get_permission (SecurityPrivacyPermissionStore* self,
                                                                const gchar* table,
                                                                const gchar* id,
                                                                const gchar* app,
                                                                gint* result_length1,
                                                                GError** error);
static gchar** security_privacy_permission_store_proxy_list (SecurityPrivacyPermissionStore* self,
                                                      const gchar* table,
                                                      gint* result_length1,
                                                      GError** error);
static guint security_privacy_permission_store_dbus_proxy_get_version (SecurityPrivacyPermissionStore* self);
static void security_privacy_permission_store_proxy_security_privacy_permission_store_interface_init (SecurityPrivacyPermissionStoreIface* iface);
static void _dbus_security_privacy_permission_store_lookup (SecurityPrivacyPermissionStore* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation);
static void _dbus_security_privacy_permission_store_set (SecurityPrivacyPermissionStore* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation);
static void _dbus_security_privacy_permission_store_delete (SecurityPrivacyPermissionStore* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation);
static void _dbus_security_privacy_permission_store_set_value (SecurityPrivacyPermissionStore* self,
                                                        GVariant* _parameters_,
                                                        GDBusMethodInvocation* invocation);
static void _dbus_security_privacy_permission_store_set_permission (SecurityPrivacyPermissionStore* self,
                                                             GVariant* _parameters_,
                                                             GDBusMethodInvocation* invocation);
static void _dbus_security_privacy_permission_store_delete_permission (SecurityPrivacyPermissionStore* self,
                                                                GVariant* _parameters_,
                                                                GDBusMethodInvocation* invocation);
static void _dbus_security_privacy_permission_store_get_permission (SecurityPrivacyPermissionStore* self,
                                                             GVariant* _parameters_,
                                                             GDBusMethodInvocation* invocation);
static void _dbus_security_privacy_permission_store_list (SecurityPrivacyPermissionStore* self,
                                                   GVariant* _parameters_,
                                                   GDBusMethodInvocation* invocation);
static void security_privacy_permission_store_dbus_interface_method_call (GDBusConnection* connection,
                                                                   const gchar* sender,
                                                                   const gchar* object_path,
                                                                   const gchar* interface_name,
                                                                   const gchar* method_name,
                                                                   GVariant* parameters,
                                                                   GDBusMethodInvocation* invocation,
                                                                   gpointer user_data);
static GVariant* security_privacy_permission_store_dbus_interface_get_property (GDBusConnection* connection,
                                                                         const gchar* sender,
                                                                         const gchar* object_path,
                                                                         const gchar* interface_name,
                                                                         const gchar* property_name,
                                                                         GError** error,
                                                                         gpointer user_data);
static GVariant* _dbus_security_privacy_permission_store_get_version (SecurityPrivacyPermissionStore* self);
static gboolean security_privacy_permission_store_dbus_interface_set_property (GDBusConnection* connection,
                                                                        const gchar* sender,
                                                                        const gchar* object_path,
                                                                        const gchar* interface_name,
                                                                        const gchar* property_name,
                                                                        GVariant* value,
                                                                        GError** error,
                                                                        gpointer user_data);
static void _dbus_security_privacy_permission_store_changed (GObject* _sender,
                                                      const gchar* table,
                                                      const gchar* id,
                                                      gboolean deleted,
                                                      GVariant* data,
                                                      GVariant* permissions,
                                                      gpointer* _data);
static void _security_privacy_permission_store_unregister_object (gpointer user_data);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_lookup_table = {-1, "table", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_lookup_id = {-1, "id", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_lookup_permissions = {-1, "permissions", "a{sas}", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_lookup_data = {-1, "data", "v", NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_lookup_in[] = {&_security_privacy_permission_store_dbus_arg_info_lookup_table, &_security_privacy_permission_store_dbus_arg_info_lookup_id, NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_lookup_out[] = {&_security_privacy_permission_store_dbus_arg_info_lookup_permissions, &_security_privacy_permission_store_dbus_arg_info_lookup_data, NULL};
static const GDBusMethodInfo _security_privacy_permission_store_dbus_method_info_lookup = {-1, "Lookup", (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_lookup_in), (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_lookup_out), NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_table = {-1, "table", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_create = {-1, "create", "b", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_id = {-1, "id", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_app_permissions = {-1, "app_permissions", "a{sas}", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_data = {-1, "data", "v", NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_set_in[] = {&_security_privacy_permission_store_dbus_arg_info_set_table, &_security_privacy_permission_store_dbus_arg_info_set_create, &_security_privacy_permission_store_dbus_arg_info_set_id, &_security_privacy_permission_store_dbus_arg_info_set_app_permissions, &_security_privacy_permission_store_dbus_arg_info_set_data, NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_set_out[] = {NULL};
static const GDBusMethodInfo _security_privacy_permission_store_dbus_method_info_set = {-1, "Set", (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_set_in), (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_set_out), NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_delete_table = {-1, "table", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_delete_id = {-1, "id", "s", NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_delete_in[] = {&_security_privacy_permission_store_dbus_arg_info_delete_table, &_security_privacy_permission_store_dbus_arg_info_delete_id, NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_delete_out[] = {NULL};
static const GDBusMethodInfo _security_privacy_permission_store_dbus_method_info_delete = {-1, "Delete", (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_delete_in), (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_delete_out), NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_value_table = {-1, "table", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_value_create = {-1, "create", "b", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_value_id = {-1, "id", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_value_data = {-1, "data", "v", NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_set_value_in[] = {&_security_privacy_permission_store_dbus_arg_info_set_value_table, &_security_privacy_permission_store_dbus_arg_info_set_value_create, &_security_privacy_permission_store_dbus_arg_info_set_value_id, &_security_privacy_permission_store_dbus_arg_info_set_value_data, NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_set_value_out[] = {NULL};
static const GDBusMethodInfo _security_privacy_permission_store_dbus_method_info_set_value = {-1, "SetValue", (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_set_value_in), (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_set_value_out), NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_permission_table = {-1, "table", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_permission_create = {-1, "create", "b", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_permission_id = {-1, "id", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_permission_app = {-1, "app", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_set_permission_permissions = {-1, "permissions", "as", NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_set_permission_in[] = {&_security_privacy_permission_store_dbus_arg_info_set_permission_table, &_security_privacy_permission_store_dbus_arg_info_set_permission_create, &_security_privacy_permission_store_dbus_arg_info_set_permission_id, &_security_privacy_permission_store_dbus_arg_info_set_permission_app, &_security_privacy_permission_store_dbus_arg_info_set_permission_permissions, NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_set_permission_out[] = {NULL};
static const GDBusMethodInfo _security_privacy_permission_store_dbus_method_info_set_permission = {-1, "SetPermission", (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_set_permission_in), (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_set_permission_out), NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_delete_permission_table = {-1, "table", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_delete_permission_id = {-1, "id", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_delete_permission_app = {-1, "app", "s", NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_delete_permission_in[] = {&_security_privacy_permission_store_dbus_arg_info_delete_permission_table, &_security_privacy_permission_store_dbus_arg_info_delete_permission_id, &_security_privacy_permission_store_dbus_arg_info_delete_permission_app, NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_delete_permission_out[] = {NULL};
static const GDBusMethodInfo _security_privacy_permission_store_dbus_method_info_delete_permission = {-1, "DeletePermission", (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_delete_permission_in), (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_delete_permission_out), NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_get_permission_table = {-1, "table", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_get_permission_id = {-1, "id", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_get_permission_app = {-1, "app", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_get_permission_result = {-1, "result", "as", NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_get_permission_in[] = {&_security_privacy_permission_store_dbus_arg_info_get_permission_table, &_security_privacy_permission_store_dbus_arg_info_get_permission_id, &_security_privacy_permission_store_dbus_arg_info_get_permission_app, NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_get_permission_out[] = {&_security_privacy_permission_store_dbus_arg_info_get_permission_result, NULL};
static const GDBusMethodInfo _security_privacy_permission_store_dbus_method_info_get_permission = {-1, "GetPermission", (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_get_permission_in), (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_get_permission_out), NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_list_table = {-1, "table", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_list_result = {-1, "result", "as", NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_list_in[] = {&_security_privacy_permission_store_dbus_arg_info_list_table, NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_list_out[] = {&_security_privacy_permission_store_dbus_arg_info_list_result, NULL};
static const GDBusMethodInfo _security_privacy_permission_store_dbus_method_info_list = {-1, "List", (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_list_in), (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_list_out), NULL};
static const GDBusMethodInfo * const _security_privacy_permission_store_dbus_method_info[] = {&_security_privacy_permission_store_dbus_method_info_lookup, &_security_privacy_permission_store_dbus_method_info_set, &_security_privacy_permission_store_dbus_method_info_delete, &_security_privacy_permission_store_dbus_method_info_set_value, &_security_privacy_permission_store_dbus_method_info_set_permission, &_security_privacy_permission_store_dbus_method_info_delete_permission, &_security_privacy_permission_store_dbus_method_info_get_permission, &_security_privacy_permission_store_dbus_method_info_list, NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_changed_table = {-1, "table", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_changed_id = {-1, "id", "s", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_changed_deleted = {-1, "deleted", "b", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_changed_data = {-1, "data", "v", NULL};
static const GDBusArgInfo _security_privacy_permission_store_dbus_arg_info_changed_permissions = {-1, "permissions", "a{sas}", NULL};
static const GDBusArgInfo * const _security_privacy_permission_store_dbus_arg_info_changed[] = {&_security_privacy_permission_store_dbus_arg_info_changed_table, &_security_privacy_permission_store_dbus_arg_info_changed_id, &_security_privacy_permission_store_dbus_arg_info_changed_deleted, &_security_privacy_permission_store_dbus_arg_info_changed_data, &_security_privacy_permission_store_dbus_arg_info_changed_permissions, NULL};
static const GDBusSignalInfo _security_privacy_permission_store_dbus_signal_info_changed = {-1, "Changed", (GDBusArgInfo **) (&_security_privacy_permission_store_dbus_arg_info_changed), NULL};
static const GDBusSignalInfo * const _security_privacy_permission_store_dbus_signal_info[] = {&_security_privacy_permission_store_dbus_signal_info_changed, NULL};
static const GDBusPropertyInfo _security_privacy_permission_store_dbus_property_info_version = {-1, "Version", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _security_privacy_permission_store_dbus_property_info[] = {&_security_privacy_permission_store_dbus_property_info_version, NULL};
static const GDBusInterfaceInfo _security_privacy_permission_store_dbus_interface_info = {-1, "org.freedesktop.impl.portal.PermissionStore", (GDBusMethodInfo **) (&_security_privacy_permission_store_dbus_method_info), (GDBusSignalInfo **) (&_security_privacy_permission_store_dbus_signal_info), (GDBusPropertyInfo **) (&_security_privacy_permission_store_dbus_property_info), NULL};
static const GDBusInterfaceVTable _security_privacy_permission_store_dbus_interface_vtable = {security_privacy_permission_store_dbus_interface_method_call, security_privacy_permission_store_dbus_interface_get_property, security_privacy_permission_store_dbus_interface_set_property};

void
security_privacy_permission_store_lookup (SecurityPrivacyPermissionStore* self,
                                          const gchar* table,
                                          const gchar* id,
                                          GVariant** permissions,
                                          GVariant** data,
                                          GError** error)
{
	SecurityPrivacyPermissionStoreIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SECURITY_PRIVACY_PERMISSION_STORE_GET_INTERFACE (self);
	if (_iface_->lookup) {
		_iface_->lookup (self, table, id, permissions, data, error);
	}
}

void
security_privacy_permission_store_set (SecurityPrivacyPermissionStore* self,
                                       const gchar* table,
                                       gboolean create,
                                       const gchar* id,
                                       GVariant* app_permissions,
                                       GVariant* data,
                                       GError** error)
{
	SecurityPrivacyPermissionStoreIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SECURITY_PRIVACY_PERMISSION_STORE_GET_INTERFACE (self);
	if (_iface_->set) {
		_iface_->set (self, table, create, id, app_permissions, data, error);
	}
}

void
security_privacy_permission_store_delete (SecurityPrivacyPermissionStore* self,
                                          const gchar* table,
                                          const gchar* id,
                                          GError** error)
{
	SecurityPrivacyPermissionStoreIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SECURITY_PRIVACY_PERMISSION_STORE_GET_INTERFACE (self);
	if (_iface_->delete) {
		_iface_->delete (self, table, id, error);
	}
}

void
security_privacy_permission_store_set_value (SecurityPrivacyPermissionStore* self,
                                             const gchar* table,
                                             gboolean create,
                                             const gchar* id,
                                             GVariant* data,
                                             GError** error)
{
	SecurityPrivacyPermissionStoreIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SECURITY_PRIVACY_PERMISSION_STORE_GET_INTERFACE (self);
	if (_iface_->set_value) {
		_iface_->set_value (self, table, create, id, data, error);
	}
}

void
security_privacy_permission_store_set_permission (SecurityPrivacyPermissionStore* self,
                                                  const gchar* table,
                                                  gboolean create,
                                                  const gchar* id,
                                                  const gchar* app,
                                                  gchar** permissions,
                                                  gint permissions_length1,
                                                  GError** error)
{
	SecurityPrivacyPermissionStoreIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SECURITY_PRIVACY_PERMISSION_STORE_GET_INTERFACE (self);
	if (_iface_->set_permission) {
		_iface_->set_permission (self, table, create, id, app, permissions, permissions_length1, error);
	}
}

void
security_privacy_permission_store_delete_permission (SecurityPrivacyPermissionStore* self,
                                                     const gchar* table,
                                                     const gchar* id,
                                                     const gchar* app,
                                                     GError** error)
{
	SecurityPrivacyPermissionStoreIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SECURITY_PRIVACY_PERMISSION_STORE_GET_INTERFACE (self);
	if (_iface_->delete_permission) {
		_iface_->delete_permission (self, table, id, app, error);
	}
}

gchar**
security_privacy_permission_store_get_permission (SecurityPrivacyPermissionStore* self,
                                                  const gchar* table,
                                                  const gchar* id,
                                                  const gchar* app,
                                                  gint* result_length1,
                                                  GError** error)
{
	SecurityPrivacyPermissionStoreIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SECURITY_PRIVACY_PERMISSION_STORE_GET_INTERFACE (self);
	if (_iface_->get_permission) {
		return _iface_->get_permission (self, table, id, app, result_length1, error);
	}
	return NULL;
}

gchar**
security_privacy_permission_store_list (SecurityPrivacyPermissionStore* self,
                                        const gchar* table,
                                        gint* result_length1,
                                        GError** error)
{
	SecurityPrivacyPermissionStoreIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SECURITY_PRIVACY_PERMISSION_STORE_GET_INTERFACE (self);
	if (_iface_->list) {
		return _iface_->list (self, table, result_length1, error);
	}
	return NULL;
}

guint
security_privacy_permission_store_get_version (SecurityPrivacyPermissionStore* self)
{
	SecurityPrivacyPermissionStoreIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = SECURITY_PRIVACY_PERMISSION_STORE_GET_INTERFACE (self);
	if (_iface_->get_version) {
		return _iface_->get_version (self);
	}
	return 0U;
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING_BOOLEAN_VARIANT_VARIANT (GClosure * closure,
                                                                     GValue * return_value,
                                                                     guint n_param_values,
                                                                     const GValue * param_values,
                                                                     gpointer invocation_hint,
                                                                     gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING_BOOLEAN_VARIANT_VARIANT) (gpointer data1, const char* arg_1, const char* arg_2, gboolean arg_3, gpointer arg_4, gpointer arg_5, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_BOOLEAN_VARIANT_VARIANT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 6);
	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__STRING_STRING_BOOLEAN_VARIANT_VARIANT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_boolean (param_values + 3), g_value_get_variant (param_values + 4), g_value_get_variant (param_values + 5), data2);
}

static void
security_privacy_permission_store_default_init (SecurityPrivacyPermissionStoreIface * iface,
                                                gpointer iface_data)
{
	security_privacy_permission_store_signals[SECURITY_PRIVACY_PERMISSION_STORE_CHANGED_SIGNAL] = g_signal_new ("changed", SECURITY_PRIVACY_TYPE_PERMISSION_STORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_BOOLEAN_VARIANT_VARIANT, G_TYPE_NONE, 5, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_VARIANT, G_TYPE_VARIANT);
}

static GType
security_privacy_permission_store_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SecurityPrivacyPermissionStoreIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) security_privacy_permission_store_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType security_privacy_permission_store_type_id;
	security_privacy_permission_store_type_id = g_type_register_static (G_TYPE_INTERFACE, "SecurityPrivacyPermissionStore", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (security_privacy_permission_store_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (security_privacy_permission_store_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) security_privacy_permission_store_proxy_get_type);
	g_type_set_qdata (security_privacy_permission_store_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.impl.portal.PermissionStore");
	g_type_set_qdata (security_privacy_permission_store_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_security_privacy_permission_store_dbus_interface_info));
	g_type_set_qdata (security_privacy_permission_store_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) security_privacy_permission_store_register_object);
	return security_privacy_permission_store_type_id;
}

GType
security_privacy_permission_store_get_type (void)
{
	static volatile gsize security_privacy_permission_store_type_id__once = 0;
	if (g_once_init_enter (&security_privacy_permission_store_type_id__once)) {
		GType security_privacy_permission_store_type_id;
		security_privacy_permission_store_type_id = security_privacy_permission_store_get_type_once ();
		g_once_init_leave (&security_privacy_permission_store_type_id__once, security_privacy_permission_store_type_id);
	}
	return security_privacy_permission_store_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (SecurityPrivacyPermissionStoreProxy, security_privacy_permission_store_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (SECURITY_PRIVACY_TYPE_PERMISSION_STORE, security_privacy_permission_store_proxy_security_privacy_permission_store_interface_init) )
static void
security_privacy_permission_store_proxy_class_init (SecurityPrivacyPermissionStoreProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = security_privacy_permission_store_proxy_g_signal;
}

static void
_dbus_handle_security_privacy_permission_store_changed (SecurityPrivacyPermissionStore* self,
                                                        GVariant* parameters)
{
	GVariantIter _arguments_iter;
	gchar* table = NULL;
	GVariant* _tmp4_;
	gchar* id = NULL;
	GVariant* _tmp5_;
	gboolean deleted = FALSE;
	GVariant* _tmp6_;
	GVariant* data = NULL;
	GVariant* _tmp7_;
	GVariant* permissions = NULL;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp4_ = g_variant_iter_next_value (&_arguments_iter);
	table = g_variant_dup_string (_tmp4_, NULL);
	g_variant_unref (_tmp4_);
	_tmp5_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_dup_string (_tmp5_, NULL);
	g_variant_unref (_tmp5_);
	_tmp6_ = g_variant_iter_next_value (&_arguments_iter);
	deleted = g_variant_get_boolean (_tmp6_);
	g_variant_unref (_tmp6_);
	_tmp7_ = g_variant_iter_next_value (&_arguments_iter);
	data = g_variant_get_variant (_tmp7_);
	g_variant_unref (_tmp7_);
	permissions = g_variant_iter_next_value (&_arguments_iter);
	g_signal_emit_by_name (self, "changed", table, id, deleted, data, permissions);
	_g_free0 (table);
	_g_free0 (id);
	_g_variant_unref0 (data);
	_g_variant_unref0 (permissions);
}

static void
security_privacy_permission_store_proxy_g_signal (GDBusProxy* proxy,
                                                  const gchar* sender_name,
                                                  const gchar* signal_name,
                                                  GVariant* parameters)
{
	if (strcmp (signal_name, "Changed") == 0) {
		_dbus_handle_security_privacy_permission_store_changed ((SecurityPrivacyPermissionStore*) proxy, parameters);
	}
}

static void
security_privacy_permission_store_proxy_init (SecurityPrivacyPermissionStoreProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_security_privacy_permission_store_dbus_interface_info));
}

static void
security_privacy_permission_store_proxy_lookup (SecurityPrivacyPermissionStore* self,
                                                const gchar* table,
                                                const gchar* id,
                                                GVariant** permissions,
                                                GVariant** data,
                                                GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	GVariant* _vala_permissions = NULL;
	GVariant* _vala_data = NULL;
	GVariant* _tmp8_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.impl.portal.PermissionStore", "Lookup");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (table));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (id));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_vala_permissions = g_variant_iter_next_value (&_reply_iter);
	*permissions = _vala_permissions;
	_tmp8_ = g_variant_iter_next_value (&_reply_iter);
	_vala_data = g_variant_get_variant (_tmp8_);
	g_variant_unref (_tmp8_);
	*data = _vala_data;
	g_object_unref (_reply_message);
}

static void
security_privacy_permission_store_proxy_set (SecurityPrivacyPermissionStore* self,
                                             const gchar* table,
                                             gboolean create,
                                             const gchar* id,
                                             GVariant* app_permissions,
                                             GVariant* data,
                                             GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.impl.portal.PermissionStore", "Set");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (table));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (create));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (id));
	g_variant_builder_add_value (&_arguments_builder, app_permissions);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_variant (data));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
security_privacy_permission_store_proxy_delete (SecurityPrivacyPermissionStore* self,
                                                const gchar* table,
                                                const gchar* id,
                                                GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.impl.portal.PermissionStore", "Delete");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (table));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (id));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
security_privacy_permission_store_proxy_set_value (SecurityPrivacyPermissionStore* self,
                                                   const gchar* table,
                                                   gboolean create,
                                                   const gchar* id,
                                                   GVariant* data,
                                                   GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.impl.portal.PermissionStore", "SetValue");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (table));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (create));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_variant (data));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
security_privacy_permission_store_proxy_set_permission (SecurityPrivacyPermissionStore* self,
                                                        const gchar* table,
                                                        gboolean create,
                                                        const gchar* id,
                                                        const gchar* app,
                                                        gchar** permissions,
                                                        gint permissions_length1,
                                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gchar** _tmp9_;
	GVariantBuilder _tmp10_;
	gint _tmp11_;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.impl.portal.PermissionStore", "SetPermission");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (table));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (create));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (app));
	_tmp9_ = permissions;
	g_variant_builder_init (&_tmp10_, G_VARIANT_TYPE ("as"));
	for (_tmp11_ = 0; _tmp11_ < permissions_length1; _tmp11_++) {
		g_variant_builder_add_value (&_tmp10_, g_variant_new_string (*_tmp9_));
		_tmp9_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp10_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
security_privacy_permission_store_proxy_delete_permission (SecurityPrivacyPermissionStore* self,
                                                           const gchar* table,
                                                           const gchar* id,
                                                           const gchar* app,
                                                           GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.impl.portal.PermissionStore", "DeletePermission");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (table));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (app));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static gchar**
security_privacy_permission_store_proxy_get_permission (SecurityPrivacyPermissionStore* self,
                                                        const gchar* table,
                                                        const gchar* id,
                                                        const gchar* app,
                                                        gint* result_length1,
                                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar** _result = NULL;
	gint _result_length1;
	GVariant* _tmp12_;
	gchar** _tmp13_;
	gint _tmp13__length;
	gint _tmp13__size;
	gint _tmp13__length1;
	GVariantIter _tmp14_;
	GVariant* _tmp15_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.impl.portal.PermissionStore", "GetPermission");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (table));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (app));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_result_length1 = 0;
	_tmp12_ = g_variant_iter_next_value (&_reply_iter);
	_tmp13_ = g_new (gchar*, 5);
	_tmp13__length = 0;
	_tmp13__size = 4;
	_tmp13__length1 = 0;
	g_variant_iter_init (&_tmp14_, _tmp12_);
	for (; (_tmp15_ = g_variant_iter_next_value (&_tmp14_)) != NULL; _tmp13__length1++) {
		if (_tmp13__size == _tmp13__length) {
			_tmp13__size = 2 * _tmp13__size;
			_tmp13_ = g_renew (gchar*, _tmp13_, _tmp13__size + 1);
		}
		_tmp13_[_tmp13__length++] = g_variant_dup_string (_tmp15_, NULL);
		g_variant_unref (_tmp15_);
	}
	_result_length1 = _tmp13__length1;
	_tmp13_[_tmp13__length] = NULL;
	_result = _tmp13_;
	g_variant_unref (_tmp12_);
	*result_length1 = _result_length1;
	g_object_unref (_reply_message);
	return _result;
}

static gchar**
security_privacy_permission_store_proxy_list (SecurityPrivacyPermissionStore* self,
                                              const gchar* table,
                                              gint* result_length1,
                                              GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar** _result = NULL;
	gint _result_length1;
	GVariant* _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length;
	gint _tmp17__size;
	gint _tmp17__length1;
	GVariantIter _tmp18_;
	GVariant* _tmp19_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.impl.portal.PermissionStore", "List");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (table));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_result_length1 = 0;
	_tmp16_ = g_variant_iter_next_value (&_reply_iter);
	_tmp17_ = g_new (gchar*, 5);
	_tmp17__length = 0;
	_tmp17__size = 4;
	_tmp17__length1 = 0;
	g_variant_iter_init (&_tmp18_, _tmp16_);
	for (; (_tmp19_ = g_variant_iter_next_value (&_tmp18_)) != NULL; _tmp17__length1++) {
		if (_tmp17__size == _tmp17__length) {
			_tmp17__size = 2 * _tmp17__size;
			_tmp17_ = g_renew (gchar*, _tmp17_, _tmp17__size + 1);
		}
		_tmp17_[_tmp17__length++] = g_variant_dup_string (_tmp19_, NULL);
		g_variant_unref (_tmp19_);
	}
	_result_length1 = _tmp17__length1;
	_tmp17_[_tmp17__length] = NULL;
	_result = _tmp17_;
	g_variant_unref (_tmp16_);
	*result_length1 = _result_length1;
	g_object_unref (_reply_message);
	return _result;
}

static guint
security_privacy_permission_store_dbus_proxy_get_version (SecurityPrivacyPermissionStore* self)
{
	GVariant *_inner_reply;
	guint _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Version");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.impl.portal.PermissionStore"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Version"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, 120000, NULL, NULL);
		if (!_reply) {
			guint _tmp20_ = 0U;
			return _tmp20_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_uint32 (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
security_privacy_permission_store_proxy_security_privacy_permission_store_interface_init (SecurityPrivacyPermissionStoreIface* iface)
{
	iface->lookup = security_privacy_permission_store_proxy_lookup;
	iface->set = security_privacy_permission_store_proxy_set;
	iface->delete = security_privacy_permission_store_proxy_delete;
	iface->set_value = security_privacy_permission_store_proxy_set_value;
	iface->set_permission = security_privacy_permission_store_proxy_set_permission;
	iface->delete_permission = security_privacy_permission_store_proxy_delete_permission;
	iface->get_permission = security_privacy_permission_store_proxy_get_permission;
	iface->list = security_privacy_permission_store_proxy_list;
	iface->get_version = security_privacy_permission_store_dbus_proxy_get_version;
}

static void
_dbus_security_privacy_permission_store_lookup (SecurityPrivacyPermissionStore* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* table = NULL;
	GVariant* _tmp21_;
	gchar* id = NULL;
	GVariant* _tmp22_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GVariant* permissions = NULL;
	GVariant* data = NULL;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp21_ = g_variant_iter_next_value (&_arguments_iter);
	table = g_variant_dup_string (_tmp21_, NULL);
	g_variant_unref (_tmp21_);
	_tmp22_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_dup_string (_tmp22_, NULL);
	g_variant_unref (_tmp22_);
	security_privacy_permission_store_lookup (self, table, id, &permissions, &data, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, permissions);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_variant (data));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (table);
	_g_free0 (id);
	_g_variant_unref0 (permissions);
	_g_variant_unref0 (data);
	;
}

static void
_dbus_security_privacy_permission_store_set (SecurityPrivacyPermissionStore* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* table = NULL;
	GVariant* _tmp23_;
	gboolean create = FALSE;
	GVariant* _tmp24_;
	gchar* id = NULL;
	GVariant* _tmp25_;
	GVariant* app_permissions = NULL;
	GVariant* data = NULL;
	GVariant* _tmp26_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp23_ = g_variant_iter_next_value (&_arguments_iter);
	table = g_variant_dup_string (_tmp23_, NULL);
	g_variant_unref (_tmp23_);
	_tmp24_ = g_variant_iter_next_value (&_arguments_iter);
	create = g_variant_get_boolean (_tmp24_);
	g_variant_unref (_tmp24_);
	_tmp25_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_dup_string (_tmp25_, NULL);
	g_variant_unref (_tmp25_);
	app_permissions = g_variant_iter_next_value (&_arguments_iter);
	_tmp26_ = g_variant_iter_next_value (&_arguments_iter);
	data = g_variant_get_variant (_tmp26_);
	g_variant_unref (_tmp26_);
	security_privacy_permission_store_set (self, table, create, id, app_permissions, data, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (table);
	_g_free0 (id);
	_g_variant_unref0 (app_permissions);
	_g_variant_unref0 (data);
	;
}

static void
_dbus_security_privacy_permission_store_delete (SecurityPrivacyPermissionStore* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* table = NULL;
	GVariant* _tmp27_;
	gchar* id = NULL;
	GVariant* _tmp28_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp27_ = g_variant_iter_next_value (&_arguments_iter);
	table = g_variant_dup_string (_tmp27_, NULL);
	g_variant_unref (_tmp27_);
	_tmp28_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_dup_string (_tmp28_, NULL);
	g_variant_unref (_tmp28_);
	security_privacy_permission_store_delete (self, table, id, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (table);
	_g_free0 (id);
	;
}

static void
_dbus_security_privacy_permission_store_set_value (SecurityPrivacyPermissionStore* self,
                                                   GVariant* _parameters_,
                                                   GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* table = NULL;
	GVariant* _tmp29_;
	gboolean create = FALSE;
	GVariant* _tmp30_;
	gchar* id = NULL;
	GVariant* _tmp31_;
	GVariant* data = NULL;
	GVariant* _tmp32_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp29_ = g_variant_iter_next_value (&_arguments_iter);
	table = g_variant_dup_string (_tmp29_, NULL);
	g_variant_unref (_tmp29_);
	_tmp30_ = g_variant_iter_next_value (&_arguments_iter);
	create = g_variant_get_boolean (_tmp30_);
	g_variant_unref (_tmp30_);
	_tmp31_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_dup_string (_tmp31_, NULL);
	g_variant_unref (_tmp31_);
	_tmp32_ = g_variant_iter_next_value (&_arguments_iter);
	data = g_variant_get_variant (_tmp32_);
	g_variant_unref (_tmp32_);
	security_privacy_permission_store_set_value (self, table, create, id, data, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (table);
	_g_free0 (id);
	_g_variant_unref0 (data);
	;
}

static void
_dbus_security_privacy_permission_store_set_permission (SecurityPrivacyPermissionStore* self,
                                                        GVariant* _parameters_,
                                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* table = NULL;
	GVariant* _tmp33_;
	gboolean create = FALSE;
	GVariant* _tmp34_;
	gchar* id = NULL;
	GVariant* _tmp35_;
	gchar* app = NULL;
	GVariant* _tmp36_;
	gchar** permissions = NULL;
	gint permissions_length1 = 0;
	GVariant* _tmp37_;
	gchar** _tmp38_;
	gint _tmp38__length;
	gint _tmp38__size;
	gint _tmp38__length1;
	GVariantIter _tmp39_;
	GVariant* _tmp40_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp33_ = g_variant_iter_next_value (&_arguments_iter);
	table = g_variant_dup_string (_tmp33_, NULL);
	g_variant_unref (_tmp33_);
	_tmp34_ = g_variant_iter_next_value (&_arguments_iter);
	create = g_variant_get_boolean (_tmp34_);
	g_variant_unref (_tmp34_);
	_tmp35_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_dup_string (_tmp35_, NULL);
	g_variant_unref (_tmp35_);
	_tmp36_ = g_variant_iter_next_value (&_arguments_iter);
	app = g_variant_dup_string (_tmp36_, NULL);
	g_variant_unref (_tmp36_);
	_tmp37_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp38_ = g_new (gchar*, 5);
	_tmp38__length = 0;
	_tmp38__size = 4;
	_tmp38__length1 = 0;
	g_variant_iter_init (&_tmp39_, _tmp37_);
	for (; (_tmp40_ = g_variant_iter_next_value (&_tmp39_)) != NULL; _tmp38__length1++) {
		if (_tmp38__size == _tmp38__length) {
			_tmp38__size = 2 * _tmp38__size;
			_tmp38_ = g_renew (gchar*, _tmp38_, _tmp38__size + 1);
		}
		_tmp38_[_tmp38__length++] = g_variant_dup_string (_tmp40_, NULL);
		g_variant_unref (_tmp40_);
	}
	permissions_length1 = _tmp38__length1;
	_tmp38_[_tmp38__length] = NULL;
	permissions = _tmp38_;
	g_variant_unref (_tmp37_);
	security_privacy_permission_store_set_permission (self, table, create, id, app, permissions, permissions_length1, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (table);
	_g_free0 (id);
	_g_free0 (app);
	permissions = (_vala_array_free (permissions, permissions_length1, (GDestroyNotify) g_free), NULL);
	;
}

static void
_dbus_security_privacy_permission_store_delete_permission (SecurityPrivacyPermissionStore* self,
                                                           GVariant* _parameters_,
                                                           GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* table = NULL;
	GVariant* _tmp41_;
	gchar* id = NULL;
	GVariant* _tmp42_;
	gchar* app = NULL;
	GVariant* _tmp43_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp41_ = g_variant_iter_next_value (&_arguments_iter);
	table = g_variant_dup_string (_tmp41_, NULL);
	g_variant_unref (_tmp41_);
	_tmp42_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_dup_string (_tmp42_, NULL);
	g_variant_unref (_tmp42_);
	_tmp43_ = g_variant_iter_next_value (&_arguments_iter);
	app = g_variant_dup_string (_tmp43_, NULL);
	g_variant_unref (_tmp43_);
	security_privacy_permission_store_delete_permission (self, table, id, app, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (table);
	_g_free0 (id);
	_g_free0 (app);
	;
}

static void
_dbus_security_privacy_permission_store_get_permission (SecurityPrivacyPermissionStore* self,
                                                        GVariant* _parameters_,
                                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* table = NULL;
	GVariant* _tmp44_;
	gchar* id = NULL;
	GVariant* _tmp45_;
	gchar* app = NULL;
	GVariant* _tmp46_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar** result;
	gint result_length1 = 0;
	gchar** _tmp47_;
	GVariantBuilder _tmp48_;
	gint _tmp49_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp44_ = g_variant_iter_next_value (&_arguments_iter);
	table = g_variant_dup_string (_tmp44_, NULL);
	g_variant_unref (_tmp44_);
	_tmp45_ = g_variant_iter_next_value (&_arguments_iter);
	id = g_variant_dup_string (_tmp45_, NULL);
	g_variant_unref (_tmp45_);
	_tmp46_ = g_variant_iter_next_value (&_arguments_iter);
	app = g_variant_dup_string (_tmp46_, NULL);
	g_variant_unref (_tmp46_);
	result = security_privacy_permission_store_get_permission (self, table, id, app, &result_length1, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_tmp47_ = result;
	g_variant_builder_init (&_tmp48_, G_VARIANT_TYPE ("as"));
	for (_tmp49_ = 0; _tmp49_ < result_length1; _tmp49_++) {
		g_variant_builder_add_value (&_tmp48_, g_variant_new_string (*_tmp47_));
		_tmp47_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp48_));
	result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (table);
	_g_free0 (id);
	_g_free0 (app);
	;
}

static void
_dbus_security_privacy_permission_store_list (SecurityPrivacyPermissionStore* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* table = NULL;
	GVariant* _tmp50_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar** result;
	gint result_length1 = 0;
	gchar** _tmp51_;
	GVariantBuilder _tmp52_;
	gint _tmp53_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp50_ = g_variant_iter_next_value (&_arguments_iter);
	table = g_variant_dup_string (_tmp50_, NULL);
	g_variant_unref (_tmp50_);
	result = security_privacy_permission_store_list (self, table, &result_length1, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_tmp51_ = result;
	g_variant_builder_init (&_tmp52_, G_VARIANT_TYPE ("as"));
	for (_tmp53_ = 0; _tmp53_ < result_length1; _tmp53_++) {
		g_variant_builder_add_value (&_tmp52_, g_variant_new_string (*_tmp51_));
		_tmp51_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp52_));
	result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (table);
	;
}

static void
security_privacy_permission_store_dbus_interface_method_call (GDBusConnection* connection,
                                                              const gchar* sender,
                                                              const gchar* object_path,
                                                              const gchar* interface_name,
                                                              const gchar* method_name,
                                                              GVariant* parameters,
                                                              GDBusMethodInvocation* invocation,
                                                              gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "Lookup") == 0) {
		_dbus_security_privacy_permission_store_lookup (object, parameters, invocation);
	} else if (strcmp (method_name, "Set") == 0) {
		_dbus_security_privacy_permission_store_set (object, parameters, invocation);
	} else if (strcmp (method_name, "Delete") == 0) {
		_dbus_security_privacy_permission_store_delete (object, parameters, invocation);
	} else if (strcmp (method_name, "SetValue") == 0) {
		_dbus_security_privacy_permission_store_set_value (object, parameters, invocation);
	} else if (strcmp (method_name, "SetPermission") == 0) {
		_dbus_security_privacy_permission_store_set_permission (object, parameters, invocation);
	} else if (strcmp (method_name, "DeletePermission") == 0) {
		_dbus_security_privacy_permission_store_delete_permission (object, parameters, invocation);
	} else if (strcmp (method_name, "GetPermission") == 0) {
		_dbus_security_privacy_permission_store_get_permission (object, parameters, invocation);
	} else if (strcmp (method_name, "List") == 0) {
		_dbus_security_privacy_permission_store_list (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_security_privacy_permission_store_get_version (SecurityPrivacyPermissionStore* self)
{
	guint result;
	GVariant* _reply;
	result = security_privacy_permission_store_get_version (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
security_privacy_permission_store_dbus_interface_get_property (GDBusConnection* connection,
                                                               const gchar* sender,
                                                               const gchar* object_path,
                                                               const gchar* interface_name,
                                                               const gchar* property_name,
                                                               GError** error,
                                                               gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "Version") == 0) {
		return _dbus_security_privacy_permission_store_get_version (object);
	}
	return NULL;
}

static gboolean
security_privacy_permission_store_dbus_interface_set_property (GDBusConnection* connection,
                                                               const gchar* sender,
                                                               const gchar* object_path,
                                                               const gchar* interface_name,
                                                               const gchar* property_name,
                                                               GVariant* value,
                                                               GError** error,
                                                               gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

static void
_dbus_security_privacy_permission_store_changed (GObject* _sender,
                                                 const gchar* table,
                                                 const gchar* id,
                                                 gboolean deleted,
                                                 GVariant* data,
                                                 GVariant* permissions,
                                                 gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (table));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (deleted));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_variant (data));
	g_variant_builder_add_value (&_arguments_builder, permissions);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.impl.portal.PermissionStore", "Changed", _arguments, NULL);
}

guint
security_privacy_permission_store_register_object (gpointer object,
                                                   GDBusConnection* connection,
                                                   const gchar* path,
                                                   GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_security_privacy_permission_store_dbus_interface_info), &_security_privacy_permission_store_dbus_interface_vtable, data, _security_privacy_permission_store_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "changed", (GCallback) _dbus_security_privacy_permission_store_changed, data);
	return result;
}

static void
_security_privacy_permission_store_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_security_privacy_permission_store_changed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

