From 9ce456700bab1a39ee3aa7f95bd7a2f9505d91ec Mon Sep 17 00:00:00 2001 From: kremlin Date: Tue, 22 Jul 2014 16:15:50 -0500 Subject: [PATCH] remove genfiles from repo, instead generate in makefile genfiles (-gen.{c,h}) should be generated at build time instead of being included in the repo. remove them & add relevant recipes/pre-reqs include genfiles in 'clean' recipe --- Makefile | 18 +- src/interfaces/hostnamed/hostnamed-gen.c | 3174 ------ src/interfaces/hostnamed/hostnamed-gen.h | 356 - src/interfaces/localed/localed-gen.c | 2513 ----- src/interfaces/localed/localed-gen.h | 296 - src/interfaces/logind/logind-gen.c | 10875 --------------------- src/interfaces/logind/logind-gen.h | 1405 --- src/interfaces/timedated/timedated-gen.c | 2559 ----- src/interfaces/timedated/timedated-gen.h | 308 - 9 files changed, 13 insertions(+), 21491 deletions(-) delete mode 100644 src/interfaces/hostnamed/hostnamed-gen.c delete mode 100644 src/interfaces/hostnamed/hostnamed-gen.h delete mode 100644 src/interfaces/localed/localed-gen.c delete mode 100644 src/interfaces/localed/localed-gen.h delete mode 100644 src/interfaces/logind/logind-gen.c delete mode 100644 src/interfaces/logind/logind-gen.h delete mode 100644 src/interfaces/timedated/timedated-gen.c delete mode 100644 src/interfaces/timedated/timedated-gen.h diff --git a/Makefile b/Makefile index de3ba75..b802403 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,11 @@ SYSCONFDIR=/etc SRCDIR=src INTFDIR=$(SRCDIR)/interfaces -DBUS_POLICYDIR=$(SYSCONFDIR)/dbus-1/systemd.d +DBUS_POLICYDIR=$(SYSCONFDIR)/dbus-1/system.d DBUS_CONFIGDIR=$(PREFIX)/share/dbus-1/system-services +INVOKE_GENFILE_SCRIPT=./scripts/gen-gdbus-interfaces.sh + all: build build: _build_interface_objs_debug @@ -29,8 +31,8 @@ publish: _build_interface_objs $(CC) -o bin/out.bin $(CFLAGS) $(GLIBEF) $(SANITY) $(SRCDIR)/main.c clean: - rm bin/* - rm bin/obj/* + find ./bin -type f -exec rm {} \; + find $(INTFDIR)/ -type f -iname *-gen.* -exec rm {} \; install: _install_conf _install_interface_binaries @@ -46,18 +48,24 @@ _build_interface_objs_debug: _build_genfile_objs_debug $(CC) -o bin/systemd-timedated $(DEBUGF) $(GLIBEF) $(SANITY) $(INTFDIR)/timedated/timedated.c bin/obj/timedated-gen.o $(CC) -o bin/systemd-logind $(DEBUGF) $(GLIBEF) $(SANITY) $(INTFDIR)/logind/logind.c bin/obj/logind-gen.o -_build_genfile_objs: +_build_genfile_objs: _generate_genfiles $(CC) -o bin/obj/hostnamed-gen.o $(CFLAGS) $(GLIBOF) $(SANITY) -c $(INTFDIR)/hostnamed/hostnamed-gen.c $(CC) -o bin/obj/localed-gen.o $(CFLAGS) $(GLIBOF) $(SANITY) -c $(INTFDIR)/localed/localed-gen.c $(CC) -o bin/obj/timedated-gen.o $(CFLAGS) $(GLIBOF) $(SANITY) -c $(INTFDIR)/timedated/timedated-gen.c $(CC) -o bin/obj/logind-gen.o $(CFLAGS) $(GLIBOF) $(SANITY) -c $(INTFDIR)/logind/logind-gen.c -_build_genfile_objs_debug: +_build_genfile_objs_debug: _generate_genfiles $(CC) -o bin/obj/hostnamed-gen.o $(DEBUGF) $(GLIBOF) $(SANITY) -c $(INTFDIR)/hostnamed/hostnamed-gen.c $(CC) -o bin/obj/localed-gen.o $(DEBUGF) $(GLIBOF) $(SANITY) -c $(INTFDIR)/localed/localed-gen.c $(CC) -o bin/obj/timedated-gen.o $(DEBUGF) $(GLIBOF) $(SANITY) -c $(INTFDIR)/timedated/timedated-gen.c $(CC) -o bin/obj/logind-gen.o $(DEBUGF) $(GLIBOF) $(SANITY) -c $(INTFDIR)/logind/logind-gen.c +_generate_genfiles: + $(INVOKE_GENFILE_SCRIPT) hostnamed + $(INVOKE_GENFILE_SCRIPT) localed + $(INVOKE_GENFILE_SCRIPT) timedated + $(INVOKE_GENFILE_SCRIPT) logind + _install_conf: cp conf/*-dbus.conf $(DBUS_POLICYDIR)/ cp conf/org.freedesktop.*.service $(DBUS_CONFIGDIR)/ diff --git a/src/interfaces/hostnamed/hostnamed-gen.c b/src/interfaces/hostnamed/hostnamed-gen.c deleted file mode 100644 index 480ff72..0000000 --- a/src/interfaces/hostnamed/hostnamed-gen.c +++ /dev/null @@ -1,3174 +0,0 @@ -/* - * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. - * - * The license of this code is the same as for the source it was derived from. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "hostnamed-gen.h" - -#include -#ifdef G_OS_UNIX -# include -#endif - -typedef struct -{ - GDBusArgInfo parent_struct; - gboolean use_gvariant; -} _ExtendedGDBusArgInfo; - -typedef struct -{ - GDBusMethodInfo parent_struct; - const gchar *signal_name; - gboolean pass_fdlist; -} _ExtendedGDBusMethodInfo; - -typedef struct -{ - GDBusSignalInfo parent_struct; - const gchar *signal_name; -} _ExtendedGDBusSignalInfo; - -typedef struct -{ - GDBusPropertyInfo parent_struct; - const gchar *hyphen_name; - gboolean use_gvariant; -} _ExtendedGDBusPropertyInfo; - -typedef struct -{ - GDBusInterfaceInfo parent_struct; - const gchar *hyphen_name; -} _ExtendedGDBusInterfaceInfo; - -typedef struct -{ - const _ExtendedGDBusPropertyInfo *info; - guint prop_id; - GValue orig_value; /* the value before the change */ -} ChangedProperty; - -static void -_changed_property_free (ChangedProperty *data) -{ - g_value_unset (&data->orig_value); - g_free (data); -} - -static gboolean -_g_strv_equal0 (gchar **a, gchar **b) -{ - gboolean ret = FALSE; - guint n; - if (a == NULL && b == NULL) - { - ret = TRUE; - goto out; - } - if (a == NULL || b == NULL) - goto out; - if (g_strv_length (a) != g_strv_length (b)) - goto out; - for (n = 0; a[n] != NULL; n++) - if (g_strcmp0 (a[n], b[n]) != 0) - goto out; - ret = TRUE; -out: - return ret; -} - -static gboolean -_g_variant_equal0 (GVariant *a, GVariant *b) -{ - gboolean ret = FALSE; - if (a == NULL && b == NULL) - { - ret = TRUE; - goto out; - } - if (a == NULL || b == NULL) - goto out; - ret = g_variant_equal (a, b); -out: - return ret; -} - -G_GNUC_UNUSED static gboolean -_g_value_equal (const GValue *a, const GValue *b) -{ - gboolean ret = FALSE; - g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); - switch (G_VALUE_TYPE (a)) - { - case G_TYPE_BOOLEAN: - ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); - break; - case G_TYPE_UCHAR: - ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); - break; - case G_TYPE_INT: - ret = (g_value_get_int (a) == g_value_get_int (b)); - break; - case G_TYPE_UINT: - ret = (g_value_get_uint (a) == g_value_get_uint (b)); - break; - case G_TYPE_INT64: - ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); - break; - case G_TYPE_UINT64: - ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); - break; - case G_TYPE_DOUBLE: - { - /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ - gdouble da = g_value_get_double (a); - gdouble db = g_value_get_double (b); - ret = memcmp (&da, &db, sizeof (gdouble)) == 0; - } - break; - case G_TYPE_STRING: - ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); - break; - case G_TYPE_VARIANT: - ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); - break; - default: - if (G_VALUE_TYPE (a) == G_TYPE_STRV) - ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); - else - g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); - break; - } - return ret; -} - -/* ------------------------------------------------------------------------ - * Code for interface org.freedesktop.hostname1 - * ------------------------------------------------------------------------ - */ - -/** - * SECTION:Hostname1 - * @title: Hostname1 - * @short_description: Generated C code for the org.freedesktop.hostname1 D-Bus interface - * - * This section contains code for working with the org.freedesktop.hostname1 D-Bus interface in C. - */ - -/* ---- Introspection data for org.freedesktop.hostname1 ---- */ - -static const _ExtendedGDBusArgInfo _hostname1_method_info_set_hostname_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _hostname1_method_info_set_hostname_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _hostname1_method_info_set_hostname_IN_ARG_pointers[] = -{ - &_hostname1_method_info_set_hostname_IN_ARG_unnamed_arg0, - &_hostname1_method_info_set_hostname_IN_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _hostname1_method_info_set_hostname = -{ - { - -1, - (gchar *) "SetHostname", - (GDBusArgInfo **) &_hostname1_method_info_set_hostname_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-hostname", - FALSE -}; - -static const _ExtendedGDBusArgInfo _hostname1_method_info_set_static_hostname_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _hostname1_method_info_set_static_hostname_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _hostname1_method_info_set_static_hostname_IN_ARG_pointers[] = -{ - &_hostname1_method_info_set_static_hostname_IN_ARG_unnamed_arg0, - &_hostname1_method_info_set_static_hostname_IN_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _hostname1_method_info_set_static_hostname = -{ - { - -1, - (gchar *) "SetStaticHostname", - (GDBusArgInfo **) &_hostname1_method_info_set_static_hostname_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-static-hostname", - FALSE -}; - -static const _ExtendedGDBusArgInfo _hostname1_method_info_set_pretty_hostname_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _hostname1_method_info_set_pretty_hostname_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _hostname1_method_info_set_pretty_hostname_IN_ARG_pointers[] = -{ - &_hostname1_method_info_set_pretty_hostname_IN_ARG_unnamed_arg0, - &_hostname1_method_info_set_pretty_hostname_IN_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _hostname1_method_info_set_pretty_hostname = -{ - { - -1, - (gchar *) "SetPrettyHostname", - (GDBusArgInfo **) &_hostname1_method_info_set_pretty_hostname_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-pretty-hostname", - FALSE -}; - -static const _ExtendedGDBusArgInfo _hostname1_method_info_set_icon_name_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _hostname1_method_info_set_icon_name_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _hostname1_method_info_set_icon_name_IN_ARG_pointers[] = -{ - &_hostname1_method_info_set_icon_name_IN_ARG_unnamed_arg0, - &_hostname1_method_info_set_icon_name_IN_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _hostname1_method_info_set_icon_name = -{ - { - -1, - (gchar *) "SetIconName", - (GDBusArgInfo **) &_hostname1_method_info_set_icon_name_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-icon-name", - FALSE -}; - -static const _ExtendedGDBusArgInfo _hostname1_method_info_set_chassis_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _hostname1_method_info_set_chassis_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _hostname1_method_info_set_chassis_IN_ARG_pointers[] = -{ - &_hostname1_method_info_set_chassis_IN_ARG_unnamed_arg0, - &_hostname1_method_info_set_chassis_IN_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _hostname1_method_info_set_chassis = -{ - { - -1, - (gchar *) "SetChassis", - (GDBusArgInfo **) &_hostname1_method_info_set_chassis_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-chassis", - FALSE -}; - -static const _ExtendedGDBusMethodInfo * const _hostname1_method_info_pointers[] = -{ - &_hostname1_method_info_set_hostname, - &_hostname1_method_info_set_static_hostname, - &_hostname1_method_info_set_pretty_hostname, - &_hostname1_method_info_set_icon_name, - &_hostname1_method_info_set_chassis, - NULL -}; - -static const GDBusAnnotationInfo _hostname1_property_hostname_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "false", - NULL -}; - -static const GDBusAnnotationInfo * const _hostname1_property_hostname_annotation_info_pointers[] = -{ - &_hostname1_property_hostname_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _hostname1_property_info_hostname = -{ - { - -1, - (gchar *) "Hostname", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_hostname1_property_hostname_annotation_info_pointers - }, - "hostname", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _hostname1_property_info_static_hostname = -{ - { - -1, - (gchar *) "StaticHostname", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "static-hostname", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _hostname1_property_info_pretty_hostname = -{ - { - -1, - (gchar *) "PrettyHostname", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "pretty-hostname", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _hostname1_property_info_icon_name = -{ - { - -1, - (gchar *) "IconName", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "icon-name", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _hostname1_property_info_chassis = -{ - { - -1, - (gchar *) "Chassis", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "chassis", - FALSE -}; - -static const GDBusAnnotationInfo _hostname1_property_kernel_name_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _hostname1_property_kernel_name_annotation_info_pointers[] = -{ - &_hostname1_property_kernel_name_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _hostname1_property_info_kernel_name = -{ - { - -1, - (gchar *) "KernelName", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_hostname1_property_kernel_name_annotation_info_pointers - }, - "kernel-name", - FALSE -}; - -static const GDBusAnnotationInfo _hostname1_property_kernel_release_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _hostname1_property_kernel_release_annotation_info_pointers[] = -{ - &_hostname1_property_kernel_release_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _hostname1_property_info_kernel_release = -{ - { - -1, - (gchar *) "KernelRelease", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_hostname1_property_kernel_release_annotation_info_pointers - }, - "kernel-release", - FALSE -}; - -static const GDBusAnnotationInfo _hostname1_property_kernel_version_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _hostname1_property_kernel_version_annotation_info_pointers[] = -{ - &_hostname1_property_kernel_version_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _hostname1_property_info_kernel_version = -{ - { - -1, - (gchar *) "KernelVersion", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_hostname1_property_kernel_version_annotation_info_pointers - }, - "kernel-version", - FALSE -}; - -static const GDBusAnnotationInfo _hostname1_property_operating_system_pretty_name_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _hostname1_property_operating_system_pretty_name_annotation_info_pointers[] = -{ - &_hostname1_property_operating_system_pretty_name_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _hostname1_property_info_operating_system_pretty_name = -{ - { - -1, - (gchar *) "OperatingSystemPrettyName", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_hostname1_property_operating_system_pretty_name_annotation_info_pointers - }, - "operating-system-pretty-name", - FALSE -}; - -static const GDBusAnnotationInfo _hostname1_property_operating_system_cpename_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _hostname1_property_operating_system_cpename_annotation_info_pointers[] = -{ - &_hostname1_property_operating_system_cpename_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _hostname1_property_info_operating_system_cpename = -{ - { - -1, - (gchar *) "OperatingSystemCPEName", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_hostname1_property_operating_system_cpename_annotation_info_pointers - }, - "operating-system-cpename", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo * const _hostname1_property_info_pointers[] = -{ - &_hostname1_property_info_hostname, - &_hostname1_property_info_static_hostname, - &_hostname1_property_info_pretty_hostname, - &_hostname1_property_info_icon_name, - &_hostname1_property_info_chassis, - &_hostname1_property_info_kernel_name, - &_hostname1_property_info_kernel_release, - &_hostname1_property_info_kernel_version, - &_hostname1_property_info_operating_system_pretty_name, - &_hostname1_property_info_operating_system_cpename, - NULL -}; - -static const _ExtendedGDBusInterfaceInfo _hostname1_interface_info = -{ - { - -1, - (gchar *) "org.freedesktop.hostname1", - (GDBusMethodInfo **) &_hostname1_method_info_pointers, - NULL, - (GDBusPropertyInfo **) &_hostname1_property_info_pointers, - NULL - }, - "hostname1", -}; - - -/** - * hostname1_interface_info: - * - * Gets a machine-readable description of the org.freedesktop.hostname1 D-Bus interface. - * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. - */ -GDBusInterfaceInfo * -hostname1_interface_info (void) -{ - return (GDBusInterfaceInfo *) &_hostname1_interface_info.parent_struct; -} - -/** - * hostname1_override_properties: - * @klass: The class structure for a #GObject-derived class. - * @property_id_begin: The property id to assign to the first overridden property. - * - * Overrides all #GObject properties in the #Hostname1 interface for a concrete class. - * The properties are overridden in the order they are defined. - * - * Returns: The last property id. - */ -guint -hostname1_override_properties (GObjectClass *klass, guint property_id_begin) -{ - g_object_class_override_property (klass, property_id_begin++, "hostname"); - g_object_class_override_property (klass, property_id_begin++, "static-hostname"); - g_object_class_override_property (klass, property_id_begin++, "pretty-hostname"); - g_object_class_override_property (klass, property_id_begin++, "icon-name"); - g_object_class_override_property (klass, property_id_begin++, "chassis"); - g_object_class_override_property (klass, property_id_begin++, "kernel-name"); - g_object_class_override_property (klass, property_id_begin++, "kernel-release"); - g_object_class_override_property (klass, property_id_begin++, "kernel-version"); - g_object_class_override_property (klass, property_id_begin++, "operating-system-pretty-name"); - g_object_class_override_property (klass, property_id_begin++, "operating-system-cpename"); - return property_id_begin - 1; -} - - - -/** - * Hostname1: - * - * Abstract interface type for the D-Bus interface org.freedesktop.hostname1. - */ - -/** - * Hostname1Iface: - * @parent_iface: The parent interface. - * @handle_set_chassis: Handler for the #Hostname1::handle-set-chassis signal. - * @handle_set_hostname: Handler for the #Hostname1::handle-set-hostname signal. - * @handle_set_icon_name: Handler for the #Hostname1::handle-set-icon-name signal. - * @handle_set_pretty_hostname: Handler for the #Hostname1::handle-set-pretty-hostname signal. - * @handle_set_static_hostname: Handler for the #Hostname1::handle-set-static-hostname signal. - * @get_chassis: Getter for the #Hostname1:chassis property. - * @get_hostname: Getter for the #Hostname1:hostname property. - * @get_icon_name: Getter for the #Hostname1:icon-name property. - * @get_kernel_name: Getter for the #Hostname1:kernel-name property. - * @get_kernel_release: Getter for the #Hostname1:kernel-release property. - * @get_kernel_version: Getter for the #Hostname1:kernel-version property. - * @get_operating_system_cpename: Getter for the #Hostname1:operating-system-cpename property. - * @get_operating_system_pretty_name: Getter for the #Hostname1:operating-system-pretty-name property. - * @get_pretty_hostname: Getter for the #Hostname1:pretty-hostname property. - * @get_static_hostname: Getter for the #Hostname1:static-hostname property. - * - * Virtual table for the D-Bus interface org.freedesktop.hostname1. - */ - -typedef Hostname1Iface Hostname1Interface; -G_DEFINE_INTERFACE (Hostname1, hostname1, G_TYPE_OBJECT); - -static void -hostname1_default_init (Hostname1Iface *iface) -{ - /* GObject signals for incoming D-Bus method calls: */ - /** - * Hostname1::handle-set-hostname: - * @object: A #Hostname1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetHostname() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call hostname1_complete_set_hostname() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-hostname", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Hostname1Iface, handle_set_hostname), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_BOOLEAN); - - /** - * Hostname1::handle-set-static-hostname: - * @object: A #Hostname1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetStaticHostname() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call hostname1_complete_set_static_hostname() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-static-hostname", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Hostname1Iface, handle_set_static_hostname), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_BOOLEAN); - - /** - * Hostname1::handle-set-pretty-hostname: - * @object: A #Hostname1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetPrettyHostname() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call hostname1_complete_set_pretty_hostname() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-pretty-hostname", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Hostname1Iface, handle_set_pretty_hostname), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_BOOLEAN); - - /** - * Hostname1::handle-set-icon-name: - * @object: A #Hostname1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetIconName() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call hostname1_complete_set_icon_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-icon-name", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Hostname1Iface, handle_set_icon_name), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_BOOLEAN); - - /** - * Hostname1::handle-set-chassis: - * @object: A #Hostname1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetChassis() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call hostname1_complete_set_chassis() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-chassis", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Hostname1Iface, handle_set_chassis), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_BOOLEAN); - - /* GObject properties for D-Bus properties: */ - /** - * Hostname1:hostname: - * - * Represents the D-Bus property "Hostname". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("hostname", "Hostname", "Hostname", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Hostname1:static-hostname: - * - * Represents the D-Bus property "StaticHostname". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("static-hostname", "StaticHostname", "StaticHostname", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Hostname1:pretty-hostname: - * - * Represents the D-Bus property "PrettyHostname". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("pretty-hostname", "PrettyHostname", "PrettyHostname", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Hostname1:icon-name: - * - * Represents the D-Bus property "IconName". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("icon-name", "IconName", "IconName", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Hostname1:chassis: - * - * Represents the D-Bus property "Chassis". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("chassis", "Chassis", "Chassis", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Hostname1:kernel-name: - * - * Represents the D-Bus property "KernelName". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("kernel-name", "KernelName", "KernelName", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Hostname1:kernel-release: - * - * Represents the D-Bus property "KernelRelease". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("kernel-release", "KernelRelease", "KernelRelease", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Hostname1:kernel-version: - * - * Represents the D-Bus property "KernelVersion". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("kernel-version", "KernelVersion", "KernelVersion", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Hostname1:operating-system-pretty-name: - * - * Represents the D-Bus property "OperatingSystemPrettyName". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("operating-system-pretty-name", "OperatingSystemPrettyName", "OperatingSystemPrettyName", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Hostname1:operating-system-cpename: - * - * Represents the D-Bus property "OperatingSystemCPEName". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("operating-system-cpename", "OperatingSystemCPEName", "OperatingSystemCPEName", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); -} - -/** - * hostname1_get_hostname: (skip) - * @object: A #Hostname1. - * - * Gets the value of the "Hostname" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use hostname1_dup_hostname() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -hostname1_get_hostname (Hostname1 *object) -{ - return HOSTNAME1_GET_IFACE (object)->get_hostname (object); -} - -/** - * hostname1_dup_hostname: (skip) - * @object: A #Hostname1. - * - * Gets a copy of the "Hostname" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -hostname1_dup_hostname (Hostname1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "hostname", &value, NULL); - return value; -} - -/** - * hostname1_set_hostname: (skip) - * @object: A #Hostname1. - * @value: The value to set. - * - * Sets the "Hostname" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -hostname1_set_hostname (Hostname1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "hostname", value, NULL); -} - -/** - * hostname1_get_static_hostname: (skip) - * @object: A #Hostname1. - * - * Gets the value of the "StaticHostname" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use hostname1_dup_static_hostname() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -hostname1_get_static_hostname (Hostname1 *object) -{ - return HOSTNAME1_GET_IFACE (object)->get_static_hostname (object); -} - -/** - * hostname1_dup_static_hostname: (skip) - * @object: A #Hostname1. - * - * Gets a copy of the "StaticHostname" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -hostname1_dup_static_hostname (Hostname1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "static-hostname", &value, NULL); - return value; -} - -/** - * hostname1_set_static_hostname: (skip) - * @object: A #Hostname1. - * @value: The value to set. - * - * Sets the "StaticHostname" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -hostname1_set_static_hostname (Hostname1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "static-hostname", value, NULL); -} - -/** - * hostname1_get_pretty_hostname: (skip) - * @object: A #Hostname1. - * - * Gets the value of the "PrettyHostname" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use hostname1_dup_pretty_hostname() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -hostname1_get_pretty_hostname (Hostname1 *object) -{ - return HOSTNAME1_GET_IFACE (object)->get_pretty_hostname (object); -} - -/** - * hostname1_dup_pretty_hostname: (skip) - * @object: A #Hostname1. - * - * Gets a copy of the "PrettyHostname" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -hostname1_dup_pretty_hostname (Hostname1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "pretty-hostname", &value, NULL); - return value; -} - -/** - * hostname1_set_pretty_hostname: (skip) - * @object: A #Hostname1. - * @value: The value to set. - * - * Sets the "PrettyHostname" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -hostname1_set_pretty_hostname (Hostname1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "pretty-hostname", value, NULL); -} - -/** - * hostname1_get_icon_name: (skip) - * @object: A #Hostname1. - * - * Gets the value of the "IconName" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use hostname1_dup_icon_name() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -hostname1_get_icon_name (Hostname1 *object) -{ - return HOSTNAME1_GET_IFACE (object)->get_icon_name (object); -} - -/** - * hostname1_dup_icon_name: (skip) - * @object: A #Hostname1. - * - * Gets a copy of the "IconName" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -hostname1_dup_icon_name (Hostname1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "icon-name", &value, NULL); - return value; -} - -/** - * hostname1_set_icon_name: (skip) - * @object: A #Hostname1. - * @value: The value to set. - * - * Sets the "IconName" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -hostname1_set_icon_name (Hostname1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "icon-name", value, NULL); -} - -/** - * hostname1_get_chassis: (skip) - * @object: A #Hostname1. - * - * Gets the value of the "Chassis" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use hostname1_dup_chassis() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -hostname1_get_chassis (Hostname1 *object) -{ - return HOSTNAME1_GET_IFACE (object)->get_chassis (object); -} - -/** - * hostname1_dup_chassis: (skip) - * @object: A #Hostname1. - * - * Gets a copy of the "Chassis" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -hostname1_dup_chassis (Hostname1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "chassis", &value, NULL); - return value; -} - -/** - * hostname1_set_chassis: (skip) - * @object: A #Hostname1. - * @value: The value to set. - * - * Sets the "Chassis" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -hostname1_set_chassis (Hostname1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "chassis", value, NULL); -} - -/** - * hostname1_get_kernel_name: (skip) - * @object: A #Hostname1. - * - * Gets the value of the "KernelName" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use hostname1_dup_kernel_name() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -hostname1_get_kernel_name (Hostname1 *object) -{ - return HOSTNAME1_GET_IFACE (object)->get_kernel_name (object); -} - -/** - * hostname1_dup_kernel_name: (skip) - * @object: A #Hostname1. - * - * Gets a copy of the "KernelName" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -hostname1_dup_kernel_name (Hostname1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "kernel-name", &value, NULL); - return value; -} - -/** - * hostname1_set_kernel_name: (skip) - * @object: A #Hostname1. - * @value: The value to set. - * - * Sets the "KernelName" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -hostname1_set_kernel_name (Hostname1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "kernel-name", value, NULL); -} - -/** - * hostname1_get_kernel_release: (skip) - * @object: A #Hostname1. - * - * Gets the value of the "KernelRelease" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use hostname1_dup_kernel_release() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -hostname1_get_kernel_release (Hostname1 *object) -{ - return HOSTNAME1_GET_IFACE (object)->get_kernel_release (object); -} - -/** - * hostname1_dup_kernel_release: (skip) - * @object: A #Hostname1. - * - * Gets a copy of the "KernelRelease" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -hostname1_dup_kernel_release (Hostname1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "kernel-release", &value, NULL); - return value; -} - -/** - * hostname1_set_kernel_release: (skip) - * @object: A #Hostname1. - * @value: The value to set. - * - * Sets the "KernelRelease" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -hostname1_set_kernel_release (Hostname1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "kernel-release", value, NULL); -} - -/** - * hostname1_get_kernel_version: (skip) - * @object: A #Hostname1. - * - * Gets the value of the "KernelVersion" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use hostname1_dup_kernel_version() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -hostname1_get_kernel_version (Hostname1 *object) -{ - return HOSTNAME1_GET_IFACE (object)->get_kernel_version (object); -} - -/** - * hostname1_dup_kernel_version: (skip) - * @object: A #Hostname1. - * - * Gets a copy of the "KernelVersion" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -hostname1_dup_kernel_version (Hostname1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "kernel-version", &value, NULL); - return value; -} - -/** - * hostname1_set_kernel_version: (skip) - * @object: A #Hostname1. - * @value: The value to set. - * - * Sets the "KernelVersion" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -hostname1_set_kernel_version (Hostname1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "kernel-version", value, NULL); -} - -/** - * hostname1_get_operating_system_pretty_name: (skip) - * @object: A #Hostname1. - * - * Gets the value of the "OperatingSystemPrettyName" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use hostname1_dup_operating_system_pretty_name() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -hostname1_get_operating_system_pretty_name (Hostname1 *object) -{ - return HOSTNAME1_GET_IFACE (object)->get_operating_system_pretty_name (object); -} - -/** - * hostname1_dup_operating_system_pretty_name: (skip) - * @object: A #Hostname1. - * - * Gets a copy of the "OperatingSystemPrettyName" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -hostname1_dup_operating_system_pretty_name (Hostname1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "operating-system-pretty-name", &value, NULL); - return value; -} - -/** - * hostname1_set_operating_system_pretty_name: (skip) - * @object: A #Hostname1. - * @value: The value to set. - * - * Sets the "OperatingSystemPrettyName" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -hostname1_set_operating_system_pretty_name (Hostname1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "operating-system-pretty-name", value, NULL); -} - -/** - * hostname1_get_operating_system_cpename: (skip) - * @object: A #Hostname1. - * - * Gets the value of the "OperatingSystemCPEName" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use hostname1_dup_operating_system_cpename() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -hostname1_get_operating_system_cpename (Hostname1 *object) -{ - return HOSTNAME1_GET_IFACE (object)->get_operating_system_cpename (object); -} - -/** - * hostname1_dup_operating_system_cpename: (skip) - * @object: A #Hostname1. - * - * Gets a copy of the "OperatingSystemCPEName" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -hostname1_dup_operating_system_cpename (Hostname1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "operating-system-cpename", &value, NULL); - return value; -} - -/** - * hostname1_set_operating_system_cpename: (skip) - * @object: A #Hostname1. - * @value: The value to set. - * - * Sets the "OperatingSystemCPEName" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -hostname1_set_operating_system_cpename (Hostname1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "operating-system-cpename", value, NULL); -} - -/** - * hostname1_call_set_hostname: - * @proxy: A #Hostname1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetHostname() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call hostname1_call_set_hostname_finish() to get the result of the operation. - * - * See hostname1_call_set_hostname_sync() for the synchronous, blocking version of this method. - */ -void -hostname1_call_set_hostname ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetHostname", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * hostname1_call_set_hostname_finish: - * @proxy: A #Hostname1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostname1_call_set_hostname(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with hostname1_call_set_hostname(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -hostname1_call_set_hostname_finish ( - Hostname1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * hostname1_call_set_hostname_sync: - * @proxy: A #Hostname1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetHostname() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See hostname1_call_set_hostname() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -hostname1_call_set_hostname_sync ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetHostname", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * hostname1_call_set_static_hostname: - * @proxy: A #Hostname1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetStaticHostname() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call hostname1_call_set_static_hostname_finish() to get the result of the operation. - * - * See hostname1_call_set_static_hostname_sync() for the synchronous, blocking version of this method. - */ -void -hostname1_call_set_static_hostname ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetStaticHostname", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * hostname1_call_set_static_hostname_finish: - * @proxy: A #Hostname1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostname1_call_set_static_hostname(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with hostname1_call_set_static_hostname(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -hostname1_call_set_static_hostname_finish ( - Hostname1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * hostname1_call_set_static_hostname_sync: - * @proxy: A #Hostname1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetStaticHostname() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See hostname1_call_set_static_hostname() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -hostname1_call_set_static_hostname_sync ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetStaticHostname", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * hostname1_call_set_pretty_hostname: - * @proxy: A #Hostname1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetPrettyHostname() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call hostname1_call_set_pretty_hostname_finish() to get the result of the operation. - * - * See hostname1_call_set_pretty_hostname_sync() for the synchronous, blocking version of this method. - */ -void -hostname1_call_set_pretty_hostname ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetPrettyHostname", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * hostname1_call_set_pretty_hostname_finish: - * @proxy: A #Hostname1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostname1_call_set_pretty_hostname(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with hostname1_call_set_pretty_hostname(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -hostname1_call_set_pretty_hostname_finish ( - Hostname1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * hostname1_call_set_pretty_hostname_sync: - * @proxy: A #Hostname1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetPrettyHostname() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See hostname1_call_set_pretty_hostname() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -hostname1_call_set_pretty_hostname_sync ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetPrettyHostname", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * hostname1_call_set_icon_name: - * @proxy: A #Hostname1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetIconName() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call hostname1_call_set_icon_name_finish() to get the result of the operation. - * - * See hostname1_call_set_icon_name_sync() for the synchronous, blocking version of this method. - */ -void -hostname1_call_set_icon_name ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetIconName", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * hostname1_call_set_icon_name_finish: - * @proxy: A #Hostname1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostname1_call_set_icon_name(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with hostname1_call_set_icon_name(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -hostname1_call_set_icon_name_finish ( - Hostname1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * hostname1_call_set_icon_name_sync: - * @proxy: A #Hostname1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetIconName() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See hostname1_call_set_icon_name() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -hostname1_call_set_icon_name_sync ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetIconName", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * hostname1_call_set_chassis: - * @proxy: A #Hostname1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetChassis() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call hostname1_call_set_chassis_finish() to get the result of the operation. - * - * See hostname1_call_set_chassis_sync() for the synchronous, blocking version of this method. - */ -void -hostname1_call_set_chassis ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetChassis", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * hostname1_call_set_chassis_finish: - * @proxy: A #Hostname1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostname1_call_set_chassis(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with hostname1_call_set_chassis(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -hostname1_call_set_chassis_finish ( - Hostname1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * hostname1_call_set_chassis_sync: - * @proxy: A #Hostname1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetChassis() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See hostname1_call_set_chassis() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -hostname1_call_set_chassis_sync ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetChassis", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * hostname1_complete_set_hostname: - * @object: A #Hostname1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetHostname() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -hostname1_complete_set_hostname ( - Hostname1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * hostname1_complete_set_static_hostname: - * @object: A #Hostname1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetStaticHostname() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -hostname1_complete_set_static_hostname ( - Hostname1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * hostname1_complete_set_pretty_hostname: - * @object: A #Hostname1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetPrettyHostname() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -hostname1_complete_set_pretty_hostname ( - Hostname1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * hostname1_complete_set_icon_name: - * @object: A #Hostname1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetIconName() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -hostname1_complete_set_icon_name ( - Hostname1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * hostname1_complete_set_chassis: - * @object: A #Hostname1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetChassis() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -hostname1_complete_set_chassis ( - Hostname1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/* ------------------------------------------------------------------------ */ - -/** - * Hostname1Proxy: - * - * The #Hostname1Proxy structure contains only private data and should only be accessed using the provided API. - */ - -/** - * Hostname1ProxyClass: - * @parent_class: The parent class. - * - * Class structure for #Hostname1Proxy. - */ - -struct _Hostname1ProxyPrivate -{ - GData *qdata; -}; - -static void hostname1_proxy_iface_init (Hostname1Iface *iface); - -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 -G_DEFINE_TYPE_WITH_CODE (Hostname1Proxy, hostname1_proxy, G_TYPE_DBUS_PROXY, - G_ADD_PRIVATE (Hostname1Proxy) - G_IMPLEMENT_INTERFACE (TYPE_HOSTNAME1, hostname1_proxy_iface_init)); - -#else -G_DEFINE_TYPE_WITH_CODE (Hostname1Proxy, hostname1_proxy, G_TYPE_DBUS_PROXY, - G_IMPLEMENT_INTERFACE (TYPE_HOSTNAME1, hostname1_proxy_iface_init)); - -#endif -static void -hostname1_proxy_finalize (GObject *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - g_datalist_clear (&proxy->priv->qdata); - G_OBJECT_CLASS (hostname1_proxy_parent_class)->finalize (object); -} - -static void -hostname1_proxy_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - const _ExtendedGDBusPropertyInfo *info; - GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 10); - info = _hostname1_property_info_pointers[prop_id - 1]; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); - if (info->use_gvariant) - { - g_value_set_variant (value, variant); - } - else - { - if (variant != NULL) - g_dbus_gvariant_to_gvalue (variant, value); - } - if (variant != NULL) - g_variant_unref (variant); -} - -static void -hostname1_proxy_set_property_cb (GDBusProxy *proxy, - GAsyncResult *res, - gpointer user_data) -{ - const _ExtendedGDBusPropertyInfo *info = user_data; - GError *error; - GVariant *_ret; - error = NULL; - _ret = g_dbus_proxy_call_finish (proxy, res, &error); - if (!_ret) - { - g_warning ("Error setting property '%s' on interface org.freedesktop.hostname1: %s (%s, %d)", - info->parent_struct.name, - error->message, g_quark_to_string (error->domain), error->code); - g_error_free (error); - } - else - { - g_variant_unref (_ret); - } -} - -static void -hostname1_proxy_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - const _ExtendedGDBusPropertyInfo *info; - GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 10); - info = _hostname1_property_info_pointers[prop_id - 1]; - variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); - g_dbus_proxy_call (G_DBUS_PROXY (object), - "org.freedesktop.DBus.Properties.Set", - g_variant_new ("(ssv)", "org.freedesktop.hostname1", info->parent_struct.name, variant), - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, (GAsyncReadyCallback) hostname1_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); - g_variant_unref (variant); -} - -static void -hostname1_proxy_g_signal (GDBusProxy *proxy, - const gchar *sender_name G_GNUC_UNUSED, - const gchar *signal_name, - GVariant *parameters) -{ - _ExtendedGDBusSignalInfo *info; - GVariantIter iter; - GVariant *child; - GValue *paramv; - guint num_params; - guint n; - guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_hostname1_interface_info.parent_struct, signal_name); - if (info == NULL) - return; - num_params = g_variant_n_children (parameters); - paramv = g_new0 (GValue, num_params + 1); - g_value_init (¶mv[0], TYPE_HOSTNAME1); - g_value_set_object (¶mv[0], proxy); - g_variant_iter_init (&iter, parameters); - n = 1; - while ((child = g_variant_iter_next_value (&iter)) != NULL) - { - _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; - if (arg_info->use_gvariant) - { - g_value_init (¶mv[n], G_TYPE_VARIANT); - g_value_set_variant (¶mv[n], child); - n++; - } - else - g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); - g_variant_unref (child); - } - signal_id = g_signal_lookup (info->signal_name, TYPE_HOSTNAME1); - g_signal_emitv (paramv, signal_id, 0, NULL); - for (n = 0; n < num_params + 1; n++) - g_value_unset (¶mv[n]); - g_free (paramv); -} - -static void -hostname1_proxy_g_properties_changed (GDBusProxy *_proxy, - GVariant *changed_properties, - const gchar *const *invalidated_properties) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (_proxy); - guint n; - const gchar *key; - GVariantIter *iter; - _ExtendedGDBusPropertyInfo *info; - g_variant_get (changed_properties, "a{sv}", &iter); - while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) - { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_hostname1_interface_info.parent_struct, key); - g_datalist_remove_data (&proxy->priv->qdata, key); - if (info != NULL) - g_object_notify (G_OBJECT (proxy), info->hyphen_name); - } - g_variant_iter_free (iter); - for (n = 0; invalidated_properties[n] != NULL; n++) - { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_hostname1_interface_info.parent_struct, invalidated_properties[n]); - g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); - if (info != NULL) - g_object_notify (G_OBJECT (proxy), info->hyphen_name); - } -} - -static const gchar * -hostname1_proxy_get_hostname (Hostname1 *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Hostname"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -hostname1_proxy_get_static_hostname (Hostname1 *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "StaticHostname"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -hostname1_proxy_get_pretty_hostname (Hostname1 *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "PrettyHostname"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -hostname1_proxy_get_icon_name (Hostname1 *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "IconName"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -hostname1_proxy_get_chassis (Hostname1 *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Chassis"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -hostname1_proxy_get_kernel_name (Hostname1 *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "KernelName"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -hostname1_proxy_get_kernel_release (Hostname1 *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "KernelRelease"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -hostname1_proxy_get_kernel_version (Hostname1 *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "KernelVersion"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -hostname1_proxy_get_operating_system_pretty_name (Hostname1 *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "OperatingSystemPrettyName"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -hostname1_proxy_get_operating_system_cpename (Hostname1 *object) -{ - Hostname1Proxy *proxy = HOSTNAME1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "OperatingSystemCPEName"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static void -hostname1_proxy_init (Hostname1Proxy *proxy) -{ -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 - proxy->priv = hostname1_proxy_get_instance_private (proxy); -#else - proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_HOSTNAME1_PROXY, Hostname1ProxyPrivate); -#endif - - g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), hostname1_interface_info ()); -} - -static void -hostname1_proxy_class_init (Hostname1ProxyClass *klass) -{ - GObjectClass *gobject_class; - GDBusProxyClass *proxy_class; - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = hostname1_proxy_finalize; - gobject_class->get_property = hostname1_proxy_get_property; - gobject_class->set_property = hostname1_proxy_set_property; - - proxy_class = G_DBUS_PROXY_CLASS (klass); - proxy_class->g_signal = hostname1_proxy_g_signal; - proxy_class->g_properties_changed = hostname1_proxy_g_properties_changed; - - hostname1_override_properties (gobject_class, 1); - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 - g_type_class_add_private (klass, sizeof (Hostname1ProxyPrivate)); -#endif -} - -static void -hostname1_proxy_iface_init (Hostname1Iface *iface) -{ - iface->get_hostname = hostname1_proxy_get_hostname; - iface->get_static_hostname = hostname1_proxy_get_static_hostname; - iface->get_pretty_hostname = hostname1_proxy_get_pretty_hostname; - iface->get_icon_name = hostname1_proxy_get_icon_name; - iface->get_chassis = hostname1_proxy_get_chassis; - iface->get_kernel_name = hostname1_proxy_get_kernel_name; - iface->get_kernel_release = hostname1_proxy_get_kernel_release; - iface->get_kernel_version = hostname1_proxy_get_kernel_version; - iface->get_operating_system_pretty_name = hostname1_proxy_get_operating_system_pretty_name; - iface->get_operating_system_cpename = hostname1_proxy_get_operating_system_cpename; -} - -/** - * hostname1_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.hostname1. See g_dbus_proxy_new() for more details. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call hostname1_proxy_new_finish() to get the result of the operation. - * - * See hostname1_proxy_new_sync() for the synchronous, blocking version of this constructor. - */ -void -hostname1_proxy_new ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_async_initable_new_async (TYPE_HOSTNAME1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.hostname1", NULL); -} - -/** - * hostname1_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostname1_proxy_new(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with hostname1_proxy_new(). - * - * Returns: (transfer full) (type Hostname1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Hostname1 * -hostname1_proxy_new_finish ( - GAsyncResult *res, - GError **error) -{ - GObject *ret; - GObject *source_object; - source_object = g_async_result_get_source_object (res); - ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); - g_object_unref (source_object); - if (ret != NULL) - return HOSTNAME1 (ret); - else - return NULL; -} - -/** - * hostname1_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Synchronously creates a proxy for the D-Bus interface org.freedesktop.hostname1. See g_dbus_proxy_new_sync() for more details. - * - * The calling thread is blocked until a reply is received. - * - * See hostname1_proxy_new() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type Hostname1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Hostname1 * -hostname1_proxy_new_sync ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error) -{ - GInitable *ret; - ret = g_initable_new (TYPE_HOSTNAME1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.hostname1", NULL); - if (ret != NULL) - return HOSTNAME1 (ret); - else - return NULL; -} - - -/** - * hostname1_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Like hostname1_proxy_new() but takes a #GBusType instead of a #GDBusConnection. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call hostname1_proxy_new_for_bus_finish() to get the result of the operation. - * - * See hostname1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. - */ -void -hostname1_proxy_new_for_bus ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_async_initable_new_async (TYPE_HOSTNAME1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.hostname1", NULL); -} - -/** - * hostname1_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to hostname1_proxy_new_for_bus(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with hostname1_proxy_new_for_bus(). - * - * Returns: (transfer full) (type Hostname1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Hostname1 * -hostname1_proxy_new_for_bus_finish ( - GAsyncResult *res, - GError **error) -{ - GObject *ret; - GObject *source_object; - source_object = g_async_result_get_source_object (res); - ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); - g_object_unref (source_object); - if (ret != NULL) - return HOSTNAME1 (ret); - else - return NULL; -} - -/** - * hostname1_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Like hostname1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. - * - * The calling thread is blocked until a reply is received. - * - * See hostname1_proxy_new_for_bus() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type Hostname1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Hostname1 * -hostname1_proxy_new_for_bus_sync ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error) -{ - GInitable *ret; - ret = g_initable_new (TYPE_HOSTNAME1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.hostname1", NULL); - if (ret != NULL) - return HOSTNAME1 (ret); - else - return NULL; -} - - -/* ------------------------------------------------------------------------ */ - -/** - * Hostname1Skeleton: - * - * The #Hostname1Skeleton structure contains only private data and should only be accessed using the provided API. - */ - -/** - * Hostname1SkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #Hostname1Skeleton. - */ - -struct _Hostname1SkeletonPrivate -{ - GValue *properties; - GList *changed_properties; - GSource *changed_properties_idle_source; - GMainContext *context; - GMutex lock; -}; - -static void -_hostname1_skeleton_handle_method_call ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name, - const gchar *method_name, - GVariant *parameters, - GDBusMethodInvocation *invocation, - gpointer user_data) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (user_data); - _ExtendedGDBusMethodInfo *info; - GVariantIter iter; - GVariant *child; - GValue *paramv; - guint num_params; - guint num_extra; - guint n; - guint signal_id; - GValue return_value = G_VALUE_INIT; - info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); - g_assert (info != NULL); - num_params = g_variant_n_children (parameters); - num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); - n = 0; - g_value_init (¶mv[n], TYPE_HOSTNAME1); - g_value_set_object (¶mv[n++], skeleton); - g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); - g_value_set_object (¶mv[n++], invocation); - if (info->pass_fdlist) - { -#ifdef G_OS_UNIX - g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); - g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); -#else - g_assert_not_reached (); -#endif - } - g_variant_iter_init (&iter, parameters); - while ((child = g_variant_iter_next_value (&iter)) != NULL) - { - _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; - if (arg_info->use_gvariant) - { - g_value_init (¶mv[n], G_TYPE_VARIANT); - g_value_set_variant (¶mv[n], child); - n++; - } - else - g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); - g_variant_unref (child); - } - signal_id = g_signal_lookup (info->signal_name, TYPE_HOSTNAME1); - g_value_init (&return_value, G_TYPE_BOOLEAN); - g_signal_emitv (paramv, signal_id, 0, &return_value); - if (!g_value_get_boolean (&return_value)) - g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); - g_value_unset (&return_value); - for (n = 0; n < num_params + num_extra; n++) - g_value_unset (¶mv[n]); - g_free (paramv); -} - -static GVariant * -_hostname1_skeleton_handle_get_property ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name G_GNUC_UNUSED, - const gchar *property_name, - GError **error, - gpointer user_data) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (user_data); - GValue value = G_VALUE_INIT; - GParamSpec *pspec; - _ExtendedGDBusPropertyInfo *info; - GVariant *ret; - ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_hostname1_interface_info.parent_struct, property_name); - g_assert (info != NULL); - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); - if (pspec == NULL) - { - g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); - } - else - { - g_value_init (&value, pspec->value_type); - g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); - ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); - g_value_unset (&value); - } - return ret; -} - -static gboolean -_hostname1_skeleton_handle_set_property ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name G_GNUC_UNUSED, - const gchar *property_name, - GVariant *variant, - GError **error, - gpointer user_data) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (user_data); - GValue value = G_VALUE_INIT; - GParamSpec *pspec; - _ExtendedGDBusPropertyInfo *info; - gboolean ret; - ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_hostname1_interface_info.parent_struct, property_name); - g_assert (info != NULL); - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); - if (pspec == NULL) - { - g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); - } - else - { - if (info->use_gvariant) - g_value_set_variant (&value, variant); - else - g_dbus_gvariant_to_gvalue (variant, &value); - g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); - g_value_unset (&value); - ret = TRUE; - } - return ret; -} - -static const GDBusInterfaceVTable _hostname1_skeleton_vtable = -{ - _hostname1_skeleton_handle_method_call, - _hostname1_skeleton_handle_get_property, - _hostname1_skeleton_handle_set_property, - {NULL} -}; - -static GDBusInterfaceInfo * -hostname1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) -{ - return hostname1_interface_info (); -} - -static GDBusInterfaceVTable * -hostname1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) -{ - return (GDBusInterfaceVTable *) &_hostname1_skeleton_vtable; -} - -static GVariant * -hostname1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (_skeleton); - - GVariantBuilder builder; - guint n; - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - if (_hostname1_interface_info.parent_struct.properties == NULL) - goto out; - for (n = 0; _hostname1_interface_info.parent_struct.properties[n] != NULL; n++) - { - GDBusPropertyInfo *info = _hostname1_interface_info.parent_struct.properties[n]; - if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) - { - GVariant *value; - value = _hostname1_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.hostname1", info->name, NULL, skeleton); - if (value != NULL) - { - g_variant_take_ref (value); - g_variant_builder_add (&builder, "{sv}", info->name, value); - g_variant_unref (value); - } - } - } -out: - return g_variant_builder_end (&builder); -} - -static gboolean _hostname1_emit_changed (gpointer user_data); - -static void -hostname1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (_skeleton); - gboolean emit_changed = FALSE; - - g_mutex_lock (&skeleton->priv->lock); - if (skeleton->priv->changed_properties_idle_source != NULL) - { - g_source_destroy (skeleton->priv->changed_properties_idle_source); - skeleton->priv->changed_properties_idle_source = NULL; - emit_changed = TRUE; - } - g_mutex_unlock (&skeleton->priv->lock); - - if (emit_changed) - _hostname1_emit_changed (skeleton); -} - -static void hostname1_skeleton_iface_init (Hostname1Iface *iface); -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 -G_DEFINE_TYPE_WITH_CODE (Hostname1Skeleton, hostname1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, - G_ADD_PRIVATE (Hostname1Skeleton) - G_IMPLEMENT_INTERFACE (TYPE_HOSTNAME1, hostname1_skeleton_iface_init)); - -#else -G_DEFINE_TYPE_WITH_CODE (Hostname1Skeleton, hostname1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, - G_IMPLEMENT_INTERFACE (TYPE_HOSTNAME1, hostname1_skeleton_iface_init)); - -#endif -static void -hostname1_skeleton_finalize (GObject *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - guint n; - for (n = 0; n < 10; n++) - g_value_unset (&skeleton->priv->properties[n]); - g_free (skeleton->priv->properties); - g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); - if (skeleton->priv->changed_properties_idle_source != NULL) - g_source_destroy (skeleton->priv->changed_properties_idle_source); - g_main_context_unref (skeleton->priv->context); - g_mutex_clear (&skeleton->priv->lock); - G_OBJECT_CLASS (hostname1_skeleton_parent_class)->finalize (object); -} - -static void -hostname1_skeleton_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 10); - g_mutex_lock (&skeleton->priv->lock); - g_value_copy (&skeleton->priv->properties[prop_id - 1], value); - g_mutex_unlock (&skeleton->priv->lock); -} - -static gboolean -_hostname1_emit_changed (gpointer user_data) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (user_data); - GList *l; - GVariantBuilder builder; - GVariantBuilder invalidated_builder; - guint num_changes; - - g_mutex_lock (&skeleton->priv->lock); - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); - for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) - { - ChangedProperty *cp = l->data; - GVariant *variant; - const GValue *cur_value; - - cur_value = &skeleton->priv->properties[cp->prop_id - 1]; - if (!_g_value_equal (cur_value, &cp->orig_value)) - { - variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); - g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); - g_variant_unref (variant); - num_changes++; - } - } - if (num_changes > 0) - { - GList *connections, *ll; - GVariant *signal_variant; - signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.hostname1", - &builder, &invalidated_builder)); - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - for (ll = connections; ll != NULL; ll = ll->next) - { - GDBusConnection *connection = ll->data; - - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), - "org.freedesktop.DBus.Properties", - "PropertiesChanged", - signal_variant, - NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); - } - else - { - g_variant_builder_clear (&builder); - g_variant_builder_clear (&invalidated_builder); - } - g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); - skeleton->priv->changed_properties = NULL; - skeleton->priv->changed_properties_idle_source = NULL; - g_mutex_unlock (&skeleton->priv->lock); - return FALSE; -} - -static void -_hostname1_schedule_emit_changed (Hostname1Skeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) -{ - ChangedProperty *cp; - GList *l; - cp = NULL; - for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) - { - ChangedProperty *i_cp = l->data; - if (i_cp->info == info) - { - cp = i_cp; - break; - } - } - if (cp == NULL) - { - cp = g_new0 (ChangedProperty, 1); - cp->prop_id = prop_id; - cp->info = info; - skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); - g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); - g_value_copy (orig_value, &cp->orig_value); - } -} - -static void -hostname1_skeleton_notify (GObject *object, - GParamSpec *pspec G_GNUC_UNUSED) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - g_mutex_lock (&skeleton->priv->lock); - if (skeleton->priv->changed_properties != NULL && - skeleton->priv->changed_properties_idle_source == NULL) - { - skeleton->priv->changed_properties_idle_source = g_idle_source_new (); - g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); - g_source_set_callback (skeleton->priv->changed_properties_idle_source, _hostname1_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); - g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); - g_source_unref (skeleton->priv->changed_properties_idle_source); - } - g_mutex_unlock (&skeleton->priv->lock); -} - -static void -hostname1_skeleton_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 10); - g_mutex_lock (&skeleton->priv->lock); - g_object_freeze_notify (object); - if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) - { - if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) - _hostname1_schedule_emit_changed (skeleton, _hostname1_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); - g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); - g_object_notify_by_pspec (object, pspec); - } - g_mutex_unlock (&skeleton->priv->lock); - g_object_thaw_notify (object); -} - -static void -hostname1_skeleton_init (Hostname1Skeleton *skeleton) -{ -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 - skeleton->priv = hostname1_skeleton_get_instance_private (skeleton); -#else - skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_HOSTNAME1_SKELETON, Hostname1SkeletonPrivate); -#endif - - g_mutex_init (&skeleton->priv->lock); - skeleton->priv->context = g_main_context_ref_thread_default (); - skeleton->priv->properties = g_new0 (GValue, 10); - g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[3], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[4], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[5], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[6], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[7], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[8], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[9], G_TYPE_STRING); -} - -static const gchar * -hostname1_skeleton_get_hostname (Hostname1 *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[0])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -hostname1_skeleton_get_static_hostname (Hostname1 *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[1])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -hostname1_skeleton_get_pretty_hostname (Hostname1 *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[2])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -hostname1_skeleton_get_icon_name (Hostname1 *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[3])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -hostname1_skeleton_get_chassis (Hostname1 *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[4])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -hostname1_skeleton_get_kernel_name (Hostname1 *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[5])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -hostname1_skeleton_get_kernel_release (Hostname1 *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[6])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -hostname1_skeleton_get_kernel_version (Hostname1 *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[7])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -hostname1_skeleton_get_operating_system_pretty_name (Hostname1 *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[8])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -hostname1_skeleton_get_operating_system_cpename (Hostname1 *object) -{ - Hostname1Skeleton *skeleton = HOSTNAME1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[9])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static void -hostname1_skeleton_class_init (Hostname1SkeletonClass *klass) -{ - GObjectClass *gobject_class; - GDBusInterfaceSkeletonClass *skeleton_class; - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = hostname1_skeleton_finalize; - gobject_class->get_property = hostname1_skeleton_get_property; - gobject_class->set_property = hostname1_skeleton_set_property; - gobject_class->notify = hostname1_skeleton_notify; - - - hostname1_override_properties (gobject_class, 1); - - skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); - skeleton_class->get_info = hostname1_skeleton_dbus_interface_get_info; - skeleton_class->get_properties = hostname1_skeleton_dbus_interface_get_properties; - skeleton_class->flush = hostname1_skeleton_dbus_interface_flush; - skeleton_class->get_vtable = hostname1_skeleton_dbus_interface_get_vtable; - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 - g_type_class_add_private (klass, sizeof (Hostname1SkeletonPrivate)); -#endif -} - -static void -hostname1_skeleton_iface_init (Hostname1Iface *iface) -{ - iface->get_hostname = hostname1_skeleton_get_hostname; - iface->get_static_hostname = hostname1_skeleton_get_static_hostname; - iface->get_pretty_hostname = hostname1_skeleton_get_pretty_hostname; - iface->get_icon_name = hostname1_skeleton_get_icon_name; - iface->get_chassis = hostname1_skeleton_get_chassis; - iface->get_kernel_name = hostname1_skeleton_get_kernel_name; - iface->get_kernel_release = hostname1_skeleton_get_kernel_release; - iface->get_kernel_version = hostname1_skeleton_get_kernel_version; - iface->get_operating_system_pretty_name = hostname1_skeleton_get_operating_system_pretty_name; - iface->get_operating_system_cpename = hostname1_skeleton_get_operating_system_cpename; -} - -/** - * hostname1_skeleton_new: - * - * Creates a skeleton object for the D-Bus interface org.freedesktop.hostname1. - * - * Returns: (transfer full) (type Hostname1Skeleton): The skeleton object. - */ -Hostname1 * -hostname1_skeleton_new (void) -{ - return HOSTNAME1 (g_object_new (TYPE_HOSTNAME1_SKELETON, NULL)); -} - diff --git a/src/interfaces/hostnamed/hostnamed-gen.h b/src/interfaces/hostnamed/hostnamed-gen.h deleted file mode 100644 index 5e23a53..0000000 --- a/src/interfaces/hostnamed/hostnamed-gen.h +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. - * - * The license of this code is the same as for the source it was derived from. - */ - -#ifndef __HOSTNAMED_GEN_H__ -#define __HOSTNAMED_GEN_H__ - -#include - -G_BEGIN_DECLS - - -/* ------------------------------------------------------------------------ */ -/* Declarations for org.freedesktop.hostname1 */ - -#define TYPE_HOSTNAME1 (hostname1_get_type ()) -#define HOSTNAME1(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_HOSTNAME1, Hostname1)) -#define IS_HOSTNAME1(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_HOSTNAME1)) -#define HOSTNAME1_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_HOSTNAME1, Hostname1Iface)) - -struct _Hostname1; -typedef struct _Hostname1 Hostname1; -typedef struct _Hostname1Iface Hostname1Iface; - -struct _Hostname1Iface -{ - GTypeInterface parent_iface; - - - gboolean (*handle_set_chassis) ( - Hostname1 *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1); - - gboolean (*handle_set_hostname) ( - Hostname1 *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1); - - gboolean (*handle_set_icon_name) ( - Hostname1 *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1); - - gboolean (*handle_set_pretty_hostname) ( - Hostname1 *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1); - - gboolean (*handle_set_static_hostname) ( - Hostname1 *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1); - - const gchar * (*get_chassis) (Hostname1 *object); - - const gchar * (*get_hostname) (Hostname1 *object); - - const gchar * (*get_icon_name) (Hostname1 *object); - - const gchar * (*get_kernel_name) (Hostname1 *object); - - const gchar * (*get_kernel_release) (Hostname1 *object); - - const gchar * (*get_kernel_version) (Hostname1 *object); - - const gchar * (*get_operating_system_cpename) (Hostname1 *object); - - const gchar * (*get_operating_system_pretty_name) (Hostname1 *object); - - const gchar * (*get_pretty_hostname) (Hostname1 *object); - - const gchar * (*get_static_hostname) (Hostname1 *object); - -}; - -GType hostname1_get_type (void) G_GNUC_CONST; - -GDBusInterfaceInfo *hostname1_interface_info (void); -guint hostname1_override_properties (GObjectClass *klass, guint property_id_begin); - - -/* D-Bus method call completion functions: */ -void hostname1_complete_set_hostname ( - Hostname1 *object, - GDBusMethodInvocation *invocation); - -void hostname1_complete_set_static_hostname ( - Hostname1 *object, - GDBusMethodInvocation *invocation); - -void hostname1_complete_set_pretty_hostname ( - Hostname1 *object, - GDBusMethodInvocation *invocation); - -void hostname1_complete_set_icon_name ( - Hostname1 *object, - GDBusMethodInvocation *invocation); - -void hostname1_complete_set_chassis ( - Hostname1 *object, - GDBusMethodInvocation *invocation); - - - -/* D-Bus method calls: */ -void hostname1_call_set_hostname ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean hostname1_call_set_hostname_finish ( - Hostname1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean hostname1_call_set_hostname_sync ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void hostname1_call_set_static_hostname ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean hostname1_call_set_static_hostname_finish ( - Hostname1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean hostname1_call_set_static_hostname_sync ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void hostname1_call_set_pretty_hostname ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean hostname1_call_set_pretty_hostname_finish ( - Hostname1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean hostname1_call_set_pretty_hostname_sync ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void hostname1_call_set_icon_name ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean hostname1_call_set_icon_name_finish ( - Hostname1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean hostname1_call_set_icon_name_sync ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void hostname1_call_set_chassis ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean hostname1_call_set_chassis_finish ( - Hostname1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean hostname1_call_set_chassis_sync ( - Hostname1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error); - - - -/* D-Bus property accessors: */ -const gchar *hostname1_get_hostname (Hostname1 *object); -gchar *hostname1_dup_hostname (Hostname1 *object); -void hostname1_set_hostname (Hostname1 *object, const gchar *value); - -const gchar *hostname1_get_static_hostname (Hostname1 *object); -gchar *hostname1_dup_static_hostname (Hostname1 *object); -void hostname1_set_static_hostname (Hostname1 *object, const gchar *value); - -const gchar *hostname1_get_pretty_hostname (Hostname1 *object); -gchar *hostname1_dup_pretty_hostname (Hostname1 *object); -void hostname1_set_pretty_hostname (Hostname1 *object, const gchar *value); - -const gchar *hostname1_get_icon_name (Hostname1 *object); -gchar *hostname1_dup_icon_name (Hostname1 *object); -void hostname1_set_icon_name (Hostname1 *object, const gchar *value); - -const gchar *hostname1_get_chassis (Hostname1 *object); -gchar *hostname1_dup_chassis (Hostname1 *object); -void hostname1_set_chassis (Hostname1 *object, const gchar *value); - -const gchar *hostname1_get_kernel_name (Hostname1 *object); -gchar *hostname1_dup_kernel_name (Hostname1 *object); -void hostname1_set_kernel_name (Hostname1 *object, const gchar *value); - -const gchar *hostname1_get_kernel_release (Hostname1 *object); -gchar *hostname1_dup_kernel_release (Hostname1 *object); -void hostname1_set_kernel_release (Hostname1 *object, const gchar *value); - -const gchar *hostname1_get_kernel_version (Hostname1 *object); -gchar *hostname1_dup_kernel_version (Hostname1 *object); -void hostname1_set_kernel_version (Hostname1 *object, const gchar *value); - -const gchar *hostname1_get_operating_system_pretty_name (Hostname1 *object); -gchar *hostname1_dup_operating_system_pretty_name (Hostname1 *object); -void hostname1_set_operating_system_pretty_name (Hostname1 *object, const gchar *value); - -const gchar *hostname1_get_operating_system_cpename (Hostname1 *object); -gchar *hostname1_dup_operating_system_cpename (Hostname1 *object); -void hostname1_set_operating_system_cpename (Hostname1 *object, const gchar *value); - - -/* ---- */ - -#define TYPE_HOSTNAME1_PROXY (hostname1_proxy_get_type ()) -#define HOSTNAME1_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_HOSTNAME1_PROXY, Hostname1Proxy)) -#define HOSTNAME1_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_HOSTNAME1_PROXY, Hostname1ProxyClass)) -#define HOSTNAME1_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_HOSTNAME1_PROXY, Hostname1ProxyClass)) -#define IS_HOSTNAME1_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_HOSTNAME1_PROXY)) -#define IS_HOSTNAME1_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_HOSTNAME1_PROXY)) - -typedef struct _Hostname1Proxy Hostname1Proxy; -typedef struct _Hostname1ProxyClass Hostname1ProxyClass; -typedef struct _Hostname1ProxyPrivate Hostname1ProxyPrivate; - -struct _Hostname1Proxy -{ - /*< private >*/ - GDBusProxy parent_instance; - Hostname1ProxyPrivate *priv; -}; - -struct _Hostname1ProxyClass -{ - GDBusProxyClass parent_class; -}; - -GType hostname1_proxy_get_type (void) G_GNUC_CONST; - -void hostname1_proxy_new ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -Hostname1 *hostname1_proxy_new_finish ( - GAsyncResult *res, - GError **error); -Hostname1 *hostname1_proxy_new_sync ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); - -void hostname1_proxy_new_for_bus ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -Hostname1 *hostname1_proxy_new_for_bus_finish ( - GAsyncResult *res, - GError **error); -Hostname1 *hostname1_proxy_new_for_bus_sync ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); - - -/* ---- */ - -#define TYPE_HOSTNAME1_SKELETON (hostname1_skeleton_get_type ()) -#define HOSTNAME1_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_HOSTNAME1_SKELETON, Hostname1Skeleton)) -#define HOSTNAME1_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_HOSTNAME1_SKELETON, Hostname1SkeletonClass)) -#define HOSTNAME1_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_HOSTNAME1_SKELETON, Hostname1SkeletonClass)) -#define IS_HOSTNAME1_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_HOSTNAME1_SKELETON)) -#define IS_HOSTNAME1_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_HOSTNAME1_SKELETON)) - -typedef struct _Hostname1Skeleton Hostname1Skeleton; -typedef struct _Hostname1SkeletonClass Hostname1SkeletonClass; -typedef struct _Hostname1SkeletonPrivate Hostname1SkeletonPrivate; - -struct _Hostname1Skeleton -{ - /*< private >*/ - GDBusInterfaceSkeleton parent_instance; - Hostname1SkeletonPrivate *priv; -}; - -struct _Hostname1SkeletonClass -{ - GDBusInterfaceSkeletonClass parent_class; -}; - -GType hostname1_skeleton_get_type (void) G_GNUC_CONST; - -Hostname1 *hostname1_skeleton_new (void); - - -G_END_DECLS - -#endif /* __HOSTNAMED_GEN_H__ */ diff --git a/src/interfaces/localed/localed-gen.c b/src/interfaces/localed/localed-gen.c deleted file mode 100644 index 77a10ad..0000000 --- a/src/interfaces/localed/localed-gen.c +++ /dev/null @@ -1,2513 +0,0 @@ -/* - * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. - * - * The license of this code is the same as for the source it was derived from. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "localed-gen.h" - -#include -#ifdef G_OS_UNIX -# include -#endif - -typedef struct -{ - GDBusArgInfo parent_struct; - gboolean use_gvariant; -} _ExtendedGDBusArgInfo; - -typedef struct -{ - GDBusMethodInfo parent_struct; - const gchar *signal_name; - gboolean pass_fdlist; -} _ExtendedGDBusMethodInfo; - -typedef struct -{ - GDBusSignalInfo parent_struct; - const gchar *signal_name; -} _ExtendedGDBusSignalInfo; - -typedef struct -{ - GDBusPropertyInfo parent_struct; - const gchar *hyphen_name; - gboolean use_gvariant; -} _ExtendedGDBusPropertyInfo; - -typedef struct -{ - GDBusInterfaceInfo parent_struct; - const gchar *hyphen_name; -} _ExtendedGDBusInterfaceInfo; - -typedef struct -{ - const _ExtendedGDBusPropertyInfo *info; - guint prop_id; - GValue orig_value; /* the value before the change */ -} ChangedProperty; - -static void -_changed_property_free (ChangedProperty *data) -{ - g_value_unset (&data->orig_value); - g_free (data); -} - -static gboolean -_g_strv_equal0 (gchar **a, gchar **b) -{ - gboolean ret = FALSE; - guint n; - if (a == NULL && b == NULL) - { - ret = TRUE; - goto out; - } - if (a == NULL || b == NULL) - goto out; - if (g_strv_length (a) != g_strv_length (b)) - goto out; - for (n = 0; a[n] != NULL; n++) - if (g_strcmp0 (a[n], b[n]) != 0) - goto out; - ret = TRUE; -out: - return ret; -} - -static gboolean -_g_variant_equal0 (GVariant *a, GVariant *b) -{ - gboolean ret = FALSE; - if (a == NULL && b == NULL) - { - ret = TRUE; - goto out; - } - if (a == NULL || b == NULL) - goto out; - ret = g_variant_equal (a, b); -out: - return ret; -} - -G_GNUC_UNUSED static gboolean -_g_value_equal (const GValue *a, const GValue *b) -{ - gboolean ret = FALSE; - g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); - switch (G_VALUE_TYPE (a)) - { - case G_TYPE_BOOLEAN: - ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); - break; - case G_TYPE_UCHAR: - ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); - break; - case G_TYPE_INT: - ret = (g_value_get_int (a) == g_value_get_int (b)); - break; - case G_TYPE_UINT: - ret = (g_value_get_uint (a) == g_value_get_uint (b)); - break; - case G_TYPE_INT64: - ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); - break; - case G_TYPE_UINT64: - ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); - break; - case G_TYPE_DOUBLE: - { - /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ - gdouble da = g_value_get_double (a); - gdouble db = g_value_get_double (b); - ret = memcmp (&da, &db, sizeof (gdouble)) == 0; - } - break; - case G_TYPE_STRING: - ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); - break; - case G_TYPE_VARIANT: - ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); - break; - default: - if (G_VALUE_TYPE (a) == G_TYPE_STRV) - ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); - else - g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); - break; - } - return ret; -} - -/* ------------------------------------------------------------------------ - * Code for interface org.freedesktop.locale1 - * ------------------------------------------------------------------------ - */ - -/** - * SECTION:Locale1 - * @title: Locale1 - * @short_description: Generated C code for the org.freedesktop.locale1 D-Bus interface - * - * This section contains code for working with the org.freedesktop.locale1 D-Bus interface in C. - */ - -/* ---- Introspection data for org.freedesktop.locale1 ---- */ - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_locale_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "as", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_locale_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _locale1_method_info_set_locale_IN_ARG_pointers[] = -{ - &_locale1_method_info_set_locale_IN_ARG_unnamed_arg0, - &_locale1_method_info_set_locale_IN_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _locale1_method_info_set_locale = -{ - { - -1, - (gchar *) "SetLocale", - (GDBusArgInfo **) &_locale1_method_info_set_locale_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-locale", - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg2 = -{ - { - -1, - (gchar *) "unnamed_arg2", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg3 = -{ - { - -1, - (gchar *) "unnamed_arg3", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _locale1_method_info_set_vconsole_keyboard_IN_ARG_pointers[] = -{ - &_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg0, - &_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg1, - &_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg2, - &_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg3, - NULL -}; - -static const _ExtendedGDBusMethodInfo _locale1_method_info_set_vconsole_keyboard = -{ - { - -1, - (gchar *) "SetVConsoleKeyboard", - (GDBusArgInfo **) &_locale1_method_info_set_vconsole_keyboard_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-vconsole-keyboard", - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg2 = -{ - { - -1, - (gchar *) "unnamed_arg2", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg3 = -{ - { - -1, - (gchar *) "unnamed_arg3", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg4 = -{ - { - -1, - (gchar *) "unnamed_arg4", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg5 = -{ - { - -1, - (gchar *) "unnamed_arg5", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _locale1_method_info_set_x11_keyboard_IN_ARG_pointers[] = -{ - &_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg0, - &_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg1, - &_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg2, - &_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg3, - &_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg4, - &_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg5, - NULL -}; - -static const _ExtendedGDBusMethodInfo _locale1_method_info_set_x11_keyboard = -{ - { - -1, - (gchar *) "SetX11Keyboard", - (GDBusArgInfo **) &_locale1_method_info_set_x11_keyboard_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-x11-keyboard", - FALSE -}; - -static const _ExtendedGDBusMethodInfo * const _locale1_method_info_pointers[] = -{ - &_locale1_method_info_set_locale, - &_locale1_method_info_set_vconsole_keyboard, - &_locale1_method_info_set_x11_keyboard, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _locale1_property_info_locale = -{ - { - -1, - (gchar *) "Locale", - (gchar *) "as", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "locale", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _locale1_property_info_x11_layout = -{ - { - -1, - (gchar *) "X11Layout", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "x11-layout", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _locale1_property_info_x11_model = -{ - { - -1, - (gchar *) "X11Model", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "x11-model", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _locale1_property_info_x11_variant = -{ - { - -1, - (gchar *) "X11Variant", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "x11-variant", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _locale1_property_info_x11_options = -{ - { - -1, - (gchar *) "X11Options", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "x11-options", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _locale1_property_info_vconsole_keymap = -{ - { - -1, - (gchar *) "VConsoleKeymap", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "vconsole-keymap", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _locale1_property_info_vconsole_keymap_toggle = -{ - { - -1, - (gchar *) "VConsoleKeymapToggle", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "vconsole-keymap-toggle", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo * const _locale1_property_info_pointers[] = -{ - &_locale1_property_info_locale, - &_locale1_property_info_x11_layout, - &_locale1_property_info_x11_model, - &_locale1_property_info_x11_variant, - &_locale1_property_info_x11_options, - &_locale1_property_info_vconsole_keymap, - &_locale1_property_info_vconsole_keymap_toggle, - NULL -}; - -static const _ExtendedGDBusInterfaceInfo _locale1_interface_info = -{ - { - -1, - (gchar *) "org.freedesktop.locale1", - (GDBusMethodInfo **) &_locale1_method_info_pointers, - NULL, - (GDBusPropertyInfo **) &_locale1_property_info_pointers, - NULL - }, - "locale1", -}; - - -/** - * locale1_interface_info: - * - * Gets a machine-readable description of the org.freedesktop.locale1 D-Bus interface. - * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. - */ -GDBusInterfaceInfo * -locale1_interface_info (void) -{ - return (GDBusInterfaceInfo *) &_locale1_interface_info.parent_struct; -} - -/** - * locale1_override_properties: - * @klass: The class structure for a #GObject-derived class. - * @property_id_begin: The property id to assign to the first overridden property. - * - * Overrides all #GObject properties in the #Locale1 interface for a concrete class. - * The properties are overridden in the order they are defined. - * - * Returns: The last property id. - */ -guint -locale1_override_properties (GObjectClass *klass, guint property_id_begin) -{ - g_object_class_override_property (klass, property_id_begin++, "locale"); - g_object_class_override_property (klass, property_id_begin++, "x11-layout"); - g_object_class_override_property (klass, property_id_begin++, "x11-model"); - g_object_class_override_property (klass, property_id_begin++, "x11-variant"); - g_object_class_override_property (klass, property_id_begin++, "x11-options"); - g_object_class_override_property (klass, property_id_begin++, "vconsole-keymap"); - g_object_class_override_property (klass, property_id_begin++, "vconsole-keymap-toggle"); - return property_id_begin - 1; -} - - - -/** - * Locale1: - * - * Abstract interface type for the D-Bus interface org.freedesktop.locale1. - */ - -/** - * Locale1Iface: - * @parent_iface: The parent interface. - * @handle_set_locale: Handler for the #Locale1::handle-set-locale signal. - * @handle_set_vconsole_keyboard: Handler for the #Locale1::handle-set-vconsole-keyboard signal. - * @handle_set_x11_keyboard: Handler for the #Locale1::handle-set-x11-keyboard signal. - * @get_locale: Getter for the #Locale1:locale property. - * @get_vconsole_keymap: Getter for the #Locale1:vconsole-keymap property. - * @get_vconsole_keymap_toggle: Getter for the #Locale1:vconsole-keymap-toggle property. - * @get_x11_layout: Getter for the #Locale1:x11-layout property. - * @get_x11_model: Getter for the #Locale1:x11-model property. - * @get_x11_options: Getter for the #Locale1:x11-options property. - * @get_x11_variant: Getter for the #Locale1:x11-variant property. - * - * Virtual table for the D-Bus interface org.freedesktop.locale1. - */ - -typedef Locale1Iface Locale1Interface; -G_DEFINE_INTERFACE (Locale1, locale1, G_TYPE_OBJECT); - -static void -locale1_default_init (Locale1Iface *iface) -{ - /* GObject signals for incoming D-Bus method calls: */ - /** - * Locale1::handle-set-locale: - * @object: A #Locale1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetLocale() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call locale1_complete_set_locale() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-locale", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Locale1Iface, handle_set_locale), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV, G_TYPE_BOOLEAN); - - /** - * Locale1::handle-set-vconsole-keyboard: - * @object: A #Locale1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * @arg_unnamed_arg2: Argument passed by remote caller. - * @arg_unnamed_arg3: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetVConsoleKeyboard() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call locale1_complete_set_vconsole_keyboard() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-vconsole-keyboard", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Locale1Iface, handle_set_vconsole_keyboard), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 5, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN); - - /** - * Locale1::handle-set-x11-keyboard: - * @object: A #Locale1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * @arg_unnamed_arg2: Argument passed by remote caller. - * @arg_unnamed_arg3: Argument passed by remote caller. - * @arg_unnamed_arg4: Argument passed by remote caller. - * @arg_unnamed_arg5: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetX11Keyboard() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call locale1_complete_set_x11_keyboard() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-x11-keyboard", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Locale1Iface, handle_set_x11_keyboard), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 7, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN); - - /* GObject properties for D-Bus properties: */ - /** - * Locale1:locale: - * - * Represents the D-Bus property "Locale". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boxed ("locale", "Locale", "Locale", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Locale1:x11-layout: - * - * Represents the D-Bus property "X11Layout". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("x11-layout", "X11Layout", "X11Layout", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Locale1:x11-model: - * - * Represents the D-Bus property "X11Model". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("x11-model", "X11Model", "X11Model", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Locale1:x11-variant: - * - * Represents the D-Bus property "X11Variant". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("x11-variant", "X11Variant", "X11Variant", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Locale1:x11-options: - * - * Represents the D-Bus property "X11Options". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("x11-options", "X11Options", "X11Options", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Locale1:vconsole-keymap: - * - * Represents the D-Bus property "VConsoleKeymap". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("vconsole-keymap", "VConsoleKeymap", "VConsoleKeymap", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Locale1:vconsole-keymap-toggle: - * - * Represents the D-Bus property "VConsoleKeymapToggle". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("vconsole-keymap-toggle", "VConsoleKeymapToggle", "VConsoleKeymapToggle", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); -} - -/** - * locale1_get_locale: (skip) - * @object: A #Locale1. - * - * Gets the value of the "Locale" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use locale1_dup_locale() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar *const * -locale1_get_locale (Locale1 *object) -{ - return LOCALE1_GET_IFACE (object)->get_locale (object); -} - -/** - * locale1_dup_locale: (skip) - * @object: A #Locale1. - * - * Gets a copy of the "Locale" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev(). - */ -gchar ** -locale1_dup_locale (Locale1 *object) -{ - gchar **value; - g_object_get (G_OBJECT (object), "locale", &value, NULL); - return value; -} - -/** - * locale1_set_locale: (skip) - * @object: A #Locale1. - * @value: The value to set. - * - * Sets the "Locale" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -locale1_set_locale (Locale1 *object, const gchar *const *value) -{ - g_object_set (G_OBJECT (object), "locale", value, NULL); -} - -/** - * locale1_get_x11_layout: (skip) - * @object: A #Locale1. - * - * Gets the value of the "X11Layout" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use locale1_dup_x11_layout() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -locale1_get_x11_layout (Locale1 *object) -{ - return LOCALE1_GET_IFACE (object)->get_x11_layout (object); -} - -/** - * locale1_dup_x11_layout: (skip) - * @object: A #Locale1. - * - * Gets a copy of the "X11Layout" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -locale1_dup_x11_layout (Locale1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "x11-layout", &value, NULL); - return value; -} - -/** - * locale1_set_x11_layout: (skip) - * @object: A #Locale1. - * @value: The value to set. - * - * Sets the "X11Layout" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -locale1_set_x11_layout (Locale1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "x11-layout", value, NULL); -} - -/** - * locale1_get_x11_model: (skip) - * @object: A #Locale1. - * - * Gets the value of the "X11Model" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use locale1_dup_x11_model() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -locale1_get_x11_model (Locale1 *object) -{ - return LOCALE1_GET_IFACE (object)->get_x11_model (object); -} - -/** - * locale1_dup_x11_model: (skip) - * @object: A #Locale1. - * - * Gets a copy of the "X11Model" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -locale1_dup_x11_model (Locale1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "x11-model", &value, NULL); - return value; -} - -/** - * locale1_set_x11_model: (skip) - * @object: A #Locale1. - * @value: The value to set. - * - * Sets the "X11Model" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -locale1_set_x11_model (Locale1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "x11-model", value, NULL); -} - -/** - * locale1_get_x11_variant: (skip) - * @object: A #Locale1. - * - * Gets the value of the "X11Variant" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use locale1_dup_x11_variant() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -locale1_get_x11_variant (Locale1 *object) -{ - return LOCALE1_GET_IFACE (object)->get_x11_variant (object); -} - -/** - * locale1_dup_x11_variant: (skip) - * @object: A #Locale1. - * - * Gets a copy of the "X11Variant" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -locale1_dup_x11_variant (Locale1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "x11-variant", &value, NULL); - return value; -} - -/** - * locale1_set_x11_variant: (skip) - * @object: A #Locale1. - * @value: The value to set. - * - * Sets the "X11Variant" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -locale1_set_x11_variant (Locale1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "x11-variant", value, NULL); -} - -/** - * locale1_get_x11_options: (skip) - * @object: A #Locale1. - * - * Gets the value of the "X11Options" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use locale1_dup_x11_options() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -locale1_get_x11_options (Locale1 *object) -{ - return LOCALE1_GET_IFACE (object)->get_x11_options (object); -} - -/** - * locale1_dup_x11_options: (skip) - * @object: A #Locale1. - * - * Gets a copy of the "X11Options" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -locale1_dup_x11_options (Locale1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "x11-options", &value, NULL); - return value; -} - -/** - * locale1_set_x11_options: (skip) - * @object: A #Locale1. - * @value: The value to set. - * - * Sets the "X11Options" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -locale1_set_x11_options (Locale1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "x11-options", value, NULL); -} - -/** - * locale1_get_vconsole_keymap: (skip) - * @object: A #Locale1. - * - * Gets the value of the "VConsoleKeymap" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use locale1_dup_vconsole_keymap() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -locale1_get_vconsole_keymap (Locale1 *object) -{ - return LOCALE1_GET_IFACE (object)->get_vconsole_keymap (object); -} - -/** - * locale1_dup_vconsole_keymap: (skip) - * @object: A #Locale1. - * - * Gets a copy of the "VConsoleKeymap" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -locale1_dup_vconsole_keymap (Locale1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "vconsole-keymap", &value, NULL); - return value; -} - -/** - * locale1_set_vconsole_keymap: (skip) - * @object: A #Locale1. - * @value: The value to set. - * - * Sets the "VConsoleKeymap" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -locale1_set_vconsole_keymap (Locale1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "vconsole-keymap", value, NULL); -} - -/** - * locale1_get_vconsole_keymap_toggle: (skip) - * @object: A #Locale1. - * - * Gets the value of the "VConsoleKeymapToggle" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use locale1_dup_vconsole_keymap_toggle() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -locale1_get_vconsole_keymap_toggle (Locale1 *object) -{ - return LOCALE1_GET_IFACE (object)->get_vconsole_keymap_toggle (object); -} - -/** - * locale1_dup_vconsole_keymap_toggle: (skip) - * @object: A #Locale1. - * - * Gets a copy of the "VConsoleKeymapToggle" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -locale1_dup_vconsole_keymap_toggle (Locale1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "vconsole-keymap-toggle", &value, NULL); - return value; -} - -/** - * locale1_set_vconsole_keymap_toggle: (skip) - * @object: A #Locale1. - * @value: The value to set. - * - * Sets the "VConsoleKeymapToggle" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -locale1_set_vconsole_keymap_toggle (Locale1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "vconsole-keymap-toggle", value, NULL); -} - -/** - * locale1_call_set_locale: - * @proxy: A #Locale1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetLocale() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call locale1_call_set_locale_finish() to get the result of the operation. - * - * See locale1_call_set_locale_sync() for the synchronous, blocking version of this method. - */ -void -locale1_call_set_locale ( - Locale1 *proxy, - const gchar *const *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetLocale", - g_variant_new ("(^asb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * locale1_call_set_locale_finish: - * @proxy: A #Locale1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to locale1_call_set_locale(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with locale1_call_set_locale(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -locale1_call_set_locale_finish ( - Locale1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * locale1_call_set_locale_sync: - * @proxy: A #Locale1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetLocale() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See locale1_call_set_locale() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -locale1_call_set_locale_sync ( - Locale1 *proxy, - const gchar *const *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetLocale", - g_variant_new ("(^asb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * locale1_call_set_vconsole_keyboard: - * @proxy: A #Locale1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @arg_unnamed_arg3: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetVConsoleKeyboard() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call locale1_call_set_vconsole_keyboard_finish() to get the result of the operation. - * - * See locale1_call_set_vconsole_keyboard_sync() for the synchronous, blocking version of this method. - */ -void -locale1_call_set_vconsole_keyboard ( - Locale1 *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - gboolean arg_unnamed_arg3, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetVConsoleKeyboard", - g_variant_new ("(ssbb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2, - arg_unnamed_arg3), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * locale1_call_set_vconsole_keyboard_finish: - * @proxy: A #Locale1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to locale1_call_set_vconsole_keyboard(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with locale1_call_set_vconsole_keyboard(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -locale1_call_set_vconsole_keyboard_finish ( - Locale1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * locale1_call_set_vconsole_keyboard_sync: - * @proxy: A #Locale1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @arg_unnamed_arg3: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetVConsoleKeyboard() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See locale1_call_set_vconsole_keyboard() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -locale1_call_set_vconsole_keyboard_sync ( - Locale1 *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - gboolean arg_unnamed_arg3, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetVConsoleKeyboard", - g_variant_new ("(ssbb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2, - arg_unnamed_arg3), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * locale1_call_set_x11_keyboard: - * @proxy: A #Locale1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @arg_unnamed_arg3: Argument to pass with the method invocation. - * @arg_unnamed_arg4: Argument to pass with the method invocation. - * @arg_unnamed_arg5: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetX11Keyboard() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call locale1_call_set_x11_keyboard_finish() to get the result of the operation. - * - * See locale1_call_set_x11_keyboard_sync() for the synchronous, blocking version of this method. - */ -void -locale1_call_set_x11_keyboard ( - Locale1 *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - gboolean arg_unnamed_arg4, - gboolean arg_unnamed_arg5, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetX11Keyboard", - g_variant_new ("(ssssbb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2, - arg_unnamed_arg3, - arg_unnamed_arg4, - arg_unnamed_arg5), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * locale1_call_set_x11_keyboard_finish: - * @proxy: A #Locale1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to locale1_call_set_x11_keyboard(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with locale1_call_set_x11_keyboard(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -locale1_call_set_x11_keyboard_finish ( - Locale1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * locale1_call_set_x11_keyboard_sync: - * @proxy: A #Locale1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @arg_unnamed_arg3: Argument to pass with the method invocation. - * @arg_unnamed_arg4: Argument to pass with the method invocation. - * @arg_unnamed_arg5: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetX11Keyboard() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See locale1_call_set_x11_keyboard() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -locale1_call_set_x11_keyboard_sync ( - Locale1 *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - gboolean arg_unnamed_arg4, - gboolean arg_unnamed_arg5, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetX11Keyboard", - g_variant_new ("(ssssbb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2, - arg_unnamed_arg3, - arg_unnamed_arg4, - arg_unnamed_arg5), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * locale1_complete_set_locale: - * @object: A #Locale1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetLocale() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -locale1_complete_set_locale ( - Locale1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * locale1_complete_set_vconsole_keyboard: - * @object: A #Locale1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetVConsoleKeyboard() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -locale1_complete_set_vconsole_keyboard ( - Locale1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * locale1_complete_set_x11_keyboard: - * @object: A #Locale1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetX11Keyboard() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -locale1_complete_set_x11_keyboard ( - Locale1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/* ------------------------------------------------------------------------ */ - -/** - * Locale1Proxy: - * - * The #Locale1Proxy structure contains only private data and should only be accessed using the provided API. - */ - -/** - * Locale1ProxyClass: - * @parent_class: The parent class. - * - * Class structure for #Locale1Proxy. - */ - -struct _Locale1ProxyPrivate -{ - GData *qdata; -}; - -static void locale1_proxy_iface_init (Locale1Iface *iface); - -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 -G_DEFINE_TYPE_WITH_CODE (Locale1Proxy, locale1_proxy, G_TYPE_DBUS_PROXY, - G_ADD_PRIVATE (Locale1Proxy) - G_IMPLEMENT_INTERFACE (TYPE_LOCALE1, locale1_proxy_iface_init)); - -#else -G_DEFINE_TYPE_WITH_CODE (Locale1Proxy, locale1_proxy, G_TYPE_DBUS_PROXY, - G_IMPLEMENT_INTERFACE (TYPE_LOCALE1, locale1_proxy_iface_init)); - -#endif -static void -locale1_proxy_finalize (GObject *object) -{ - Locale1Proxy *proxy = LOCALE1_PROXY (object); - g_datalist_clear (&proxy->priv->qdata); - G_OBJECT_CLASS (locale1_proxy_parent_class)->finalize (object); -} - -static void -locale1_proxy_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - const _ExtendedGDBusPropertyInfo *info; - GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 7); - info = _locale1_property_info_pointers[prop_id - 1]; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); - if (info->use_gvariant) - { - g_value_set_variant (value, variant); - } - else - { - if (variant != NULL) - g_dbus_gvariant_to_gvalue (variant, value); - } - if (variant != NULL) - g_variant_unref (variant); -} - -static void -locale1_proxy_set_property_cb (GDBusProxy *proxy, - GAsyncResult *res, - gpointer user_data) -{ - const _ExtendedGDBusPropertyInfo *info = user_data; - GError *error; - GVariant *_ret; - error = NULL; - _ret = g_dbus_proxy_call_finish (proxy, res, &error); - if (!_ret) - { - g_warning ("Error setting property '%s' on interface org.freedesktop.locale1: %s (%s, %d)", - info->parent_struct.name, - error->message, g_quark_to_string (error->domain), error->code); - g_error_free (error); - } - else - { - g_variant_unref (_ret); - } -} - -static void -locale1_proxy_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - const _ExtendedGDBusPropertyInfo *info; - GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 7); - info = _locale1_property_info_pointers[prop_id - 1]; - variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); - g_dbus_proxy_call (G_DBUS_PROXY (object), - "org.freedesktop.DBus.Properties.Set", - g_variant_new ("(ssv)", "org.freedesktop.locale1", info->parent_struct.name, variant), - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, (GAsyncReadyCallback) locale1_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); - g_variant_unref (variant); -} - -static void -locale1_proxy_g_signal (GDBusProxy *proxy, - const gchar *sender_name G_GNUC_UNUSED, - const gchar *signal_name, - GVariant *parameters) -{ - _ExtendedGDBusSignalInfo *info; - GVariantIter iter; - GVariant *child; - GValue *paramv; - guint num_params; - guint n; - guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_locale1_interface_info.parent_struct, signal_name); - if (info == NULL) - return; - num_params = g_variant_n_children (parameters); - paramv = g_new0 (GValue, num_params + 1); - g_value_init (¶mv[0], TYPE_LOCALE1); - g_value_set_object (¶mv[0], proxy); - g_variant_iter_init (&iter, parameters); - n = 1; - while ((child = g_variant_iter_next_value (&iter)) != NULL) - { - _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; - if (arg_info->use_gvariant) - { - g_value_init (¶mv[n], G_TYPE_VARIANT); - g_value_set_variant (¶mv[n], child); - n++; - } - else - g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); - g_variant_unref (child); - } - signal_id = g_signal_lookup (info->signal_name, TYPE_LOCALE1); - g_signal_emitv (paramv, signal_id, 0, NULL); - for (n = 0; n < num_params + 1; n++) - g_value_unset (¶mv[n]); - g_free (paramv); -} - -static void -locale1_proxy_g_properties_changed (GDBusProxy *_proxy, - GVariant *changed_properties, - const gchar *const *invalidated_properties) -{ - Locale1Proxy *proxy = LOCALE1_PROXY (_proxy); - guint n; - const gchar *key; - GVariantIter *iter; - _ExtendedGDBusPropertyInfo *info; - g_variant_get (changed_properties, "a{sv}", &iter); - while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) - { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_locale1_interface_info.parent_struct, key); - g_datalist_remove_data (&proxy->priv->qdata, key); - if (info != NULL) - g_object_notify (G_OBJECT (proxy), info->hyphen_name); - } - g_variant_iter_free (iter); - for (n = 0; invalidated_properties[n] != NULL; n++) - { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_locale1_interface_info.parent_struct, invalidated_properties[n]); - g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); - if (info != NULL) - g_object_notify (G_OBJECT (proxy), info->hyphen_name); - } -} - -static const gchar *const * -locale1_proxy_get_locale (Locale1 *object) -{ - Locale1Proxy *proxy = LOCALE1_PROXY (object); - GVariant *variant; - const gchar *const *value = NULL; - value = g_datalist_get_data (&proxy->priv->qdata, "Locale"); - if (value != NULL) - return value; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Locale"); - if (variant != NULL) - { - value = g_variant_get_strv (variant, NULL); - g_datalist_set_data_full (&proxy->priv->qdata, "Locale", (gpointer) value, g_free); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -locale1_proxy_get_x11_layout (Locale1 *object) -{ - Locale1Proxy *proxy = LOCALE1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Layout"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -locale1_proxy_get_x11_model (Locale1 *object) -{ - Locale1Proxy *proxy = LOCALE1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Model"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -locale1_proxy_get_x11_variant (Locale1 *object) -{ - Locale1Proxy *proxy = LOCALE1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Variant"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -locale1_proxy_get_x11_options (Locale1 *object) -{ - Locale1Proxy *proxy = LOCALE1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Options"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -locale1_proxy_get_vconsole_keymap (Locale1 *object) -{ - Locale1Proxy *proxy = LOCALE1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "VConsoleKeymap"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -locale1_proxy_get_vconsole_keymap_toggle (Locale1 *object) -{ - Locale1Proxy *proxy = LOCALE1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "VConsoleKeymapToggle"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static void -locale1_proxy_init (Locale1Proxy *proxy) -{ -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 - proxy->priv = locale1_proxy_get_instance_private (proxy); -#else - proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_LOCALE1_PROXY, Locale1ProxyPrivate); -#endif - - g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), locale1_interface_info ()); -} - -static void -locale1_proxy_class_init (Locale1ProxyClass *klass) -{ - GObjectClass *gobject_class; - GDBusProxyClass *proxy_class; - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = locale1_proxy_finalize; - gobject_class->get_property = locale1_proxy_get_property; - gobject_class->set_property = locale1_proxy_set_property; - - proxy_class = G_DBUS_PROXY_CLASS (klass); - proxy_class->g_signal = locale1_proxy_g_signal; - proxy_class->g_properties_changed = locale1_proxy_g_properties_changed; - - locale1_override_properties (gobject_class, 1); - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 - g_type_class_add_private (klass, sizeof (Locale1ProxyPrivate)); -#endif -} - -static void -locale1_proxy_iface_init (Locale1Iface *iface) -{ - iface->get_locale = locale1_proxy_get_locale; - iface->get_x11_layout = locale1_proxy_get_x11_layout; - iface->get_x11_model = locale1_proxy_get_x11_model; - iface->get_x11_variant = locale1_proxy_get_x11_variant; - iface->get_x11_options = locale1_proxy_get_x11_options; - iface->get_vconsole_keymap = locale1_proxy_get_vconsole_keymap; - iface->get_vconsole_keymap_toggle = locale1_proxy_get_vconsole_keymap_toggle; -} - -/** - * locale1_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.locale1. See g_dbus_proxy_new() for more details. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call locale1_proxy_new_finish() to get the result of the operation. - * - * See locale1_proxy_new_sync() for the synchronous, blocking version of this constructor. - */ -void -locale1_proxy_new ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_async_initable_new_async (TYPE_LOCALE1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.locale1", NULL); -} - -/** - * locale1_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to locale1_proxy_new(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with locale1_proxy_new(). - * - * Returns: (transfer full) (type Locale1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Locale1 * -locale1_proxy_new_finish ( - GAsyncResult *res, - GError **error) -{ - GObject *ret; - GObject *source_object; - source_object = g_async_result_get_source_object (res); - ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); - g_object_unref (source_object); - if (ret != NULL) - return LOCALE1 (ret); - else - return NULL; -} - -/** - * locale1_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Synchronously creates a proxy for the D-Bus interface org.freedesktop.locale1. See g_dbus_proxy_new_sync() for more details. - * - * The calling thread is blocked until a reply is received. - * - * See locale1_proxy_new() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type Locale1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Locale1 * -locale1_proxy_new_sync ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error) -{ - GInitable *ret; - ret = g_initable_new (TYPE_LOCALE1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.locale1", NULL); - if (ret != NULL) - return LOCALE1 (ret); - else - return NULL; -} - - -/** - * locale1_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Like locale1_proxy_new() but takes a #GBusType instead of a #GDBusConnection. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call locale1_proxy_new_for_bus_finish() to get the result of the operation. - * - * See locale1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. - */ -void -locale1_proxy_new_for_bus ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_async_initable_new_async (TYPE_LOCALE1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.locale1", NULL); -} - -/** - * locale1_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to locale1_proxy_new_for_bus(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with locale1_proxy_new_for_bus(). - * - * Returns: (transfer full) (type Locale1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Locale1 * -locale1_proxy_new_for_bus_finish ( - GAsyncResult *res, - GError **error) -{ - GObject *ret; - GObject *source_object; - source_object = g_async_result_get_source_object (res); - ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); - g_object_unref (source_object); - if (ret != NULL) - return LOCALE1 (ret); - else - return NULL; -} - -/** - * locale1_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Like locale1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. - * - * The calling thread is blocked until a reply is received. - * - * See locale1_proxy_new_for_bus() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type Locale1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Locale1 * -locale1_proxy_new_for_bus_sync ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error) -{ - GInitable *ret; - ret = g_initable_new (TYPE_LOCALE1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.locale1", NULL); - if (ret != NULL) - return LOCALE1 (ret); - else - return NULL; -} - - -/* ------------------------------------------------------------------------ */ - -/** - * Locale1Skeleton: - * - * The #Locale1Skeleton structure contains only private data and should only be accessed using the provided API. - */ - -/** - * Locale1SkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #Locale1Skeleton. - */ - -struct _Locale1SkeletonPrivate -{ - GValue *properties; - GList *changed_properties; - GSource *changed_properties_idle_source; - GMainContext *context; - GMutex lock; -}; - -static void -_locale1_skeleton_handle_method_call ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name, - const gchar *method_name, - GVariant *parameters, - GDBusMethodInvocation *invocation, - gpointer user_data) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (user_data); - _ExtendedGDBusMethodInfo *info; - GVariantIter iter; - GVariant *child; - GValue *paramv; - guint num_params; - guint num_extra; - guint n; - guint signal_id; - GValue return_value = G_VALUE_INIT; - info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); - g_assert (info != NULL); - num_params = g_variant_n_children (parameters); - num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); - n = 0; - g_value_init (¶mv[n], TYPE_LOCALE1); - g_value_set_object (¶mv[n++], skeleton); - g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); - g_value_set_object (¶mv[n++], invocation); - if (info->pass_fdlist) - { -#ifdef G_OS_UNIX - g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); - g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); -#else - g_assert_not_reached (); -#endif - } - g_variant_iter_init (&iter, parameters); - while ((child = g_variant_iter_next_value (&iter)) != NULL) - { - _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; - if (arg_info->use_gvariant) - { - g_value_init (¶mv[n], G_TYPE_VARIANT); - g_value_set_variant (¶mv[n], child); - n++; - } - else - g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); - g_variant_unref (child); - } - signal_id = g_signal_lookup (info->signal_name, TYPE_LOCALE1); - g_value_init (&return_value, G_TYPE_BOOLEAN); - g_signal_emitv (paramv, signal_id, 0, &return_value); - if (!g_value_get_boolean (&return_value)) - g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); - g_value_unset (&return_value); - for (n = 0; n < num_params + num_extra; n++) - g_value_unset (¶mv[n]); - g_free (paramv); -} - -static GVariant * -_locale1_skeleton_handle_get_property ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name G_GNUC_UNUSED, - const gchar *property_name, - GError **error, - gpointer user_data) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (user_data); - GValue value = G_VALUE_INIT; - GParamSpec *pspec; - _ExtendedGDBusPropertyInfo *info; - GVariant *ret; - ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_locale1_interface_info.parent_struct, property_name); - g_assert (info != NULL); - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); - if (pspec == NULL) - { - g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); - } - else - { - g_value_init (&value, pspec->value_type); - g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); - ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); - g_value_unset (&value); - } - return ret; -} - -static gboolean -_locale1_skeleton_handle_set_property ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name G_GNUC_UNUSED, - const gchar *property_name, - GVariant *variant, - GError **error, - gpointer user_data) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (user_data); - GValue value = G_VALUE_INIT; - GParamSpec *pspec; - _ExtendedGDBusPropertyInfo *info; - gboolean ret; - ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_locale1_interface_info.parent_struct, property_name); - g_assert (info != NULL); - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); - if (pspec == NULL) - { - g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); - } - else - { - if (info->use_gvariant) - g_value_set_variant (&value, variant); - else - g_dbus_gvariant_to_gvalue (variant, &value); - g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); - g_value_unset (&value); - ret = TRUE; - } - return ret; -} - -static const GDBusInterfaceVTable _locale1_skeleton_vtable = -{ - _locale1_skeleton_handle_method_call, - _locale1_skeleton_handle_get_property, - _locale1_skeleton_handle_set_property, - {NULL} -}; - -static GDBusInterfaceInfo * -locale1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) -{ - return locale1_interface_info (); -} - -static GDBusInterfaceVTable * -locale1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) -{ - return (GDBusInterfaceVTable *) &_locale1_skeleton_vtable; -} - -static GVariant * -locale1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (_skeleton); - - GVariantBuilder builder; - guint n; - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - if (_locale1_interface_info.parent_struct.properties == NULL) - goto out; - for (n = 0; _locale1_interface_info.parent_struct.properties[n] != NULL; n++) - { - GDBusPropertyInfo *info = _locale1_interface_info.parent_struct.properties[n]; - if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) - { - GVariant *value; - value = _locale1_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.locale1", info->name, NULL, skeleton); - if (value != NULL) - { - g_variant_take_ref (value); - g_variant_builder_add (&builder, "{sv}", info->name, value); - g_variant_unref (value); - } - } - } -out: - return g_variant_builder_end (&builder); -} - -static gboolean _locale1_emit_changed (gpointer user_data); - -static void -locale1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (_skeleton); - gboolean emit_changed = FALSE; - - g_mutex_lock (&skeleton->priv->lock); - if (skeleton->priv->changed_properties_idle_source != NULL) - { - g_source_destroy (skeleton->priv->changed_properties_idle_source); - skeleton->priv->changed_properties_idle_source = NULL; - emit_changed = TRUE; - } - g_mutex_unlock (&skeleton->priv->lock); - - if (emit_changed) - _locale1_emit_changed (skeleton); -} - -static void locale1_skeleton_iface_init (Locale1Iface *iface); -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 -G_DEFINE_TYPE_WITH_CODE (Locale1Skeleton, locale1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, - G_ADD_PRIVATE (Locale1Skeleton) - G_IMPLEMENT_INTERFACE (TYPE_LOCALE1, locale1_skeleton_iface_init)); - -#else -G_DEFINE_TYPE_WITH_CODE (Locale1Skeleton, locale1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, - G_IMPLEMENT_INTERFACE (TYPE_LOCALE1, locale1_skeleton_iface_init)); - -#endif -static void -locale1_skeleton_finalize (GObject *object) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - guint n; - for (n = 0; n < 7; n++) - g_value_unset (&skeleton->priv->properties[n]); - g_free (skeleton->priv->properties); - g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); - if (skeleton->priv->changed_properties_idle_source != NULL) - g_source_destroy (skeleton->priv->changed_properties_idle_source); - g_main_context_unref (skeleton->priv->context); - g_mutex_clear (&skeleton->priv->lock); - G_OBJECT_CLASS (locale1_skeleton_parent_class)->finalize (object); -} - -static void -locale1_skeleton_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 7); - g_mutex_lock (&skeleton->priv->lock); - g_value_copy (&skeleton->priv->properties[prop_id - 1], value); - g_mutex_unlock (&skeleton->priv->lock); -} - -static gboolean -_locale1_emit_changed (gpointer user_data) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (user_data); - GList *l; - GVariantBuilder builder; - GVariantBuilder invalidated_builder; - guint num_changes; - - g_mutex_lock (&skeleton->priv->lock); - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); - for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) - { - ChangedProperty *cp = l->data; - GVariant *variant; - const GValue *cur_value; - - cur_value = &skeleton->priv->properties[cp->prop_id - 1]; - if (!_g_value_equal (cur_value, &cp->orig_value)) - { - variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); - g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); - g_variant_unref (variant); - num_changes++; - } - } - if (num_changes > 0) - { - GList *connections, *ll; - GVariant *signal_variant; - signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.locale1", - &builder, &invalidated_builder)); - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - for (ll = connections; ll != NULL; ll = ll->next) - { - GDBusConnection *connection = ll->data; - - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), - "org.freedesktop.DBus.Properties", - "PropertiesChanged", - signal_variant, - NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); - } - else - { - g_variant_builder_clear (&builder); - g_variant_builder_clear (&invalidated_builder); - } - g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); - skeleton->priv->changed_properties = NULL; - skeleton->priv->changed_properties_idle_source = NULL; - g_mutex_unlock (&skeleton->priv->lock); - return FALSE; -} - -static void -_locale1_schedule_emit_changed (Locale1Skeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) -{ - ChangedProperty *cp; - GList *l; - cp = NULL; - for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) - { - ChangedProperty *i_cp = l->data; - if (i_cp->info == info) - { - cp = i_cp; - break; - } - } - if (cp == NULL) - { - cp = g_new0 (ChangedProperty, 1); - cp->prop_id = prop_id; - cp->info = info; - skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); - g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); - g_value_copy (orig_value, &cp->orig_value); - } -} - -static void -locale1_skeleton_notify (GObject *object, - GParamSpec *pspec G_GNUC_UNUSED) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - g_mutex_lock (&skeleton->priv->lock); - if (skeleton->priv->changed_properties != NULL && - skeleton->priv->changed_properties_idle_source == NULL) - { - skeleton->priv->changed_properties_idle_source = g_idle_source_new (); - g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); - g_source_set_callback (skeleton->priv->changed_properties_idle_source, _locale1_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); - g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); - g_source_unref (skeleton->priv->changed_properties_idle_source); - } - g_mutex_unlock (&skeleton->priv->lock); -} - -static void -locale1_skeleton_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 7); - g_mutex_lock (&skeleton->priv->lock); - g_object_freeze_notify (object); - if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) - { - if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) - _locale1_schedule_emit_changed (skeleton, _locale1_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); - g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); - g_object_notify_by_pspec (object, pspec); - } - g_mutex_unlock (&skeleton->priv->lock); - g_object_thaw_notify (object); -} - -static void -locale1_skeleton_init (Locale1Skeleton *skeleton) -{ -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 - skeleton->priv = locale1_skeleton_get_instance_private (skeleton); -#else - skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_LOCALE1_SKELETON, Locale1SkeletonPrivate); -#endif - - g_mutex_init (&skeleton->priv->lock); - skeleton->priv->context = g_main_context_ref_thread_default (); - skeleton->priv->properties = g_new0 (GValue, 7); - g_value_init (&skeleton->priv->properties[0], G_TYPE_STRV); - g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[3], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[4], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[5], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[6], G_TYPE_STRING); -} - -static const gchar *const * -locale1_skeleton_get_locale (Locale1 *object) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - const gchar *const *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boxed (&(skeleton->priv->properties[0])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -locale1_skeleton_get_x11_layout (Locale1 *object) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[1])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -locale1_skeleton_get_x11_model (Locale1 *object) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[2])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -locale1_skeleton_get_x11_variant (Locale1 *object) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[3])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -locale1_skeleton_get_x11_options (Locale1 *object) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[4])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -locale1_skeleton_get_vconsole_keymap (Locale1 *object) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[5])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -locale1_skeleton_get_vconsole_keymap_toggle (Locale1 *object) -{ - Locale1Skeleton *skeleton = LOCALE1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[6])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static void -locale1_skeleton_class_init (Locale1SkeletonClass *klass) -{ - GObjectClass *gobject_class; - GDBusInterfaceSkeletonClass *skeleton_class; - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = locale1_skeleton_finalize; - gobject_class->get_property = locale1_skeleton_get_property; - gobject_class->set_property = locale1_skeleton_set_property; - gobject_class->notify = locale1_skeleton_notify; - - - locale1_override_properties (gobject_class, 1); - - skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); - skeleton_class->get_info = locale1_skeleton_dbus_interface_get_info; - skeleton_class->get_properties = locale1_skeleton_dbus_interface_get_properties; - skeleton_class->flush = locale1_skeleton_dbus_interface_flush; - skeleton_class->get_vtable = locale1_skeleton_dbus_interface_get_vtable; - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 - g_type_class_add_private (klass, sizeof (Locale1SkeletonPrivate)); -#endif -} - -static void -locale1_skeleton_iface_init (Locale1Iface *iface) -{ - iface->get_locale = locale1_skeleton_get_locale; - iface->get_x11_layout = locale1_skeleton_get_x11_layout; - iface->get_x11_model = locale1_skeleton_get_x11_model; - iface->get_x11_variant = locale1_skeleton_get_x11_variant; - iface->get_x11_options = locale1_skeleton_get_x11_options; - iface->get_vconsole_keymap = locale1_skeleton_get_vconsole_keymap; - iface->get_vconsole_keymap_toggle = locale1_skeleton_get_vconsole_keymap_toggle; -} - -/** - * locale1_skeleton_new: - * - * Creates a skeleton object for the D-Bus interface org.freedesktop.locale1. - * - * Returns: (transfer full) (type Locale1Skeleton): The skeleton object. - */ -Locale1 * -locale1_skeleton_new (void) -{ - return LOCALE1 (g_object_new (TYPE_LOCALE1_SKELETON, NULL)); -} - diff --git a/src/interfaces/localed/localed-gen.h b/src/interfaces/localed/localed-gen.h deleted file mode 100644 index cf8352c..0000000 --- a/src/interfaces/localed/localed-gen.h +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. - * - * The license of this code is the same as for the source it was derived from. - */ - -#ifndef __LOCALED_GEN_H__ -#define __LOCALED_GEN_H__ - -#include - -G_BEGIN_DECLS - - -/* ------------------------------------------------------------------------ */ -/* Declarations for org.freedesktop.locale1 */ - -#define TYPE_LOCALE1 (locale1_get_type ()) -#define LOCALE1(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_LOCALE1, Locale1)) -#define IS_LOCALE1(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_LOCALE1)) -#define LOCALE1_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_LOCALE1, Locale1Iface)) - -struct _Locale1; -typedef struct _Locale1 Locale1; -typedef struct _Locale1Iface Locale1Iface; - -struct _Locale1Iface -{ - GTypeInterface parent_iface; - - - gboolean (*handle_set_locale) ( - Locale1 *object, - GDBusMethodInvocation *invocation, - const gchar *const *arg_unnamed_arg0, - gboolean arg_unnamed_arg1); - - gboolean (*handle_set_vconsole_keyboard) ( - Locale1 *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - gboolean arg_unnamed_arg3); - - gboolean (*handle_set_x11_keyboard) ( - Locale1 *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - gboolean arg_unnamed_arg4, - gboolean arg_unnamed_arg5); - - const gchar *const * (*get_locale) (Locale1 *object); - - const gchar * (*get_vconsole_keymap) (Locale1 *object); - - const gchar * (*get_vconsole_keymap_toggle) (Locale1 *object); - - const gchar * (*get_x11_layout) (Locale1 *object); - - const gchar * (*get_x11_model) (Locale1 *object); - - const gchar * (*get_x11_options) (Locale1 *object); - - const gchar * (*get_x11_variant) (Locale1 *object); - -}; - -GType locale1_get_type (void) G_GNUC_CONST; - -GDBusInterfaceInfo *locale1_interface_info (void); -guint locale1_override_properties (GObjectClass *klass, guint property_id_begin); - - -/* D-Bus method call completion functions: */ -void locale1_complete_set_locale ( - Locale1 *object, - GDBusMethodInvocation *invocation); - -void locale1_complete_set_vconsole_keyboard ( - Locale1 *object, - GDBusMethodInvocation *invocation); - -void locale1_complete_set_x11_keyboard ( - Locale1 *object, - GDBusMethodInvocation *invocation); - - - -/* D-Bus method calls: */ -void locale1_call_set_locale ( - Locale1 *proxy, - const gchar *const *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean locale1_call_set_locale_finish ( - Locale1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean locale1_call_set_locale_sync ( - Locale1 *proxy, - const gchar *const *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void locale1_call_set_vconsole_keyboard ( - Locale1 *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - gboolean arg_unnamed_arg3, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean locale1_call_set_vconsole_keyboard_finish ( - Locale1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean locale1_call_set_vconsole_keyboard_sync ( - Locale1 *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - gboolean arg_unnamed_arg3, - GCancellable *cancellable, - GError **error); - -void locale1_call_set_x11_keyboard ( - Locale1 *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - gboolean arg_unnamed_arg4, - gboolean arg_unnamed_arg5, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean locale1_call_set_x11_keyboard_finish ( - Locale1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean locale1_call_set_x11_keyboard_sync ( - Locale1 *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - gboolean arg_unnamed_arg4, - gboolean arg_unnamed_arg5, - GCancellable *cancellable, - GError **error); - - - -/* D-Bus property accessors: */ -const gchar *const *locale1_get_locale (Locale1 *object); -gchar **locale1_dup_locale (Locale1 *object); -void locale1_set_locale (Locale1 *object, const gchar *const *value); - -const gchar *locale1_get_x11_layout (Locale1 *object); -gchar *locale1_dup_x11_layout (Locale1 *object); -void locale1_set_x11_layout (Locale1 *object, const gchar *value); - -const gchar *locale1_get_x11_model (Locale1 *object); -gchar *locale1_dup_x11_model (Locale1 *object); -void locale1_set_x11_model (Locale1 *object, const gchar *value); - -const gchar *locale1_get_x11_variant (Locale1 *object); -gchar *locale1_dup_x11_variant (Locale1 *object); -void locale1_set_x11_variant (Locale1 *object, const gchar *value); - -const gchar *locale1_get_x11_options (Locale1 *object); -gchar *locale1_dup_x11_options (Locale1 *object); -void locale1_set_x11_options (Locale1 *object, const gchar *value); - -const gchar *locale1_get_vconsole_keymap (Locale1 *object); -gchar *locale1_dup_vconsole_keymap (Locale1 *object); -void locale1_set_vconsole_keymap (Locale1 *object, const gchar *value); - -const gchar *locale1_get_vconsole_keymap_toggle (Locale1 *object); -gchar *locale1_dup_vconsole_keymap_toggle (Locale1 *object); -void locale1_set_vconsole_keymap_toggle (Locale1 *object, const gchar *value); - - -/* ---- */ - -#define TYPE_LOCALE1_PROXY (locale1_proxy_get_type ()) -#define LOCALE1_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_LOCALE1_PROXY, Locale1Proxy)) -#define LOCALE1_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_LOCALE1_PROXY, Locale1ProxyClass)) -#define LOCALE1_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_LOCALE1_PROXY, Locale1ProxyClass)) -#define IS_LOCALE1_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_LOCALE1_PROXY)) -#define IS_LOCALE1_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_LOCALE1_PROXY)) - -typedef struct _Locale1Proxy Locale1Proxy; -typedef struct _Locale1ProxyClass Locale1ProxyClass; -typedef struct _Locale1ProxyPrivate Locale1ProxyPrivate; - -struct _Locale1Proxy -{ - /*< private >*/ - GDBusProxy parent_instance; - Locale1ProxyPrivate *priv; -}; - -struct _Locale1ProxyClass -{ - GDBusProxyClass parent_class; -}; - -GType locale1_proxy_get_type (void) G_GNUC_CONST; - -void locale1_proxy_new ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -Locale1 *locale1_proxy_new_finish ( - GAsyncResult *res, - GError **error); -Locale1 *locale1_proxy_new_sync ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); - -void locale1_proxy_new_for_bus ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -Locale1 *locale1_proxy_new_for_bus_finish ( - GAsyncResult *res, - GError **error); -Locale1 *locale1_proxy_new_for_bus_sync ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); - - -/* ---- */ - -#define TYPE_LOCALE1_SKELETON (locale1_skeleton_get_type ()) -#define LOCALE1_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_LOCALE1_SKELETON, Locale1Skeleton)) -#define LOCALE1_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_LOCALE1_SKELETON, Locale1SkeletonClass)) -#define LOCALE1_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_LOCALE1_SKELETON, Locale1SkeletonClass)) -#define IS_LOCALE1_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_LOCALE1_SKELETON)) -#define IS_LOCALE1_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_LOCALE1_SKELETON)) - -typedef struct _Locale1Skeleton Locale1Skeleton; -typedef struct _Locale1SkeletonClass Locale1SkeletonClass; -typedef struct _Locale1SkeletonPrivate Locale1SkeletonPrivate; - -struct _Locale1Skeleton -{ - /*< private >*/ - GDBusInterfaceSkeleton parent_instance; - Locale1SkeletonPrivate *priv; -}; - -struct _Locale1SkeletonClass -{ - GDBusInterfaceSkeletonClass parent_class; -}; - -GType locale1_skeleton_get_type (void) G_GNUC_CONST; - -Locale1 *locale1_skeleton_new (void); - - -G_END_DECLS - -#endif /* __LOCALED_GEN_H__ */ diff --git a/src/interfaces/logind/logind-gen.c b/src/interfaces/logind/logind-gen.c deleted file mode 100644 index 4930158..0000000 --- a/src/interfaces/logind/logind-gen.c +++ /dev/null @@ -1,10875 +0,0 @@ -/* - * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. - * - * The license of this code is the same as for the source it was derived from. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "logind-gen.h" - -#include -#ifdef G_OS_UNIX -# include -#endif - -typedef struct -{ - GDBusArgInfo parent_struct; - gboolean use_gvariant; -} _ExtendedGDBusArgInfo; - -typedef struct -{ - GDBusMethodInfo parent_struct; - const gchar *signal_name; - gboolean pass_fdlist; -} _ExtendedGDBusMethodInfo; - -typedef struct -{ - GDBusSignalInfo parent_struct; - const gchar *signal_name; -} _ExtendedGDBusSignalInfo; - -typedef struct -{ - GDBusPropertyInfo parent_struct; - const gchar *hyphen_name; - gboolean use_gvariant; -} _ExtendedGDBusPropertyInfo; - -typedef struct -{ - GDBusInterfaceInfo parent_struct; - const gchar *hyphen_name; -} _ExtendedGDBusInterfaceInfo; - -typedef struct -{ - const _ExtendedGDBusPropertyInfo *info; - guint prop_id; - GValue orig_value; /* the value before the change */ -} ChangedProperty; - -static void -_changed_property_free (ChangedProperty *data) -{ - g_value_unset (&data->orig_value); - g_free (data); -} - -static gboolean -_g_strv_equal0 (gchar **a, gchar **b) -{ - gboolean ret = FALSE; - guint n; - if (a == NULL && b == NULL) - { - ret = TRUE; - goto out; - } - if (a == NULL || b == NULL) - goto out; - if (g_strv_length (a) != g_strv_length (b)) - goto out; - for (n = 0; a[n] != NULL; n++) - if (g_strcmp0 (a[n], b[n]) != 0) - goto out; - ret = TRUE; -out: - return ret; -} - -static gboolean -_g_variant_equal0 (GVariant *a, GVariant *b) -{ - gboolean ret = FALSE; - if (a == NULL && b == NULL) - { - ret = TRUE; - goto out; - } - if (a == NULL || b == NULL) - goto out; - ret = g_variant_equal (a, b); -out: - return ret; -} - -G_GNUC_UNUSED static gboolean -_g_value_equal (const GValue *a, const GValue *b) -{ - gboolean ret = FALSE; - g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); - switch (G_VALUE_TYPE (a)) - { - case G_TYPE_BOOLEAN: - ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); - break; - case G_TYPE_UCHAR: - ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); - break; - case G_TYPE_INT: - ret = (g_value_get_int (a) == g_value_get_int (b)); - break; - case G_TYPE_UINT: - ret = (g_value_get_uint (a) == g_value_get_uint (b)); - break; - case G_TYPE_INT64: - ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); - break; - case G_TYPE_UINT64: - ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); - break; - case G_TYPE_DOUBLE: - { - /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ - gdouble da = g_value_get_double (a); - gdouble db = g_value_get_double (b); - ret = memcmp (&da, &db, sizeof (gdouble)) == 0; - } - break; - case G_TYPE_STRING: - ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); - break; - case G_TYPE_VARIANT: - ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); - break; - default: - if (G_VALUE_TYPE (a) == G_TYPE_STRV) - ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); - else - g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); - break; - } - return ret; -} - -/* ------------------------------------------------------------------------ - * Code for interface org.freedesktop.login1.Manager - * ------------------------------------------------------------------------ - */ - -/** - * SECTION:Login1Manager - * @title: Login1Manager - * @short_description: Generated C code for the org.freedesktop.login1.Manager D-Bus interface - * - * This section contains code for working with the org.freedesktop.login1.Manager D-Bus interface in C. - */ - -/* ---- Introspection data for org.freedesktop.login1.Manager ---- */ - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_get_session_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_get_session_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_get_session_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_get_session_OUT_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_get_session_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_get_session_OUT_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_get_session = -{ - { - -1, - (gchar *) "GetSession", - (GDBusArgInfo **) &_login1_manager_method_info_get_session_IN_ARG_pointers, - (GDBusArgInfo **) &_login1_manager_method_info_get_session_OUT_ARG_pointers, - NULL - }, - "handle-get-session", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_get_session_by_pid_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_get_session_by_pid_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_get_session_by_pid_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_get_session_by_pid_OUT_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_get_session_by_pid_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_get_session_by_pid_OUT_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_get_session_by_pid = -{ - { - -1, - (gchar *) "GetSessionByPID", - (GDBusArgInfo **) &_login1_manager_method_info_get_session_by_pid_IN_ARG_pointers, - (GDBusArgInfo **) &_login1_manager_method_info_get_session_by_pid_OUT_ARG_pointers, - NULL - }, - "handle-get-session-by-pid", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_get_user_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_get_user_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_get_user_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_get_user_OUT_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_get_user_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_get_user_OUT_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_get_user = -{ - { - -1, - (gchar *) "GetUser", - (GDBusArgInfo **) &_login1_manager_method_info_get_user_IN_ARG_pointers, - (GDBusArgInfo **) &_login1_manager_method_info_get_user_OUT_ARG_pointers, - NULL - }, - "handle-get-user", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_get_user_by_pid_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_get_user_by_pid_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_get_user_by_pid_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_get_user_by_pid_OUT_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_get_user_by_pid_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_get_user_by_pid_OUT_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_get_user_by_pid = -{ - { - -1, - (gchar *) "GetUserByPID", - (GDBusArgInfo **) &_login1_manager_method_info_get_user_by_pid_IN_ARG_pointers, - (GDBusArgInfo **) &_login1_manager_method_info_get_user_by_pid_OUT_ARG_pointers, - NULL - }, - "handle-get-user-by-pid", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_get_seat_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_get_seat_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_get_seat_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_get_seat_OUT_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_get_seat_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_get_seat_OUT_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_get_seat = -{ - { - -1, - (gchar *) "GetSeat", - (GDBusArgInfo **) &_login1_manager_method_info_get_seat_IN_ARG_pointers, - (GDBusArgInfo **) &_login1_manager_method_info_get_seat_OUT_ARG_pointers, - NULL - }, - "handle-get-seat", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_list_sessions_OUT_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "a(susso)", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_list_sessions_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_list_sessions_OUT_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_list_sessions = -{ - { - -1, - (gchar *) "ListSessions", - NULL, - (GDBusArgInfo **) &_login1_manager_method_info_list_sessions_OUT_ARG_pointers, - NULL - }, - "handle-list-sessions", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_list_users_OUT_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "a(uso)", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_list_users_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_list_users_OUT_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_list_users = -{ - { - -1, - (gchar *) "ListUsers", - NULL, - (GDBusArgInfo **) &_login1_manager_method_info_list_users_OUT_ARG_pointers, - NULL - }, - "handle-list-users", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_list_seats_OUT_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "a(so)", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_list_seats_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_list_seats_OUT_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_list_seats = -{ - { - -1, - (gchar *) "ListSeats", - NULL, - (GDBusArgInfo **) &_login1_manager_method_info_list_seats_OUT_ARG_pointers, - NULL - }, - "handle-list-seats", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_list_inhibitors_OUT_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "a(ssssuu)", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_list_inhibitors_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_list_inhibitors_OUT_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_list_inhibitors = -{ - { - -1, - (gchar *) "ListInhibitors", - NULL, - (GDBusArgInfo **) &_login1_manager_method_info_list_inhibitors_OUT_ARG_pointers, - NULL - }, - "handle-list-inhibitors", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg2 = -{ - { - -1, - (gchar *) "unnamed_arg2", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg3 = -{ - { - -1, - (gchar *) "unnamed_arg3", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg4 = -{ - { - -1, - (gchar *) "unnamed_arg4", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg5 = -{ - { - -1, - (gchar *) "unnamed_arg5", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg6 = -{ - { - -1, - (gchar *) "unnamed_arg6", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg7 = -{ - { - -1, - (gchar *) "unnamed_arg7", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg8 = -{ - { - -1, - (gchar *) "unnamed_arg8", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg9 = -{ - { - -1, - (gchar *) "unnamed_arg9", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg10 = -{ - { - -1, - (gchar *) "unnamed_arg10", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg11 = -{ - { - -1, - (gchar *) "unnamed_arg11", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg12 = -{ - { - -1, - (gchar *) "unnamed_arg12", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_IN_ARG_unnamed_arg13 = -{ - { - -1, - (gchar *) "unnamed_arg13", - (gchar *) "a(sv)", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_create_session_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg0, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg1, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg2, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg3, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg4, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg5, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg6, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg7, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg8, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg9, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg10, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg11, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg12, - &_login1_manager_method_info_create_session_IN_ARG_unnamed_arg13, - NULL -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_OUT_ARG_unnamed_arg14 = -{ - { - -1, - (gchar *) "unnamed_arg14", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_OUT_ARG_unnamed_arg15 = -{ - { - -1, - (gchar *) "unnamed_arg15", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_OUT_ARG_unnamed_arg16 = -{ - { - -1, - (gchar *) "unnamed_arg16", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_OUT_ARG_unnamed_arg17 = -{ - { - -1, - (gchar *) "unnamed_arg17", - (gchar *) "h", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_OUT_ARG_unnamed_arg18 = -{ - { - -1, - (gchar *) "unnamed_arg18", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_OUT_ARG_unnamed_arg19 = -{ - { - -1, - (gchar *) "unnamed_arg19", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_OUT_ARG_unnamed_arg20 = -{ - { - -1, - (gchar *) "unnamed_arg20", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_create_session_OUT_ARG_unnamed_arg21 = -{ - { - -1, - (gchar *) "unnamed_arg21", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_create_session_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_create_session_OUT_ARG_unnamed_arg14, - &_login1_manager_method_info_create_session_OUT_ARG_unnamed_arg15, - &_login1_manager_method_info_create_session_OUT_ARG_unnamed_arg16, - &_login1_manager_method_info_create_session_OUT_ARG_unnamed_arg17, - &_login1_manager_method_info_create_session_OUT_ARG_unnamed_arg18, - &_login1_manager_method_info_create_session_OUT_ARG_unnamed_arg19, - &_login1_manager_method_info_create_session_OUT_ARG_unnamed_arg20, - &_login1_manager_method_info_create_session_OUT_ARG_unnamed_arg21, - NULL -}; - -static const GDBusAnnotationInfo _login1_manager_method_create_session_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_create_session_annotation_info_pointers[] = -{ - &_login1_manager_method_create_session_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_create_session = -{ - { - -1, - (gchar *) "CreateSession", - (GDBusArgInfo **) &_login1_manager_method_info_create_session_IN_ARG_pointers, - (GDBusArgInfo **) &_login1_manager_method_info_create_session_OUT_ARG_pointers, - (GDBusAnnotationInfo **) &_login1_manager_method_create_session_annotation_info_pointers - }, - "handle-create-session", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_release_session_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_release_session_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_release_session_IN_ARG_unnamed_arg0, - NULL -}; - -static const GDBusAnnotationInfo _login1_manager_method_release_session_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_release_session_annotation_info_pointers[] = -{ - &_login1_manager_method_release_session_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_release_session = -{ - { - -1, - (gchar *) "ReleaseSession", - (GDBusArgInfo **) &_login1_manager_method_info_release_session_IN_ARG_pointers, - NULL, - (GDBusAnnotationInfo **) &_login1_manager_method_release_session_annotation_info_pointers - }, - "handle-release-session", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_activate_session_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_activate_session_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_activate_session_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_activate_session = -{ - { - -1, - (gchar *) "ActivateSession", - (GDBusArgInfo **) &_login1_manager_method_info_activate_session_IN_ARG_pointers, - NULL, - NULL - }, - "handle-activate-session", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_activate_session_on_seat_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_activate_session_on_seat_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_activate_session_on_seat_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_activate_session_on_seat_IN_ARG_unnamed_arg0, - &_login1_manager_method_info_activate_session_on_seat_IN_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_activate_session_on_seat = -{ - { - -1, - (gchar *) "ActivateSessionOnSeat", - (GDBusArgInfo **) &_login1_manager_method_info_activate_session_on_seat_IN_ARG_pointers, - NULL, - NULL - }, - "handle-activate-session-on-seat", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_lock_session_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_lock_session_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_lock_session_IN_ARG_unnamed_arg0, - NULL -}; - -static const GDBusAnnotationInfo _login1_manager_method_lock_session_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_lock_session_annotation_info_pointers[] = -{ - &_login1_manager_method_lock_session_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_lock_session = -{ - { - -1, - (gchar *) "LockSession", - (GDBusArgInfo **) &_login1_manager_method_info_lock_session_IN_ARG_pointers, - NULL, - (GDBusAnnotationInfo **) &_login1_manager_method_lock_session_annotation_info_pointers - }, - "handle-lock-session", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_unlock_session_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_unlock_session_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_unlock_session_IN_ARG_unnamed_arg0, - NULL -}; - -static const GDBusAnnotationInfo _login1_manager_method_unlock_session_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_unlock_session_annotation_info_pointers[] = -{ - &_login1_manager_method_unlock_session_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_unlock_session = -{ - { - -1, - (gchar *) "UnlockSession", - (GDBusArgInfo **) &_login1_manager_method_info_unlock_session_IN_ARG_pointers, - NULL, - (GDBusAnnotationInfo **) &_login1_manager_method_unlock_session_annotation_info_pointers - }, - "handle-unlock-session", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_method_lock_sessions_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_lock_sessions_annotation_info_pointers[] = -{ - &_login1_manager_method_lock_sessions_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_lock_sessions = -{ - { - -1, - (gchar *) "LockSessions", - NULL, - NULL, - (GDBusAnnotationInfo **) &_login1_manager_method_lock_sessions_annotation_info_pointers - }, - "handle-lock-sessions", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_method_unlock_sessions_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_unlock_sessions_annotation_info_pointers[] = -{ - &_login1_manager_method_unlock_sessions_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_unlock_sessions = -{ - { - -1, - (gchar *) "UnlockSessions", - NULL, - NULL, - (GDBusAnnotationInfo **) &_login1_manager_method_unlock_sessions_annotation_info_pointers - }, - "handle-unlock-sessions", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_kill_session_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_kill_session_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_kill_session_IN_ARG_unnamed_arg2 = -{ - { - -1, - (gchar *) "unnamed_arg2", - (gchar *) "i", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_kill_session_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_kill_session_IN_ARG_unnamed_arg0, - &_login1_manager_method_info_kill_session_IN_ARG_unnamed_arg1, - &_login1_manager_method_info_kill_session_IN_ARG_unnamed_arg2, - NULL -}; - -static const GDBusAnnotationInfo _login1_manager_method_kill_session_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_kill_session_annotation_info_pointers[] = -{ - &_login1_manager_method_kill_session_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_kill_session = -{ - { - -1, - (gchar *) "KillSession", - (GDBusArgInfo **) &_login1_manager_method_info_kill_session_IN_ARG_pointers, - NULL, - (GDBusAnnotationInfo **) &_login1_manager_method_kill_session_annotation_info_pointers - }, - "handle-kill-session", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_kill_user_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_kill_user_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "i", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_kill_user_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_kill_user_IN_ARG_unnamed_arg0, - &_login1_manager_method_info_kill_user_IN_ARG_unnamed_arg1, - NULL -}; - -static const GDBusAnnotationInfo _login1_manager_method_kill_user_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_kill_user_annotation_info_pointers[] = -{ - &_login1_manager_method_kill_user_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_kill_user = -{ - { - -1, - (gchar *) "KillUser", - (GDBusArgInfo **) &_login1_manager_method_info_kill_user_IN_ARG_pointers, - NULL, - (GDBusAnnotationInfo **) &_login1_manager_method_kill_user_annotation_info_pointers - }, - "handle-kill-user", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_terminate_session_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_terminate_session_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_terminate_session_IN_ARG_unnamed_arg0, - NULL -}; - -static const GDBusAnnotationInfo _login1_manager_method_terminate_session_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_terminate_session_annotation_info_pointers[] = -{ - &_login1_manager_method_terminate_session_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_terminate_session = -{ - { - -1, - (gchar *) "TerminateSession", - (GDBusArgInfo **) &_login1_manager_method_info_terminate_session_IN_ARG_pointers, - NULL, - (GDBusAnnotationInfo **) &_login1_manager_method_terminate_session_annotation_info_pointers - }, - "handle-terminate-session", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_terminate_user_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_terminate_user_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_terminate_user_IN_ARG_unnamed_arg0, - NULL -}; - -static const GDBusAnnotationInfo _login1_manager_method_terminate_user_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_terminate_user_annotation_info_pointers[] = -{ - &_login1_manager_method_terminate_user_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_terminate_user = -{ - { - -1, - (gchar *) "TerminateUser", - (GDBusArgInfo **) &_login1_manager_method_info_terminate_user_IN_ARG_pointers, - NULL, - (GDBusAnnotationInfo **) &_login1_manager_method_terminate_user_annotation_info_pointers - }, - "handle-terminate-user", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_terminate_seat_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_terminate_seat_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_terminate_seat_IN_ARG_unnamed_arg0, - NULL -}; - -static const GDBusAnnotationInfo _login1_manager_method_terminate_seat_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.systemd1.Privileged", - (gchar *) "true", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_method_terminate_seat_annotation_info_pointers[] = -{ - &_login1_manager_method_terminate_seat_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_terminate_seat = -{ - { - -1, - (gchar *) "TerminateSeat", - (GDBusArgInfo **) &_login1_manager_method_info_terminate_seat_IN_ARG_pointers, - NULL, - (GDBusAnnotationInfo **) &_login1_manager_method_terminate_seat_annotation_info_pointers - }, - "handle-terminate-seat", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_set_user_linger_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_set_user_linger_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_set_user_linger_IN_ARG_unnamed_arg2 = -{ - { - -1, - (gchar *) "unnamed_arg2", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_set_user_linger_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_set_user_linger_IN_ARG_unnamed_arg0, - &_login1_manager_method_info_set_user_linger_IN_ARG_unnamed_arg1, - &_login1_manager_method_info_set_user_linger_IN_ARG_unnamed_arg2, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_set_user_linger = -{ - { - -1, - (gchar *) "SetUserLinger", - (GDBusArgInfo **) &_login1_manager_method_info_set_user_linger_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-user-linger", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_attach_device_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_attach_device_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_attach_device_IN_ARG_unnamed_arg2 = -{ - { - -1, - (gchar *) "unnamed_arg2", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_attach_device_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_attach_device_IN_ARG_unnamed_arg0, - &_login1_manager_method_info_attach_device_IN_ARG_unnamed_arg1, - &_login1_manager_method_info_attach_device_IN_ARG_unnamed_arg2, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_attach_device = -{ - { - -1, - (gchar *) "AttachDevice", - (GDBusArgInfo **) &_login1_manager_method_info_attach_device_IN_ARG_pointers, - NULL, - NULL - }, - "handle-attach-device", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_flush_devices_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_flush_devices_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_flush_devices_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_flush_devices = -{ - { - -1, - (gchar *) "FlushDevices", - (GDBusArgInfo **) &_login1_manager_method_info_flush_devices_IN_ARG_pointers, - NULL, - NULL - }, - "handle-flush-devices", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_power_off_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_power_off_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_power_off_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_power_off = -{ - { - -1, - (gchar *) "PowerOff", - (GDBusArgInfo **) &_login1_manager_method_info_power_off_IN_ARG_pointers, - NULL, - NULL - }, - "handle-power-off", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_reboot_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_reboot_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_reboot_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_reboot = -{ - { - -1, - (gchar *) "Reboot", - (GDBusArgInfo **) &_login1_manager_method_info_reboot_IN_ARG_pointers, - NULL, - NULL - }, - "handle-reboot", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_suspend_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_suspend_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_suspend_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_suspend = -{ - { - -1, - (gchar *) "Suspend", - (GDBusArgInfo **) &_login1_manager_method_info_suspend_IN_ARG_pointers, - NULL, - NULL - }, - "handle-suspend", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_hibernate_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_hibernate_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_hibernate_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_hibernate = -{ - { - -1, - (gchar *) "Hibernate", - (GDBusArgInfo **) &_login1_manager_method_info_hibernate_IN_ARG_pointers, - NULL, - NULL - }, - "handle-hibernate", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_hybrid_sleep_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_hybrid_sleep_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_hybrid_sleep_IN_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_hybrid_sleep = -{ - { - -1, - (gchar *) "HybridSleep", - (GDBusArgInfo **) &_login1_manager_method_info_hybrid_sleep_IN_ARG_pointers, - NULL, - NULL - }, - "handle-hybrid-sleep", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_can_power_off_OUT_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_can_power_off_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_can_power_off_OUT_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_can_power_off = -{ - { - -1, - (gchar *) "CanPowerOff", - NULL, - (GDBusArgInfo **) &_login1_manager_method_info_can_power_off_OUT_ARG_pointers, - NULL - }, - "handle-can-power-off", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_can_reboot_OUT_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_can_reboot_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_can_reboot_OUT_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_can_reboot = -{ - { - -1, - (gchar *) "CanReboot", - NULL, - (GDBusArgInfo **) &_login1_manager_method_info_can_reboot_OUT_ARG_pointers, - NULL - }, - "handle-can-reboot", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_can_suspend_OUT_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_can_suspend_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_can_suspend_OUT_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_can_suspend = -{ - { - -1, - (gchar *) "CanSuspend", - NULL, - (GDBusArgInfo **) &_login1_manager_method_info_can_suspend_OUT_ARG_pointers, - NULL - }, - "handle-can-suspend", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_can_hibernate_OUT_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_can_hibernate_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_can_hibernate_OUT_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_can_hibernate = -{ - { - -1, - (gchar *) "CanHibernate", - NULL, - (GDBusArgInfo **) &_login1_manager_method_info_can_hibernate_OUT_ARG_pointers, - NULL - }, - "handle-can-hibernate", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_can_hybrid_sleep_OUT_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_can_hybrid_sleep_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_can_hybrid_sleep_OUT_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_can_hybrid_sleep = -{ - { - -1, - (gchar *) "CanHybridSleep", - NULL, - (GDBusArgInfo **) &_login1_manager_method_info_can_hybrid_sleep_OUT_ARG_pointers, - NULL - }, - "handle-can-hybrid-sleep", - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_inhibit_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_inhibit_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_inhibit_IN_ARG_unnamed_arg2 = -{ - { - -1, - (gchar *) "unnamed_arg2", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_inhibit_IN_ARG_unnamed_arg3 = -{ - { - -1, - (gchar *) "unnamed_arg3", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_inhibit_IN_ARG_pointers[] = -{ - &_login1_manager_method_info_inhibit_IN_ARG_unnamed_arg0, - &_login1_manager_method_info_inhibit_IN_ARG_unnamed_arg1, - &_login1_manager_method_info_inhibit_IN_ARG_unnamed_arg2, - &_login1_manager_method_info_inhibit_IN_ARG_unnamed_arg3, - NULL -}; - -static const _ExtendedGDBusArgInfo _login1_manager_method_info_inhibit_OUT_ARG_unnamed_arg4 = -{ - { - -1, - (gchar *) "unnamed_arg4", - (gchar *) "h", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_method_info_inhibit_OUT_ARG_pointers[] = -{ - &_login1_manager_method_info_inhibit_OUT_ARG_unnamed_arg4, - NULL -}; - -static const _ExtendedGDBusMethodInfo _login1_manager_method_info_inhibit = -{ - { - -1, - (gchar *) "Inhibit", - (GDBusArgInfo **) &_login1_manager_method_info_inhibit_IN_ARG_pointers, - (GDBusArgInfo **) &_login1_manager_method_info_inhibit_OUT_ARG_pointers, - NULL - }, - "handle-inhibit", - FALSE -}; - -static const _ExtendedGDBusMethodInfo * const _login1_manager_method_info_pointers[] = -{ - &_login1_manager_method_info_get_session, - &_login1_manager_method_info_get_session_by_pid, - &_login1_manager_method_info_get_user, - &_login1_manager_method_info_get_user_by_pid, - &_login1_manager_method_info_get_seat, - &_login1_manager_method_info_list_sessions, - &_login1_manager_method_info_list_users, - &_login1_manager_method_info_list_seats, - &_login1_manager_method_info_list_inhibitors, - &_login1_manager_method_info_create_session, - &_login1_manager_method_info_release_session, - &_login1_manager_method_info_activate_session, - &_login1_manager_method_info_activate_session_on_seat, - &_login1_manager_method_info_lock_session, - &_login1_manager_method_info_unlock_session, - &_login1_manager_method_info_lock_sessions, - &_login1_manager_method_info_unlock_sessions, - &_login1_manager_method_info_kill_session, - &_login1_manager_method_info_kill_user, - &_login1_manager_method_info_terminate_session, - &_login1_manager_method_info_terminate_user, - &_login1_manager_method_info_terminate_seat, - &_login1_manager_method_info_set_user_linger, - &_login1_manager_method_info_attach_device, - &_login1_manager_method_info_flush_devices, - &_login1_manager_method_info_power_off, - &_login1_manager_method_info_reboot, - &_login1_manager_method_info_suspend, - &_login1_manager_method_info_hibernate, - &_login1_manager_method_info_hybrid_sleep, - &_login1_manager_method_info_can_power_off, - &_login1_manager_method_info_can_reboot, - &_login1_manager_method_info_can_suspend, - &_login1_manager_method_info_can_hibernate, - &_login1_manager_method_info_can_hybrid_sleep, - &_login1_manager_method_info_inhibit, - NULL -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_session_new_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_session_new_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_signal_info_session_new_ARG_pointers[] = -{ - &_login1_manager_signal_info_session_new_ARG_unnamed_arg0, - &_login1_manager_signal_info_session_new_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusSignalInfo _login1_manager_signal_info_session_new = -{ - { - -1, - (gchar *) "SessionNew", - (GDBusArgInfo **) &_login1_manager_signal_info_session_new_ARG_pointers, - NULL - }, - "session-new" -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_session_removed_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_session_removed_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_signal_info_session_removed_ARG_pointers[] = -{ - &_login1_manager_signal_info_session_removed_ARG_unnamed_arg0, - &_login1_manager_signal_info_session_removed_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusSignalInfo _login1_manager_signal_info_session_removed = -{ - { - -1, - (gchar *) "SessionRemoved", - (GDBusArgInfo **) &_login1_manager_signal_info_session_removed_ARG_pointers, - NULL - }, - "session-removed" -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_user_new_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_user_new_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_signal_info_user_new_ARG_pointers[] = -{ - &_login1_manager_signal_info_user_new_ARG_unnamed_arg0, - &_login1_manager_signal_info_user_new_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusSignalInfo _login1_manager_signal_info_user_new = -{ - { - -1, - (gchar *) "UserNew", - (GDBusArgInfo **) &_login1_manager_signal_info_user_new_ARG_pointers, - NULL - }, - "user-new" -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_user_removed_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "u", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_user_removed_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_signal_info_user_removed_ARG_pointers[] = -{ - &_login1_manager_signal_info_user_removed_ARG_unnamed_arg0, - &_login1_manager_signal_info_user_removed_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusSignalInfo _login1_manager_signal_info_user_removed = -{ - { - -1, - (gchar *) "UserRemoved", - (GDBusArgInfo **) &_login1_manager_signal_info_user_removed_ARG_pointers, - NULL - }, - "user-removed" -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_seat_new_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_seat_new_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_signal_info_seat_new_ARG_pointers[] = -{ - &_login1_manager_signal_info_seat_new_ARG_unnamed_arg0, - &_login1_manager_signal_info_seat_new_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusSignalInfo _login1_manager_signal_info_seat_new = -{ - { - -1, - (gchar *) "SeatNew", - (GDBusArgInfo **) &_login1_manager_signal_info_seat_new_ARG_pointers, - NULL - }, - "seat-new" -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_seat_removed_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_seat_removed_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "o", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_signal_info_seat_removed_ARG_pointers[] = -{ - &_login1_manager_signal_info_seat_removed_ARG_unnamed_arg0, - &_login1_manager_signal_info_seat_removed_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusSignalInfo _login1_manager_signal_info_seat_removed = -{ - { - -1, - (gchar *) "SeatRemoved", - (GDBusArgInfo **) &_login1_manager_signal_info_seat_removed_ARG_pointers, - NULL - }, - "seat-removed" -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_prepare_for_shutdown_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_signal_info_prepare_for_shutdown_ARG_pointers[] = -{ - &_login1_manager_signal_info_prepare_for_shutdown_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusSignalInfo _login1_manager_signal_info_prepare_for_shutdown = -{ - { - -1, - (gchar *) "PrepareForShutdown", - (GDBusArgInfo **) &_login1_manager_signal_info_prepare_for_shutdown_ARG_pointers, - NULL - }, - "prepare-for-shutdown" -}; - -static const _ExtendedGDBusArgInfo _login1_manager_signal_info_prepare_for_sleep_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _login1_manager_signal_info_prepare_for_sleep_ARG_pointers[] = -{ - &_login1_manager_signal_info_prepare_for_sleep_ARG_unnamed_arg0, - NULL -}; - -static const _ExtendedGDBusSignalInfo _login1_manager_signal_info_prepare_for_sleep = -{ - { - -1, - (gchar *) "PrepareForSleep", - (GDBusArgInfo **) &_login1_manager_signal_info_prepare_for_sleep_ARG_pointers, - NULL - }, - "prepare-for-sleep" -}; - -static const _ExtendedGDBusSignalInfo * const _login1_manager_signal_info_pointers[] = -{ - &_login1_manager_signal_info_session_new, - &_login1_manager_signal_info_session_removed, - &_login1_manager_signal_info_user_new, - &_login1_manager_signal_info_user_removed, - &_login1_manager_signal_info_seat_new, - &_login1_manager_signal_info_seat_removed, - &_login1_manager_signal_info_prepare_for_shutdown, - &_login1_manager_signal_info_prepare_for_sleep, - NULL -}; - -static const GDBusAnnotationInfo _login1_manager_property_nauto_vts_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_nauto_vts_annotation_info_pointers[] = -{ - &_login1_manager_property_nauto_vts_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_nauto_vts = -{ - { - -1, - (gchar *) "NAutoVTs", - (gchar *) "u", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_nauto_vts_annotation_info_pointers - }, - "nauto-vts", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_kill_only_users_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_kill_only_users_annotation_info_pointers[] = -{ - &_login1_manager_property_kill_only_users_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_kill_only_users = -{ - { - -1, - (gchar *) "KillOnlyUsers", - (gchar *) "as", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_kill_only_users_annotation_info_pointers - }, - "kill-only-users", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_kill_exclude_users_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_kill_exclude_users_annotation_info_pointers[] = -{ - &_login1_manager_property_kill_exclude_users_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_kill_exclude_users = -{ - { - -1, - (gchar *) "KillExcludeUsers", - (gchar *) "as", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_kill_exclude_users_annotation_info_pointers - }, - "kill-exclude-users", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_kill_user_processes_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_kill_user_processes_annotation_info_pointers[] = -{ - &_login1_manager_property_kill_user_processes_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_kill_user_processes = -{ - { - -1, - (gchar *) "KillUserProcesses", - (gchar *) "b", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_kill_user_processes_annotation_info_pointers - }, - "kill-user-processes", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_idle_hint = -{ - { - -1, - (gchar *) "IdleHint", - (gchar *) "b", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "idle-hint", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_idle_since_hint = -{ - { - -1, - (gchar *) "IdleSinceHint", - (gchar *) "t", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "idle-since-hint", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_idle_since_hint_monotonic = -{ - { - -1, - (gchar *) "IdleSinceHintMonotonic", - (gchar *) "t", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "idle-since-hint-monotonic", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_block_inhibited = -{ - { - -1, - (gchar *) "BlockInhibited", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "block-inhibited", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_delay_inhibited = -{ - { - -1, - (gchar *) "DelayInhibited", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "delay-inhibited", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_inhibit_delay_max_usec_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_inhibit_delay_max_usec_annotation_info_pointers[] = -{ - &_login1_manager_property_inhibit_delay_max_usec_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_inhibit_delay_max_usec = -{ - { - -1, - (gchar *) "InhibitDelayMaxUSec", - (gchar *) "t", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_inhibit_delay_max_usec_annotation_info_pointers - }, - "inhibit-delay-max-usec", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_handle_power_key_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_handle_power_key_annotation_info_pointers[] = -{ - &_login1_manager_property_handle_power_key_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_handle_power_key = -{ - { - -1, - (gchar *) "HandlePowerKey", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_handle_power_key_annotation_info_pointers - }, - "handle-power-key", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_handle_suspend_key_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_handle_suspend_key_annotation_info_pointers[] = -{ - &_login1_manager_property_handle_suspend_key_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_handle_suspend_key = -{ - { - -1, - (gchar *) "HandleSuspendKey", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_handle_suspend_key_annotation_info_pointers - }, - "handle-suspend-key", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_handle_hibernate_key_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_handle_hibernate_key_annotation_info_pointers[] = -{ - &_login1_manager_property_handle_hibernate_key_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_handle_hibernate_key = -{ - { - -1, - (gchar *) "HandleHibernateKey", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_handle_hibernate_key_annotation_info_pointers - }, - "handle-hibernate-key", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_handle_lid_switch_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_handle_lid_switch_annotation_info_pointers[] = -{ - &_login1_manager_property_handle_lid_switch_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_handle_lid_switch = -{ - { - -1, - (gchar *) "HandleLidSwitch", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_handle_lid_switch_annotation_info_pointers - }, - "handle-lid-switch", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_idle_action_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_idle_action_annotation_info_pointers[] = -{ - &_login1_manager_property_idle_action_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_idle_action = -{ - { - -1, - (gchar *) "IdleAction", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_idle_action_annotation_info_pointers - }, - "idle-action", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_idle_action_usec_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "const", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_idle_action_usec_annotation_info_pointers[] = -{ - &_login1_manager_property_idle_action_usec_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_idle_action_usec = -{ - { - -1, - (gchar *) "IdleActionUSec", - (gchar *) "t", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_idle_action_usec_annotation_info_pointers - }, - "idle-action-usec", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_preparing_for_shutdown_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "false", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_preparing_for_shutdown_annotation_info_pointers[] = -{ - &_login1_manager_property_preparing_for_shutdown_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_preparing_for_shutdown = -{ - { - -1, - (gchar *) "PreparingForShutdown", - (gchar *) "b", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_preparing_for_shutdown_annotation_info_pointers - }, - "preparing-for-shutdown", - FALSE -}; - -static const GDBusAnnotationInfo _login1_manager_property_preparing_for_sleep_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "false", - NULL -}; - -static const GDBusAnnotationInfo * const _login1_manager_property_preparing_for_sleep_annotation_info_pointers[] = -{ - &_login1_manager_property_preparing_for_sleep_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _login1_manager_property_info_preparing_for_sleep = -{ - { - -1, - (gchar *) "PreparingForSleep", - (gchar *) "b", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_login1_manager_property_preparing_for_sleep_annotation_info_pointers - }, - "preparing-for-sleep", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo * const _login1_manager_property_info_pointers[] = -{ - &_login1_manager_property_info_nauto_vts, - &_login1_manager_property_info_kill_only_users, - &_login1_manager_property_info_kill_exclude_users, - &_login1_manager_property_info_kill_user_processes, - &_login1_manager_property_info_idle_hint, - &_login1_manager_property_info_idle_since_hint, - &_login1_manager_property_info_idle_since_hint_monotonic, - &_login1_manager_property_info_block_inhibited, - &_login1_manager_property_info_delay_inhibited, - &_login1_manager_property_info_inhibit_delay_max_usec, - &_login1_manager_property_info_handle_power_key, - &_login1_manager_property_info_handle_suspend_key, - &_login1_manager_property_info_handle_hibernate_key, - &_login1_manager_property_info_handle_lid_switch, - &_login1_manager_property_info_idle_action, - &_login1_manager_property_info_idle_action_usec, - &_login1_manager_property_info_preparing_for_shutdown, - &_login1_manager_property_info_preparing_for_sleep, - NULL -}; - -static const _ExtendedGDBusInterfaceInfo _login1_manager_interface_info = -{ - { - -1, - (gchar *) "org.freedesktop.login1.Manager", - (GDBusMethodInfo **) &_login1_manager_method_info_pointers, - (GDBusSignalInfo **) &_login1_manager_signal_info_pointers, - (GDBusPropertyInfo **) &_login1_manager_property_info_pointers, - NULL - }, - "login1-manager", -}; - - -/** - * login1_manager_interface_info: - * - * Gets a machine-readable description of the org.freedesktop.login1.Manager D-Bus interface. - * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. - */ -GDBusInterfaceInfo * -login1_manager_interface_info (void) -{ - return (GDBusInterfaceInfo *) &_login1_manager_interface_info.parent_struct; -} - -/** - * login1_manager_override_properties: - * @klass: The class structure for a #GObject-derived class. - * @property_id_begin: The property id to assign to the first overridden property. - * - * Overrides all #GObject properties in the #Login1Manager interface for a concrete class. - * The properties are overridden in the order they are defined. - * - * Returns: The last property id. - */ -guint -login1_manager_override_properties (GObjectClass *klass, guint property_id_begin) -{ - g_object_class_override_property (klass, property_id_begin++, "nauto-vts"); - g_object_class_override_property (klass, property_id_begin++, "kill-only-users"); - g_object_class_override_property (klass, property_id_begin++, "kill-exclude-users"); - g_object_class_override_property (klass, property_id_begin++, "kill-user-processes"); - g_object_class_override_property (klass, property_id_begin++, "idle-hint"); - g_object_class_override_property (klass, property_id_begin++, "idle-since-hint"); - g_object_class_override_property (klass, property_id_begin++, "idle-since-hint-monotonic"); - g_object_class_override_property (klass, property_id_begin++, "block-inhibited"); - g_object_class_override_property (klass, property_id_begin++, "delay-inhibited"); - g_object_class_override_property (klass, property_id_begin++, "inhibit-delay-max-usec"); - g_object_class_override_property (klass, property_id_begin++, "handle-power-key"); - g_object_class_override_property (klass, property_id_begin++, "handle-suspend-key"); - g_object_class_override_property (klass, property_id_begin++, "handle-hibernate-key"); - g_object_class_override_property (klass, property_id_begin++, "handle-lid-switch"); - g_object_class_override_property (klass, property_id_begin++, "idle-action"); - g_object_class_override_property (klass, property_id_begin++, "idle-action-usec"); - g_object_class_override_property (klass, property_id_begin++, "preparing-for-shutdown"); - g_object_class_override_property (klass, property_id_begin++, "preparing-for-sleep"); - return property_id_begin - 1; -} - - - -/** - * Login1Manager: - * - * Abstract interface type for the D-Bus interface org.freedesktop.login1.Manager. - */ - -/** - * Login1ManagerIface: - * @parent_iface: The parent interface. - * @handle_activate_session: Handler for the #Login1Manager::handle-activate-session signal. - * @handle_activate_session_on_seat: Handler for the #Login1Manager::handle-activate-session-on-seat signal. - * @handle_attach_device: Handler for the #Login1Manager::handle-attach-device signal. - * @handle_can_hibernate: Handler for the #Login1Manager::handle-can-hibernate signal. - * @handle_can_hybrid_sleep: Handler for the #Login1Manager::handle-can-hybrid-sleep signal. - * @handle_can_power_off: Handler for the #Login1Manager::handle-can-power-off signal. - * @handle_can_reboot: Handler for the #Login1Manager::handle-can-reboot signal. - * @handle_can_suspend: Handler for the #Login1Manager::handle-can-suspend signal. - * @handle_create_session: Handler for the #Login1Manager::handle-create-session signal. - * @handle_flush_devices: Handler for the #Login1Manager::handle-flush-devices signal. - * @handle_get_seat: Handler for the #Login1Manager::handle-get-seat signal. - * @handle_get_session: Handler for the #Login1Manager::handle-get-session signal. - * @handle_get_session_by_pid: Handler for the #Login1Manager::handle-get-session-by-pid signal. - * @handle_get_user: Handler for the #Login1Manager::handle-get-user signal. - * @handle_get_user_by_pid: Handler for the #Login1Manager::handle-get-user-by-pid signal. - * @handle_hibernate: Handler for the #Login1Manager::handle-hibernate signal. - * @handle_hybrid_sleep: Handler for the #Login1Manager::handle-hybrid-sleep signal. - * @handle_inhibit: Handler for the #Login1Manager::handle-inhibit signal. - * @handle_kill_session: Handler for the #Login1Manager::handle-kill-session signal. - * @handle_kill_user: Handler for the #Login1Manager::handle-kill-user signal. - * @handle_list_inhibitors: Handler for the #Login1Manager::handle-list-inhibitors signal. - * @handle_list_seats: Handler for the #Login1Manager::handle-list-seats signal. - * @handle_list_sessions: Handler for the #Login1Manager::handle-list-sessions signal. - * @handle_list_users: Handler for the #Login1Manager::handle-list-users signal. - * @handle_lock_session: Handler for the #Login1Manager::handle-lock-session signal. - * @handle_lock_sessions: Handler for the #Login1Manager::handle-lock-sessions signal. - * @handle_power_off: Handler for the #Login1Manager::handle-power-off signal. - * @handle_reboot: Handler for the #Login1Manager::handle-reboot signal. - * @handle_release_session: Handler for the #Login1Manager::handle-release-session signal. - * @handle_set_user_linger: Handler for the #Login1Manager::handle-set-user-linger signal. - * @handle_suspend: Handler for the #Login1Manager::handle-suspend signal. - * @handle_terminate_seat: Handler for the #Login1Manager::handle-terminate-seat signal. - * @handle_terminate_session: Handler for the #Login1Manager::handle-terminate-session signal. - * @handle_terminate_user: Handler for the #Login1Manager::handle-terminate-user signal. - * @handle_unlock_session: Handler for the #Login1Manager::handle-unlock-session signal. - * @handle_unlock_sessions: Handler for the #Login1Manager::handle-unlock-sessions signal. - * @get_block_inhibited: Getter for the #Login1Manager:block-inhibited property. - * @get_delay_inhibited: Getter for the #Login1Manager:delay-inhibited property. - * @get_handle_hibernate_key: Getter for the #Login1Manager:handle-hibernate-key property. - * @get_handle_lid_switch: Getter for the #Login1Manager:handle-lid-switch property. - * @get_handle_power_key: Getter for the #Login1Manager:handle-power-key property. - * @get_handle_suspend_key: Getter for the #Login1Manager:handle-suspend-key property. - * @get_idle_action: Getter for the #Login1Manager:idle-action property. - * @get_idle_action_usec: Getter for the #Login1Manager:idle-action-usec property. - * @get_idle_hint: Getter for the #Login1Manager:idle-hint property. - * @get_idle_since_hint: Getter for the #Login1Manager:idle-since-hint property. - * @get_idle_since_hint_monotonic: Getter for the #Login1Manager:idle-since-hint-monotonic property. - * @get_inhibit_delay_max_usec: Getter for the #Login1Manager:inhibit-delay-max-usec property. - * @get_kill_exclude_users: Getter for the #Login1Manager:kill-exclude-users property. - * @get_kill_only_users: Getter for the #Login1Manager:kill-only-users property. - * @get_kill_user_processes: Getter for the #Login1Manager:kill-user-processes property. - * @get_nauto_vts: Getter for the #Login1Manager:nauto-vts property. - * @get_preparing_for_shutdown: Getter for the #Login1Manager:preparing-for-shutdown property. - * @get_preparing_for_sleep: Getter for the #Login1Manager:preparing-for-sleep property. - * @prepare_for_shutdown: Handler for the #Login1Manager::prepare-for-shutdown signal. - * @prepare_for_sleep: Handler for the #Login1Manager::prepare-for-sleep signal. - * @seat_new: Handler for the #Login1Manager::seat-new signal. - * @seat_removed: Handler for the #Login1Manager::seat-removed signal. - * @session_new: Handler for the #Login1Manager::session-new signal. - * @session_removed: Handler for the #Login1Manager::session-removed signal. - * @user_new: Handler for the #Login1Manager::user-new signal. - * @user_removed: Handler for the #Login1Manager::user-removed signal. - * - * Virtual table for the D-Bus interface org.freedesktop.login1.Manager. - */ - -typedef Login1ManagerIface Login1ManagerInterface; -G_DEFINE_INTERFACE (Login1Manager, login1_manager, G_TYPE_OBJECT); - -static void -login1_manager_default_init (Login1ManagerIface *iface) -{ - /* GObject signals for incoming D-Bus method calls: */ - /** - * Login1Manager::handle-get-session: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetSession() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_get_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-get-session", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_get_session), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); - - /** - * Login1Manager::handle-get-session-by-pid: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetSessionByPID() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_get_session_by_pid() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-get-session-by-pid", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_get_session_by_pid), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); - - /** - * Login1Manager::handle-get-user: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetUser() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_get_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-get-user", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_get_user), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); - - /** - * Login1Manager::handle-get-user-by-pid: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetUserByPID() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_get_user_by_pid() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-get-user-by-pid", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_get_user_by_pid), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); - - /** - * Login1Manager::handle-get-seat: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the GetSeat() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_get_seat() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-get-seat", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_get_seat), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); - - /** - * Login1Manager::handle-list-sessions: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the ListSessions() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_list_sessions() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-list-sessions", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_list_sessions), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-list-users: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the ListUsers() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_list_users() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-list-users", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_list_users), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-list-seats: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the ListSeats() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_list_seats() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-list-seats", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_list_seats), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-list-inhibitors: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the ListInhibitors() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_list_inhibitors() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-list-inhibitors", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_list_inhibitors), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-create-session: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * @arg_unnamed_arg2: Argument passed by remote caller. - * @arg_unnamed_arg3: Argument passed by remote caller. - * @arg_unnamed_arg4: Argument passed by remote caller. - * @arg_unnamed_arg5: Argument passed by remote caller. - * @arg_unnamed_arg6: Argument passed by remote caller. - * @arg_unnamed_arg7: Argument passed by remote caller. - * @arg_unnamed_arg8: Argument passed by remote caller. - * @arg_unnamed_arg9: Argument passed by remote caller. - * @arg_unnamed_arg10: Argument passed by remote caller. - * @arg_unnamed_arg11: Argument passed by remote caller. - * @arg_unnamed_arg12: Argument passed by remote caller. - * @arg_unnamed_arg13: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the CreateSession() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_create_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-create-session", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_create_session), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 15, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT); - - /** - * Login1Manager::handle-release-session: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the ReleaseSession() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_release_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-release-session", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_release_session), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); - - /** - * Login1Manager::handle-activate-session: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the ActivateSession() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_activate_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-activate-session", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_activate_session), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); - - /** - * Login1Manager::handle-activate-session-on-seat: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the ActivateSessionOnSeat() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_activate_session_on_seat() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-activate-session-on-seat", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_activate_session_on_seat), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING); - - /** - * Login1Manager::handle-lock-session: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the LockSession() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_lock_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-lock-session", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_lock_session), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); - - /** - * Login1Manager::handle-unlock-session: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the UnlockSession() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_unlock_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-unlock-session", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_unlock_session), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); - - /** - * Login1Manager::handle-lock-sessions: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the LockSessions() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_lock_sessions() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-lock-sessions", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_lock_sessions), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-unlock-sessions: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the UnlockSessions() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_unlock_sessions() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-unlock-sessions", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_unlock_sessions), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-kill-session: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * @arg_unnamed_arg2: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the KillSession() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_kill_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-kill-session", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_kill_session), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 4, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); - - /** - * Login1Manager::handle-kill-user: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the KillUser() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_kill_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-kill-user", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_kill_user), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_INT); - - /** - * Login1Manager::handle-terminate-session: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the TerminateSession() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_terminate_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-terminate-session", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_terminate_session), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); - - /** - * Login1Manager::handle-terminate-user: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the TerminateUser() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_terminate_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-terminate-user", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_terminate_user), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); - - /** - * Login1Manager::handle-terminate-seat: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the TerminateSeat() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_terminate_seat() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-terminate-seat", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_terminate_seat), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); - - /** - * Login1Manager::handle-set-user-linger: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * @arg_unnamed_arg2: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetUserLinger() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_set_user_linger() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-user-linger", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_set_user_linger), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 4, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN); - - /** - * Login1Manager::handle-attach-device: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * @arg_unnamed_arg2: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the AttachDevice() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_attach_device() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-attach-device", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_attach_device), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 4, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN); - - /** - * Login1Manager::handle-flush-devices: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the FlushDevices() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_flush_devices() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-flush-devices", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_flush_devices), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); - - /** - * Login1Manager::handle-power-off: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the PowerOff() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_power_off() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-power-off", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_power_off), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); - - /** - * Login1Manager::handle-reboot: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the Reboot() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_reboot() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-reboot", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_reboot), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); - - /** - * Login1Manager::handle-suspend: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the Suspend() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_suspend() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-suspend", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_suspend), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); - - /** - * Login1Manager::handle-hibernate: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the Hibernate() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_hibernate() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-hibernate", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_hibernate), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); - - /** - * Login1Manager::handle-hybrid-sleep: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the HybridSleep() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_hybrid_sleep() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-hybrid-sleep", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_hybrid_sleep), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); - - /** - * Login1Manager::handle-can-power-off: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the CanPowerOff() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_can_power_off() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-can-power-off", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_can_power_off), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-can-reboot: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the CanReboot() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_can_reboot() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-can-reboot", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_can_reboot), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-can-suspend: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the CanSuspend() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_can_suspend() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-can-suspend", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_can_suspend), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-can-hibernate: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the CanHibernate() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_can_hibernate() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-can-hibernate", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_can_hibernate), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-can-hybrid-sleep: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the CanHybridSleep() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_can_hybrid_sleep() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-can-hybrid-sleep", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_can_hybrid_sleep), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /** - * Login1Manager::handle-inhibit: - * @object: A #Login1Manager. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * @arg_unnamed_arg2: Argument passed by remote caller. - * @arg_unnamed_arg3: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the Inhibit() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call login1_manager_complete_inhibit() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-inhibit", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, handle_inhibit), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 5, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); - - /* GObject signals for received D-Bus signals: */ - /** - * Login1Manager::session-new: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument. - * @arg_unnamed_arg1: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "SessionNew" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - g_signal_new ("session-new", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, session_new), - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 2, G_TYPE_STRING, G_TYPE_STRING); - - /** - * Login1Manager::session-removed: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument. - * @arg_unnamed_arg1: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "SessionRemoved" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - g_signal_new ("session-removed", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, session_removed), - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 2, G_TYPE_STRING, G_TYPE_STRING); - - /** - * Login1Manager::user-new: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument. - * @arg_unnamed_arg1: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "UserNew" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - g_signal_new ("user-new", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, user_new), - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 2, G_TYPE_UINT, G_TYPE_STRING); - - /** - * Login1Manager::user-removed: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument. - * @arg_unnamed_arg1: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "UserRemoved" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - g_signal_new ("user-removed", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, user_removed), - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 2, G_TYPE_UINT, G_TYPE_STRING); - - /** - * Login1Manager::seat-new: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument. - * @arg_unnamed_arg1: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "SeatNew" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - g_signal_new ("seat-new", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, seat_new), - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 2, G_TYPE_STRING, G_TYPE_STRING); - - /** - * Login1Manager::seat-removed: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument. - * @arg_unnamed_arg1: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "SeatRemoved" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - g_signal_new ("seat-removed", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, seat_removed), - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 2, G_TYPE_STRING, G_TYPE_STRING); - - /** - * Login1Manager::prepare-for-shutdown: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "PrepareForShutdown" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - g_signal_new ("prepare-for-shutdown", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, prepare_for_shutdown), - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 1, G_TYPE_BOOLEAN); - - /** - * Login1Manager::prepare-for-sleep: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument. - * - * On the client-side, this signal is emitted whenever the D-Bus signal "PrepareForSleep" is received. - * - * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. - */ - g_signal_new ("prepare-for-sleep", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Login1ManagerIface, prepare_for_sleep), - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 1, G_TYPE_BOOLEAN); - - /* GObject properties for D-Bus properties: */ - /** - * Login1Manager:nauto-vts: - * - * Represents the D-Bus property "NAutoVTs". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_uint ("nauto-vts", "NAutoVTs", "NAutoVTs", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:kill-only-users: - * - * Represents the D-Bus property "KillOnlyUsers". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boxed ("kill-only-users", "KillOnlyUsers", "KillOnlyUsers", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:kill-exclude-users: - * - * Represents the D-Bus property "KillExcludeUsers". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boxed ("kill-exclude-users", "KillExcludeUsers", "KillExcludeUsers", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:kill-user-processes: - * - * Represents the D-Bus property "KillUserProcesses". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boolean ("kill-user-processes", "KillUserProcesses", "KillUserProcesses", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:idle-hint: - * - * Represents the D-Bus property "IdleHint". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boolean ("idle-hint", "IdleHint", "IdleHint", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:idle-since-hint: - * - * Represents the D-Bus property "IdleSinceHint". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_uint64 ("idle-since-hint", "IdleSinceHint", "IdleSinceHint", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:idle-since-hint-monotonic: - * - * Represents the D-Bus property "IdleSinceHintMonotonic". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_uint64 ("idle-since-hint-monotonic", "IdleSinceHintMonotonic", "IdleSinceHintMonotonic", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:block-inhibited: - * - * Represents the D-Bus property "BlockInhibited". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("block-inhibited", "BlockInhibited", "BlockInhibited", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:delay-inhibited: - * - * Represents the D-Bus property "DelayInhibited". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("delay-inhibited", "DelayInhibited", "DelayInhibited", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:inhibit-delay-max-usec: - * - * Represents the D-Bus property "InhibitDelayMaxUSec". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_uint64 ("inhibit-delay-max-usec", "InhibitDelayMaxUSec", "InhibitDelayMaxUSec", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:handle-power-key: - * - * Represents the D-Bus property "HandlePowerKey". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("handle-power-key", "HandlePowerKey", "HandlePowerKey", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:handle-suspend-key: - * - * Represents the D-Bus property "HandleSuspendKey". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("handle-suspend-key", "HandleSuspendKey", "HandleSuspendKey", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:handle-hibernate-key: - * - * Represents the D-Bus property "HandleHibernateKey". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("handle-hibernate-key", "HandleHibernateKey", "HandleHibernateKey", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:handle-lid-switch: - * - * Represents the D-Bus property "HandleLidSwitch". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("handle-lid-switch", "HandleLidSwitch", "HandleLidSwitch", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:idle-action: - * - * Represents the D-Bus property "IdleAction". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("idle-action", "IdleAction", "IdleAction", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:idle-action-usec: - * - * Represents the D-Bus property "IdleActionUSec". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_uint64 ("idle-action-usec", "IdleActionUSec", "IdleActionUSec", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:preparing-for-shutdown: - * - * Represents the D-Bus property "PreparingForShutdown". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boolean ("preparing-for-shutdown", "PreparingForShutdown", "PreparingForShutdown", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Login1Manager:preparing-for-sleep: - * - * Represents the D-Bus property "PreparingForSleep". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boolean ("preparing-for-sleep", "PreparingForSleep", "PreparingForSleep", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); -} - -/** - * login1_manager_get_nauto_vts: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "NAutoVTs" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -guint -login1_manager_get_nauto_vts (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_nauto_vts (object); -} - -/** - * login1_manager_set_nauto_vts: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "NAutoVTs" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_nauto_vts (Login1Manager *object, guint value) -{ - g_object_set (G_OBJECT (object), "nauto-vts", value, NULL); -} - -/** - * login1_manager_get_kill_only_users: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "KillOnlyUsers" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use login1_manager_dup_kill_only_users() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar *const * -login1_manager_get_kill_only_users (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_kill_only_users (object); -} - -/** - * login1_manager_dup_kill_only_users: (skip) - * @object: A #Login1Manager. - * - * Gets a copy of the "KillOnlyUsers" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev(). - */ -gchar ** -login1_manager_dup_kill_only_users (Login1Manager *object) -{ - gchar **value; - g_object_get (G_OBJECT (object), "kill-only-users", &value, NULL); - return value; -} - -/** - * login1_manager_set_kill_only_users: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "KillOnlyUsers" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_kill_only_users (Login1Manager *object, const gchar *const *value) -{ - g_object_set (G_OBJECT (object), "kill-only-users", value, NULL); -} - -/** - * login1_manager_get_kill_exclude_users: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "KillExcludeUsers" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use login1_manager_dup_kill_exclude_users() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar *const * -login1_manager_get_kill_exclude_users (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_kill_exclude_users (object); -} - -/** - * login1_manager_dup_kill_exclude_users: (skip) - * @object: A #Login1Manager. - * - * Gets a copy of the "KillExcludeUsers" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev(). - */ -gchar ** -login1_manager_dup_kill_exclude_users (Login1Manager *object) -{ - gchar **value; - g_object_get (G_OBJECT (object), "kill-exclude-users", &value, NULL); - return value; -} - -/** - * login1_manager_set_kill_exclude_users: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "KillExcludeUsers" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_kill_exclude_users (Login1Manager *object, const gchar *const *value) -{ - g_object_set (G_OBJECT (object), "kill-exclude-users", value, NULL); -} - -/** - * login1_manager_get_kill_user_processes: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "KillUserProcesses" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -gboolean -login1_manager_get_kill_user_processes (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_kill_user_processes (object); -} - -/** - * login1_manager_set_kill_user_processes: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "KillUserProcesses" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_kill_user_processes (Login1Manager *object, gboolean value) -{ - g_object_set (G_OBJECT (object), "kill-user-processes", value, NULL); -} - -/** - * login1_manager_get_idle_hint: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "IdleHint" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -gboolean -login1_manager_get_idle_hint (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_idle_hint (object); -} - -/** - * login1_manager_set_idle_hint: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "IdleHint" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_idle_hint (Login1Manager *object, gboolean value) -{ - g_object_set (G_OBJECT (object), "idle-hint", value, NULL); -} - -/** - * login1_manager_get_idle_since_hint: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "IdleSinceHint" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -guint64 -login1_manager_get_idle_since_hint (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_idle_since_hint (object); -} - -/** - * login1_manager_set_idle_since_hint: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "IdleSinceHint" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_idle_since_hint (Login1Manager *object, guint64 value) -{ - g_object_set (G_OBJECT (object), "idle-since-hint", value, NULL); -} - -/** - * login1_manager_get_idle_since_hint_monotonic: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "IdleSinceHintMonotonic" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -guint64 -login1_manager_get_idle_since_hint_monotonic (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_idle_since_hint_monotonic (object); -} - -/** - * login1_manager_set_idle_since_hint_monotonic: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "IdleSinceHintMonotonic" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_idle_since_hint_monotonic (Login1Manager *object, guint64 value) -{ - g_object_set (G_OBJECT (object), "idle-since-hint-monotonic", value, NULL); -} - -/** - * login1_manager_get_block_inhibited: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "BlockInhibited" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use login1_manager_dup_block_inhibited() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -login1_manager_get_block_inhibited (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_block_inhibited (object); -} - -/** - * login1_manager_dup_block_inhibited: (skip) - * @object: A #Login1Manager. - * - * Gets a copy of the "BlockInhibited" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -login1_manager_dup_block_inhibited (Login1Manager *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "block-inhibited", &value, NULL); - return value; -} - -/** - * login1_manager_set_block_inhibited: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "BlockInhibited" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_block_inhibited (Login1Manager *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "block-inhibited", value, NULL); -} - -/** - * login1_manager_get_delay_inhibited: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "DelayInhibited" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use login1_manager_dup_delay_inhibited() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -login1_manager_get_delay_inhibited (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_delay_inhibited (object); -} - -/** - * login1_manager_dup_delay_inhibited: (skip) - * @object: A #Login1Manager. - * - * Gets a copy of the "DelayInhibited" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -login1_manager_dup_delay_inhibited (Login1Manager *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "delay-inhibited", &value, NULL); - return value; -} - -/** - * login1_manager_set_delay_inhibited: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "DelayInhibited" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_delay_inhibited (Login1Manager *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "delay-inhibited", value, NULL); -} - -/** - * login1_manager_get_inhibit_delay_max_usec: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "InhibitDelayMaxUSec" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -guint64 -login1_manager_get_inhibit_delay_max_usec (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_inhibit_delay_max_usec (object); -} - -/** - * login1_manager_set_inhibit_delay_max_usec: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "InhibitDelayMaxUSec" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_inhibit_delay_max_usec (Login1Manager *object, guint64 value) -{ - g_object_set (G_OBJECT (object), "inhibit-delay-max-usec", value, NULL); -} - -/** - * login1_manager_get_handle_power_key: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "HandlePowerKey" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use login1_manager_dup_handle_power_key() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -login1_manager_get_handle_power_key (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_handle_power_key (object); -} - -/** - * login1_manager_dup_handle_power_key: (skip) - * @object: A #Login1Manager. - * - * Gets a copy of the "HandlePowerKey" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -login1_manager_dup_handle_power_key (Login1Manager *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "handle-power-key", &value, NULL); - return value; -} - -/** - * login1_manager_set_handle_power_key: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "HandlePowerKey" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_handle_power_key (Login1Manager *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "handle-power-key", value, NULL); -} - -/** - * login1_manager_get_handle_suspend_key: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "HandleSuspendKey" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use login1_manager_dup_handle_suspend_key() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -login1_manager_get_handle_suspend_key (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_handle_suspend_key (object); -} - -/** - * login1_manager_dup_handle_suspend_key: (skip) - * @object: A #Login1Manager. - * - * Gets a copy of the "HandleSuspendKey" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -login1_manager_dup_handle_suspend_key (Login1Manager *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "handle-suspend-key", &value, NULL); - return value; -} - -/** - * login1_manager_set_handle_suspend_key: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "HandleSuspendKey" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_handle_suspend_key (Login1Manager *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "handle-suspend-key", value, NULL); -} - -/** - * login1_manager_get_handle_hibernate_key: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "HandleHibernateKey" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use login1_manager_dup_handle_hibernate_key() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -login1_manager_get_handle_hibernate_key (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_handle_hibernate_key (object); -} - -/** - * login1_manager_dup_handle_hibernate_key: (skip) - * @object: A #Login1Manager. - * - * Gets a copy of the "HandleHibernateKey" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -login1_manager_dup_handle_hibernate_key (Login1Manager *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "handle-hibernate-key", &value, NULL); - return value; -} - -/** - * login1_manager_set_handle_hibernate_key: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "HandleHibernateKey" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_handle_hibernate_key (Login1Manager *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "handle-hibernate-key", value, NULL); -} - -/** - * login1_manager_get_handle_lid_switch: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "HandleLidSwitch" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use login1_manager_dup_handle_lid_switch() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -login1_manager_get_handle_lid_switch (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_handle_lid_switch (object); -} - -/** - * login1_manager_dup_handle_lid_switch: (skip) - * @object: A #Login1Manager. - * - * Gets a copy of the "HandleLidSwitch" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -login1_manager_dup_handle_lid_switch (Login1Manager *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "handle-lid-switch", &value, NULL); - return value; -} - -/** - * login1_manager_set_handle_lid_switch: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "HandleLidSwitch" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_handle_lid_switch (Login1Manager *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "handle-lid-switch", value, NULL); -} - -/** - * login1_manager_get_idle_action: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "IdleAction" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use login1_manager_dup_idle_action() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -login1_manager_get_idle_action (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_idle_action (object); -} - -/** - * login1_manager_dup_idle_action: (skip) - * @object: A #Login1Manager. - * - * Gets a copy of the "IdleAction" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -login1_manager_dup_idle_action (Login1Manager *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "idle-action", &value, NULL); - return value; -} - -/** - * login1_manager_set_idle_action: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "IdleAction" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_idle_action (Login1Manager *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "idle-action", value, NULL); -} - -/** - * login1_manager_get_idle_action_usec: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "IdleActionUSec" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -guint64 -login1_manager_get_idle_action_usec (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_idle_action_usec (object); -} - -/** - * login1_manager_set_idle_action_usec: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "IdleActionUSec" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_idle_action_usec (Login1Manager *object, guint64 value) -{ - g_object_set (G_OBJECT (object), "idle-action-usec", value, NULL); -} - -/** - * login1_manager_get_preparing_for_shutdown: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "PreparingForShutdown" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -gboolean -login1_manager_get_preparing_for_shutdown (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_preparing_for_shutdown (object); -} - -/** - * login1_manager_set_preparing_for_shutdown: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "PreparingForShutdown" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_preparing_for_shutdown (Login1Manager *object, gboolean value) -{ - g_object_set (G_OBJECT (object), "preparing-for-shutdown", value, NULL); -} - -/** - * login1_manager_get_preparing_for_sleep: (skip) - * @object: A #Login1Manager. - * - * Gets the value of the "PreparingForSleep" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -gboolean -login1_manager_get_preparing_for_sleep (Login1Manager *object) -{ - return LOGIN1_MANAGER_GET_IFACE (object)->get_preparing_for_sleep (object); -} - -/** - * login1_manager_set_preparing_for_sleep: (skip) - * @object: A #Login1Manager. - * @value: The value to set. - * - * Sets the "PreparingForSleep" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -login1_manager_set_preparing_for_sleep (Login1Manager *object, gboolean value) -{ - g_object_set (G_OBJECT (object), "preparing-for-sleep", value, NULL); -} - -/** - * login1_manager_emit_session_new: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument to pass with the signal. - * @arg_unnamed_arg1: Argument to pass with the signal. - * - * Emits the "SessionNew" D-Bus signal. - */ -void -login1_manager_emit_session_new ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - g_signal_emit_by_name (object, "session-new", arg_unnamed_arg0, arg_unnamed_arg1); -} - -/** - * login1_manager_emit_session_removed: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument to pass with the signal. - * @arg_unnamed_arg1: Argument to pass with the signal. - * - * Emits the "SessionRemoved" D-Bus signal. - */ -void -login1_manager_emit_session_removed ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - g_signal_emit_by_name (object, "session-removed", arg_unnamed_arg0, arg_unnamed_arg1); -} - -/** - * login1_manager_emit_user_new: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument to pass with the signal. - * @arg_unnamed_arg1: Argument to pass with the signal. - * - * Emits the "UserNew" D-Bus signal. - */ -void -login1_manager_emit_user_new ( - Login1Manager *object, - guint arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - g_signal_emit_by_name (object, "user-new", arg_unnamed_arg0, arg_unnamed_arg1); -} - -/** - * login1_manager_emit_user_removed: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument to pass with the signal. - * @arg_unnamed_arg1: Argument to pass with the signal. - * - * Emits the "UserRemoved" D-Bus signal. - */ -void -login1_manager_emit_user_removed ( - Login1Manager *object, - guint arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - g_signal_emit_by_name (object, "user-removed", arg_unnamed_arg0, arg_unnamed_arg1); -} - -/** - * login1_manager_emit_seat_new: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument to pass with the signal. - * @arg_unnamed_arg1: Argument to pass with the signal. - * - * Emits the "SeatNew" D-Bus signal. - */ -void -login1_manager_emit_seat_new ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - g_signal_emit_by_name (object, "seat-new", arg_unnamed_arg0, arg_unnamed_arg1); -} - -/** - * login1_manager_emit_seat_removed: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument to pass with the signal. - * @arg_unnamed_arg1: Argument to pass with the signal. - * - * Emits the "SeatRemoved" D-Bus signal. - */ -void -login1_manager_emit_seat_removed ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - g_signal_emit_by_name (object, "seat-removed", arg_unnamed_arg0, arg_unnamed_arg1); -} - -/** - * login1_manager_emit_prepare_for_shutdown: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument to pass with the signal. - * - * Emits the "PrepareForShutdown" D-Bus signal. - */ -void -login1_manager_emit_prepare_for_shutdown ( - Login1Manager *object, - gboolean arg_unnamed_arg0) -{ - g_signal_emit_by_name (object, "prepare-for-shutdown", arg_unnamed_arg0); -} - -/** - * login1_manager_emit_prepare_for_sleep: - * @object: A #Login1Manager. - * @arg_unnamed_arg0: Argument to pass with the signal. - * - * Emits the "PrepareForSleep" D-Bus signal. - */ -void -login1_manager_emit_prepare_for_sleep ( - Login1Manager *object, - gboolean arg_unnamed_arg0) -{ - g_signal_emit_by_name (object, "prepare-for-sleep", arg_unnamed_arg0); -} - -/** - * login1_manager_call_get_session: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetSession() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_get_session_finish() to get the result of the operation. - * - * See login1_manager_call_get_session_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_get_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "GetSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_get_session_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_get_session(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_get_session(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_get_session_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg1, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(o)", - out_unnamed_arg1); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_get_session_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetSession() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_get_session() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_get_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - gchar **out_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "GetSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(o)", - out_unnamed_arg1); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_get_session_by_pid: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetSessionByPID() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_get_session_by_pid_finish() to get the result of the operation. - * - * See login1_manager_call_get_session_by_pid_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_get_session_by_pid ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "GetSessionByPID", - g_variant_new ("(u)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_get_session_by_pid_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_get_session_by_pid(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_get_session_by_pid(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_get_session_by_pid_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg1, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(o)", - out_unnamed_arg1); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_get_session_by_pid_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetSessionByPID() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_get_session_by_pid() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_get_session_by_pid_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gchar **out_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "GetSessionByPID", - g_variant_new ("(u)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(o)", - out_unnamed_arg1); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_get_user: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetUser() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_get_user_finish() to get the result of the operation. - * - * See login1_manager_call_get_user_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_get_user ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "GetUser", - g_variant_new ("(u)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_get_user_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_get_user(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_get_user(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_get_user_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg1, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(o)", - out_unnamed_arg1); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_get_user_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetUser() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_get_user() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_get_user_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gchar **out_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "GetUser", - g_variant_new ("(u)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(o)", - out_unnamed_arg1); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_get_user_by_pid: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetUserByPID() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_get_user_by_pid_finish() to get the result of the operation. - * - * See login1_manager_call_get_user_by_pid_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_get_user_by_pid ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "GetUserByPID", - g_variant_new ("(u)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_get_user_by_pid_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_get_user_by_pid(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_get_user_by_pid(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_get_user_by_pid_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg1, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(o)", - out_unnamed_arg1); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_get_user_by_pid_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetUserByPID() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_get_user_by_pid() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_get_user_by_pid_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gchar **out_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "GetUserByPID", - g_variant_new ("(u)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(o)", - out_unnamed_arg1); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_get_seat: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetSeat() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_get_seat_finish() to get the result of the operation. - * - * See login1_manager_call_get_seat_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_get_seat ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "GetSeat", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_get_seat_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_get_seat(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_get_seat(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_get_seat_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg1, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(o)", - out_unnamed_arg1); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_get_seat_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @out_unnamed_arg1: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetSeat() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_get_seat() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_get_seat_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - gchar **out_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "GetSeat", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(o)", - out_unnamed_arg1); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_list_sessions: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ListSessions() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_list_sessions_finish() to get the result of the operation. - * - * See login1_manager_call_list_sessions_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_list_sessions ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "ListSessions", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_list_sessions_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_list_sessions(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_list_sessions(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_list_sessions_finish ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(@a(susso))", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_list_sessions_sync: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ListSessions() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_list_sessions() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_list_sessions_sync ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "ListSessions", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(@a(susso))", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_list_users: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ListUsers() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_list_users_finish() to get the result of the operation. - * - * See login1_manager_call_list_users_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_list_users ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "ListUsers", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_list_users_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_list_users(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_list_users(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_list_users_finish ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(@a(uso))", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_list_users_sync: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ListUsers() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_list_users() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_list_users_sync ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "ListUsers", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(@a(uso))", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_list_seats: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ListSeats() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_list_seats_finish() to get the result of the operation. - * - * See login1_manager_call_list_seats_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_list_seats ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "ListSeats", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_list_seats_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_list_seats(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_list_seats(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_list_seats_finish ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(@a(so))", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_list_seats_sync: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ListSeats() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_list_seats() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_list_seats_sync ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "ListSeats", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(@a(so))", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_list_inhibitors: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ListInhibitors() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_list_inhibitors_finish() to get the result of the operation. - * - * See login1_manager_call_list_inhibitors_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_list_inhibitors ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "ListInhibitors", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_list_inhibitors_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_list_inhibitors(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_list_inhibitors(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_list_inhibitors_finish ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(@a(ssssuu))", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_list_inhibitors_sync: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ListInhibitors() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_list_inhibitors() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_list_inhibitors_sync ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "ListInhibitors", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(@a(ssssuu))", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_create_session: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @arg_unnamed_arg3: Argument to pass with the method invocation. - * @arg_unnamed_arg4: Argument to pass with the method invocation. - * @arg_unnamed_arg5: Argument to pass with the method invocation. - * @arg_unnamed_arg6: Argument to pass with the method invocation. - * @arg_unnamed_arg7: Argument to pass with the method invocation. - * @arg_unnamed_arg8: Argument to pass with the method invocation. - * @arg_unnamed_arg9: Argument to pass with the method invocation. - * @arg_unnamed_arg10: Argument to pass with the method invocation. - * @arg_unnamed_arg11: Argument to pass with the method invocation. - * @arg_unnamed_arg12: Argument to pass with the method invocation. - * @arg_unnamed_arg13: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the CreateSession() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_create_session_finish() to get the result of the operation. - * - * See login1_manager_call_create_session_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_create_session ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - guint arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - const gchar *arg_unnamed_arg4, - const gchar *arg_unnamed_arg5, - const gchar *arg_unnamed_arg6, - guint arg_unnamed_arg7, - const gchar *arg_unnamed_arg8, - const gchar *arg_unnamed_arg9, - gboolean arg_unnamed_arg10, - const gchar *arg_unnamed_arg11, - const gchar *arg_unnamed_arg12, - GVariant *arg_unnamed_arg13, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "CreateSession", - g_variant_new ("(uusssssussbss@a(sv))", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2, - arg_unnamed_arg3, - arg_unnamed_arg4, - arg_unnamed_arg5, - arg_unnamed_arg6, - arg_unnamed_arg7, - arg_unnamed_arg8, - arg_unnamed_arg9, - arg_unnamed_arg10, - arg_unnamed_arg11, - arg_unnamed_arg12, - arg_unnamed_arg13), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_create_session_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg14: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg15: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg16: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg17: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg18: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg19: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg20: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg21: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_create_session(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_create_session(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_create_session_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg14, - gchar **out_unnamed_arg15, - gchar **out_unnamed_arg16, - GVariant **out_unnamed_arg17, - guint *out_unnamed_arg18, - gchar **out_unnamed_arg19, - guint *out_unnamed_arg20, - gboolean *out_unnamed_arg21, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(sos@husub)", - out_unnamed_arg14, - out_unnamed_arg15, - out_unnamed_arg16, - out_unnamed_arg17, - out_unnamed_arg18, - out_unnamed_arg19, - out_unnamed_arg20, - out_unnamed_arg21); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_create_session_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @arg_unnamed_arg3: Argument to pass with the method invocation. - * @arg_unnamed_arg4: Argument to pass with the method invocation. - * @arg_unnamed_arg5: Argument to pass with the method invocation. - * @arg_unnamed_arg6: Argument to pass with the method invocation. - * @arg_unnamed_arg7: Argument to pass with the method invocation. - * @arg_unnamed_arg8: Argument to pass with the method invocation. - * @arg_unnamed_arg9: Argument to pass with the method invocation. - * @arg_unnamed_arg10: Argument to pass with the method invocation. - * @arg_unnamed_arg11: Argument to pass with the method invocation. - * @arg_unnamed_arg12: Argument to pass with the method invocation. - * @arg_unnamed_arg13: Argument to pass with the method invocation. - * @out_unnamed_arg14: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg15: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg16: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg17: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg18: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg19: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg20: (out): Return location for return parameter or %NULL to ignore. - * @out_unnamed_arg21: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the CreateSession() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_create_session() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_create_session_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - guint arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - const gchar *arg_unnamed_arg4, - const gchar *arg_unnamed_arg5, - const gchar *arg_unnamed_arg6, - guint arg_unnamed_arg7, - const gchar *arg_unnamed_arg8, - const gchar *arg_unnamed_arg9, - gboolean arg_unnamed_arg10, - const gchar *arg_unnamed_arg11, - const gchar *arg_unnamed_arg12, - GVariant *arg_unnamed_arg13, - gchar **out_unnamed_arg14, - gchar **out_unnamed_arg15, - gchar **out_unnamed_arg16, - GVariant **out_unnamed_arg17, - guint *out_unnamed_arg18, - gchar **out_unnamed_arg19, - guint *out_unnamed_arg20, - gboolean *out_unnamed_arg21, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "CreateSession", - g_variant_new ("(uusssssussbss@a(sv))", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2, - arg_unnamed_arg3, - arg_unnamed_arg4, - arg_unnamed_arg5, - arg_unnamed_arg6, - arg_unnamed_arg7, - arg_unnamed_arg8, - arg_unnamed_arg9, - arg_unnamed_arg10, - arg_unnamed_arg11, - arg_unnamed_arg12, - arg_unnamed_arg13), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(sos@husub)", - out_unnamed_arg14, - out_unnamed_arg15, - out_unnamed_arg16, - out_unnamed_arg17, - out_unnamed_arg18, - out_unnamed_arg19, - out_unnamed_arg20, - out_unnamed_arg21); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_release_session: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ReleaseSession() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_release_session_finish() to get the result of the operation. - * - * See login1_manager_call_release_session_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_release_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "ReleaseSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_release_session_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_release_session(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_release_session(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_release_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_release_session_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ReleaseSession() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_release_session() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_release_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "ReleaseSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_activate_session: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ActivateSession() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_activate_session_finish() to get the result of the operation. - * - * See login1_manager_call_activate_session_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_activate_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "ActivateSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_activate_session_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_activate_session(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_activate_session(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_activate_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_activate_session_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ActivateSession() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_activate_session() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_activate_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "ActivateSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_activate_session_on_seat: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the ActivateSessionOnSeat() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_activate_session_on_seat_finish() to get the result of the operation. - * - * See login1_manager_call_activate_session_on_seat_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_activate_session_on_seat ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "ActivateSessionOnSeat", - g_variant_new ("(ss)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_activate_session_on_seat_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_activate_session_on_seat(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_activate_session_on_seat(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_activate_session_on_seat_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_activate_session_on_seat_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the ActivateSessionOnSeat() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_activate_session_on_seat() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_activate_session_on_seat_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "ActivateSessionOnSeat", - g_variant_new ("(ss)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_lock_session: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the LockSession() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_lock_session_finish() to get the result of the operation. - * - * See login1_manager_call_lock_session_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_lock_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "LockSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_lock_session_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_lock_session(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_lock_session(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_lock_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_lock_session_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the LockSession() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_lock_session() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_lock_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "LockSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_unlock_session: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the UnlockSession() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_unlock_session_finish() to get the result of the operation. - * - * See login1_manager_call_unlock_session_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_unlock_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "UnlockSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_unlock_session_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_unlock_session(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_unlock_session(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_unlock_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_unlock_session_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the UnlockSession() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_unlock_session() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_unlock_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "UnlockSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_lock_sessions: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the LockSessions() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_lock_sessions_finish() to get the result of the operation. - * - * See login1_manager_call_lock_sessions_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_lock_sessions ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "LockSessions", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_lock_sessions_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_lock_sessions(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_lock_sessions(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_lock_sessions_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_lock_sessions_sync: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the LockSessions() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_lock_sessions() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_lock_sessions_sync ( - Login1Manager *proxy, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "LockSessions", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_unlock_sessions: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the UnlockSessions() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_unlock_sessions_finish() to get the result of the operation. - * - * See login1_manager_call_unlock_sessions_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_unlock_sessions ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "UnlockSessions", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_unlock_sessions_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_unlock_sessions(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_unlock_sessions(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_unlock_sessions_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_unlock_sessions_sync: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the UnlockSessions() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_unlock_sessions() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_unlock_sessions_sync ( - Login1Manager *proxy, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "UnlockSessions", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_kill_session: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the KillSession() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_kill_session_finish() to get the result of the operation. - * - * See login1_manager_call_kill_session_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_kill_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gint arg_unnamed_arg2, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "KillSession", - g_variant_new ("(ssi)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_kill_session_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_kill_session(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_kill_session(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_kill_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_kill_session_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the KillSession() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_kill_session() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_kill_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gint arg_unnamed_arg2, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "KillSession", - g_variant_new ("(ssi)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_kill_user: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the KillUser() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_kill_user_finish() to get the result of the operation. - * - * See login1_manager_call_kill_user_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_kill_user ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gint arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "KillUser", - g_variant_new ("(ui)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_kill_user_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_kill_user(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_kill_user(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_kill_user_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_kill_user_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the KillUser() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_kill_user() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_kill_user_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gint arg_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "KillUser", - g_variant_new ("(ui)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_terminate_session: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the TerminateSession() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_terminate_session_finish() to get the result of the operation. - * - * See login1_manager_call_terminate_session_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_terminate_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "TerminateSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_terminate_session_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_terminate_session(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_terminate_session(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_terminate_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_terminate_session_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the TerminateSession() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_terminate_session() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_terminate_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "TerminateSession", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_terminate_user: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the TerminateUser() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_terminate_user_finish() to get the result of the operation. - * - * See login1_manager_call_terminate_user_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_terminate_user ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "TerminateUser", - g_variant_new ("(u)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_terminate_user_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_terminate_user(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_terminate_user(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_terminate_user_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_terminate_user_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the TerminateUser() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_terminate_user() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_terminate_user_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "TerminateUser", - g_variant_new ("(u)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_terminate_seat: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the TerminateSeat() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_terminate_seat_finish() to get the result of the operation. - * - * See login1_manager_call_terminate_seat_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_terminate_seat ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "TerminateSeat", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_terminate_seat_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_terminate_seat(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_terminate_seat(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_terminate_seat_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_terminate_seat_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the TerminateSeat() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_terminate_seat() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_terminate_seat_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "TerminateSeat", - g_variant_new ("(s)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_set_user_linger: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetUserLinger() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_set_user_linger_finish() to get the result of the operation. - * - * See login1_manager_call_set_user_linger_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_set_user_linger ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetUserLinger", - g_variant_new ("(ubb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_set_user_linger_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_set_user_linger(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_set_user_linger(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_set_user_linger_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_set_user_linger_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetUserLinger() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_set_user_linger() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_set_user_linger_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetUserLinger", - g_variant_new ("(ubb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_attach_device: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the AttachDevice() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_attach_device_finish() to get the result of the operation. - * - * See login1_manager_call_attach_device_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_attach_device ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "AttachDevice", - g_variant_new ("(ssb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_attach_device_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_attach_device(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_attach_device(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_attach_device_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_attach_device_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the AttachDevice() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_attach_device() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_attach_device_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "AttachDevice", - g_variant_new ("(ssb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_flush_devices: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the FlushDevices() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_flush_devices_finish() to get the result of the operation. - * - * See login1_manager_call_flush_devices_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_flush_devices ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "FlushDevices", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_flush_devices_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_flush_devices(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_flush_devices(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_flush_devices_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_flush_devices_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the FlushDevices() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_flush_devices() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_flush_devices_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "FlushDevices", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_power_off: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the PowerOff() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_power_off_finish() to get the result of the operation. - * - * See login1_manager_call_power_off_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_power_off ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "PowerOff", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_power_off_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_power_off(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_power_off(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_power_off_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_power_off_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the PowerOff() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_power_off() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_power_off_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "PowerOff", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_reboot: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the Reboot() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_reboot_finish() to get the result of the operation. - * - * See login1_manager_call_reboot_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_reboot ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "Reboot", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_reboot_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_reboot(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_reboot(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_reboot_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_reboot_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the Reboot() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_reboot() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_reboot_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "Reboot", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_suspend: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the Suspend() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_suspend_finish() to get the result of the operation. - * - * See login1_manager_call_suspend_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_suspend ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "Suspend", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_suspend_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_suspend(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_suspend(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_suspend_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_suspend_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the Suspend() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_suspend() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_suspend_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "Suspend", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_hibernate: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the Hibernate() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_hibernate_finish() to get the result of the operation. - * - * See login1_manager_call_hibernate_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_hibernate ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "Hibernate", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_hibernate_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_hibernate(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_hibernate(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_hibernate_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_hibernate_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the Hibernate() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_hibernate() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_hibernate_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "Hibernate", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_hybrid_sleep: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the HybridSleep() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_hybrid_sleep_finish() to get the result of the operation. - * - * See login1_manager_call_hybrid_sleep_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_hybrid_sleep ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "HybridSleep", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_hybrid_sleep_finish: - * @proxy: A #Login1ManagerProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_hybrid_sleep(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_hybrid_sleep(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_hybrid_sleep_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_hybrid_sleep_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the HybridSleep() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_hybrid_sleep() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_hybrid_sleep_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "HybridSleep", - g_variant_new ("(b)", - arg_unnamed_arg0), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_can_power_off: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the CanPowerOff() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_can_power_off_finish() to get the result of the operation. - * - * See login1_manager_call_can_power_off_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_can_power_off ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "CanPowerOff", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_can_power_off_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_can_power_off(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_can_power_off(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_can_power_off_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_can_power_off_sync: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the CanPowerOff() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_can_power_off() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_can_power_off_sync ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "CanPowerOff", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_can_reboot: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the CanReboot() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_can_reboot_finish() to get the result of the operation. - * - * See login1_manager_call_can_reboot_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_can_reboot ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "CanReboot", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_can_reboot_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_can_reboot(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_can_reboot(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_can_reboot_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_can_reboot_sync: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the CanReboot() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_can_reboot() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_can_reboot_sync ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "CanReboot", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_can_suspend: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the CanSuspend() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_can_suspend_finish() to get the result of the operation. - * - * See login1_manager_call_can_suspend_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_can_suspend ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "CanSuspend", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_can_suspend_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_can_suspend(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_can_suspend(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_can_suspend_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_can_suspend_sync: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the CanSuspend() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_can_suspend() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_can_suspend_sync ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "CanSuspend", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_can_hibernate: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the CanHibernate() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_can_hibernate_finish() to get the result of the operation. - * - * See login1_manager_call_can_hibernate_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_can_hibernate ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "CanHibernate", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_can_hibernate_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_can_hibernate(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_can_hibernate(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_can_hibernate_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_can_hibernate_sync: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the CanHibernate() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_can_hibernate() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_can_hibernate_sync ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "CanHibernate", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_can_hybrid_sleep: - * @proxy: A #Login1ManagerProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the CanHybridSleep() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_can_hybrid_sleep_finish() to get the result of the operation. - * - * See login1_manager_call_can_hybrid_sleep_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_can_hybrid_sleep ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "CanHybridSleep", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_can_hybrid_sleep_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_can_hybrid_sleep(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_can_hybrid_sleep(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_can_hybrid_sleep_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_can_hybrid_sleep_sync: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg0: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the CanHybridSleep() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_can_hybrid_sleep() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_can_hybrid_sleep_sync ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "CanHybridSleep", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_unnamed_arg0); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_inhibit: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @arg_unnamed_arg3: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the Inhibit() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_call_inhibit_finish() to get the result of the operation. - * - * See login1_manager_call_inhibit_sync() for the synchronous, blocking version of this method. - */ -void -login1_manager_call_inhibit ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "Inhibit", - g_variant_new ("(ssss)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2, - arg_unnamed_arg3), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * login1_manager_call_inhibit_finish: - * @proxy: A #Login1ManagerProxy. - * @out_unnamed_arg4: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_call_inhibit(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with login1_manager_call_inhibit(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_inhibit_finish ( - Login1Manager *proxy, - GVariant **out_unnamed_arg4, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(@h)", - out_unnamed_arg4); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_call_inhibit_sync: - * @proxy: A #Login1ManagerProxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @arg_unnamed_arg3: Argument to pass with the method invocation. - * @out_unnamed_arg4: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the Inhibit() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See login1_manager_call_inhibit() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -login1_manager_call_inhibit_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - GVariant **out_unnamed_arg4, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "Inhibit", - g_variant_new ("(ssss)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2, - arg_unnamed_arg3), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(@h)", - out_unnamed_arg4); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * login1_manager_complete_get_session: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg1: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetSession() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_get_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg1) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(o)", - unnamed_arg1)); -} - -/** - * login1_manager_complete_get_session_by_pid: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg1: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetSessionByPID() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_get_session_by_pid ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg1) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(o)", - unnamed_arg1)); -} - -/** - * login1_manager_complete_get_user: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg1: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetUser() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_get_user ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg1) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(o)", - unnamed_arg1)); -} - -/** - * login1_manager_complete_get_user_by_pid: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg1: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetUserByPID() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_get_user_by_pid ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg1) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(o)", - unnamed_arg1)); -} - -/** - * login1_manager_complete_get_seat: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg1: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetSeat() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_get_seat ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg1) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(o)", - unnamed_arg1)); -} - -/** - * login1_manager_complete_list_sessions: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg0: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the ListSessions() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_list_sessions ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - GVariant *unnamed_arg0) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(@a(susso))", - unnamed_arg0)); -} - -/** - * login1_manager_complete_list_users: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg0: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the ListUsers() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_list_users ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - GVariant *unnamed_arg0) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(@a(uso))", - unnamed_arg0)); -} - -/** - * login1_manager_complete_list_seats: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg0: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the ListSeats() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_list_seats ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - GVariant *unnamed_arg0) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(@a(so))", - unnamed_arg0)); -} - -/** - * login1_manager_complete_list_inhibitors: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg0: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the ListInhibitors() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_list_inhibitors ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - GVariant *unnamed_arg0) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(@a(ssssuu))", - unnamed_arg0)); -} - -/** - * login1_manager_complete_create_session: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg14: Parameter to return. - * @unnamed_arg15: Parameter to return. - * @unnamed_arg16: Parameter to return. - * @unnamed_arg17: Parameter to return. - * @unnamed_arg18: Parameter to return. - * @unnamed_arg19: Parameter to return. - * @unnamed_arg20: Parameter to return. - * @unnamed_arg21: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the CreateSession() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_create_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg14, - const gchar *unnamed_arg15, - const gchar *unnamed_arg16, - GVariant *unnamed_arg17, - guint unnamed_arg18, - const gchar *unnamed_arg19, - guint unnamed_arg20, - gboolean unnamed_arg21) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(sos@husub)", - unnamed_arg14, - unnamed_arg15, - unnamed_arg16, - unnamed_arg17, - unnamed_arg18, - unnamed_arg19, - unnamed_arg20, - unnamed_arg21)); -} - -/** - * login1_manager_complete_release_session: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the ReleaseSession() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_release_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_activate_session: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the ActivateSession() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_activate_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_activate_session_on_seat: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the ActivateSessionOnSeat() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_activate_session_on_seat ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_lock_session: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the LockSession() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_lock_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_unlock_session: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the UnlockSession() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_unlock_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_lock_sessions: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the LockSessions() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_lock_sessions ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_unlock_sessions: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the UnlockSessions() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_unlock_sessions ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_kill_session: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the KillSession() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_kill_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_kill_user: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the KillUser() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_kill_user ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_terminate_session: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the TerminateSession() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_terminate_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_terminate_user: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the TerminateUser() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_terminate_user ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_terminate_seat: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the TerminateSeat() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_terminate_seat ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_set_user_linger: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetUserLinger() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_set_user_linger ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_attach_device: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the AttachDevice() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_attach_device ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_flush_devices: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the FlushDevices() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_flush_devices ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_power_off: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the PowerOff() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_power_off ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_reboot: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the Reboot() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_reboot ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_suspend: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the Suspend() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_suspend ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_hibernate: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the Hibernate() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_hibernate ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_hybrid_sleep: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the HybridSleep() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_hybrid_sleep ( - Login1Manager *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * login1_manager_complete_can_power_off: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg0: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the CanPowerOff() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_can_power_off ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg0) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(s)", - unnamed_arg0)); -} - -/** - * login1_manager_complete_can_reboot: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg0: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the CanReboot() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_can_reboot ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg0) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(s)", - unnamed_arg0)); -} - -/** - * login1_manager_complete_can_suspend: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg0: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the CanSuspend() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_can_suspend ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg0) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(s)", - unnamed_arg0)); -} - -/** - * login1_manager_complete_can_hibernate: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg0: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the CanHibernate() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_can_hibernate ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg0) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(s)", - unnamed_arg0)); -} - -/** - * login1_manager_complete_can_hybrid_sleep: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg0: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the CanHybridSleep() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_can_hybrid_sleep ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg0) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(s)", - unnamed_arg0)); -} - -/** - * login1_manager_complete_inhibit: - * @object: A #Login1Manager. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @unnamed_arg4: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the Inhibit() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -login1_manager_complete_inhibit ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - GVariant *unnamed_arg4) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(@h)", - unnamed_arg4)); -} - -/* ------------------------------------------------------------------------ */ - -/** - * Login1ManagerProxy: - * - * The #Login1ManagerProxy structure contains only private data and should only be accessed using the provided API. - */ - -/** - * Login1ManagerProxyClass: - * @parent_class: The parent class. - * - * Class structure for #Login1ManagerProxy. - */ - -struct _Login1ManagerProxyPrivate -{ - GData *qdata; -}; - -static void login1_manager_proxy_iface_init (Login1ManagerIface *iface); - -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 -G_DEFINE_TYPE_WITH_CODE (Login1ManagerProxy, login1_manager_proxy, G_TYPE_DBUS_PROXY, - G_ADD_PRIVATE (Login1ManagerProxy) - G_IMPLEMENT_INTERFACE (TYPE_LOGIN1_MANAGER, login1_manager_proxy_iface_init)); - -#else -G_DEFINE_TYPE_WITH_CODE (Login1ManagerProxy, login1_manager_proxy, G_TYPE_DBUS_PROXY, - G_IMPLEMENT_INTERFACE (TYPE_LOGIN1_MANAGER, login1_manager_proxy_iface_init)); - -#endif -static void -login1_manager_proxy_finalize (GObject *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - g_datalist_clear (&proxy->priv->qdata); - G_OBJECT_CLASS (login1_manager_proxy_parent_class)->finalize (object); -} - -static void -login1_manager_proxy_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - const _ExtendedGDBusPropertyInfo *info; - GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 18); - info = _login1_manager_property_info_pointers[prop_id - 1]; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); - if (info->use_gvariant) - { - g_value_set_variant (value, variant); - } - else - { - if (variant != NULL) - g_dbus_gvariant_to_gvalue (variant, value); - } - if (variant != NULL) - g_variant_unref (variant); -} - -static void -login1_manager_proxy_set_property_cb (GDBusProxy *proxy, - GAsyncResult *res, - gpointer user_data) -{ - const _ExtendedGDBusPropertyInfo *info = user_data; - GError *error; - GVariant *_ret; - error = NULL; - _ret = g_dbus_proxy_call_finish (proxy, res, &error); - if (!_ret) - { - g_warning ("Error setting property '%s' on interface org.freedesktop.login1.Manager: %s (%s, %d)", - info->parent_struct.name, - error->message, g_quark_to_string (error->domain), error->code); - g_error_free (error); - } - else - { - g_variant_unref (_ret); - } -} - -static void -login1_manager_proxy_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - const _ExtendedGDBusPropertyInfo *info; - GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 18); - info = _login1_manager_property_info_pointers[prop_id - 1]; - variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); - g_dbus_proxy_call (G_DBUS_PROXY (object), - "org.freedesktop.DBus.Properties.Set", - g_variant_new ("(ssv)", "org.freedesktop.login1.Manager", info->parent_struct.name, variant), - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, (GAsyncReadyCallback) login1_manager_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); - g_variant_unref (variant); -} - -static void -login1_manager_proxy_g_signal (GDBusProxy *proxy, - const gchar *sender_name G_GNUC_UNUSED, - const gchar *signal_name, - GVariant *parameters) -{ - _ExtendedGDBusSignalInfo *info; - GVariantIter iter; - GVariant *child; - GValue *paramv; - guint num_params; - guint n; - guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_login1_manager_interface_info.parent_struct, signal_name); - if (info == NULL) - return; - num_params = g_variant_n_children (parameters); - paramv = g_new0 (GValue, num_params + 1); - g_value_init (¶mv[0], TYPE_LOGIN1_MANAGER); - g_value_set_object (¶mv[0], proxy); - g_variant_iter_init (&iter, parameters); - n = 1; - while ((child = g_variant_iter_next_value (&iter)) != NULL) - { - _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; - if (arg_info->use_gvariant) - { - g_value_init (¶mv[n], G_TYPE_VARIANT); - g_value_set_variant (¶mv[n], child); - n++; - } - else - g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); - g_variant_unref (child); - } - signal_id = g_signal_lookup (info->signal_name, TYPE_LOGIN1_MANAGER); - g_signal_emitv (paramv, signal_id, 0, NULL); - for (n = 0; n < num_params + 1; n++) - g_value_unset (¶mv[n]); - g_free (paramv); -} - -static void -login1_manager_proxy_g_properties_changed (GDBusProxy *_proxy, - GVariant *changed_properties, - const gchar *const *invalidated_properties) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (_proxy); - guint n; - const gchar *key; - GVariantIter *iter; - _ExtendedGDBusPropertyInfo *info; - g_variant_get (changed_properties, "a{sv}", &iter); - while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) - { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_login1_manager_interface_info.parent_struct, key); - g_datalist_remove_data (&proxy->priv->qdata, key); - if (info != NULL) - g_object_notify (G_OBJECT (proxy), info->hyphen_name); - } - g_variant_iter_free (iter); - for (n = 0; invalidated_properties[n] != NULL; n++) - { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_login1_manager_interface_info.parent_struct, invalidated_properties[n]); - g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); - if (info != NULL) - g_object_notify (G_OBJECT (proxy), info->hyphen_name); - } -} - -static guint -login1_manager_proxy_get_nauto_vts (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - guint value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "NAutoVTs"); - if (variant != NULL) - { - value = g_variant_get_uint32 (variant); - g_variant_unref (variant); - } - return value; -} - -static const gchar *const * -login1_manager_proxy_get_kill_only_users (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - const gchar *const *value = NULL; - value = g_datalist_get_data (&proxy->priv->qdata, "KillOnlyUsers"); - if (value != NULL) - return value; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "KillOnlyUsers"); - if (variant != NULL) - { - value = g_variant_get_strv (variant, NULL); - g_datalist_set_data_full (&proxy->priv->qdata, "KillOnlyUsers", (gpointer) value, g_free); - g_variant_unref (variant); - } - return value; -} - -static const gchar *const * -login1_manager_proxy_get_kill_exclude_users (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - const gchar *const *value = NULL; - value = g_datalist_get_data (&proxy->priv->qdata, "KillExcludeUsers"); - if (value != NULL) - return value; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "KillExcludeUsers"); - if (variant != NULL) - { - value = g_variant_get_strv (variant, NULL); - g_datalist_set_data_full (&proxy->priv->qdata, "KillExcludeUsers", (gpointer) value, g_free); - g_variant_unref (variant); - } - return value; -} - -static gboolean -login1_manager_proxy_get_kill_user_processes (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - gboolean value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "KillUserProcesses"); - if (variant != NULL) - { - value = g_variant_get_boolean (variant); - g_variant_unref (variant); - } - return value; -} - -static gboolean -login1_manager_proxy_get_idle_hint (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - gboolean value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "IdleHint"); - if (variant != NULL) - { - value = g_variant_get_boolean (variant); - g_variant_unref (variant); - } - return value; -} - -static guint64 -login1_manager_proxy_get_idle_since_hint (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - guint64 value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "IdleSinceHint"); - if (variant != NULL) - { - value = g_variant_get_uint64 (variant); - g_variant_unref (variant); - } - return value; -} - -static guint64 -login1_manager_proxy_get_idle_since_hint_monotonic (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - guint64 value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "IdleSinceHintMonotonic"); - if (variant != NULL) - { - value = g_variant_get_uint64 (variant); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -login1_manager_proxy_get_block_inhibited (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "BlockInhibited"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -login1_manager_proxy_get_delay_inhibited (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "DelayInhibited"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static guint64 -login1_manager_proxy_get_inhibit_delay_max_usec (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - guint64 value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "InhibitDelayMaxUSec"); - if (variant != NULL) - { - value = g_variant_get_uint64 (variant); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -login1_manager_proxy_get_handle_power_key (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "HandlePowerKey"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -login1_manager_proxy_get_handle_suspend_key (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "HandleSuspendKey"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -login1_manager_proxy_get_handle_hibernate_key (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "HandleHibernateKey"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -login1_manager_proxy_get_handle_lid_switch (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "HandleLidSwitch"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static const gchar * -login1_manager_proxy_get_idle_action (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "IdleAction"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static guint64 -login1_manager_proxy_get_idle_action_usec (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - guint64 value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "IdleActionUSec"); - if (variant != NULL) - { - value = g_variant_get_uint64 (variant); - g_variant_unref (variant); - } - return value; -} - -static gboolean -login1_manager_proxy_get_preparing_for_shutdown (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - gboolean value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "PreparingForShutdown"); - if (variant != NULL) - { - value = g_variant_get_boolean (variant); - g_variant_unref (variant); - } - return value; -} - -static gboolean -login1_manager_proxy_get_preparing_for_sleep (Login1Manager *object) -{ - Login1ManagerProxy *proxy = LOGIN1_MANAGER_PROXY (object); - GVariant *variant; - gboolean value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "PreparingForSleep"); - if (variant != NULL) - { - value = g_variant_get_boolean (variant); - g_variant_unref (variant); - } - return value; -} - -static void -login1_manager_proxy_init (Login1ManagerProxy *proxy) -{ -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 - proxy->priv = login1_manager_proxy_get_instance_private (proxy); -#else - proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_LOGIN1_MANAGER_PROXY, Login1ManagerProxyPrivate); -#endif - - g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), login1_manager_interface_info ()); -} - -static void -login1_manager_proxy_class_init (Login1ManagerProxyClass *klass) -{ - GObjectClass *gobject_class; - GDBusProxyClass *proxy_class; - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = login1_manager_proxy_finalize; - gobject_class->get_property = login1_manager_proxy_get_property; - gobject_class->set_property = login1_manager_proxy_set_property; - - proxy_class = G_DBUS_PROXY_CLASS (klass); - proxy_class->g_signal = login1_manager_proxy_g_signal; - proxy_class->g_properties_changed = login1_manager_proxy_g_properties_changed; - - login1_manager_override_properties (gobject_class, 1); - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 - g_type_class_add_private (klass, sizeof (Login1ManagerProxyPrivate)); -#endif -} - -static void -login1_manager_proxy_iface_init (Login1ManagerIface *iface) -{ - iface->get_nauto_vts = login1_manager_proxy_get_nauto_vts; - iface->get_kill_only_users = login1_manager_proxy_get_kill_only_users; - iface->get_kill_exclude_users = login1_manager_proxy_get_kill_exclude_users; - iface->get_kill_user_processes = login1_manager_proxy_get_kill_user_processes; - iface->get_idle_hint = login1_manager_proxy_get_idle_hint; - iface->get_idle_since_hint = login1_manager_proxy_get_idle_since_hint; - iface->get_idle_since_hint_monotonic = login1_manager_proxy_get_idle_since_hint_monotonic; - iface->get_block_inhibited = login1_manager_proxy_get_block_inhibited; - iface->get_delay_inhibited = login1_manager_proxy_get_delay_inhibited; - iface->get_inhibit_delay_max_usec = login1_manager_proxy_get_inhibit_delay_max_usec; - iface->get_handle_power_key = login1_manager_proxy_get_handle_power_key; - iface->get_handle_suspend_key = login1_manager_proxy_get_handle_suspend_key; - iface->get_handle_hibernate_key = login1_manager_proxy_get_handle_hibernate_key; - iface->get_handle_lid_switch = login1_manager_proxy_get_handle_lid_switch; - iface->get_idle_action = login1_manager_proxy_get_idle_action; - iface->get_idle_action_usec = login1_manager_proxy_get_idle_action_usec; - iface->get_preparing_for_shutdown = login1_manager_proxy_get_preparing_for_shutdown; - iface->get_preparing_for_sleep = login1_manager_proxy_get_preparing_for_sleep; -} - -/** - * login1_manager_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.login1.Manager. See g_dbus_proxy_new() for more details. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_proxy_new_finish() to get the result of the operation. - * - * See login1_manager_proxy_new_sync() for the synchronous, blocking version of this constructor. - */ -void -login1_manager_proxy_new ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_async_initable_new_async (TYPE_LOGIN1_MANAGER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.login1.Manager", NULL); -} - -/** - * login1_manager_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_proxy_new(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with login1_manager_proxy_new(). - * - * Returns: (transfer full) (type Login1ManagerProxy): The constructed proxy object or %NULL if @error is set. - */ -Login1Manager * -login1_manager_proxy_new_finish ( - GAsyncResult *res, - GError **error) -{ - GObject *ret; - GObject *source_object; - source_object = g_async_result_get_source_object (res); - ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); - g_object_unref (source_object); - if (ret != NULL) - return LOGIN1_MANAGER (ret); - else - return NULL; -} - -/** - * login1_manager_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Synchronously creates a proxy for the D-Bus interface org.freedesktop.login1.Manager. See g_dbus_proxy_new_sync() for more details. - * - * The calling thread is blocked until a reply is received. - * - * See login1_manager_proxy_new() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type Login1ManagerProxy): The constructed proxy object or %NULL if @error is set. - */ -Login1Manager * -login1_manager_proxy_new_sync ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error) -{ - GInitable *ret; - ret = g_initable_new (TYPE_LOGIN1_MANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.login1.Manager", NULL); - if (ret != NULL) - return LOGIN1_MANAGER (ret); - else - return NULL; -} - - -/** - * login1_manager_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Like login1_manager_proxy_new() but takes a #GBusType instead of a #GDBusConnection. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call login1_manager_proxy_new_for_bus_finish() to get the result of the operation. - * - * See login1_manager_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. - */ -void -login1_manager_proxy_new_for_bus ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_async_initable_new_async (TYPE_LOGIN1_MANAGER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.login1.Manager", NULL); -} - -/** - * login1_manager_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to login1_manager_proxy_new_for_bus(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with login1_manager_proxy_new_for_bus(). - * - * Returns: (transfer full) (type Login1ManagerProxy): The constructed proxy object or %NULL if @error is set. - */ -Login1Manager * -login1_manager_proxy_new_for_bus_finish ( - GAsyncResult *res, - GError **error) -{ - GObject *ret; - GObject *source_object; - source_object = g_async_result_get_source_object (res); - ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); - g_object_unref (source_object); - if (ret != NULL) - return LOGIN1_MANAGER (ret); - else - return NULL; -} - -/** - * login1_manager_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Like login1_manager_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. - * - * The calling thread is blocked until a reply is received. - * - * See login1_manager_proxy_new_for_bus() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type Login1ManagerProxy): The constructed proxy object or %NULL if @error is set. - */ -Login1Manager * -login1_manager_proxy_new_for_bus_sync ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error) -{ - GInitable *ret; - ret = g_initable_new (TYPE_LOGIN1_MANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.login1.Manager", NULL); - if (ret != NULL) - return LOGIN1_MANAGER (ret); - else - return NULL; -} - - -/* ------------------------------------------------------------------------ */ - -/** - * Login1ManagerSkeleton: - * - * The #Login1ManagerSkeleton structure contains only private data and should only be accessed using the provided API. - */ - -/** - * Login1ManagerSkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #Login1ManagerSkeleton. - */ - -struct _Login1ManagerSkeletonPrivate -{ - GValue *properties; - GList *changed_properties; - GSource *changed_properties_idle_source; - GMainContext *context; - GMutex lock; -}; - -static void -_login1_manager_skeleton_handle_method_call ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name, - const gchar *method_name, - GVariant *parameters, - GDBusMethodInvocation *invocation, - gpointer user_data) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (user_data); - _ExtendedGDBusMethodInfo *info; - GVariantIter iter; - GVariant *child; - GValue *paramv; - guint num_params; - guint num_extra; - guint n; - guint signal_id; - GValue return_value = G_VALUE_INIT; - info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); - g_assert (info != NULL); - num_params = g_variant_n_children (parameters); - num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); - n = 0; - g_value_init (¶mv[n], TYPE_LOGIN1_MANAGER); - g_value_set_object (¶mv[n++], skeleton); - g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); - g_value_set_object (¶mv[n++], invocation); - if (info->pass_fdlist) - { -#ifdef G_OS_UNIX - g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); - g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); -#else - g_assert_not_reached (); -#endif - } - g_variant_iter_init (&iter, parameters); - while ((child = g_variant_iter_next_value (&iter)) != NULL) - { - _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; - if (arg_info->use_gvariant) - { - g_value_init (¶mv[n], G_TYPE_VARIANT); - g_value_set_variant (¶mv[n], child); - n++; - } - else - g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); - g_variant_unref (child); - } - signal_id = g_signal_lookup (info->signal_name, TYPE_LOGIN1_MANAGER); - g_value_init (&return_value, G_TYPE_BOOLEAN); - g_signal_emitv (paramv, signal_id, 0, &return_value); - if (!g_value_get_boolean (&return_value)) - g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); - g_value_unset (&return_value); - for (n = 0; n < num_params + num_extra; n++) - g_value_unset (¶mv[n]); - g_free (paramv); -} - -static GVariant * -_login1_manager_skeleton_handle_get_property ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name G_GNUC_UNUSED, - const gchar *property_name, - GError **error, - gpointer user_data) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (user_data); - GValue value = G_VALUE_INIT; - GParamSpec *pspec; - _ExtendedGDBusPropertyInfo *info; - GVariant *ret; - ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_login1_manager_interface_info.parent_struct, property_name); - g_assert (info != NULL); - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); - if (pspec == NULL) - { - g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); - } - else - { - g_value_init (&value, pspec->value_type); - g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); - ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); - g_value_unset (&value); - } - return ret; -} - -static gboolean -_login1_manager_skeleton_handle_set_property ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name G_GNUC_UNUSED, - const gchar *property_name, - GVariant *variant, - GError **error, - gpointer user_data) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (user_data); - GValue value = G_VALUE_INIT; - GParamSpec *pspec; - _ExtendedGDBusPropertyInfo *info; - gboolean ret; - ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_login1_manager_interface_info.parent_struct, property_name); - g_assert (info != NULL); - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); - if (pspec == NULL) - { - g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); - } - else - { - if (info->use_gvariant) - g_value_set_variant (&value, variant); - else - g_dbus_gvariant_to_gvalue (variant, &value); - g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); - g_value_unset (&value); - ret = TRUE; - } - return ret; -} - -static const GDBusInterfaceVTable _login1_manager_skeleton_vtable = -{ - _login1_manager_skeleton_handle_method_call, - _login1_manager_skeleton_handle_get_property, - _login1_manager_skeleton_handle_set_property, - {NULL} -}; - -static GDBusInterfaceInfo * -login1_manager_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) -{ - return login1_manager_interface_info (); -} - -static GDBusInterfaceVTable * -login1_manager_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) -{ - return (GDBusInterfaceVTable *) &_login1_manager_skeleton_vtable; -} - -static GVariant * -login1_manager_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (_skeleton); - - GVariantBuilder builder; - guint n; - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - if (_login1_manager_interface_info.parent_struct.properties == NULL) - goto out; - for (n = 0; _login1_manager_interface_info.parent_struct.properties[n] != NULL; n++) - { - GDBusPropertyInfo *info = _login1_manager_interface_info.parent_struct.properties[n]; - if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) - { - GVariant *value; - value = _login1_manager_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.login1.Manager", info->name, NULL, skeleton); - if (value != NULL) - { - g_variant_take_ref (value); - g_variant_builder_add (&builder, "{sv}", info->name, value); - g_variant_unref (value); - } - } - } -out: - return g_variant_builder_end (&builder); -} - -static gboolean _login1_manager_emit_changed (gpointer user_data); - -static void -login1_manager_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (_skeleton); - gboolean emit_changed = FALSE; - - g_mutex_lock (&skeleton->priv->lock); - if (skeleton->priv->changed_properties_idle_source != NULL) - { - g_source_destroy (skeleton->priv->changed_properties_idle_source); - skeleton->priv->changed_properties_idle_source = NULL; - emit_changed = TRUE; - } - g_mutex_unlock (&skeleton->priv->lock); - - if (emit_changed) - _login1_manager_emit_changed (skeleton); -} - -static void -_login1_manager_on_signal_session_new ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - - GList *connections, *l; - GVariant *signal_variant; - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - - signal_variant = g_variant_ref_sink (g_variant_new ("(so)", - arg_unnamed_arg0, - arg_unnamed_arg1)); - for (l = connections; l != NULL; l = l->next) - { - GDBusConnection *connection = l->data; - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.login1.Manager", "SessionNew", - signal_variant, NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); -} - -static void -_login1_manager_on_signal_session_removed ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - - GList *connections, *l; - GVariant *signal_variant; - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - - signal_variant = g_variant_ref_sink (g_variant_new ("(so)", - arg_unnamed_arg0, - arg_unnamed_arg1)); - for (l = connections; l != NULL; l = l->next) - { - GDBusConnection *connection = l->data; - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.login1.Manager", "SessionRemoved", - signal_variant, NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); -} - -static void -_login1_manager_on_signal_user_new ( - Login1Manager *object, - guint arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - - GList *connections, *l; - GVariant *signal_variant; - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - - signal_variant = g_variant_ref_sink (g_variant_new ("(uo)", - arg_unnamed_arg0, - arg_unnamed_arg1)); - for (l = connections; l != NULL; l = l->next) - { - GDBusConnection *connection = l->data; - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.login1.Manager", "UserNew", - signal_variant, NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); -} - -static void -_login1_manager_on_signal_user_removed ( - Login1Manager *object, - guint arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - - GList *connections, *l; - GVariant *signal_variant; - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - - signal_variant = g_variant_ref_sink (g_variant_new ("(uo)", - arg_unnamed_arg0, - arg_unnamed_arg1)); - for (l = connections; l != NULL; l = l->next) - { - GDBusConnection *connection = l->data; - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.login1.Manager", "UserRemoved", - signal_variant, NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); -} - -static void -_login1_manager_on_signal_seat_new ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - - GList *connections, *l; - GVariant *signal_variant; - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - - signal_variant = g_variant_ref_sink (g_variant_new ("(so)", - arg_unnamed_arg0, - arg_unnamed_arg1)); - for (l = connections; l != NULL; l = l->next) - { - GDBusConnection *connection = l->data; - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.login1.Manager", "SeatNew", - signal_variant, NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); -} - -static void -_login1_manager_on_signal_seat_removed ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - - GList *connections, *l; - GVariant *signal_variant; - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - - signal_variant = g_variant_ref_sink (g_variant_new ("(so)", - arg_unnamed_arg0, - arg_unnamed_arg1)); - for (l = connections; l != NULL; l = l->next) - { - GDBusConnection *connection = l->data; - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.login1.Manager", "SeatRemoved", - signal_variant, NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); -} - -static void -_login1_manager_on_signal_prepare_for_shutdown ( - Login1Manager *object, - gboolean arg_unnamed_arg0) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - - GList *connections, *l; - GVariant *signal_variant; - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - - signal_variant = g_variant_ref_sink (g_variant_new ("(b)", - arg_unnamed_arg0)); - for (l = connections; l != NULL; l = l->next) - { - GDBusConnection *connection = l->data; - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.login1.Manager", "PrepareForShutdown", - signal_variant, NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); -} - -static void -_login1_manager_on_signal_prepare_for_sleep ( - Login1Manager *object, - gboolean arg_unnamed_arg0) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - - GList *connections, *l; - GVariant *signal_variant; - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - - signal_variant = g_variant_ref_sink (g_variant_new ("(b)", - arg_unnamed_arg0)); - for (l = connections; l != NULL; l = l->next) - { - GDBusConnection *connection = l->data; - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.login1.Manager", "PrepareForSleep", - signal_variant, NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); -} - -static void login1_manager_skeleton_iface_init (Login1ManagerIface *iface); -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 -G_DEFINE_TYPE_WITH_CODE (Login1ManagerSkeleton, login1_manager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, - G_ADD_PRIVATE (Login1ManagerSkeleton) - G_IMPLEMENT_INTERFACE (TYPE_LOGIN1_MANAGER, login1_manager_skeleton_iface_init)); - -#else -G_DEFINE_TYPE_WITH_CODE (Login1ManagerSkeleton, login1_manager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, - G_IMPLEMENT_INTERFACE (TYPE_LOGIN1_MANAGER, login1_manager_skeleton_iface_init)); - -#endif -static void -login1_manager_skeleton_finalize (GObject *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - guint n; - for (n = 0; n < 18; n++) - g_value_unset (&skeleton->priv->properties[n]); - g_free (skeleton->priv->properties); - g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); - if (skeleton->priv->changed_properties_idle_source != NULL) - g_source_destroy (skeleton->priv->changed_properties_idle_source); - g_main_context_unref (skeleton->priv->context); - g_mutex_clear (&skeleton->priv->lock); - G_OBJECT_CLASS (login1_manager_skeleton_parent_class)->finalize (object); -} - -static void -login1_manager_skeleton_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 18); - g_mutex_lock (&skeleton->priv->lock); - g_value_copy (&skeleton->priv->properties[prop_id - 1], value); - g_mutex_unlock (&skeleton->priv->lock); -} - -static gboolean -_login1_manager_emit_changed (gpointer user_data) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (user_data); - GList *l; - GVariantBuilder builder; - GVariantBuilder invalidated_builder; - guint num_changes; - - g_mutex_lock (&skeleton->priv->lock); - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); - for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) - { - ChangedProperty *cp = l->data; - GVariant *variant; - const GValue *cur_value; - - cur_value = &skeleton->priv->properties[cp->prop_id - 1]; - if (!_g_value_equal (cur_value, &cp->orig_value)) - { - variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); - g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); - g_variant_unref (variant); - num_changes++; - } - } - if (num_changes > 0) - { - GList *connections, *ll; - GVariant *signal_variant; - signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.login1.Manager", - &builder, &invalidated_builder)); - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - for (ll = connections; ll != NULL; ll = ll->next) - { - GDBusConnection *connection = ll->data; - - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), - "org.freedesktop.DBus.Properties", - "PropertiesChanged", - signal_variant, - NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); - } - else - { - g_variant_builder_clear (&builder); - g_variant_builder_clear (&invalidated_builder); - } - g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); - skeleton->priv->changed_properties = NULL; - skeleton->priv->changed_properties_idle_source = NULL; - g_mutex_unlock (&skeleton->priv->lock); - return FALSE; -} - -static void -_login1_manager_schedule_emit_changed (Login1ManagerSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) -{ - ChangedProperty *cp; - GList *l; - cp = NULL; - for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) - { - ChangedProperty *i_cp = l->data; - if (i_cp->info == info) - { - cp = i_cp; - break; - } - } - if (cp == NULL) - { - cp = g_new0 (ChangedProperty, 1); - cp->prop_id = prop_id; - cp->info = info; - skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); - g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); - g_value_copy (orig_value, &cp->orig_value); - } -} - -static void -login1_manager_skeleton_notify (GObject *object, - GParamSpec *pspec G_GNUC_UNUSED) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - g_mutex_lock (&skeleton->priv->lock); - if (skeleton->priv->changed_properties != NULL && - skeleton->priv->changed_properties_idle_source == NULL) - { - skeleton->priv->changed_properties_idle_source = g_idle_source_new (); - g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); - g_source_set_callback (skeleton->priv->changed_properties_idle_source, _login1_manager_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); - g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); - g_source_unref (skeleton->priv->changed_properties_idle_source); - } - g_mutex_unlock (&skeleton->priv->lock); -} - -static void -login1_manager_skeleton_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 18); - g_mutex_lock (&skeleton->priv->lock); - g_object_freeze_notify (object); - if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) - { - if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) - _login1_manager_schedule_emit_changed (skeleton, _login1_manager_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); - g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); - g_object_notify_by_pspec (object, pspec); - } - g_mutex_unlock (&skeleton->priv->lock); - g_object_thaw_notify (object); -} - -static void -login1_manager_skeleton_init (Login1ManagerSkeleton *skeleton) -{ -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 - skeleton->priv = login1_manager_skeleton_get_instance_private (skeleton); -#else - skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_LOGIN1_MANAGER_SKELETON, Login1ManagerSkeletonPrivate); -#endif - - g_mutex_init (&skeleton->priv->lock); - skeleton->priv->context = g_main_context_ref_thread_default (); - skeleton->priv->properties = g_new0 (GValue, 18); - g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT); - g_value_init (&skeleton->priv->properties[1], G_TYPE_STRV); - g_value_init (&skeleton->priv->properties[2], G_TYPE_STRV); - g_value_init (&skeleton->priv->properties[3], G_TYPE_BOOLEAN); - g_value_init (&skeleton->priv->properties[4], G_TYPE_BOOLEAN); - g_value_init (&skeleton->priv->properties[5], G_TYPE_UINT64); - g_value_init (&skeleton->priv->properties[6], G_TYPE_UINT64); - g_value_init (&skeleton->priv->properties[7], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[8], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[9], G_TYPE_UINT64); - g_value_init (&skeleton->priv->properties[10], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[11], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[12], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[13], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[14], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[15], G_TYPE_UINT64); - g_value_init (&skeleton->priv->properties[16], G_TYPE_BOOLEAN); - g_value_init (&skeleton->priv->properties[17], G_TYPE_BOOLEAN); -} - -static guint -login1_manager_skeleton_get_nauto_vts (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - guint value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_uint (&(skeleton->priv->properties[0])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar *const * -login1_manager_skeleton_get_kill_only_users (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - const gchar *const *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boxed (&(skeleton->priv->properties[1])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar *const * -login1_manager_skeleton_get_kill_exclude_users (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - const gchar *const *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boxed (&(skeleton->priv->properties[2])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static gboolean -login1_manager_skeleton_get_kill_user_processes (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - gboolean value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boolean (&(skeleton->priv->properties[3])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static gboolean -login1_manager_skeleton_get_idle_hint (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - gboolean value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boolean (&(skeleton->priv->properties[4])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static guint64 -login1_manager_skeleton_get_idle_since_hint (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - guint64 value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_uint64 (&(skeleton->priv->properties[5])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static guint64 -login1_manager_skeleton_get_idle_since_hint_monotonic (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - guint64 value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_uint64 (&(skeleton->priv->properties[6])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -login1_manager_skeleton_get_block_inhibited (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[7])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -login1_manager_skeleton_get_delay_inhibited (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[8])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static guint64 -login1_manager_skeleton_get_inhibit_delay_max_usec (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - guint64 value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_uint64 (&(skeleton->priv->properties[9])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -login1_manager_skeleton_get_handle_power_key (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[10])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -login1_manager_skeleton_get_handle_suspend_key (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[11])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -login1_manager_skeleton_get_handle_hibernate_key (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[12])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -login1_manager_skeleton_get_handle_lid_switch (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[13])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static const gchar * -login1_manager_skeleton_get_idle_action (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[14])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static guint64 -login1_manager_skeleton_get_idle_action_usec (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - guint64 value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_uint64 (&(skeleton->priv->properties[15])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static gboolean -login1_manager_skeleton_get_preparing_for_shutdown (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - gboolean value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boolean (&(skeleton->priv->properties[16])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static gboolean -login1_manager_skeleton_get_preparing_for_sleep (Login1Manager *object) -{ - Login1ManagerSkeleton *skeleton = LOGIN1_MANAGER_SKELETON (object); - gboolean value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boolean (&(skeleton->priv->properties[17])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static void -login1_manager_skeleton_class_init (Login1ManagerSkeletonClass *klass) -{ - GObjectClass *gobject_class; - GDBusInterfaceSkeletonClass *skeleton_class; - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = login1_manager_skeleton_finalize; - gobject_class->get_property = login1_manager_skeleton_get_property; - gobject_class->set_property = login1_manager_skeleton_set_property; - gobject_class->notify = login1_manager_skeleton_notify; - - - login1_manager_override_properties (gobject_class, 1); - - skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); - skeleton_class->get_info = login1_manager_skeleton_dbus_interface_get_info; - skeleton_class->get_properties = login1_manager_skeleton_dbus_interface_get_properties; - skeleton_class->flush = login1_manager_skeleton_dbus_interface_flush; - skeleton_class->get_vtable = login1_manager_skeleton_dbus_interface_get_vtable; - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 - g_type_class_add_private (klass, sizeof (Login1ManagerSkeletonPrivate)); -#endif -} - -static void -login1_manager_skeleton_iface_init (Login1ManagerIface *iface) -{ - iface->session_new = _login1_manager_on_signal_session_new; - iface->session_removed = _login1_manager_on_signal_session_removed; - iface->user_new = _login1_manager_on_signal_user_new; - iface->user_removed = _login1_manager_on_signal_user_removed; - iface->seat_new = _login1_manager_on_signal_seat_new; - iface->seat_removed = _login1_manager_on_signal_seat_removed; - iface->prepare_for_shutdown = _login1_manager_on_signal_prepare_for_shutdown; - iface->prepare_for_sleep = _login1_manager_on_signal_prepare_for_sleep; - iface->get_nauto_vts = login1_manager_skeleton_get_nauto_vts; - iface->get_kill_only_users = login1_manager_skeleton_get_kill_only_users; - iface->get_kill_exclude_users = login1_manager_skeleton_get_kill_exclude_users; - iface->get_kill_user_processes = login1_manager_skeleton_get_kill_user_processes; - iface->get_idle_hint = login1_manager_skeleton_get_idle_hint; - iface->get_idle_since_hint = login1_manager_skeleton_get_idle_since_hint; - iface->get_idle_since_hint_monotonic = login1_manager_skeleton_get_idle_since_hint_monotonic; - iface->get_block_inhibited = login1_manager_skeleton_get_block_inhibited; - iface->get_delay_inhibited = login1_manager_skeleton_get_delay_inhibited; - iface->get_inhibit_delay_max_usec = login1_manager_skeleton_get_inhibit_delay_max_usec; - iface->get_handle_power_key = login1_manager_skeleton_get_handle_power_key; - iface->get_handle_suspend_key = login1_manager_skeleton_get_handle_suspend_key; - iface->get_handle_hibernate_key = login1_manager_skeleton_get_handle_hibernate_key; - iface->get_handle_lid_switch = login1_manager_skeleton_get_handle_lid_switch; - iface->get_idle_action = login1_manager_skeleton_get_idle_action; - iface->get_idle_action_usec = login1_manager_skeleton_get_idle_action_usec; - iface->get_preparing_for_shutdown = login1_manager_skeleton_get_preparing_for_shutdown; - iface->get_preparing_for_sleep = login1_manager_skeleton_get_preparing_for_sleep; -} - -/** - * login1_manager_skeleton_new: - * - * Creates a skeleton object for the D-Bus interface org.freedesktop.login1.Manager. - * - * Returns: (transfer full) (type Login1ManagerSkeleton): The skeleton object. - */ -Login1Manager * -login1_manager_skeleton_new (void) -{ - return LOGIN1_MANAGER (g_object_new (TYPE_LOGIN1_MANAGER_SKELETON, NULL)); -} - diff --git a/src/interfaces/logind/logind-gen.h b/src/interfaces/logind/logind-gen.h deleted file mode 100644 index dfd76ba..0000000 --- a/src/interfaces/logind/logind-gen.h +++ /dev/null @@ -1,1405 +0,0 @@ -/* - * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. - * - * The license of this code is the same as for the source it was derived from. - */ - -#ifndef __LOGIND_GEN_H__ -#define __LOGIND_GEN_H__ - -#include - -G_BEGIN_DECLS - - -/* ------------------------------------------------------------------------ */ -/* Declarations for org.freedesktop.login1.Manager */ - -#define TYPE_LOGIN1_MANAGER (login1_manager_get_type ()) -#define LOGIN1_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_LOGIN1_MANAGER, Login1Manager)) -#define IS_LOGIN1_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_LOGIN1_MANAGER)) -#define LOGIN1_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_LOGIN1_MANAGER, Login1ManagerIface)) - -struct _Login1Manager; -typedef struct _Login1Manager Login1Manager; -typedef struct _Login1ManagerIface Login1ManagerIface; - -struct _Login1ManagerIface -{ - GTypeInterface parent_iface; - - - - gboolean (*handle_activate_session) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0); - - gboolean (*handle_activate_session_on_seat) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - - gboolean (*handle_attach_device) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gboolean arg_unnamed_arg2); - - gboolean (*handle_can_hibernate) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_can_hybrid_sleep) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_can_power_off) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_can_reboot) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_can_suspend) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_create_session) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - guint arg_unnamed_arg0, - guint arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - const gchar *arg_unnamed_arg4, - const gchar *arg_unnamed_arg5, - const gchar *arg_unnamed_arg6, - guint arg_unnamed_arg7, - const gchar *arg_unnamed_arg8, - const gchar *arg_unnamed_arg9, - gboolean arg_unnamed_arg10, - const gchar *arg_unnamed_arg11, - const gchar *arg_unnamed_arg12, - GVariant *arg_unnamed_arg13); - - gboolean (*handle_flush_devices) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - gboolean arg_unnamed_arg0); - - gboolean (*handle_get_seat) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0); - - gboolean (*handle_get_session) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0); - - gboolean (*handle_get_session_by_pid) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - guint arg_unnamed_arg0); - - gboolean (*handle_get_user) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - guint arg_unnamed_arg0); - - gboolean (*handle_get_user_by_pid) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - guint arg_unnamed_arg0); - - gboolean (*handle_hibernate) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - gboolean arg_unnamed_arg0); - - gboolean (*handle_hybrid_sleep) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - gboolean arg_unnamed_arg0); - - gboolean (*handle_inhibit) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3); - - gboolean (*handle_kill_session) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gint arg_unnamed_arg2); - - gboolean (*handle_kill_user) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - guint arg_unnamed_arg0, - gint arg_unnamed_arg1); - - gboolean (*handle_list_inhibitors) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_list_seats) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_list_sessions) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_list_users) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_lock_session) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0); - - gboolean (*handle_lock_sessions) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_power_off) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - gboolean arg_unnamed_arg0); - - gboolean (*handle_reboot) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - gboolean arg_unnamed_arg0); - - gboolean (*handle_release_session) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0); - - gboolean (*handle_set_user_linger) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - guint arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2); - - gboolean (*handle_suspend) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - gboolean arg_unnamed_arg0); - - gboolean (*handle_terminate_seat) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0); - - gboolean (*handle_terminate_session) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0); - - gboolean (*handle_terminate_user) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - guint arg_unnamed_arg0); - - gboolean (*handle_unlock_session) ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0); - - gboolean (*handle_unlock_sessions) ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - - const gchar * (*get_block_inhibited) (Login1Manager *object); - - const gchar * (*get_delay_inhibited) (Login1Manager *object); - - const gchar * (*get_handle_hibernate_key) (Login1Manager *object); - - const gchar * (*get_handle_lid_switch) (Login1Manager *object); - - const gchar * (*get_handle_power_key) (Login1Manager *object); - - const gchar * (*get_handle_suspend_key) (Login1Manager *object); - - const gchar * (*get_idle_action) (Login1Manager *object); - - guint64 (*get_idle_action_usec) (Login1Manager *object); - - gboolean (*get_idle_hint) (Login1Manager *object); - - guint64 (*get_idle_since_hint) (Login1Manager *object); - - guint64 (*get_idle_since_hint_monotonic) (Login1Manager *object); - - guint64 (*get_inhibit_delay_max_usec) (Login1Manager *object); - - const gchar *const * (*get_kill_exclude_users) (Login1Manager *object); - - const gchar *const * (*get_kill_only_users) (Login1Manager *object); - - gboolean (*get_kill_user_processes) (Login1Manager *object); - - guint (*get_nauto_vts) (Login1Manager *object); - - gboolean (*get_preparing_for_shutdown) (Login1Manager *object); - - gboolean (*get_preparing_for_sleep) (Login1Manager *object); - - void (*prepare_for_shutdown) ( - Login1Manager *object, - gboolean arg_unnamed_arg0); - - void (*prepare_for_sleep) ( - Login1Manager *object, - gboolean arg_unnamed_arg0); - - void (*seat_new) ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - - void (*seat_removed) ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - - void (*session_new) ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - - void (*session_removed) ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - - void (*user_new) ( - Login1Manager *object, - guint arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - - void (*user_removed) ( - Login1Manager *object, - guint arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - -}; - -GType login1_manager_get_type (void) G_GNUC_CONST; - -GDBusInterfaceInfo *login1_manager_interface_info (void); -guint login1_manager_override_properties (GObjectClass *klass, guint property_id_begin); - - -/* D-Bus method call completion functions: */ -void login1_manager_complete_get_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg1); - -void login1_manager_complete_get_session_by_pid ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg1); - -void login1_manager_complete_get_user ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg1); - -void login1_manager_complete_get_user_by_pid ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg1); - -void login1_manager_complete_get_seat ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg1); - -void login1_manager_complete_list_sessions ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - GVariant *unnamed_arg0); - -void login1_manager_complete_list_users ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - GVariant *unnamed_arg0); - -void login1_manager_complete_list_seats ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - GVariant *unnamed_arg0); - -void login1_manager_complete_list_inhibitors ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - GVariant *unnamed_arg0); - -void login1_manager_complete_create_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg14, - const gchar *unnamed_arg15, - const gchar *unnamed_arg16, - GVariant *unnamed_arg17, - guint unnamed_arg18, - const gchar *unnamed_arg19, - guint unnamed_arg20, - gboolean unnamed_arg21); - -void login1_manager_complete_release_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_activate_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_activate_session_on_seat ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_lock_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_unlock_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_lock_sessions ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_unlock_sessions ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_kill_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_kill_user ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_terminate_session ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_terminate_user ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_terminate_seat ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_set_user_linger ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_attach_device ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_flush_devices ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_power_off ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_reboot ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_suspend ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_hibernate ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_hybrid_sleep ( - Login1Manager *object, - GDBusMethodInvocation *invocation); - -void login1_manager_complete_can_power_off ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg0); - -void login1_manager_complete_can_reboot ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg0); - -void login1_manager_complete_can_suspend ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg0); - -void login1_manager_complete_can_hibernate ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg0); - -void login1_manager_complete_can_hybrid_sleep ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - const gchar *unnamed_arg0); - -void login1_manager_complete_inhibit ( - Login1Manager *object, - GDBusMethodInvocation *invocation, - GVariant *unnamed_arg4); - - - -/* D-Bus signal emissions functions: */ -void login1_manager_emit_session_new ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - -void login1_manager_emit_session_removed ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - -void login1_manager_emit_user_new ( - Login1Manager *object, - guint arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - -void login1_manager_emit_user_removed ( - Login1Manager *object, - guint arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - -void login1_manager_emit_seat_new ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - -void login1_manager_emit_seat_removed ( - Login1Manager *object, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1); - -void login1_manager_emit_prepare_for_shutdown ( - Login1Manager *object, - gboolean arg_unnamed_arg0); - -void login1_manager_emit_prepare_for_sleep ( - Login1Manager *object, - gboolean arg_unnamed_arg0); - - - -/* D-Bus method calls: */ -void login1_manager_call_get_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_get_session_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg1, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_get_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - gchar **out_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_get_session_by_pid ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_get_session_by_pid_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg1, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_get_session_by_pid_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gchar **out_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_get_user ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_get_user_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg1, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_get_user_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gchar **out_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_get_user_by_pid ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_get_user_by_pid_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg1, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_get_user_by_pid_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gchar **out_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_get_seat ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_get_seat_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg1, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_get_seat_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - gchar **out_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_list_sessions ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_list_sessions_finish ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_list_sessions_sync ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_list_users ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_list_users_finish ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_list_users_sync ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_list_seats ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_list_seats_finish ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_list_seats_sync ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_list_inhibitors ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_list_inhibitors_finish ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_list_inhibitors_sync ( - Login1Manager *proxy, - GVariant **out_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_create_session ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - guint arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - const gchar *arg_unnamed_arg4, - const gchar *arg_unnamed_arg5, - const gchar *arg_unnamed_arg6, - guint arg_unnamed_arg7, - const gchar *arg_unnamed_arg8, - const gchar *arg_unnamed_arg9, - gboolean arg_unnamed_arg10, - const gchar *arg_unnamed_arg11, - const gchar *arg_unnamed_arg12, - GVariant *arg_unnamed_arg13, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_create_session_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg14, - gchar **out_unnamed_arg15, - gchar **out_unnamed_arg16, - GVariant **out_unnamed_arg17, - guint *out_unnamed_arg18, - gchar **out_unnamed_arg19, - guint *out_unnamed_arg20, - gboolean *out_unnamed_arg21, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_create_session_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - guint arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - const gchar *arg_unnamed_arg4, - const gchar *arg_unnamed_arg5, - const gchar *arg_unnamed_arg6, - guint arg_unnamed_arg7, - const gchar *arg_unnamed_arg8, - const gchar *arg_unnamed_arg9, - gboolean arg_unnamed_arg10, - const gchar *arg_unnamed_arg11, - const gchar *arg_unnamed_arg12, - GVariant *arg_unnamed_arg13, - gchar **out_unnamed_arg14, - gchar **out_unnamed_arg15, - gchar **out_unnamed_arg16, - GVariant **out_unnamed_arg17, - guint *out_unnamed_arg18, - gchar **out_unnamed_arg19, - guint *out_unnamed_arg20, - gboolean *out_unnamed_arg21, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_release_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_release_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_release_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_activate_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_activate_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_activate_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_activate_session_on_seat ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_activate_session_on_seat_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_activate_session_on_seat_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_lock_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_lock_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_lock_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_unlock_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_unlock_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_unlock_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_lock_sessions ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_lock_sessions_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_lock_sessions_sync ( - Login1Manager *proxy, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_unlock_sessions ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_unlock_sessions_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_unlock_sessions_sync ( - Login1Manager *proxy, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_kill_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gint arg_unnamed_arg2, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_kill_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_kill_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gint arg_unnamed_arg2, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_kill_user ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gint arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_kill_user_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_kill_user_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gint arg_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_terminate_session ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_terminate_session_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_terminate_session_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_terminate_user ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_terminate_user_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_terminate_user_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_terminate_seat ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_terminate_seat_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_terminate_seat_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_set_user_linger ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_set_user_linger_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_set_user_linger_sync ( - Login1Manager *proxy, - guint arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_attach_device ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_attach_device_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_attach_device_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_flush_devices ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_flush_devices_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_flush_devices_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_power_off ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_power_off_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_power_off_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_reboot ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_reboot_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_reboot_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_suspend ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_suspend_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_suspend_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_hibernate ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_hibernate_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_hibernate_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_hybrid_sleep ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_hybrid_sleep_finish ( - Login1Manager *proxy, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_hybrid_sleep_sync ( - Login1Manager *proxy, - gboolean arg_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_can_power_off ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_can_power_off_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_can_power_off_sync ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_can_reboot ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_can_reboot_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_can_reboot_sync ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_can_suspend ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_can_suspend_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_can_suspend_sync ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_can_hibernate ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_can_hibernate_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_can_hibernate_sync ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_can_hybrid_sleep ( - Login1Manager *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_can_hybrid_sleep_finish ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_can_hybrid_sleep_sync ( - Login1Manager *proxy, - gchar **out_unnamed_arg0, - GCancellable *cancellable, - GError **error); - -void login1_manager_call_inhibit ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean login1_manager_call_inhibit_finish ( - Login1Manager *proxy, - GVariant **out_unnamed_arg4, - GAsyncResult *res, - GError **error); - -gboolean login1_manager_call_inhibit_sync ( - Login1Manager *proxy, - const gchar *arg_unnamed_arg0, - const gchar *arg_unnamed_arg1, - const gchar *arg_unnamed_arg2, - const gchar *arg_unnamed_arg3, - GVariant **out_unnamed_arg4, - GCancellable *cancellable, - GError **error); - - - -/* D-Bus property accessors: */ -guint login1_manager_get_nauto_vts (Login1Manager *object); -void login1_manager_set_nauto_vts (Login1Manager *object, guint value); - -const gchar *const *login1_manager_get_kill_only_users (Login1Manager *object); -gchar **login1_manager_dup_kill_only_users (Login1Manager *object); -void login1_manager_set_kill_only_users (Login1Manager *object, const gchar *const *value); - -const gchar *const *login1_manager_get_kill_exclude_users (Login1Manager *object); -gchar **login1_manager_dup_kill_exclude_users (Login1Manager *object); -void login1_manager_set_kill_exclude_users (Login1Manager *object, const gchar *const *value); - -gboolean login1_manager_get_kill_user_processes (Login1Manager *object); -void login1_manager_set_kill_user_processes (Login1Manager *object, gboolean value); - -gboolean login1_manager_get_idle_hint (Login1Manager *object); -void login1_manager_set_idle_hint (Login1Manager *object, gboolean value); - -guint64 login1_manager_get_idle_since_hint (Login1Manager *object); -void login1_manager_set_idle_since_hint (Login1Manager *object, guint64 value); - -guint64 login1_manager_get_idle_since_hint_monotonic (Login1Manager *object); -void login1_manager_set_idle_since_hint_monotonic (Login1Manager *object, guint64 value); - -const gchar *login1_manager_get_block_inhibited (Login1Manager *object); -gchar *login1_manager_dup_block_inhibited (Login1Manager *object); -void login1_manager_set_block_inhibited (Login1Manager *object, const gchar *value); - -const gchar *login1_manager_get_delay_inhibited (Login1Manager *object); -gchar *login1_manager_dup_delay_inhibited (Login1Manager *object); -void login1_manager_set_delay_inhibited (Login1Manager *object, const gchar *value); - -guint64 login1_manager_get_inhibit_delay_max_usec (Login1Manager *object); -void login1_manager_set_inhibit_delay_max_usec (Login1Manager *object, guint64 value); - -const gchar *login1_manager_get_handle_power_key (Login1Manager *object); -gchar *login1_manager_dup_handle_power_key (Login1Manager *object); -void login1_manager_set_handle_power_key (Login1Manager *object, const gchar *value); - -const gchar *login1_manager_get_handle_suspend_key (Login1Manager *object); -gchar *login1_manager_dup_handle_suspend_key (Login1Manager *object); -void login1_manager_set_handle_suspend_key (Login1Manager *object, const gchar *value); - -const gchar *login1_manager_get_handle_hibernate_key (Login1Manager *object); -gchar *login1_manager_dup_handle_hibernate_key (Login1Manager *object); -void login1_manager_set_handle_hibernate_key (Login1Manager *object, const gchar *value); - -const gchar *login1_manager_get_handle_lid_switch (Login1Manager *object); -gchar *login1_manager_dup_handle_lid_switch (Login1Manager *object); -void login1_manager_set_handle_lid_switch (Login1Manager *object, const gchar *value); - -const gchar *login1_manager_get_idle_action (Login1Manager *object); -gchar *login1_manager_dup_idle_action (Login1Manager *object); -void login1_manager_set_idle_action (Login1Manager *object, const gchar *value); - -guint64 login1_manager_get_idle_action_usec (Login1Manager *object); -void login1_manager_set_idle_action_usec (Login1Manager *object, guint64 value); - -gboolean login1_manager_get_preparing_for_shutdown (Login1Manager *object); -void login1_manager_set_preparing_for_shutdown (Login1Manager *object, gboolean value); - -gboolean login1_manager_get_preparing_for_sleep (Login1Manager *object); -void login1_manager_set_preparing_for_sleep (Login1Manager *object, gboolean value); - - -/* ---- */ - -#define TYPE_LOGIN1_MANAGER_PROXY (login1_manager_proxy_get_type ()) -#define LOGIN1_MANAGER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_LOGIN1_MANAGER_PROXY, Login1ManagerProxy)) -#define LOGIN1_MANAGER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_LOGIN1_MANAGER_PROXY, Login1ManagerProxyClass)) -#define LOGIN1_MANAGER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_LOGIN1_MANAGER_PROXY, Login1ManagerProxyClass)) -#define IS_LOGIN1_MANAGER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_LOGIN1_MANAGER_PROXY)) -#define IS_LOGIN1_MANAGER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_LOGIN1_MANAGER_PROXY)) - -typedef struct _Login1ManagerProxy Login1ManagerProxy; -typedef struct _Login1ManagerProxyClass Login1ManagerProxyClass; -typedef struct _Login1ManagerProxyPrivate Login1ManagerProxyPrivate; - -struct _Login1ManagerProxy -{ - /*< private >*/ - GDBusProxy parent_instance; - Login1ManagerProxyPrivate *priv; -}; - -struct _Login1ManagerProxyClass -{ - GDBusProxyClass parent_class; -}; - -GType login1_manager_proxy_get_type (void) G_GNUC_CONST; - -void login1_manager_proxy_new ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -Login1Manager *login1_manager_proxy_new_finish ( - GAsyncResult *res, - GError **error); -Login1Manager *login1_manager_proxy_new_sync ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); - -void login1_manager_proxy_new_for_bus ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -Login1Manager *login1_manager_proxy_new_for_bus_finish ( - GAsyncResult *res, - GError **error); -Login1Manager *login1_manager_proxy_new_for_bus_sync ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); - - -/* ---- */ - -#define TYPE_LOGIN1_MANAGER_SKELETON (login1_manager_skeleton_get_type ()) -#define LOGIN1_MANAGER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_LOGIN1_MANAGER_SKELETON, Login1ManagerSkeleton)) -#define LOGIN1_MANAGER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_LOGIN1_MANAGER_SKELETON, Login1ManagerSkeletonClass)) -#define LOGIN1_MANAGER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_LOGIN1_MANAGER_SKELETON, Login1ManagerSkeletonClass)) -#define IS_LOGIN1_MANAGER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_LOGIN1_MANAGER_SKELETON)) -#define IS_LOGIN1_MANAGER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_LOGIN1_MANAGER_SKELETON)) - -typedef struct _Login1ManagerSkeleton Login1ManagerSkeleton; -typedef struct _Login1ManagerSkeletonClass Login1ManagerSkeletonClass; -typedef struct _Login1ManagerSkeletonPrivate Login1ManagerSkeletonPrivate; - -struct _Login1ManagerSkeleton -{ - /*< private >*/ - GDBusInterfaceSkeleton parent_instance; - Login1ManagerSkeletonPrivate *priv; -}; - -struct _Login1ManagerSkeletonClass -{ - GDBusInterfaceSkeletonClass parent_class; -}; - -GType login1_manager_skeleton_get_type (void) G_GNUC_CONST; - -Login1Manager *login1_manager_skeleton_new (void); - - -G_END_DECLS - -#endif /* __LOGIND_GEN_H__ */ diff --git a/src/interfaces/timedated/timedated-gen.c b/src/interfaces/timedated/timedated-gen.c deleted file mode 100644 index 2e100e7..0000000 --- a/src/interfaces/timedated/timedated-gen.c +++ /dev/null @@ -1,2559 +0,0 @@ -/* - * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. - * - * The license of this code is the same as for the source it was derived from. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "timedated-gen.h" - -#include -#ifdef G_OS_UNIX -# include -#endif - -typedef struct -{ - GDBusArgInfo parent_struct; - gboolean use_gvariant; -} _ExtendedGDBusArgInfo; - -typedef struct -{ - GDBusMethodInfo parent_struct; - const gchar *signal_name; - gboolean pass_fdlist; -} _ExtendedGDBusMethodInfo; - -typedef struct -{ - GDBusSignalInfo parent_struct; - const gchar *signal_name; -} _ExtendedGDBusSignalInfo; - -typedef struct -{ - GDBusPropertyInfo parent_struct; - const gchar *hyphen_name; - gboolean use_gvariant; -} _ExtendedGDBusPropertyInfo; - -typedef struct -{ - GDBusInterfaceInfo parent_struct; - const gchar *hyphen_name; -} _ExtendedGDBusInterfaceInfo; - -typedef struct -{ - const _ExtendedGDBusPropertyInfo *info; - guint prop_id; - GValue orig_value; /* the value before the change */ -} ChangedProperty; - -static void -_changed_property_free (ChangedProperty *data) -{ - g_value_unset (&data->orig_value); - g_free (data); -} - -static gboolean -_g_strv_equal0 (gchar **a, gchar **b) -{ - gboolean ret = FALSE; - guint n; - if (a == NULL && b == NULL) - { - ret = TRUE; - goto out; - } - if (a == NULL || b == NULL) - goto out; - if (g_strv_length (a) != g_strv_length (b)) - goto out; - for (n = 0; a[n] != NULL; n++) - if (g_strcmp0 (a[n], b[n]) != 0) - goto out; - ret = TRUE; -out: - return ret; -} - -static gboolean -_g_variant_equal0 (GVariant *a, GVariant *b) -{ - gboolean ret = FALSE; - if (a == NULL && b == NULL) - { - ret = TRUE; - goto out; - } - if (a == NULL || b == NULL) - goto out; - ret = g_variant_equal (a, b); -out: - return ret; -} - -G_GNUC_UNUSED static gboolean -_g_value_equal (const GValue *a, const GValue *b) -{ - gboolean ret = FALSE; - g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); - switch (G_VALUE_TYPE (a)) - { - case G_TYPE_BOOLEAN: - ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); - break; - case G_TYPE_UCHAR: - ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); - break; - case G_TYPE_INT: - ret = (g_value_get_int (a) == g_value_get_int (b)); - break; - case G_TYPE_UINT: - ret = (g_value_get_uint (a) == g_value_get_uint (b)); - break; - case G_TYPE_INT64: - ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); - break; - case G_TYPE_UINT64: - ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); - break; - case G_TYPE_DOUBLE: - { - /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ - gdouble da = g_value_get_double (a); - gdouble db = g_value_get_double (b); - ret = memcmp (&da, &db, sizeof (gdouble)) == 0; - } - break; - case G_TYPE_STRING: - ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); - break; - case G_TYPE_VARIANT: - ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); - break; - default: - if (G_VALUE_TYPE (a) == G_TYPE_STRV) - ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); - else - g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); - break; - } - return ret; -} - -/* ------------------------------------------------------------------------ - * Code for interface org.freedesktop.timedate1 - * ------------------------------------------------------------------------ - */ - -/** - * SECTION:Timedate1 - * @title: Timedate1 - * @short_description: Generated C code for the org.freedesktop.timedate1 D-Bus interface - * - * This section contains code for working with the org.freedesktop.timedate1 D-Bus interface in C. - */ - -/* ---- Introspection data for org.freedesktop.timedate1 ---- */ - -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_time_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "x", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_time_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_time_IN_ARG_unnamed_arg2 = -{ - { - -1, - (gchar *) "unnamed_arg2", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _timedate1_method_info_set_time_IN_ARG_pointers[] = -{ - &_timedate1_method_info_set_time_IN_ARG_unnamed_arg0, - &_timedate1_method_info_set_time_IN_ARG_unnamed_arg1, - &_timedate1_method_info_set_time_IN_ARG_unnamed_arg2, - NULL -}; - -static const _ExtendedGDBusMethodInfo _timedate1_method_info_set_time = -{ - { - -1, - (gchar *) "SetTime", - (GDBusArgInfo **) &_timedate1_method_info_set_time_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-time", - FALSE -}; - -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_timezone_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_timezone_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _timedate1_method_info_set_timezone_IN_ARG_pointers[] = -{ - &_timedate1_method_info_set_timezone_IN_ARG_unnamed_arg0, - &_timedate1_method_info_set_timezone_IN_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _timedate1_method_info_set_timezone = -{ - { - -1, - (gchar *) "SetTimezone", - (GDBusArgInfo **) &_timedate1_method_info_set_timezone_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-timezone", - FALSE -}; - -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_local_rtc_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_local_rtc_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_local_rtc_IN_ARG_unnamed_arg2 = -{ - { - -1, - (gchar *) "unnamed_arg2", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _timedate1_method_info_set_local_rtc_IN_ARG_pointers[] = -{ - &_timedate1_method_info_set_local_rtc_IN_ARG_unnamed_arg0, - &_timedate1_method_info_set_local_rtc_IN_ARG_unnamed_arg1, - &_timedate1_method_info_set_local_rtc_IN_ARG_unnamed_arg2, - NULL -}; - -static const _ExtendedGDBusMethodInfo _timedate1_method_info_set_local_rtc = -{ - { - -1, - (gchar *) "SetLocalRTC", - (GDBusArgInfo **) &_timedate1_method_info_set_local_rtc_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-local-rtc", - FALSE -}; - -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_ntp_IN_ARG_unnamed_arg0 = -{ - { - -1, - (gchar *) "unnamed_arg0", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo _timedate1_method_info_set_ntp_IN_ARG_unnamed_arg1 = -{ - { - -1, - (gchar *) "unnamed_arg1", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _timedate1_method_info_set_ntp_IN_ARG_pointers[] = -{ - &_timedate1_method_info_set_ntp_IN_ARG_unnamed_arg0, - &_timedate1_method_info_set_ntp_IN_ARG_unnamed_arg1, - NULL -}; - -static const _ExtendedGDBusMethodInfo _timedate1_method_info_set_ntp = -{ - { - -1, - (gchar *) "SetNTP", - (GDBusArgInfo **) &_timedate1_method_info_set_ntp_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-ntp", - FALSE -}; - -static const _ExtendedGDBusMethodInfo * const _timedate1_method_info_pointers[] = -{ - &_timedate1_method_info_set_time, - &_timedate1_method_info_set_timezone, - &_timedate1_method_info_set_local_rtc, - &_timedate1_method_info_set_ntp, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _timedate1_property_info_timezone = -{ - { - -1, - (gchar *) "Timezone", - (gchar *) "s", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "timezone", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _timedate1_property_info_local_rtc = -{ - { - -1, - (gchar *) "LocalRTC", - (gchar *) "b", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "local-rtc", - FALSE -}; - -static const GDBusAnnotationInfo _timedate1_property_can_ntp_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "false", - NULL -}; - -static const GDBusAnnotationInfo * const _timedate1_property_can_ntp_annotation_info_pointers[] = -{ - &_timedate1_property_can_ntp_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _timedate1_property_info_can_ntp = -{ - { - -1, - (gchar *) "CanNTP", - (gchar *) "b", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_timedate1_property_can_ntp_annotation_info_pointers - }, - "can-ntp", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _timedate1_property_info_ntp = -{ - { - -1, - (gchar *) "NTP", - (gchar *) "b", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "ntp", - FALSE -}; - -static const GDBusAnnotationInfo _timedate1_property_ntpsynchronized_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "false", - NULL -}; - -static const GDBusAnnotationInfo * const _timedate1_property_ntpsynchronized_annotation_info_pointers[] = -{ - &_timedate1_property_ntpsynchronized_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _timedate1_property_info_ntpsynchronized = -{ - { - -1, - (gchar *) "NTPSynchronized", - (gchar *) "b", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_timedate1_property_ntpsynchronized_annotation_info_pointers - }, - "ntpsynchronized", - FALSE -}; - -static const GDBusAnnotationInfo _timedate1_property_time_usec_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "false", - NULL -}; - -static const GDBusAnnotationInfo * const _timedate1_property_time_usec_annotation_info_pointers[] = -{ - &_timedate1_property_time_usec_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _timedate1_property_info_time_usec = -{ - { - -1, - (gchar *) "TimeUSec", - (gchar *) "t", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_timedate1_property_time_usec_annotation_info_pointers - }, - "time-usec", - FALSE -}; - -static const GDBusAnnotationInfo _timedate1_property_rtctime_usec_annotation_info_0 = -{ - -1, - (gchar *) "org.freedesktop.DBus.Property.EmitsChangedSignal", - (gchar *) "false", - NULL -}; - -static const GDBusAnnotationInfo * const _timedate1_property_rtctime_usec_annotation_info_pointers[] = -{ - &_timedate1_property_rtctime_usec_annotation_info_0, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _timedate1_property_info_rtctime_usec = -{ - { - -1, - (gchar *) "RTCTimeUSec", - (gchar *) "t", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - (GDBusAnnotationInfo **) &_timedate1_property_rtctime_usec_annotation_info_pointers - }, - "rtctime-usec", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo * const _timedate1_property_info_pointers[] = -{ - &_timedate1_property_info_timezone, - &_timedate1_property_info_local_rtc, - &_timedate1_property_info_can_ntp, - &_timedate1_property_info_ntp, - &_timedate1_property_info_ntpsynchronized, - &_timedate1_property_info_time_usec, - &_timedate1_property_info_rtctime_usec, - NULL -}; - -static const _ExtendedGDBusInterfaceInfo _timedate1_interface_info = -{ - { - -1, - (gchar *) "org.freedesktop.timedate1", - (GDBusMethodInfo **) &_timedate1_method_info_pointers, - NULL, - (GDBusPropertyInfo **) &_timedate1_property_info_pointers, - NULL - }, - "timedate1", -}; - - -/** - * timedate1_interface_info: - * - * Gets a machine-readable description of the org.freedesktop.timedate1 D-Bus interface. - * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. - */ -GDBusInterfaceInfo * -timedate1_interface_info (void) -{ - return (GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct; -} - -/** - * timedate1_override_properties: - * @klass: The class structure for a #GObject-derived class. - * @property_id_begin: The property id to assign to the first overridden property. - * - * Overrides all #GObject properties in the #Timedate1 interface for a concrete class. - * The properties are overridden in the order they are defined. - * - * Returns: The last property id. - */ -guint -timedate1_override_properties (GObjectClass *klass, guint property_id_begin) -{ - g_object_class_override_property (klass, property_id_begin++, "timezone"); - g_object_class_override_property (klass, property_id_begin++, "local-rtc"); - g_object_class_override_property (klass, property_id_begin++, "can-ntp"); - g_object_class_override_property (klass, property_id_begin++, "ntp"); - g_object_class_override_property (klass, property_id_begin++, "ntpsynchronized"); - g_object_class_override_property (klass, property_id_begin++, "time-usec"); - g_object_class_override_property (klass, property_id_begin++, "rtctime-usec"); - return property_id_begin - 1; -} - - - -/** - * Timedate1: - * - * Abstract interface type for the D-Bus interface org.freedesktop.timedate1. - */ - -/** - * Timedate1Iface: - * @parent_iface: The parent interface. - * @handle_set_local_rtc: Handler for the #Timedate1::handle-set-local-rtc signal. - * @handle_set_ntp: Handler for the #Timedate1::handle-set-ntp signal. - * @handle_set_time: Handler for the #Timedate1::handle-set-time signal. - * @handle_set_timezone: Handler for the #Timedate1::handle-set-timezone signal. - * @get_can_ntp: Getter for the #Timedate1:can-ntp property. - * @get_local_rtc: Getter for the #Timedate1:local-rtc property. - * @get_ntp: Getter for the #Timedate1:ntp property. - * @get_ntpsynchronized: Getter for the #Timedate1:ntpsynchronized property. - * @get_rtctime_usec: Getter for the #Timedate1:rtctime-usec property. - * @get_time_usec: Getter for the #Timedate1:time-usec property. - * @get_timezone: Getter for the #Timedate1:timezone property. - * - * Virtual table for the D-Bus interface org.freedesktop.timedate1. - */ - -typedef Timedate1Iface Timedate1Interface; -G_DEFINE_INTERFACE (Timedate1, timedate1, G_TYPE_OBJECT); - -static void -timedate1_default_init (Timedate1Iface *iface) -{ - /* GObject signals for incoming D-Bus method calls: */ - /** - * Timedate1::handle-set-time: - * @object: A #Timedate1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * @arg_unnamed_arg2: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetTime() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call timedate1_complete_set_time() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-time", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Timedate1Iface, handle_set_time), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 4, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT64, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN); - - /** - * Timedate1::handle-set-timezone: - * @object: A #Timedate1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetTimezone() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call timedate1_complete_set_timezone() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-timezone", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Timedate1Iface, handle_set_timezone), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_BOOLEAN); - - /** - * Timedate1::handle-set-local-rtc: - * @object: A #Timedate1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * @arg_unnamed_arg2: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetLocalRTC() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call timedate1_complete_set_local_rtc() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-local-rtc", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Timedate1Iface, handle_set_local_rtc), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 4, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN); - - /** - * Timedate1::handle-set-ntp: - * @object: A #Timedate1. - * @invocation: A #GDBusMethodInvocation. - * @arg_unnamed_arg0: Argument passed by remote caller. - * @arg_unnamed_arg1: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetNTP() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call timedate1_complete_set_ntp() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-ntp", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (Timedate1Iface, handle_set_ntp), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 3, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN); - - /* GObject properties for D-Bus properties: */ - /** - * Timedate1:timezone: - * - * Represents the D-Bus property "Timezone". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_string ("timezone", "Timezone", "Timezone", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Timedate1:local-rtc: - * - * Represents the D-Bus property "LocalRTC". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boolean ("local-rtc", "LocalRTC", "LocalRTC", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Timedate1:can-ntp: - * - * Represents the D-Bus property "CanNTP". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boolean ("can-ntp", "CanNTP", "CanNTP", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Timedate1:ntp: - * - * Represents the D-Bus property "NTP". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boolean ("ntp", "NTP", "NTP", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Timedate1:ntpsynchronized: - * - * Represents the D-Bus property "NTPSynchronized". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boolean ("ntpsynchronized", "NTPSynchronized", "NTPSynchronized", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Timedate1:time-usec: - * - * Represents the D-Bus property "TimeUSec". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_uint64 ("time-usec", "TimeUSec", "TimeUSec", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * Timedate1:rtctime-usec: - * - * Represents the D-Bus property "RTCTimeUSec". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_uint64 ("rtctime-usec", "RTCTimeUSec", "RTCTimeUSec", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); -} - -/** - * timedate1_get_timezone: (skip) - * @object: A #Timedate1. - * - * Gets the value of the "Timezone" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use timedate1_dup_timezone() if on another thread. - * - * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. - */ -const gchar * -timedate1_get_timezone (Timedate1 *object) -{ - return TIMEDATE1_GET_IFACE (object)->get_timezone (object); -} - -/** - * timedate1_dup_timezone: (skip) - * @object: A #Timedate1. - * - * Gets a copy of the "Timezone" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). - */ -gchar * -timedate1_dup_timezone (Timedate1 *object) -{ - gchar *value; - g_object_get (G_OBJECT (object), "timezone", &value, NULL); - return value; -} - -/** - * timedate1_set_timezone: (skip) - * @object: A #Timedate1. - * @value: The value to set. - * - * Sets the "Timezone" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -timedate1_set_timezone (Timedate1 *object, const gchar *value) -{ - g_object_set (G_OBJECT (object), "timezone", value, NULL); -} - -/** - * timedate1_get_local_rtc: (skip) - * @object: A #Timedate1. - * - * Gets the value of the "LocalRTC" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -gboolean -timedate1_get_local_rtc (Timedate1 *object) -{ - return TIMEDATE1_GET_IFACE (object)->get_local_rtc (object); -} - -/** - * timedate1_set_local_rtc: (skip) - * @object: A #Timedate1. - * @value: The value to set. - * - * Sets the "LocalRTC" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -timedate1_set_local_rtc (Timedate1 *object, gboolean value) -{ - g_object_set (G_OBJECT (object), "local-rtc", value, NULL); -} - -/** - * timedate1_get_can_ntp: (skip) - * @object: A #Timedate1. - * - * Gets the value of the "CanNTP" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -gboolean -timedate1_get_can_ntp (Timedate1 *object) -{ - return TIMEDATE1_GET_IFACE (object)->get_can_ntp (object); -} - -/** - * timedate1_set_can_ntp: (skip) - * @object: A #Timedate1. - * @value: The value to set. - * - * Sets the "CanNTP" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -timedate1_set_can_ntp (Timedate1 *object, gboolean value) -{ - g_object_set (G_OBJECT (object), "can-ntp", value, NULL); -} - -/** - * timedate1_get_ntp: (skip) - * @object: A #Timedate1. - * - * Gets the value of the "NTP" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -gboolean -timedate1_get_ntp (Timedate1 *object) -{ - return TIMEDATE1_GET_IFACE (object)->get_ntp (object); -} - -/** - * timedate1_set_ntp: (skip) - * @object: A #Timedate1. - * @value: The value to set. - * - * Sets the "NTP" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -timedate1_set_ntp (Timedate1 *object, gboolean value) -{ - g_object_set (G_OBJECT (object), "ntp", value, NULL); -} - -/** - * timedate1_get_ntpsynchronized: (skip) - * @object: A #Timedate1. - * - * Gets the value of the "NTPSynchronized" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -gboolean -timedate1_get_ntpsynchronized (Timedate1 *object) -{ - return TIMEDATE1_GET_IFACE (object)->get_ntpsynchronized (object); -} - -/** - * timedate1_set_ntpsynchronized: (skip) - * @object: A #Timedate1. - * @value: The value to set. - * - * Sets the "NTPSynchronized" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -timedate1_set_ntpsynchronized (Timedate1 *object, gboolean value) -{ - g_object_set (G_OBJECT (object), "ntpsynchronized", value, NULL); -} - -/** - * timedate1_get_time_usec: (skip) - * @object: A #Timedate1. - * - * Gets the value of the "TimeUSec" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -guint64 -timedate1_get_time_usec (Timedate1 *object) -{ - return TIMEDATE1_GET_IFACE (object)->get_time_usec (object); -} - -/** - * timedate1_set_time_usec: (skip) - * @object: A #Timedate1. - * @value: The value to set. - * - * Sets the "TimeUSec" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -timedate1_set_time_usec (Timedate1 *object, guint64 value) -{ - g_object_set (G_OBJECT (object), "time-usec", value, NULL); -} - -/** - * timedate1_get_rtctime_usec: (skip) - * @object: A #Timedate1. - * - * Gets the value of the "RTCTimeUSec" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -guint64 -timedate1_get_rtctime_usec (Timedate1 *object) -{ - return TIMEDATE1_GET_IFACE (object)->get_rtctime_usec (object); -} - -/** - * timedate1_set_rtctime_usec: (skip) - * @object: A #Timedate1. - * @value: The value to set. - * - * Sets the "RTCTimeUSec" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -timedate1_set_rtctime_usec (Timedate1 *object, guint64 value) -{ - g_object_set (G_OBJECT (object), "rtctime-usec", value, NULL); -} - -/** - * timedate1_call_set_time: - * @proxy: A #Timedate1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetTime() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call timedate1_call_set_time_finish() to get the result of the operation. - * - * See timedate1_call_set_time_sync() for the synchronous, blocking version of this method. - */ -void -timedate1_call_set_time ( - Timedate1 *proxy, - gint64 arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetTime", - g_variant_new ("(xbb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * timedate1_call_set_time_finish: - * @proxy: A #Timedate1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_call_set_time(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with timedate1_call_set_time(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -timedate1_call_set_time_finish ( - Timedate1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * timedate1_call_set_time_sync: - * @proxy: A #Timedate1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetTime() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See timedate1_call_set_time() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -timedate1_call_set_time_sync ( - Timedate1 *proxy, - gint64 arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetTime", - g_variant_new ("(xbb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * timedate1_call_set_timezone: - * @proxy: A #Timedate1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetTimezone() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call timedate1_call_set_timezone_finish() to get the result of the operation. - * - * See timedate1_call_set_timezone_sync() for the synchronous, blocking version of this method. - */ -void -timedate1_call_set_timezone ( - Timedate1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetTimezone", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * timedate1_call_set_timezone_finish: - * @proxy: A #Timedate1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_call_set_timezone(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with timedate1_call_set_timezone(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -timedate1_call_set_timezone_finish ( - Timedate1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * timedate1_call_set_timezone_sync: - * @proxy: A #Timedate1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetTimezone() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See timedate1_call_set_timezone() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -timedate1_call_set_timezone_sync ( - Timedate1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetTimezone", - g_variant_new ("(sb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * timedate1_call_set_local_rtc: - * @proxy: A #Timedate1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetLocalRTC() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call timedate1_call_set_local_rtc_finish() to get the result of the operation. - * - * See timedate1_call_set_local_rtc_sync() for the synchronous, blocking version of this method. - */ -void -timedate1_call_set_local_rtc ( - Timedate1 *proxy, - gboolean arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetLocalRTC", - g_variant_new ("(bbb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * timedate1_call_set_local_rtc_finish: - * @proxy: A #Timedate1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_call_set_local_rtc(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with timedate1_call_set_local_rtc(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -timedate1_call_set_local_rtc_finish ( - Timedate1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * timedate1_call_set_local_rtc_sync: - * @proxy: A #Timedate1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @arg_unnamed_arg2: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetLocalRTC() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See timedate1_call_set_local_rtc() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -timedate1_call_set_local_rtc_sync ( - Timedate1 *proxy, - gboolean arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetLocalRTC", - g_variant_new ("(bbb)", - arg_unnamed_arg0, - arg_unnamed_arg1, - arg_unnamed_arg2), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * timedate1_call_set_ntp: - * @proxy: A #Timedate1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetNTP() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call timedate1_call_set_ntp_finish() to get the result of the operation. - * - * See timedate1_call_set_ntp_sync() for the synchronous, blocking version of this method. - */ -void -timedate1_call_set_ntp ( - Timedate1 *proxy, - gboolean arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetNTP", - g_variant_new ("(bb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * timedate1_call_set_ntp_finish: - * @proxy: A #Timedate1Proxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_call_set_ntp(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with timedate1_call_set_ntp(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -timedate1_call_set_ntp_finish ( - Timedate1 *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * timedate1_call_set_ntp_sync: - * @proxy: A #Timedate1Proxy. - * @arg_unnamed_arg0: Argument to pass with the method invocation. - * @arg_unnamed_arg1: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetNTP() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See timedate1_call_set_ntp() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -timedate1_call_set_ntp_sync ( - Timedate1 *proxy, - gboolean arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetNTP", - g_variant_new ("(bb)", - arg_unnamed_arg0, - arg_unnamed_arg1), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * timedate1_complete_set_time: - * @object: A #Timedate1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetTime() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -timedate1_complete_set_time ( - Timedate1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * timedate1_complete_set_timezone: - * @object: A #Timedate1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetTimezone() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -timedate1_complete_set_timezone ( - Timedate1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * timedate1_complete_set_local_rtc: - * @object: A #Timedate1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetLocalRTC() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -timedate1_complete_set_local_rtc ( - Timedate1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * timedate1_complete_set_ntp: - * @object: A #Timedate1. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetNTP() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -timedate1_complete_set_ntp ( - Timedate1 *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/* ------------------------------------------------------------------------ */ - -/** - * Timedate1Proxy: - * - * The #Timedate1Proxy structure contains only private data and should only be accessed using the provided API. - */ - -/** - * Timedate1ProxyClass: - * @parent_class: The parent class. - * - * Class structure for #Timedate1Proxy. - */ - -struct _Timedate1ProxyPrivate -{ - GData *qdata; -}; - -static void timedate1_proxy_iface_init (Timedate1Iface *iface); - -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 -G_DEFINE_TYPE_WITH_CODE (Timedate1Proxy, timedate1_proxy, G_TYPE_DBUS_PROXY, - G_ADD_PRIVATE (Timedate1Proxy) - G_IMPLEMENT_INTERFACE (TYPE_TIMEDATE1, timedate1_proxy_iface_init)); - -#else -G_DEFINE_TYPE_WITH_CODE (Timedate1Proxy, timedate1_proxy, G_TYPE_DBUS_PROXY, - G_IMPLEMENT_INTERFACE (TYPE_TIMEDATE1, timedate1_proxy_iface_init)); - -#endif -static void -timedate1_proxy_finalize (GObject *object) -{ - Timedate1Proxy *proxy = TIMEDATE1_PROXY (object); - g_datalist_clear (&proxy->priv->qdata); - G_OBJECT_CLASS (timedate1_proxy_parent_class)->finalize (object); -} - -static void -timedate1_proxy_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - const _ExtendedGDBusPropertyInfo *info; - GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 7); - info = _timedate1_property_info_pointers[prop_id - 1]; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); - if (info->use_gvariant) - { - g_value_set_variant (value, variant); - } - else - { - if (variant != NULL) - g_dbus_gvariant_to_gvalue (variant, value); - } - if (variant != NULL) - g_variant_unref (variant); -} - -static void -timedate1_proxy_set_property_cb (GDBusProxy *proxy, - GAsyncResult *res, - gpointer user_data) -{ - const _ExtendedGDBusPropertyInfo *info = user_data; - GError *error; - GVariant *_ret; - error = NULL; - _ret = g_dbus_proxy_call_finish (proxy, res, &error); - if (!_ret) - { - g_warning ("Error setting property '%s' on interface org.freedesktop.timedate1: %s (%s, %d)", - info->parent_struct.name, - error->message, g_quark_to_string (error->domain), error->code); - g_error_free (error); - } - else - { - g_variant_unref (_ret); - } -} - -static void -timedate1_proxy_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - const _ExtendedGDBusPropertyInfo *info; - GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 7); - info = _timedate1_property_info_pointers[prop_id - 1]; - variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); - g_dbus_proxy_call (G_DBUS_PROXY (object), - "org.freedesktop.DBus.Properties.Set", - g_variant_new ("(ssv)", "org.freedesktop.timedate1", info->parent_struct.name, variant), - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, (GAsyncReadyCallback) timedate1_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); - g_variant_unref (variant); -} - -static void -timedate1_proxy_g_signal (GDBusProxy *proxy, - const gchar *sender_name G_GNUC_UNUSED, - const gchar *signal_name, - GVariant *parameters) -{ - _ExtendedGDBusSignalInfo *info; - GVariantIter iter; - GVariant *child; - GValue *paramv; - guint num_params; - guint n; - guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct, signal_name); - if (info == NULL) - return; - num_params = g_variant_n_children (parameters); - paramv = g_new0 (GValue, num_params + 1); - g_value_init (¶mv[0], TYPE_TIMEDATE1); - g_value_set_object (¶mv[0], proxy); - g_variant_iter_init (&iter, parameters); - n = 1; - while ((child = g_variant_iter_next_value (&iter)) != NULL) - { - _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; - if (arg_info->use_gvariant) - { - g_value_init (¶mv[n], G_TYPE_VARIANT); - g_value_set_variant (¶mv[n], child); - n++; - } - else - g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); - g_variant_unref (child); - } - signal_id = g_signal_lookup (info->signal_name, TYPE_TIMEDATE1); - g_signal_emitv (paramv, signal_id, 0, NULL); - for (n = 0; n < num_params + 1; n++) - g_value_unset (¶mv[n]); - g_free (paramv); -} - -static void -timedate1_proxy_g_properties_changed (GDBusProxy *_proxy, - GVariant *changed_properties, - const gchar *const *invalidated_properties) -{ - Timedate1Proxy *proxy = TIMEDATE1_PROXY (_proxy); - guint n; - const gchar *key; - GVariantIter *iter; - _ExtendedGDBusPropertyInfo *info; - g_variant_get (changed_properties, "a{sv}", &iter); - while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) - { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct, key); - g_datalist_remove_data (&proxy->priv->qdata, key); - if (info != NULL) - g_object_notify (G_OBJECT (proxy), info->hyphen_name); - } - g_variant_iter_free (iter); - for (n = 0; invalidated_properties[n] != NULL; n++) - { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct, invalidated_properties[n]); - g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); - if (info != NULL) - g_object_notify (G_OBJECT (proxy), info->hyphen_name); - } -} - -static const gchar * -timedate1_proxy_get_timezone (Timedate1 *object) -{ - Timedate1Proxy *proxy = TIMEDATE1_PROXY (object); - GVariant *variant; - const gchar *value = NULL; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Timezone"); - if (variant != NULL) - { - value = g_variant_get_string (variant, NULL); - g_variant_unref (variant); - } - return value; -} - -static gboolean -timedate1_proxy_get_local_rtc (Timedate1 *object) -{ - Timedate1Proxy *proxy = TIMEDATE1_PROXY (object); - GVariant *variant; - gboolean value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LocalRTC"); - if (variant != NULL) - { - value = g_variant_get_boolean (variant); - g_variant_unref (variant); - } - return value; -} - -static gboolean -timedate1_proxy_get_can_ntp (Timedate1 *object) -{ - Timedate1Proxy *proxy = TIMEDATE1_PROXY (object); - GVariant *variant; - gboolean value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "CanNTP"); - if (variant != NULL) - { - value = g_variant_get_boolean (variant); - g_variant_unref (variant); - } - return value; -} - -static gboolean -timedate1_proxy_get_ntp (Timedate1 *object) -{ - Timedate1Proxy *proxy = TIMEDATE1_PROXY (object); - GVariant *variant; - gboolean value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "NTP"); - if (variant != NULL) - { - value = g_variant_get_boolean (variant); - g_variant_unref (variant); - } - return value; -} - -static gboolean -timedate1_proxy_get_ntpsynchronized (Timedate1 *object) -{ - Timedate1Proxy *proxy = TIMEDATE1_PROXY (object); - GVariant *variant; - gboolean value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "NTPSynchronized"); - if (variant != NULL) - { - value = g_variant_get_boolean (variant); - g_variant_unref (variant); - } - return value; -} - -static guint64 -timedate1_proxy_get_time_usec (Timedate1 *object) -{ - Timedate1Proxy *proxy = TIMEDATE1_PROXY (object); - GVariant *variant; - guint64 value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "TimeUSec"); - if (variant != NULL) - { - value = g_variant_get_uint64 (variant); - g_variant_unref (variant); - } - return value; -} - -static guint64 -timedate1_proxy_get_rtctime_usec (Timedate1 *object) -{ - Timedate1Proxy *proxy = TIMEDATE1_PROXY (object); - GVariant *variant; - guint64 value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "RTCTimeUSec"); - if (variant != NULL) - { - value = g_variant_get_uint64 (variant); - g_variant_unref (variant); - } - return value; -} - -static void -timedate1_proxy_init (Timedate1Proxy *proxy) -{ -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 - proxy->priv = timedate1_proxy_get_instance_private (proxy); -#else - proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_TIMEDATE1_PROXY, Timedate1ProxyPrivate); -#endif - - g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), timedate1_interface_info ()); -} - -static void -timedate1_proxy_class_init (Timedate1ProxyClass *klass) -{ - GObjectClass *gobject_class; - GDBusProxyClass *proxy_class; - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = timedate1_proxy_finalize; - gobject_class->get_property = timedate1_proxy_get_property; - gobject_class->set_property = timedate1_proxy_set_property; - - proxy_class = G_DBUS_PROXY_CLASS (klass); - proxy_class->g_signal = timedate1_proxy_g_signal; - proxy_class->g_properties_changed = timedate1_proxy_g_properties_changed; - - timedate1_override_properties (gobject_class, 1); - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 - g_type_class_add_private (klass, sizeof (Timedate1ProxyPrivate)); -#endif -} - -static void -timedate1_proxy_iface_init (Timedate1Iface *iface) -{ - iface->get_timezone = timedate1_proxy_get_timezone; - iface->get_local_rtc = timedate1_proxy_get_local_rtc; - iface->get_can_ntp = timedate1_proxy_get_can_ntp; - iface->get_ntp = timedate1_proxy_get_ntp; - iface->get_ntpsynchronized = timedate1_proxy_get_ntpsynchronized; - iface->get_time_usec = timedate1_proxy_get_time_usec; - iface->get_rtctime_usec = timedate1_proxy_get_rtctime_usec; -} - -/** - * timedate1_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Asynchronously creates a proxy for the D-Bus interface org.freedesktop.timedate1. See g_dbus_proxy_new() for more details. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call timedate1_proxy_new_finish() to get the result of the operation. - * - * See timedate1_proxy_new_sync() for the synchronous, blocking version of this constructor. - */ -void -timedate1_proxy_new ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_async_initable_new_async (TYPE_TIMEDATE1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.timedate1", NULL); -} - -/** - * timedate1_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_proxy_new(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with timedate1_proxy_new(). - * - * Returns: (transfer full) (type Timedate1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Timedate1 * -timedate1_proxy_new_finish ( - GAsyncResult *res, - GError **error) -{ - GObject *ret; - GObject *source_object; - source_object = g_async_result_get_source_object (res); - ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); - g_object_unref (source_object); - if (ret != NULL) - return TIMEDATE1 (ret); - else - return NULL; -} - -/** - * timedate1_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Synchronously creates a proxy for the D-Bus interface org.freedesktop.timedate1. See g_dbus_proxy_new_sync() for more details. - * - * The calling thread is blocked until a reply is received. - * - * See timedate1_proxy_new() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type Timedate1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Timedate1 * -timedate1_proxy_new_sync ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error) -{ - GInitable *ret; - ret = g_initable_new (TYPE_TIMEDATE1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.timedate1", NULL); - if (ret != NULL) - return TIMEDATE1 (ret); - else - return NULL; -} - - -/** - * timedate1_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Like timedate1_proxy_new() but takes a #GBusType instead of a #GDBusConnection. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call timedate1_proxy_new_for_bus_finish() to get the result of the operation. - * - * See timedate1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. - */ -void -timedate1_proxy_new_for_bus ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_async_initable_new_async (TYPE_TIMEDATE1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.timedate1", NULL); -} - -/** - * timedate1_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to timedate1_proxy_new_for_bus(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with timedate1_proxy_new_for_bus(). - * - * Returns: (transfer full) (type Timedate1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Timedate1 * -timedate1_proxy_new_for_bus_finish ( - GAsyncResult *res, - GError **error) -{ - GObject *ret; - GObject *source_object; - source_object = g_async_result_get_source_object (res); - ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); - g_object_unref (source_object); - if (ret != NULL) - return TIMEDATE1 (ret); - else - return NULL; -} - -/** - * timedate1_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Like timedate1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. - * - * The calling thread is blocked until a reply is received. - * - * See timedate1_proxy_new_for_bus() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type Timedate1Proxy): The constructed proxy object or %NULL if @error is set. - */ -Timedate1 * -timedate1_proxy_new_for_bus_sync ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error) -{ - GInitable *ret; - ret = g_initable_new (TYPE_TIMEDATE1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.timedate1", NULL); - if (ret != NULL) - return TIMEDATE1 (ret); - else - return NULL; -} - - -/* ------------------------------------------------------------------------ */ - -/** - * Timedate1Skeleton: - * - * The #Timedate1Skeleton structure contains only private data and should only be accessed using the provided API. - */ - -/** - * Timedate1SkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #Timedate1Skeleton. - */ - -struct _Timedate1SkeletonPrivate -{ - GValue *properties; - GList *changed_properties; - GSource *changed_properties_idle_source; - GMainContext *context; - GMutex lock; -}; - -static void -_timedate1_skeleton_handle_method_call ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name, - const gchar *method_name, - GVariant *parameters, - GDBusMethodInvocation *invocation, - gpointer user_data) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (user_data); - _ExtendedGDBusMethodInfo *info; - GVariantIter iter; - GVariant *child; - GValue *paramv; - guint num_params; - guint num_extra; - guint n; - guint signal_id; - GValue return_value = G_VALUE_INIT; - info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); - g_assert (info != NULL); - num_params = g_variant_n_children (parameters); - num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); - n = 0; - g_value_init (¶mv[n], TYPE_TIMEDATE1); - g_value_set_object (¶mv[n++], skeleton); - g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); - g_value_set_object (¶mv[n++], invocation); - if (info->pass_fdlist) - { -#ifdef G_OS_UNIX - g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); - g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); -#else - g_assert_not_reached (); -#endif - } - g_variant_iter_init (&iter, parameters); - while ((child = g_variant_iter_next_value (&iter)) != NULL) - { - _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; - if (arg_info->use_gvariant) - { - g_value_init (¶mv[n], G_TYPE_VARIANT); - g_value_set_variant (¶mv[n], child); - n++; - } - else - g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); - g_variant_unref (child); - } - signal_id = g_signal_lookup (info->signal_name, TYPE_TIMEDATE1); - g_value_init (&return_value, G_TYPE_BOOLEAN); - g_signal_emitv (paramv, signal_id, 0, &return_value); - if (!g_value_get_boolean (&return_value)) - g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); - g_value_unset (&return_value); - for (n = 0; n < num_params + num_extra; n++) - g_value_unset (¶mv[n]); - g_free (paramv); -} - -static GVariant * -_timedate1_skeleton_handle_get_property ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name G_GNUC_UNUSED, - const gchar *property_name, - GError **error, - gpointer user_data) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (user_data); - GValue value = G_VALUE_INIT; - GParamSpec *pspec; - _ExtendedGDBusPropertyInfo *info; - GVariant *ret; - ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct, property_name); - g_assert (info != NULL); - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); - if (pspec == NULL) - { - g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); - } - else - { - g_value_init (&value, pspec->value_type); - g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); - ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); - g_value_unset (&value); - } - return ret; -} - -static gboolean -_timedate1_skeleton_handle_set_property ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name G_GNUC_UNUSED, - const gchar *property_name, - GVariant *variant, - GError **error, - gpointer user_data) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (user_data); - GValue value = G_VALUE_INIT; - GParamSpec *pspec; - _ExtendedGDBusPropertyInfo *info; - gboolean ret; - ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_timedate1_interface_info.parent_struct, property_name); - g_assert (info != NULL); - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); - if (pspec == NULL) - { - g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); - } - else - { - if (info->use_gvariant) - g_value_set_variant (&value, variant); - else - g_dbus_gvariant_to_gvalue (variant, &value); - g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); - g_value_unset (&value); - ret = TRUE; - } - return ret; -} - -static const GDBusInterfaceVTable _timedate1_skeleton_vtable = -{ - _timedate1_skeleton_handle_method_call, - _timedate1_skeleton_handle_get_property, - _timedate1_skeleton_handle_set_property, - {NULL} -}; - -static GDBusInterfaceInfo * -timedate1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) -{ - return timedate1_interface_info (); -} - -static GDBusInterfaceVTable * -timedate1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) -{ - return (GDBusInterfaceVTable *) &_timedate1_skeleton_vtable; -} - -static GVariant * -timedate1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (_skeleton); - - GVariantBuilder builder; - guint n; - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - if (_timedate1_interface_info.parent_struct.properties == NULL) - goto out; - for (n = 0; _timedate1_interface_info.parent_struct.properties[n] != NULL; n++) - { - GDBusPropertyInfo *info = _timedate1_interface_info.parent_struct.properties[n]; - if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) - { - GVariant *value; - value = _timedate1_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.timedate1", info->name, NULL, skeleton); - if (value != NULL) - { - g_variant_take_ref (value); - g_variant_builder_add (&builder, "{sv}", info->name, value); - g_variant_unref (value); - } - } - } -out: - return g_variant_builder_end (&builder); -} - -static gboolean _timedate1_emit_changed (gpointer user_data); - -static void -timedate1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (_skeleton); - gboolean emit_changed = FALSE; - - g_mutex_lock (&skeleton->priv->lock); - if (skeleton->priv->changed_properties_idle_source != NULL) - { - g_source_destroy (skeleton->priv->changed_properties_idle_source); - skeleton->priv->changed_properties_idle_source = NULL; - emit_changed = TRUE; - } - g_mutex_unlock (&skeleton->priv->lock); - - if (emit_changed) - _timedate1_emit_changed (skeleton); -} - -static void timedate1_skeleton_iface_init (Timedate1Iface *iface); -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 -G_DEFINE_TYPE_WITH_CODE (Timedate1Skeleton, timedate1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, - G_ADD_PRIVATE (Timedate1Skeleton) - G_IMPLEMENT_INTERFACE (TYPE_TIMEDATE1, timedate1_skeleton_iface_init)); - -#else -G_DEFINE_TYPE_WITH_CODE (Timedate1Skeleton, timedate1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, - G_IMPLEMENT_INTERFACE (TYPE_TIMEDATE1, timedate1_skeleton_iface_init)); - -#endif -static void -timedate1_skeleton_finalize (GObject *object) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - guint n; - for (n = 0; n < 7; n++) - g_value_unset (&skeleton->priv->properties[n]); - g_free (skeleton->priv->properties); - g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); - if (skeleton->priv->changed_properties_idle_source != NULL) - g_source_destroy (skeleton->priv->changed_properties_idle_source); - g_main_context_unref (skeleton->priv->context); - g_mutex_clear (&skeleton->priv->lock); - G_OBJECT_CLASS (timedate1_skeleton_parent_class)->finalize (object); -} - -static void -timedate1_skeleton_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 7); - g_mutex_lock (&skeleton->priv->lock); - g_value_copy (&skeleton->priv->properties[prop_id - 1], value); - g_mutex_unlock (&skeleton->priv->lock); -} - -static gboolean -_timedate1_emit_changed (gpointer user_data) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (user_data); - GList *l; - GVariantBuilder builder; - GVariantBuilder invalidated_builder; - guint num_changes; - - g_mutex_lock (&skeleton->priv->lock); - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); - for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) - { - ChangedProperty *cp = l->data; - GVariant *variant; - const GValue *cur_value; - - cur_value = &skeleton->priv->properties[cp->prop_id - 1]; - if (!_g_value_equal (cur_value, &cp->orig_value)) - { - variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); - g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); - g_variant_unref (variant); - num_changes++; - } - } - if (num_changes > 0) - { - GList *connections, *ll; - GVariant *signal_variant; - signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.timedate1", - &builder, &invalidated_builder)); - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - for (ll = connections; ll != NULL; ll = ll->next) - { - GDBusConnection *connection = ll->data; - - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), - "org.freedesktop.DBus.Properties", - "PropertiesChanged", - signal_variant, - NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); - } - else - { - g_variant_builder_clear (&builder); - g_variant_builder_clear (&invalidated_builder); - } - g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); - skeleton->priv->changed_properties = NULL; - skeleton->priv->changed_properties_idle_source = NULL; - g_mutex_unlock (&skeleton->priv->lock); - return FALSE; -} - -static void -_timedate1_schedule_emit_changed (Timedate1Skeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) -{ - ChangedProperty *cp; - GList *l; - cp = NULL; - for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) - { - ChangedProperty *i_cp = l->data; - if (i_cp->info == info) - { - cp = i_cp; - break; - } - } - if (cp == NULL) - { - cp = g_new0 (ChangedProperty, 1); - cp->prop_id = prop_id; - cp->info = info; - skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); - g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); - g_value_copy (orig_value, &cp->orig_value); - } -} - -static void -timedate1_skeleton_notify (GObject *object, - GParamSpec *pspec G_GNUC_UNUSED) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - g_mutex_lock (&skeleton->priv->lock); - if (skeleton->priv->changed_properties != NULL && - skeleton->priv->changed_properties_idle_source == NULL) - { - skeleton->priv->changed_properties_idle_source = g_idle_source_new (); - g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); - g_source_set_callback (skeleton->priv->changed_properties_idle_source, _timedate1_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); - g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); - g_source_unref (skeleton->priv->changed_properties_idle_source); - } - g_mutex_unlock (&skeleton->priv->lock); -} - -static void -timedate1_skeleton_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 7); - g_mutex_lock (&skeleton->priv->lock); - g_object_freeze_notify (object); - if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) - { - if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) - _timedate1_schedule_emit_changed (skeleton, _timedate1_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); - g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); - g_object_notify_by_pspec (object, pspec); - } - g_mutex_unlock (&skeleton->priv->lock); - g_object_thaw_notify (object); -} - -static void -timedate1_skeleton_init (Timedate1Skeleton *skeleton) -{ -#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 - skeleton->priv = timedate1_skeleton_get_instance_private (skeleton); -#else - skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_TIMEDATE1_SKELETON, Timedate1SkeletonPrivate); -#endif - - g_mutex_init (&skeleton->priv->lock); - skeleton->priv->context = g_main_context_ref_thread_default (); - skeleton->priv->properties = g_new0 (GValue, 7); - g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING); - g_value_init (&skeleton->priv->properties[1], G_TYPE_BOOLEAN); - g_value_init (&skeleton->priv->properties[2], G_TYPE_BOOLEAN); - g_value_init (&skeleton->priv->properties[3], G_TYPE_BOOLEAN); - g_value_init (&skeleton->priv->properties[4], G_TYPE_BOOLEAN); - g_value_init (&skeleton->priv->properties[5], G_TYPE_UINT64); - g_value_init (&skeleton->priv->properties[6], G_TYPE_UINT64); -} - -static const gchar * -timedate1_skeleton_get_timezone (Timedate1 *object) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - const gchar *value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_string (&(skeleton->priv->properties[0])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static gboolean -timedate1_skeleton_get_local_rtc (Timedate1 *object) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - gboolean value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boolean (&(skeleton->priv->properties[1])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static gboolean -timedate1_skeleton_get_can_ntp (Timedate1 *object) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - gboolean value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boolean (&(skeleton->priv->properties[2])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static gboolean -timedate1_skeleton_get_ntp (Timedate1 *object) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - gboolean value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boolean (&(skeleton->priv->properties[3])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static gboolean -timedate1_skeleton_get_ntpsynchronized (Timedate1 *object) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - gboolean value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boolean (&(skeleton->priv->properties[4])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static guint64 -timedate1_skeleton_get_time_usec (Timedate1 *object) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - guint64 value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_uint64 (&(skeleton->priv->properties[5])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static guint64 -timedate1_skeleton_get_rtctime_usec (Timedate1 *object) -{ - Timedate1Skeleton *skeleton = TIMEDATE1_SKELETON (object); - guint64 value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_uint64 (&(skeleton->priv->properties[6])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static void -timedate1_skeleton_class_init (Timedate1SkeletonClass *klass) -{ - GObjectClass *gobject_class; - GDBusInterfaceSkeletonClass *skeleton_class; - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = timedate1_skeleton_finalize; - gobject_class->get_property = timedate1_skeleton_get_property; - gobject_class->set_property = timedate1_skeleton_set_property; - gobject_class->notify = timedate1_skeleton_notify; - - - timedate1_override_properties (gobject_class, 1); - - skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); - skeleton_class->get_info = timedate1_skeleton_dbus_interface_get_info; - skeleton_class->get_properties = timedate1_skeleton_dbus_interface_get_properties; - skeleton_class->flush = timedate1_skeleton_dbus_interface_flush; - skeleton_class->get_vtable = timedate1_skeleton_dbus_interface_get_vtable; - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 - g_type_class_add_private (klass, sizeof (Timedate1SkeletonPrivate)); -#endif -} - -static void -timedate1_skeleton_iface_init (Timedate1Iface *iface) -{ - iface->get_timezone = timedate1_skeleton_get_timezone; - iface->get_local_rtc = timedate1_skeleton_get_local_rtc; - iface->get_can_ntp = timedate1_skeleton_get_can_ntp; - iface->get_ntp = timedate1_skeleton_get_ntp; - iface->get_ntpsynchronized = timedate1_skeleton_get_ntpsynchronized; - iface->get_time_usec = timedate1_skeleton_get_time_usec; - iface->get_rtctime_usec = timedate1_skeleton_get_rtctime_usec; -} - -/** - * timedate1_skeleton_new: - * - * Creates a skeleton object for the D-Bus interface org.freedesktop.timedate1. - * - * Returns: (transfer full) (type Timedate1Skeleton): The skeleton object. - */ -Timedate1 * -timedate1_skeleton_new (void) -{ - return TIMEDATE1 (g_object_new (TYPE_TIMEDATE1_SKELETON, NULL)); -} - diff --git a/src/interfaces/timedated/timedated-gen.h b/src/interfaces/timedated/timedated-gen.h deleted file mode 100644 index 515c819..0000000 --- a/src/interfaces/timedated/timedated-gen.h +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Generated by gdbus-codegen 2.40.0. DO NOT EDIT. - * - * The license of this code is the same as for the source it was derived from. - */ - -#ifndef __TIMEDATED_GEN_H__ -#define __TIMEDATED_GEN_H__ - -#include - -G_BEGIN_DECLS - - -/* ------------------------------------------------------------------------ */ -/* Declarations for org.freedesktop.timedate1 */ - -#define TYPE_TIMEDATE1 (timedate1_get_type ()) -#define TIMEDATE1(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_TIMEDATE1, Timedate1)) -#define IS_TIMEDATE1(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_TIMEDATE1)) -#define TIMEDATE1_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_TIMEDATE1, Timedate1Iface)) - -struct _Timedate1; -typedef struct _Timedate1 Timedate1; -typedef struct _Timedate1Iface Timedate1Iface; - -struct _Timedate1Iface -{ - GTypeInterface parent_iface; - - - gboolean (*handle_set_local_rtc) ( - Timedate1 *object, - GDBusMethodInvocation *invocation, - gboolean arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2); - - gboolean (*handle_set_ntp) ( - Timedate1 *object, - GDBusMethodInvocation *invocation, - gboolean arg_unnamed_arg0, - gboolean arg_unnamed_arg1); - - gboolean (*handle_set_time) ( - Timedate1 *object, - GDBusMethodInvocation *invocation, - gint64 arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2); - - gboolean (*handle_set_timezone) ( - Timedate1 *object, - GDBusMethodInvocation *invocation, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1); - - gboolean (*get_can_ntp) (Timedate1 *object); - - gboolean (*get_local_rtc) (Timedate1 *object); - - gboolean (*get_ntp) (Timedate1 *object); - - gboolean (*get_ntpsynchronized) (Timedate1 *object); - - guint64 (*get_rtctime_usec) (Timedate1 *object); - - guint64 (*get_time_usec) (Timedate1 *object); - - const gchar * (*get_timezone) (Timedate1 *object); - -}; - -GType timedate1_get_type (void) G_GNUC_CONST; - -GDBusInterfaceInfo *timedate1_interface_info (void); -guint timedate1_override_properties (GObjectClass *klass, guint property_id_begin); - - -/* D-Bus method call completion functions: */ -void timedate1_complete_set_time ( - Timedate1 *object, - GDBusMethodInvocation *invocation); - -void timedate1_complete_set_timezone ( - Timedate1 *object, - GDBusMethodInvocation *invocation); - -void timedate1_complete_set_local_rtc ( - Timedate1 *object, - GDBusMethodInvocation *invocation); - -void timedate1_complete_set_ntp ( - Timedate1 *object, - GDBusMethodInvocation *invocation); - - - -/* D-Bus method calls: */ -void timedate1_call_set_time ( - Timedate1 *proxy, - gint64 arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean timedate1_call_set_time_finish ( - Timedate1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean timedate1_call_set_time_sync ( - Timedate1 *proxy, - gint64 arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GError **error); - -void timedate1_call_set_timezone ( - Timedate1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean timedate1_call_set_timezone_finish ( - Timedate1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean timedate1_call_set_timezone_sync ( - Timedate1 *proxy, - const gchar *arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error); - -void timedate1_call_set_local_rtc ( - Timedate1 *proxy, - gboolean arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean timedate1_call_set_local_rtc_finish ( - Timedate1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean timedate1_call_set_local_rtc_sync ( - Timedate1 *proxy, - gboolean arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - gboolean arg_unnamed_arg2, - GCancellable *cancellable, - GError **error); - -void timedate1_call_set_ntp ( - Timedate1 *proxy, - gboolean arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean timedate1_call_set_ntp_finish ( - Timedate1 *proxy, - GAsyncResult *res, - GError **error); - -gboolean timedate1_call_set_ntp_sync ( - Timedate1 *proxy, - gboolean arg_unnamed_arg0, - gboolean arg_unnamed_arg1, - GCancellable *cancellable, - GError **error); - - - -/* D-Bus property accessors: */ -const gchar *timedate1_get_timezone (Timedate1 *object); -gchar *timedate1_dup_timezone (Timedate1 *object); -void timedate1_set_timezone (Timedate1 *object, const gchar *value); - -gboolean timedate1_get_local_rtc (Timedate1 *object); -void timedate1_set_local_rtc (Timedate1 *object, gboolean value); - -gboolean timedate1_get_can_ntp (Timedate1 *object); -void timedate1_set_can_ntp (Timedate1 *object, gboolean value); - -gboolean timedate1_get_ntp (Timedate1 *object); -void timedate1_set_ntp (Timedate1 *object, gboolean value); - -gboolean timedate1_get_ntpsynchronized (Timedate1 *object); -void timedate1_set_ntpsynchronized (Timedate1 *object, gboolean value); - -guint64 timedate1_get_time_usec (Timedate1 *object); -void timedate1_set_time_usec (Timedate1 *object, guint64 value); - -guint64 timedate1_get_rtctime_usec (Timedate1 *object); -void timedate1_set_rtctime_usec (Timedate1 *object, guint64 value); - - -/* ---- */ - -#define TYPE_TIMEDATE1_PROXY (timedate1_proxy_get_type ()) -#define TIMEDATE1_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_TIMEDATE1_PROXY, Timedate1Proxy)) -#define TIMEDATE1_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_TIMEDATE1_PROXY, Timedate1ProxyClass)) -#define TIMEDATE1_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_TIMEDATE1_PROXY, Timedate1ProxyClass)) -#define IS_TIMEDATE1_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_TIMEDATE1_PROXY)) -#define IS_TIMEDATE1_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_TIMEDATE1_PROXY)) - -typedef struct _Timedate1Proxy Timedate1Proxy; -typedef struct _Timedate1ProxyClass Timedate1ProxyClass; -typedef struct _Timedate1ProxyPrivate Timedate1ProxyPrivate; - -struct _Timedate1Proxy -{ - /*< private >*/ - GDBusProxy parent_instance; - Timedate1ProxyPrivate *priv; -}; - -struct _Timedate1ProxyClass -{ - GDBusProxyClass parent_class; -}; - -GType timedate1_proxy_get_type (void) G_GNUC_CONST; - -void timedate1_proxy_new ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -Timedate1 *timedate1_proxy_new_finish ( - GAsyncResult *res, - GError **error); -Timedate1 *timedate1_proxy_new_sync ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); - -void timedate1_proxy_new_for_bus ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -Timedate1 *timedate1_proxy_new_for_bus_finish ( - GAsyncResult *res, - GError **error); -Timedate1 *timedate1_proxy_new_for_bus_sync ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); - - -/* ---- */ - -#define TYPE_TIMEDATE1_SKELETON (timedate1_skeleton_get_type ()) -#define TIMEDATE1_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_TIMEDATE1_SKELETON, Timedate1Skeleton)) -#define TIMEDATE1_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_TIMEDATE1_SKELETON, Timedate1SkeletonClass)) -#define TIMEDATE1_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_TIMEDATE1_SKELETON, Timedate1SkeletonClass)) -#define IS_TIMEDATE1_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_TIMEDATE1_SKELETON)) -#define IS_TIMEDATE1_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_TIMEDATE1_SKELETON)) - -typedef struct _Timedate1Skeleton Timedate1Skeleton; -typedef struct _Timedate1SkeletonClass Timedate1SkeletonClass; -typedef struct _Timedate1SkeletonPrivate Timedate1SkeletonPrivate; - -struct _Timedate1Skeleton -{ - /*< private >*/ - GDBusInterfaceSkeleton parent_instance; - Timedate1SkeletonPrivate *priv; -}; - -struct _Timedate1SkeletonClass -{ - GDBusInterfaceSkeletonClass parent_class; -}; - -GType timedate1_skeleton_get_type (void) G_GNUC_CONST; - -Timedate1 *timedate1_skeleton_new (void); - - -G_END_DECLS - -#endif /* __TIMEDATED_GEN_H__ */ -- 2.41.0