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

/*
 * Copyright (c) 2026 focus-timer contributors
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

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

typedef GDBusProxy SniStatusNotifierWatcherProxy;
typedef GDBusProxyClass SniStatusNotifierWatcherProxyClass;
typedef struct _SniStatusNotifierWatcherRegisterStatusNotifierItemReadyData SniStatusNotifierWatcherRegisterStatusNotifierItemReadyData;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))

struct _SniStatusNotifierWatcherRegisterStatusNotifierItemReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* service;
};

static GType sni_status_notifier_watcher_type_id = 0;

static void sni_status_notifier_watcher_proxy_g_signal (GDBusProxy* proxy,
                                                 const gchar* sender_name,
                                                 const gchar* signal_name,
                                                 GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void sni_status_notifier_watcher_proxy_register_status_notifier_item_async (SniStatusNotifierWatcher* self,
                                                                            const gchar* service,
                                                                            GAsyncReadyCallback _callback_,
                                                                            gpointer _user_data_);
static void sni_status_notifier_watcher_proxy_register_status_notifier_item_finish (SniStatusNotifierWatcher* self,
                                                                             GAsyncResult* _res_,
                                                                             GError** error);
static gboolean sni_status_notifier_watcher_dbus_proxy_get_is_status_notifier_host_registered (SniStatusNotifierWatcher* self);
static gint32 sni_status_notifier_watcher_dbus_proxy_get_protocol_version (SniStatusNotifierWatcher* self);
static void sni_status_notifier_watcher_proxy_sni_status_notifier_watcher_interface_init (SniStatusNotifierWatcherIface* iface);
static void _dbus_sni_status_notifier_watcher_register_status_notifier_item (SniStatusNotifierWatcher* self,
                                                                      GVariant* _parameters_,
                                                                      GDBusMethodInvocation* invocation);
static void _dbus_sni_status_notifier_watcher_register_status_notifier_item_ready (GObject * source_object,
                                                                            GAsyncResult * _res_,
                                                                            gpointer _user_data_);
static void sni_status_notifier_watcher_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* sni_status_notifier_watcher_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_sni_status_notifier_watcher_get_is_status_notifier_host_registered (SniStatusNotifierWatcher* self);
static GVariant* _dbus_sni_status_notifier_watcher_get_protocol_version (SniStatusNotifierWatcher* self);
static gboolean sni_status_notifier_watcher_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 _sni_status_notifier_watcher_unregister_object (gpointer user_data);
static guint8* _vala_array_dup1 (guint8* self,
                          gssize length);
static void _vala_SniPixmap_array_free (SniPixmap * array,
                                 gssize array_length);
VALA_EXTERN GVariant* sni_serialize_pixmaps (SniPixmap* pixmaps,
                                 gint pixmaps_length1);
static SniPixmap* _vala_array_dup2 (SniPixmap* self,
                             gssize length);
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 inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static const GDBusArgInfo _sni_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_service = {-1, "service", "s", NULL};
static const GDBusArgInfo * const _sni_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_in[] = {&_sni_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_service, NULL};
static const GDBusArgInfo * const _sni_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_out[] = {NULL};
static const GDBusMethodInfo _sni_status_notifier_watcher_dbus_method_info_register_status_notifier_item = {-1, "RegisterStatusNotifierItem", (GDBusArgInfo **) (&_sni_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_in), (GDBusArgInfo **) (&_sni_status_notifier_watcher_dbus_arg_info_register_status_notifier_item_out), NULL};
static const GDBusMethodInfo * const _sni_status_notifier_watcher_dbus_method_info[] = {&_sni_status_notifier_watcher_dbus_method_info_register_status_notifier_item, NULL};
static const GDBusSignalInfo * const _sni_status_notifier_watcher_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _sni_status_notifier_watcher_dbus_property_info_is_status_notifier_host_registered = {-1, "IsStatusNotifierHostRegistered", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sni_status_notifier_watcher_dbus_property_info_protocol_version = {-1, "ProtocolVersion", "i", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _sni_status_notifier_watcher_dbus_property_info[] = {&_sni_status_notifier_watcher_dbus_property_info_is_status_notifier_host_registered, &_sni_status_notifier_watcher_dbus_property_info_protocol_version, NULL};
static const GDBusInterfaceInfo _sni_status_notifier_watcher_dbus_interface_info = {-1, "org.kde.StatusNotifierWatcher", (GDBusMethodInfo **) (&_sni_status_notifier_watcher_dbus_method_info), (GDBusSignalInfo **) (&_sni_status_notifier_watcher_dbus_signal_info), (GDBusPropertyInfo **) (&_sni_status_notifier_watcher_dbus_property_info), NULL};
static const GDBusInterfaceVTable _sni_status_notifier_watcher_dbus_interface_vtable = {sni_status_notifier_watcher_dbus_interface_method_call, sni_status_notifier_watcher_dbus_interface_get_property, sni_status_notifier_watcher_dbus_interface_set_property};

void
sni_status_notifier_watcher_register_status_notifier_item (SniStatusNotifierWatcher* self,
                                                           const gchar* service,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_)
{
	SniStatusNotifierWatcherIface* _iface_;
	_iface_ = SNI_STATUS_NOTIFIER_WATCHER_GET_INTERFACE (self);
	if (_iface_->register_status_notifier_item) {
		_iface_->register_status_notifier_item (self, service, _callback_, _user_data_);
	}
}

void
sni_status_notifier_watcher_register_status_notifier_item_finish (SniStatusNotifierWatcher* self,
                                                                  GAsyncResult* _res_,
                                                                  GError** error)
{
	SniStatusNotifierWatcherIface* _iface_;
	_iface_ = SNI_STATUS_NOTIFIER_WATCHER_GET_INTERFACE (self);
	if (_iface_->register_status_notifier_item_finish) {
		_iface_->register_status_notifier_item_finish (self, _res_, error);
	}
}

gboolean
sni_status_notifier_watcher_get_is_status_notifier_host_registered (SniStatusNotifierWatcher* self)
{
	SniStatusNotifierWatcherIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SNI_STATUS_NOTIFIER_WATCHER_GET_INTERFACE (self);
	if (_iface_->get_is_status_notifier_host_registered) {
		return _iface_->get_is_status_notifier_host_registered (self);
	}
	return FALSE;
}

gint32
sni_status_notifier_watcher_get_protocol_version (SniStatusNotifierWatcher* self)
{
	SniStatusNotifierWatcherIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = SNI_STATUS_NOTIFIER_WATCHER_GET_INTERFACE (self);
	if (_iface_->get_protocol_version) {
		return _iface_->get_protocol_version (self);
	}
	return -1;
}

static void
sni_status_notifier_watcher_default_init (SniStatusNotifierWatcherIface * iface,
                                          gpointer iface_data)
{
}

GType
sni_status_notifier_watcher_get_type (void)
{
	return sni_status_notifier_watcher_type_id;
}

GType
sni_status_notifier_watcher_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (SniStatusNotifierWatcherIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sni_status_notifier_watcher_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	sni_status_notifier_watcher_type_id = g_type_module_register_type (module, G_TYPE_INTERFACE, "SniStatusNotifierWatcher", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (sni_status_notifier_watcher_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (sni_status_notifier_watcher_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) sni_status_notifier_watcher_proxy_get_type);
	g_type_set_qdata (sni_status_notifier_watcher_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.kde.StatusNotifierWatcher");
	g_type_set_qdata (sni_status_notifier_watcher_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_sni_status_notifier_watcher_dbus_interface_info));
	g_type_set_qdata (sni_status_notifier_watcher_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) sni_status_notifier_watcher_register_object);
	return sni_status_notifier_watcher_type_id;
}

G_DEFINE_DYNAMIC_TYPE_EXTENDED (SniStatusNotifierWatcherProxy, sni_status_notifier_watcher_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE_DYNAMIC (SNI_TYPE_STATUS_NOTIFIER_WATCHER, sni_status_notifier_watcher_proxy_sni_status_notifier_watcher_interface_init) )
static void
sni_status_notifier_watcher_proxy_class_init (SniStatusNotifierWatcherProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = sni_status_notifier_watcher_proxy_g_signal;
}

static void
sni_status_notifier_watcher_proxy_g_signal (GDBusProxy* proxy,
                                            const gchar* sender_name,
                                            const gchar* signal_name,
                                            GVariant* parameters)
{
}

static void
sni_status_notifier_watcher_proxy_class_finalize (SniStatusNotifierWatcherProxyClass* klass)
{
}

void
sni_status_notifier_watcher_proxy_register_dynamic_type (GTypeModule* module)
{
	sni_status_notifier_watcher_proxy_register_type (module);
}

static void
sni_status_notifier_watcher_proxy_init (SniStatusNotifierWatcherProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_sni_status_notifier_watcher_dbus_interface_info));
}

static void
_vala_g_async_ready_callback (GObject *source_object,
                              GAsyncResult *res,
                              void *user_data)
{
	g_task_return_pointer (user_data, g_object_ref (res), g_object_unref);
	g_object_unref (user_data);
}

static void
sni_status_notifier_watcher_proxy_register_status_notifier_item_async (SniStatusNotifierWatcher* self,
                                                                       const gchar* service,
                                                                       GAsyncReadyCallback _callback_,
                                                                       gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	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.kde.StatusNotifierWatcher", "RegisterStatusNotifierItem");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (service));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
sni_status_notifier_watcher_proxy_register_status_notifier_item_finish (SniStatusNotifierWatcher* self,
                                                                        GAsyncResult* _res_,
                                                                        GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	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 gboolean
sni_status_notifier_watcher_dbus_proxy_get_is_status_notifier_host_registered (SniStatusNotifierWatcher* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "IsStatusNotifierHostRegistered");
	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.kde.StatusNotifierWatcher"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("IsStatusNotifierHostRegistered"));
		_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, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp0_ = FALSE;
			return _tmp0_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gint32
sni_status_notifier_watcher_dbus_proxy_get_protocol_version (SniStatusNotifierWatcher* self)
{
	GVariant *_inner_reply;
	gint32 _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "ProtocolVersion");
	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.kde.StatusNotifierWatcher"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("ProtocolVersion"));
		_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, -1, NULL, NULL);
		if (!_reply) {
			gint32 _tmp1_ = 0;
			return _tmp1_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_int32 (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
sni_status_notifier_watcher_proxy_sni_status_notifier_watcher_interface_init (SniStatusNotifierWatcherIface* iface)
{
	iface->register_status_notifier_item = sni_status_notifier_watcher_proxy_register_status_notifier_item_async;
	iface->register_status_notifier_item_finish = sni_status_notifier_watcher_proxy_register_status_notifier_item_finish;
	iface->get_is_status_notifier_host_registered = sni_status_notifier_watcher_dbus_proxy_get_is_status_notifier_host_registered;
	iface->get_protocol_version = sni_status_notifier_watcher_dbus_proxy_get_protocol_version;
}

static void
_dbus_sni_status_notifier_watcher_register_status_notifier_item (SniStatusNotifierWatcher* self,
                                                                 GVariant* _parameters_,
                                                                 GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SniStatusNotifierWatcherRegisterStatusNotifierItemReadyData* _ready_data;
	GVariant* _tmp2_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (SniStatusNotifierWatcherRegisterStatusNotifierItemReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp2_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->service = g_variant_dup_string (_tmp2_, NULL);
	g_variant_unref (_tmp2_);
	sni_status_notifier_watcher_register_status_notifier_item (self, _ready_data->service, (GAsyncReadyCallback) _dbus_sni_status_notifier_watcher_register_status_notifier_item_ready, _ready_data);
	_error:
	;
}

static void
_dbus_sni_status_notifier_watcher_register_status_notifier_item_ready (GObject * source_object,
                                                                       GAsyncResult * _res_,
                                                                       gpointer _user_data_)
{
	SniStatusNotifierWatcherRegisterStatusNotifierItemReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	sni_status_notifier_watcher_register_status_notifier_item_finish ((SniStatusNotifierWatcher*) source_object, _res_, &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 (_ready_data->service);
	g_slice_free (SniStatusNotifierWatcherRegisterStatusNotifierItemReadyData, _ready_data);
}

static void
sni_status_notifier_watcher_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, "RegisterStatusNotifierItem") == 0) {
		_dbus_sni_status_notifier_watcher_register_status_notifier_item (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_sni_status_notifier_watcher_get_is_status_notifier_host_registered (SniStatusNotifierWatcher* self)
{
	gboolean result;
	GVariant* _reply;
	result = sni_status_notifier_watcher_get_is_status_notifier_host_registered (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_sni_status_notifier_watcher_get_protocol_version (SniStatusNotifierWatcher* self)
{
	gint32 result;
	GVariant* _reply;
	result = sni_status_notifier_watcher_get_protocol_version (self);
	_reply = g_variant_new_int32 (result);
	return _reply;
}

static GVariant*
sni_status_notifier_watcher_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, "IsStatusNotifierHostRegistered") == 0) {
		return _dbus_sni_status_notifier_watcher_get_is_status_notifier_host_registered (object);
	} else if (strcmp (property_name, "ProtocolVersion") == 0) {
		return _dbus_sni_status_notifier_watcher_get_protocol_version (object);
	}
	return NULL;
}

static gboolean
sni_status_notifier_watcher_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)
{
	return FALSE;
}

guint
sni_status_notifier_watcher_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 *) (&_sni_status_notifier_watcher_dbus_interface_info), &_sni_status_notifier_watcher_dbus_interface_vtable, data, _sni_status_notifier_watcher_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_sni_status_notifier_watcher_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

gchar*
sni_indicator_status_to_string (SniIndicatorStatus self)
{
	gchar* result;
	switch (self) {
		case SNI_INDICATOR_STATUS_PASSIVE:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("Passive");
			result = _tmp0_;
			return result;
		}
		case SNI_INDICATOR_STATUS_ACTIVE:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("Active");
			result = _tmp1_;
			return result;
		}
		case SNI_INDICATOR_STATUS_NEEDS_ATTENTION:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("NeedsAttention");
			result = _tmp2_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

SniIndicatorStatus
sni_indicator_status_from_string (const gchar* status)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	SniIndicatorStatus result;
	_tmp0_ = status;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("Passive")))) {
		switch (0) {
			default:
			{
				result = SNI_INDICATOR_STATUS_PASSIVE;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("NeedsAttention")))) {
		switch (0) {
			default:
			{
				result = SNI_INDICATOR_STATUS_NEEDS_ATTENTION;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = SNI_INDICATOR_STATUS_ACTIVE;
				return result;
			}
		}
	}
}

static GType
sni_indicator_status_get_type_once (void)
{
	static const GEnumValue values[] = {{SNI_INDICATOR_STATUS_PASSIVE, "SNI_INDICATOR_STATUS_PASSIVE", "passive"}, {SNI_INDICATOR_STATUS_ACTIVE, "SNI_INDICATOR_STATUS_ACTIVE", "active"}, {SNI_INDICATOR_STATUS_NEEDS_ATTENTION, "SNI_INDICATOR_STATUS_NEEDS_ATTENTION", "needs-attention"}, {0, NULL, NULL}};
	GType sni_indicator_status_type_id;
	sni_indicator_status_type_id = g_enum_register_static ("SniIndicatorStatus", values);
	return sni_indicator_status_type_id;
}

GType
sni_indicator_status_get_type (void)
{
	static volatile gsize sni_indicator_status_type_id__once = 0;
	if (g_once_init_enter (&sni_indicator_status_type_id__once)) {
		GType sni_indicator_status_type_id;
		sni_indicator_status_type_id = sni_indicator_status_get_type_once ();
		g_once_init_leave (&sni_indicator_status_type_id__once, sni_indicator_status_type_id);
	}
	return sni_indicator_status_type_id__once;
}

GVariant*
sni_pixmap_to_variant (SniPixmap *self)
{
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	const GVariantType* _tmp2_;
	guint8* _tmp3_;
	gint _tmp3__length1;
	GBytes* _tmp4_;
	GBytes* _tmp5_;
	GVariant* _tmp6_;
	GVariant** _tmp7_;
	GVariant** _tmp8_;
	gint _tmp8__length1;
	GVariant* _tmp9_;
	GVariant* _tmp10_;
	GVariant* result;
	_tmp0_ = g_variant_new_int32 ((*self).width);
	g_variant_ref_sink (_tmp0_);
	_tmp1_ = g_variant_new_int32 ((*self).height);
	g_variant_ref_sink (_tmp1_);
	_tmp2_ = G_VARIANT_TYPE_BYTE;
	_tmp3_ = (*self).data;
	_tmp3__length1 = (*self).data_length1;
	_tmp4_ = g_bytes_new (_tmp3_, _tmp3__length1);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_variant_new_from_bytes (_tmp2_, _tmp5_, TRUE);
	g_variant_ref_sink (_tmp6_);
	_tmp7_ = g_new0 (GVariant*, 3 + 1);
	_tmp7_[0] = _tmp0_;
	_tmp7_[1] = _tmp1_;
	_tmp7_[2] = _tmp6_;
	_tmp8_ = _tmp7_;
	_tmp8__length1 = 3;
	_tmp9_ = g_variant_new_tuple (_tmp8_, 3);
	g_variant_ref_sink (_tmp9_);
	_tmp10_ = _tmp9_;
	_tmp8_ = (_vala_array_free (_tmp8_, _tmp8__length1, (GDestroyNotify) g_variant_unref), NULL);
	_g_bytes_unref0 (_tmp5_);
	result = _tmp10_;
	return result;
}

static guint8*
_vala_array_dup1 (guint8* self,
                  gssize length)
{
	if (length > 0) {
		return _vala_memdup2 (self, length * sizeof (guint8));
	}
	return NULL;
}

void
sni_pixmap_copy (const SniPixmap* self,
                 SniPixmap* dest)
{
	guint8* _tmp0_;
	gint _tmp0__length1;
	guint8* _tmp1_;
	gint _tmp1__length1;
	(*dest).width = (*self).width;
	(*dest).height = (*self).height;
	_tmp0_ = (*self).data;
	_tmp0__length1 = (*self).data_length1;
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup1 (_tmp0_, _tmp0__length1) : _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	(*dest).data = (g_free ((*dest).data), NULL);
	(*dest).data = _tmp1_;
	(*dest).data_length1 = _tmp1__length1;
}

void
sni_pixmap_destroy (SniPixmap* self)
{
	(*self).data = (g_free ((*self).data), NULL);
}

SniPixmap*
sni_pixmap_dup (const SniPixmap* self)
{
	SniPixmap* dup;
	dup = g_new0 (SniPixmap, 1);
	sni_pixmap_copy (self, dup);
	return dup;
}

void
sni_pixmap_free (SniPixmap* self)
{
	sni_pixmap_destroy (self);
	g_free (self);
}

static GType
sni_pixmap_get_type_once (void)
{
	GType sni_pixmap_type_id;
	sni_pixmap_type_id = g_boxed_type_register_static ("SniPixmap", (GBoxedCopyFunc) sni_pixmap_dup, (GBoxedFreeFunc) sni_pixmap_free);
	return sni_pixmap_type_id;
}

GType
sni_pixmap_get_type (void)
{
	static volatile gsize sni_pixmap_type_id__once = 0;
	if (g_once_init_enter (&sni_pixmap_type_id__once)) {
		GType sni_pixmap_type_id;
		sni_pixmap_type_id = sni_pixmap_get_type_once ();
		g_once_init_leave (&sni_pixmap_type_id__once, sni_pixmap_type_id);
	}
	return sni_pixmap_type_id__once;
}

static void
_vala_SniPixmap_array_free (SniPixmap * array,
                            gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			sni_pixmap_destroy (&array[i]);
		}
	}
	g_free (array);
}

void
sni_tooltip_init (SniTooltip *self)
{
	gchar* _tmp0_;
	SniPixmap* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	memset (self, 0, sizeof (SniTooltip));
	_tmp0_ = g_strdup ("");
	_g_free0 ((*self).icon_name);
	(*self).icon_name = _tmp0_;
	_tmp1_ = g_new0 (SniPixmap, 0);
	(*self).icon_pixmaps = (_vala_SniPixmap_array_free ((*self).icon_pixmaps, (*self).icon_pixmaps_length1), NULL);
	(*self).icon_pixmaps = _tmp1_;
	(*self).icon_pixmaps_length1 = 0;
	_tmp2_ = g_strdup ("");
	_g_free0 ((*self).title);
	(*self).title = _tmp2_;
	_tmp3_ = g_strdup ("");
	_g_free0 ((*self).description);
	(*self).description = _tmp3_;
}

GVariant*
sni_tooltip_to_variant (SniTooltip *self)
{
	const gchar* _tmp0_;
	GVariant* _tmp1_;
	SniPixmap* _tmp2_;
	gint _tmp2__length1;
	GVariant* _tmp3_;
	const gchar* _tmp4_;
	GVariant* _tmp5_;
	const gchar* _tmp6_;
	GVariant* _tmp7_;
	GVariant** _tmp8_;
	GVariant** _tmp9_;
	gint _tmp9__length1;
	GVariant* _tmp10_;
	GVariant* _tmp11_;
	GVariant* result;
	_tmp0_ = (*self).icon_name;
	_tmp1_ = g_variant_new_string (_tmp0_);
	g_variant_ref_sink (_tmp1_);
	_tmp2_ = (*self).icon_pixmaps;
	_tmp2__length1 = (*self).icon_pixmaps_length1;
	_tmp3_ = sni_serialize_pixmaps (_tmp2_, (gint) _tmp2__length1);
	_tmp4_ = (*self).title;
	_tmp5_ = g_variant_new_string (_tmp4_);
	g_variant_ref_sink (_tmp5_);
	_tmp6_ = (*self).description;
	_tmp7_ = g_variant_new_string (_tmp6_);
	g_variant_ref_sink (_tmp7_);
	_tmp8_ = g_new0 (GVariant*, 4 + 1);
	_tmp8_[0] = _tmp1_;
	_tmp8_[1] = _tmp3_;
	_tmp8_[2] = _tmp5_;
	_tmp8_[3] = _tmp7_;
	_tmp9_ = _tmp8_;
	_tmp9__length1 = 4;
	_tmp10_ = g_variant_new_tuple (_tmp9_, 4);
	g_variant_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	_tmp9_ = (_vala_array_free (_tmp9_, _tmp9__length1, (GDestroyNotify) g_variant_unref), NULL);
	result = _tmp11_;
	return result;
}

gboolean
sni_tooltip_equals (SniTooltip *self,
                    SniTooltip* other)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_;
	SniTooltip _tmp3_;
	const gchar* _tmp4_;
	gboolean result;
	g_return_val_if_fail (other != NULL, FALSE);
	_tmp2_ = (*self).description;
	_tmp3_ = *other;
	_tmp4_ = _tmp3_.description;
	if (g_strcmp0 (_tmp2_, _tmp4_) == 0) {
		const gchar* _tmp5_;
		SniTooltip _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = (*self).title;
		_tmp6_ = *other;
		_tmp7_ = _tmp6_.title;
		_tmp1_ = g_strcmp0 (_tmp5_, _tmp7_) == 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		const gchar* _tmp8_;
		SniTooltip _tmp9_;
		const gchar* _tmp10_;
		_tmp8_ = (*self).icon_name;
		_tmp9_ = *other;
		_tmp10_ = _tmp9_.icon_name;
		_tmp0_ = g_strcmp0 (_tmp8_, _tmp10_) == 0;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static SniPixmap*
_vala_array_dup2 (SniPixmap* self,
                  gssize length)
{
	if (length > 0) {
		SniPixmap* result;
		gssize i;
		result = g_new0 (SniPixmap, length);
		for (i = 0; i < length; i++) {
			SniPixmap _tmp0_;
			SniPixmap _tmp1_ = {0};
			_tmp0_ = self[i];
			sni_pixmap_copy (&_tmp0_, &_tmp1_);
			result[i] = _tmp1_;
		}
		return result;
	}
	return NULL;
}

void
sni_tooltip_copy (const SniTooltip* self,
                  SniTooltip* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	SniPixmap* _tmp2_;
	gint _tmp2__length1;
	SniPixmap* _tmp3_;
	gint _tmp3__length1;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	_tmp0_ = (*self).icon_name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).icon_name);
	(*dest).icon_name = _tmp1_;
	_tmp2_ = (*self).icon_pixmaps;
	_tmp2__length1 = (*self).icon_pixmaps_length1;
	_tmp3_ = (_tmp2_ != NULL) ? _vala_array_dup2 (_tmp2_, _tmp2__length1) : _tmp2_;
	_tmp3__length1 = _tmp2__length1;
	(*dest).icon_pixmaps = (_vala_SniPixmap_array_free ((*dest).icon_pixmaps, (*dest).icon_pixmaps_length1), NULL);
	(*dest).icon_pixmaps = _tmp3_;
	(*dest).icon_pixmaps_length1 = _tmp3__length1;
	_tmp4_ = (*self).title;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 ((*dest).title);
	(*dest).title = _tmp5_;
	_tmp6_ = (*self).description;
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 ((*dest).description);
	(*dest).description = _tmp7_;
}

void
sni_tooltip_destroy (SniTooltip* self)
{
	_g_free0 ((*self).icon_name);
	(*self).icon_pixmaps = (_vala_SniPixmap_array_free ((*self).icon_pixmaps, (*self).icon_pixmaps_length1), NULL);
	_g_free0 ((*self).title);
	_g_free0 ((*self).description);
}

SniTooltip*
sni_tooltip_dup (const SniTooltip* self)
{
	SniTooltip* dup;
	dup = g_new0 (SniTooltip, 1);
	sni_tooltip_copy (self, dup);
	return dup;
}

void
sni_tooltip_free (SniTooltip* self)
{
	sni_tooltip_destroy (self);
	g_free (self);
}

static GType
sni_tooltip_get_type_once (void)
{
	GType sni_tooltip_type_id;
	sni_tooltip_type_id = g_boxed_type_register_static ("SniTooltip", (GBoxedCopyFunc) sni_tooltip_dup, (GBoxedFreeFunc) sni_tooltip_free);
	return sni_tooltip_type_id;
}

GType
sni_tooltip_get_type (void)
{
	static volatile gsize sni_tooltip_type_id__once = 0;
	if (g_once_init_enter (&sni_tooltip_type_id__once)) {
		GType sni_tooltip_type_id;
		sni_tooltip_type_id = sni_tooltip_get_type_once ();
		g_once_init_leave (&sni_tooltip_type_id__once, sni_tooltip_type_id);
	}
	return sni_tooltip_type_id__once;
}

gchar*
sni_menu_toggle_type_to_string (SniMenuToggleType self)
{
	gchar* result;
	switch (self) {
		case SNI_MENU_TOGGLE_TYPE_NONE:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("");
			result = _tmp0_;
			return result;
		}
		case SNI_MENU_TOGGLE_TYPE_CHECKMARK:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("checkmark");
			result = _tmp1_;
			return result;
		}
		case SNI_MENU_TOGGLE_TYPE_RADIO:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("radio");
			result = _tmp2_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static GType
sni_menu_toggle_type_get_type_once (void)
{
	static const GEnumValue values[] = {{SNI_MENU_TOGGLE_TYPE_NONE, "SNI_MENU_TOGGLE_TYPE_NONE", "none"}, {SNI_MENU_TOGGLE_TYPE_CHECKMARK, "SNI_MENU_TOGGLE_TYPE_CHECKMARK", "checkmark"}, {SNI_MENU_TOGGLE_TYPE_RADIO, "SNI_MENU_TOGGLE_TYPE_RADIO", "radio"}, {0, NULL, NULL}};
	GType sni_menu_toggle_type_type_id;
	sni_menu_toggle_type_type_id = g_enum_register_static ("SniMenuToggleType", values);
	return sni_menu_toggle_type_type_id;
}

GType
sni_menu_toggle_type_get_type (void)
{
	static volatile gsize sni_menu_toggle_type_type_id__once = 0;
	if (g_once_init_enter (&sni_menu_toggle_type_type_id__once)) {
		GType sni_menu_toggle_type_type_id;
		sni_menu_toggle_type_type_id = sni_menu_toggle_type_get_type_once ();
		g_once_init_leave (&sni_menu_toggle_type_type_id__once, sni_menu_toggle_type_type_id);
	}
	return sni_menu_toggle_type_type_id__once;
}

gchar*
sni_menu_item_type_to_string (SniMenuItemType self)
{
	gchar* result;
	switch (self) {
		case SNI_MENU_ITEM_TYPE_STANDARD:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("standard");
			result = _tmp0_;
			return result;
		}
		case SNI_MENU_ITEM_TYPE_SEPARATOR:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("separator");
			result = _tmp1_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static GType
sni_menu_item_type_get_type_once (void)
{
	static const GEnumValue values[] = {{SNI_MENU_ITEM_TYPE_STANDARD, "SNI_MENU_ITEM_TYPE_STANDARD", "standard"}, {SNI_MENU_ITEM_TYPE_SEPARATOR, "SNI_MENU_ITEM_TYPE_SEPARATOR", "separator"}, {0, NULL, NULL}};
	GType sni_menu_item_type_type_id;
	sni_menu_item_type_type_id = g_enum_register_static ("SniMenuItemType", values);
	return sni_menu_item_type_type_id;
}

GType
sni_menu_item_type_get_type (void)
{
	static volatile gsize sni_menu_item_type_type_id__once = 0;
	if (g_once_init_enter (&sni_menu_item_type_type_id__once)) {
		GType sni_menu_item_type_type_id;
		sni_menu_item_type_type_id = sni_menu_item_type_get_type_once ();
		g_once_init_leave (&sni_menu_item_type_type_id__once, sni_menu_item_type_type_id);
	}
	return sni_menu_item_type_type_id__once;
}

/**
     * Menu item properties exported in the D-Bus API
     */
SniMenuItemProperty
sni_menu_item_property_from_string (const gchar* str)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	static GQuark _tmp1_label5 = 0;
	static GQuark _tmp1_label6 = 0;
	static GQuark _tmp1_label7 = 0;
	static GQuark _tmp1_label8 = 0;
	static GQuark _tmp1_label9 = 0;
	SniMenuItemProperty result;
	g_return_val_if_fail (str != NULL, 0);
	_tmp0_ = str;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("type")))) {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_TYPE;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("label")))) {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_LABEL;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("enabled")))) {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_ENABLED;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("visible")))) {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_VISIBLE;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("icon-name")))) {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_ICON_NAME;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label5) ? _tmp1_label5 : (_tmp1_label5 = g_quark_from_static_string ("toggle-type")))) {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_TOGGLE_TYPE;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label6) ? _tmp1_label6 : (_tmp1_label6 = g_quark_from_static_string ("toggle-state")))) {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_TOGGLE_STATE;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label7) ? _tmp1_label7 : (_tmp1_label7 = g_quark_from_static_string ("children-display")))) {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_CHILDREN_DISPLAY;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label8) ? _tmp1_label8 : (_tmp1_label8 = g_quark_from_static_string ("icon-data")))) {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_ICON_DATA;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label9) ? _tmp1_label9 : (_tmp1_label9 = g_quark_from_static_string ("shortcut")))) {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_SHORTCUT;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = SNI_MENU_ITEM_PROPERTY_INVALID;
				return result;
			}
		}
	}
}

SniMenuItemProperty*
sni_menu_item_property_from_strv (gchar** strv,
                                  gint strv_length1,
                                  gint* result_length1)
{
	SniMenuItemProperty* result;
	if (strv_length1 == 0) {
		gint _tmp0_ = 0;
		SniMenuItemProperty* _tmp1_;
		SniMenuItemProperty* _tmp2_;
		gint _tmp2__length1;
		_tmp1_ = sni_menu_item_property_all (&_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp2__length1 = _tmp0_;
		if (result_length1) {
			*result_length1 = _tmp2__length1;
		}
		result = _tmp2_;
		return result;
	} else {
		SniMenuItemProperty* properties = NULL;
		SniMenuItemProperty* _tmp3_;
		gint properties_length1;
		gint _properties_size_;
		SniMenuItemProperty* _tmp8_;
		gint _tmp8__length1;
		_tmp3_ = g_new0 (SniMenuItemProperty, strv_length1);
		properties = _tmp3_;
		properties_length1 = strv_length1;
		_properties_size_ = properties_length1;
		{
			gint index = 0;
			index = 0;
			{
				gboolean _tmp4_ = FALSE;
				_tmp4_ = TRUE;
				while (TRUE) {
					SniMenuItemProperty* _tmp6_;
					gint _tmp6__length1;
					const gchar* _tmp7_;
					if (!_tmp4_) {
						gint _tmp5_;
						_tmp5_ = index;
						index = _tmp5_ + 1;
					}
					_tmp4_ = FALSE;
					if (!(index < strv_length1)) {
						break;
					}
					_tmp6_ = properties;
					_tmp6__length1 = properties_length1;
					_tmp7_ = strv[index];
					_tmp6_[index] = sni_menu_item_property_from_string (_tmp7_);
				}
			}
		}
		_tmp8_ = properties;
		_tmp8__length1 = properties_length1;
		if (result_length1) {
			*result_length1 = _tmp8__length1;
		}
		result = _tmp8_;
		return result;
	}
}

SniMenuItemProperty*
sni_menu_item_property_all (gint* result_length1)
{
	SniMenuItemProperty* _tmp0_;
	SniMenuItemProperty* _tmp1_;
	gint _tmp1__length1;
	SniMenuItemProperty* result;
	_tmp0_ = g_new0 (SniMenuItemProperty, 8);
	_tmp0_[0] = SNI_MENU_ITEM_PROPERTY_TYPE;
	_tmp0_[1] = SNI_MENU_ITEM_PROPERTY_LABEL;
	_tmp0_[2] = SNI_MENU_ITEM_PROPERTY_ENABLED;
	_tmp0_[3] = SNI_MENU_ITEM_PROPERTY_VISIBLE;
	_tmp0_[4] = SNI_MENU_ITEM_PROPERTY_ICON_NAME;
	_tmp0_[5] = SNI_MENU_ITEM_PROPERTY_TOGGLE_TYPE;
	_tmp0_[6] = SNI_MENU_ITEM_PROPERTY_TOGGLE_STATE;
	_tmp0_[7] = SNI_MENU_ITEM_PROPERTY_CHILDREN_DISPLAY;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 8;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

gchar*
sni_menu_item_property_to_string (SniMenuItemProperty self)
{
	gchar* result;
	switch (self) {
		case SNI_MENU_ITEM_PROPERTY_TYPE:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("type");
			result = _tmp0_;
			return result;
		}
		case SNI_MENU_ITEM_PROPERTY_LABEL:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("label");
			result = _tmp1_;
			return result;
		}
		case SNI_MENU_ITEM_PROPERTY_ENABLED:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("enabled");
			result = _tmp2_;
			return result;
		}
		case SNI_MENU_ITEM_PROPERTY_VISIBLE:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("visible");
			result = _tmp3_;
			return result;
		}
		case SNI_MENU_ITEM_PROPERTY_ICON_NAME:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup ("icon-name");
			result = _tmp4_;
			return result;
		}
		case SNI_MENU_ITEM_PROPERTY_TOGGLE_TYPE:
		{
			gchar* _tmp5_;
			_tmp5_ = g_strdup ("toggle-type");
			result = _tmp5_;
			return result;
		}
		case SNI_MENU_ITEM_PROPERTY_TOGGLE_STATE:
		{
			gchar* _tmp6_;
			_tmp6_ = g_strdup ("toggle-state");
			result = _tmp6_;
			return result;
		}
		case SNI_MENU_ITEM_PROPERTY_CHILDREN_DISPLAY:
		{
			gchar* _tmp7_;
			_tmp7_ = g_strdup ("children-display");
			result = _tmp7_;
			return result;
		}
		case SNI_MENU_ITEM_PROPERTY_ICON_DATA:
		{
			gchar* _tmp8_;
			_tmp8_ = g_strdup ("icon-data");
			result = _tmp8_;
			return result;
		}
		case SNI_MENU_ITEM_PROPERTY_SHORTCUT:
		{
			gchar* _tmp9_;
			_tmp9_ = g_strdup ("shortcut");
			result = _tmp9_;
			return result;
		}
		case SNI_MENU_ITEM_PROPERTY_INVALID:
		{
			gchar* _tmp10_;
			_tmp10_ = g_strdup ("");
			result = _tmp10_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static GType
sni_menu_item_property_get_type_once (void)
{
	static const GEnumValue values[] = {{SNI_MENU_ITEM_PROPERTY_INVALID, "SNI_MENU_ITEM_PROPERTY_INVALID", "invalid"}, {SNI_MENU_ITEM_PROPERTY_TYPE, "SNI_MENU_ITEM_PROPERTY_TYPE", "type"}, {SNI_MENU_ITEM_PROPERTY_LABEL, "SNI_MENU_ITEM_PROPERTY_LABEL", "label"}, {SNI_MENU_ITEM_PROPERTY_ENABLED, "SNI_MENU_ITEM_PROPERTY_ENABLED", "enabled"}, {SNI_MENU_ITEM_PROPERTY_VISIBLE, "SNI_MENU_ITEM_PROPERTY_VISIBLE", "visible"}, {SNI_MENU_ITEM_PROPERTY_ICON_NAME, "SNI_MENU_ITEM_PROPERTY_ICON_NAME", "icon-name"}, {SNI_MENU_ITEM_PROPERTY_TOGGLE_TYPE, "SNI_MENU_ITEM_PROPERTY_TOGGLE_TYPE", "toggle-type"}, {SNI_MENU_ITEM_PROPERTY_TOGGLE_STATE, "SNI_MENU_ITEM_PROPERTY_TOGGLE_STATE", "toggle-state"}, {SNI_MENU_ITEM_PROPERTY_CHILDREN_DISPLAY, "SNI_MENU_ITEM_PROPERTY_CHILDREN_DISPLAY", "children-display"}, {SNI_MENU_ITEM_PROPERTY_ICON_DATA, "SNI_MENU_ITEM_PROPERTY_ICON_DATA", "icon-data"}, {SNI_MENU_ITEM_PROPERTY_SHORTCUT, "SNI_MENU_ITEM_PROPERTY_SHORTCUT", "shortcut"}, {0, NULL, NULL}};
	GType sni_menu_item_property_type_id;
	sni_menu_item_property_type_id = g_enum_register_static ("SniMenuItemProperty", values);
	return sni_menu_item_property_type_id;
}

GType
sni_menu_item_property_get_type (void)
{
	static volatile gsize sni_menu_item_property_type_id__once = 0;
	if (g_once_init_enter (&sni_menu_item_property_type_id__once)) {
		GType sni_menu_item_property_type_id;
		sni_menu_item_property_type_id = sni_menu_item_property_get_type_once ();
		g_once_init_leave (&sni_menu_item_property_type_id__once, sni_menu_item_property_type_id);
	}
	return sni_menu_item_property_type_id__once;
}

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);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

