git: 3acf90281da5 - main - x11/gnome-flashback: new port

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Tue, 10 Jun 2025 11:37:39 UTC
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3acf90281da53415f7be1f7d653b4c4c30e2441d

commit 3acf90281da53415f7be1f7d653b4c4c30e2441d
Author:     Olivier Duchateau <duchateau.olivier@gmail.com>
AuthorDate: 2025-06-10 11:33:57 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2025-06-10 11:37:14 +0000

    x11/gnome-flashback: new port
    
    This package contains the GNOME Flashback backend. It provides the
    'gnome-flashback' and 'gnome-flashback-clipboard' programs.
    
    PR:     286697
---
 x11/Makefile                                       |    1 +
 x11/gnome-flashback/Makefile                       |   83 +
 x11/gnome-flashback/distinfo                       |    3 +
 .../files/gf-consolekit-manager-gen.c              | 1430 ++++++++++++++++++
 .../files/gf-consolekit-manager-gen.h              |  240 +++
 .../files/gf-consolekit-session-gen.c              | 1584 ++++++++++++++++++++
 .../files/gf-consolekit-session-gen.h              |  209 +++
 x11/gnome-flashback/files/gnome-flashback.in       |   15 +
 .../files/org.freedesktop.ConsoleKit.Manager.xml   |   27 +
 .../files/org.freedesktop.ConsoleKit.Session.xml   |   21 +
 x11/gnome-flashback/files/patch-configure          |  257 ++++
 x11/gnome-flashback/files/patch-data_Makefile.in   |   10 +
 .../files/patch-data_autostart_Makefile.in         |   26 +
 ...ta_schemas_00__gnome-flashback.gschema.override |   16 +
 x11/gnome-flashback/files/patch-dbus_Makefile.in   |  139 ++
 .../patch-dbus_org.freedesktop.login1.Manager.xml  |   32 +
 .../patch-dbus_org.freedesktop.login1.Session.xml  |   20 +
 ...atch-gnome-flashback_libdesktop_gf-trash-icon.c |   17 +
 .../patch-gnome-flashback_libdesktop_gf-utils.c    |   25 +
 ...ch-gnome-flashback_libscreensaver_gf-listener.c |  253 ++++
 ...flashback_libscreensaver_gf-screensaver-utils.c |   12 +
 ...gnome-flashback_libscreensaver_gf-screensaver.c |   11 +
 x11/gnome-flashback/files/pkg-message.in           |   16 +
 x11/gnome-flashback/pkg-descr                      |    2 +
 x11/gnome-flashback/pkg-plist                      |   58 +
 25 files changed, 4507 insertions(+)

diff --git a/x11/Makefile b/x11/Makefile
index 115adc7556ae..d4edf1b0ead3 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -99,6 +99,7 @@
     SUBDIR += gnome-clipboard-daemon
     SUBDIR += gnome-console
     SUBDIR += gnome-desktop
+    SUBDIR += gnome-flashback
     SUBDIR += gnome-menus
     SUBDIR += gnome-panel
     SUBDIR += gnome-pie
diff --git a/x11/gnome-flashback/Makefile b/x11/gnome-flashback/Makefile
new file mode 100644
index 000000000000..59f5978b96b2
--- /dev/null
+++ b/x11/gnome-flashback/Makefile
@@ -0,0 +1,83 @@
+PORTNAME=	gnome-flashback
+PORTVERSION=	3.56.0
+CATEGORIES=	x11 gnome
+MASTER_SITES=	GNOME
+DIST_SUBDIR=	gnome
+
+MAINTAINER=	gnome@FreeBSD.org
+COMMENT=	GNOME Flashback session and helper applications
+WWW=		https://gitlab.gnome.org/GNOME/gnome-flashback
+
+LICENSE=	GPLv3
+
+BUILD_DEPENDS=	gsettings-desktop-schemas>0:devel/gsettings-desktop-schemas \
+		xkeyboard-config>0:x11/xkeyboard-config
+LIB_DEPENDS=	libgnome-panel.so:x11/gnome-panel \
+		libpolkit-gobject-1.so:sysutils/polkit \
+		libibus-1.0.so:textproc/ibus \
+		libconsolekit.so:sysutils/consolekit2 \
+		libxkbfile.so:x11/libxkbfile \
+		libcanberra.so:audio/libcanberra \
+		libcanberra-gtk3.so:audio/libcanberra-gtk3 \
+		libpulse.so:audio/pulseaudio \
+		libupower-glib.so:sysutils/upower \
+		libgdm.so:x11/gdm \
+		libasound.so:audio/alsa-lib \
+		libharfbuzz.so:print/harfbuzz
+RUN_DEPENDS=	xkeyboard-config>0:x11/xkeyboard-config \
+		gnome-session>0:x11/gnome-session \
+		metacity>0:x11-wm/metacity \
+		gnome-applets>0:x11/gnome-applets \
+		tecla>0:x11/tecla \
+		alacarte>0:x11/alacarte \
+		gedit>0:editors/gedit \
+		sushi>0:x11-fm/sushi \
+		nautilus>0:x11-fm/nautilus \
+		gnome-terminal>0:x11/gnome-terminal \
+		xdg-user-dirs-gtk>0:x11/xdg-user-dirs-gtk \
+		cantarell-fonts>0:x11-fonts/cantarell-fonts \
+		source-code-pro-ttf>0:x11-fonts/source-code-pro-ttf
+
+# x11/gnome-shell is mandatory for x11/gdm and it provides the screenshot
+# service through the org.gnome.Shell.Screenshot interface
+RUN_DEPENDS+=	gnome-shell>0:x11/gnome-shell
+
+USES=		gettext gmake gnome libtool pkgconfig tar:xz xorg
+GNU_CONFIGURE=	yes
+USE_GNOME=	cairo gdkpixbuf glib20 gtk30 gnomedesktop3 pango
+USE_XORG=	x11 xcb xext xfixes xi xrandr xxf86vm
+
+CONFIGURE_ARGS=	--without-compiz-session
+INSTALL_TARGET=	install-strip
+
+SUB_FILES=	gnome-flashback pkg-message
+SUB_LIST=	EXAMPLESDIR=${EXAMPLESDIR:S|${PORTNAME}|gnome-shell|}
+
+GLIB_SCHEMAS=	00_gnome-flashback.gschema.override \
+		org.gnome.gnome-flashback.desktop.background.gschema.xml \
+		org.gnome.gnome-flashback.desktop.enums.xml \
+		org.gnome.gnome-flashback.desktop.gschema.xml \
+		org.gnome.gnome-flashback.desktop.icons.gschema.xml \
+		org.gnome.gnome-flashback.gschema.xml \
+		org.gnome.gnome-flashback.keybindings.gschema.xml \
+		org.gnome.gnome-flashback.notifications.gschema.xml \
+		org.gnome.gnome-flashback.system-indicators.input-sources.gschema.xml
+
+post-extract:
+	${CP} ${FILESDIR}/gf-consolekit-* \
+		${WRKSRC}/dbus/
+	${CP} ${FILESDIR}/org.freedesktop.ConsoleKit* \
+		${WRKSRC}/dbus/
+
+post-patch:
+	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${LOCALBASE}|" \
+		${WRKSRC}/gnome-flashback/libscreensaver/gf-screensaver.c
+	@${REINPLACE_CMD} -e 's|X-GNOME-HiddenUnderSystemd|#X-GNOME-HiddenUnderSystemd|' \
+		${WRKSRC}/data/applications/gnome-flashback.desktop.in
+
+post-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/pam.d
+	${INSTALL_DATA} ${WRKDIR}/gnome-flashback \
+		${STAGEDIR}${PREFIX}/etc/pam.d
+
+.include <bsd.port.mk>
diff --git a/x11/gnome-flashback/distinfo b/x11/gnome-flashback/distinfo
new file mode 100644
index 000000000000..b1455e262c45
--- /dev/null
+++ b/x11/gnome-flashback/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1745754419
+SHA256 (gnome/gnome-flashback-3.56.0.tar.xz) = 2d0fa22f373db080eaef0e5693b9628cde844f25633d5a90313b049dd9529260
+SIZE (gnome/gnome-flashback-3.56.0.tar.xz) = 912964
diff --git a/x11/gnome-flashback/files/gf-consolekit-manager-gen.c b/x11/gnome-flashback/files/gf-consolekit-manager-gen.c
new file mode 100644
index 000000000000..8982ebe9bd78
--- /dev/null
+++ b/x11/gnome-flashback/files/gf-consolekit-manager-gen.c
@@ -0,0 +1,1430 @@
+/*
+ * This file is generated by gdbus-codegen, do not modify it.
+ *
+ * The license of this code is the same as for the D-Bus interface description
+ * it was derived from. Note that it links to GLib, so must comply with the
+ * LGPL linking clauses.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include "gf-consolekit-manager-gen.h"
+
+#include <string.h>
+#ifdef G_OS_UNIX
+#  include <gio/gunixfdlist.h>
+#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;
+  guint use_gvariant : 1;
+  guint emits_changed_signal : 1;
+} _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.ConsoleKit.Manager
+ * ------------------------------------------------------------------------
+ */
+
+/**
+ * SECTION:GfConsoleKitManagerGen
+ * @title: GfConsoleKitManagerGen
+ * @short_description: Generated C code for the org.freedesktop.ConsoleKit.Manager D-Bus interface
+ *
+ * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.Manager</link> D-Bus interface in C.
+ */
+
+/* ---- Introspection data for org.freedesktop.ConsoleKit.Manager ---- */
+
+static const _ExtendedGDBusArgInfo _gf_console_kit_manager_gen_method_info_get_session_for_cookie_IN_ARG_session_id =
+{
+  {
+    -1,
+    (gchar *) "session_id",
+    (gchar *) "s",
+    NULL
+  },
+  FALSE
+};
+
+static const GDBusArgInfo * const _gf_console_kit_manager_gen_method_info_get_session_for_cookie_IN_ARG_pointers[] =
+{
+  &_gf_console_kit_manager_gen_method_info_get_session_for_cookie_IN_ARG_session_id.parent_struct,
+  NULL
+};
+
+static const _ExtendedGDBusArgInfo _gf_console_kit_manager_gen_method_info_get_session_for_cookie_OUT_ARG_object_path =
+{
+  {
+    -1,
+    (gchar *) "object_path",
+    (gchar *) "o",
+    NULL
+  },
+  FALSE
+};
+
+static const GDBusArgInfo * const _gf_console_kit_manager_gen_method_info_get_session_for_cookie_OUT_ARG_pointers[] =
+{
+  &_gf_console_kit_manager_gen_method_info_get_session_for_cookie_OUT_ARG_object_path.parent_struct,
+  NULL
+};
+
+static const _ExtendedGDBusMethodInfo _gf_console_kit_manager_gen_method_info_get_session_for_cookie =
+{
+  {
+    -1,
+    (gchar *) "GetSessionForCookie",
+    (GDBusArgInfo **) &_gf_console_kit_manager_gen_method_info_get_session_for_cookie_IN_ARG_pointers,
+    (GDBusArgInfo **) &_gf_console_kit_manager_gen_method_info_get_session_for_cookie_OUT_ARG_pointers,
+    NULL
+  },
+  "handle-get-session-for-cookie",
+  FALSE
+};
+
+static const _ExtendedGDBusArgInfo _gf_console_kit_manager_gen_method_info_inhibit_IN_ARG_what =
+{
+  {
+    -1,
+    (gchar *) "what",
+    (gchar *) "s",
+    NULL
+  },
+  FALSE
+};
+
+static const _ExtendedGDBusArgInfo _gf_console_kit_manager_gen_method_info_inhibit_IN_ARG_who =
+{
+  {
+    -1,
+    (gchar *) "who",
+    (gchar *) "s",
+    NULL
+  },
+  FALSE
+};
+
+static const _ExtendedGDBusArgInfo _gf_console_kit_manager_gen_method_info_inhibit_IN_ARG_why =
+{
+  {
+    -1,
+    (gchar *) "why",
+    (gchar *) "s",
+    NULL
+  },
+  FALSE
+};
+
+static const _ExtendedGDBusArgInfo _gf_console_kit_manager_gen_method_info_inhibit_IN_ARG_mode =
+{
+  {
+    -1,
+    (gchar *) "mode",
+    (gchar *) "s",
+    NULL
+  },
+  FALSE
+};
+
+static const GDBusArgInfo * const _gf_console_kit_manager_gen_method_info_inhibit_IN_ARG_pointers[] =
+{
+  &_gf_console_kit_manager_gen_method_info_inhibit_IN_ARG_what.parent_struct,
+  &_gf_console_kit_manager_gen_method_info_inhibit_IN_ARG_who.parent_struct,
+  &_gf_console_kit_manager_gen_method_info_inhibit_IN_ARG_why.parent_struct,
+  &_gf_console_kit_manager_gen_method_info_inhibit_IN_ARG_mode.parent_struct,
+  NULL
+};
+
+static const _ExtendedGDBusArgInfo _gf_console_kit_manager_gen_method_info_inhibit_OUT_ARG_pipe_fd =
+{
+  {
+    -1,
+    (gchar *) "pipe_fd",
+    (gchar *) "h",
+    NULL
+  },
+  FALSE
+};
+
+static const GDBusArgInfo * const _gf_console_kit_manager_gen_method_info_inhibit_OUT_ARG_pointers[] =
+{
+  &_gf_console_kit_manager_gen_method_info_inhibit_OUT_ARG_pipe_fd.parent_struct,
+  NULL
+};
+
+static const _ExtendedGDBusMethodInfo _gf_console_kit_manager_gen_method_info_inhibit =
+{
+  {
+    -1,
+    (gchar *) "Inhibit",
+    (GDBusArgInfo **) &_gf_console_kit_manager_gen_method_info_inhibit_IN_ARG_pointers,
+    (GDBusArgInfo **) &_gf_console_kit_manager_gen_method_info_inhibit_OUT_ARG_pointers,
+    NULL
+  },
+  "handle-inhibit",
+  TRUE
+};
+
+static const GDBusMethodInfo * const _gf_console_kit_manager_gen_method_info_pointers[] =
+{
+  &_gf_console_kit_manager_gen_method_info_get_session_for_cookie.parent_struct,
+  &_gf_console_kit_manager_gen_method_info_inhibit.parent_struct,
+  NULL
+};
+
+static const _ExtendedGDBusArgInfo _gf_console_kit_manager_gen_signal_info_prepare_for_sleep_ARG_start =
+{
+  {
+    -1,
+    (gchar *) "start",
+    (gchar *) "b",
+    NULL
+  },
+  FALSE
+};
+
+static const GDBusArgInfo * const _gf_console_kit_manager_gen_signal_info_prepare_for_sleep_ARG_pointers[] =
+{
+  &_gf_console_kit_manager_gen_signal_info_prepare_for_sleep_ARG_start.parent_struct,
+  NULL
+};
+
+static const _ExtendedGDBusSignalInfo _gf_console_kit_manager_gen_signal_info_prepare_for_sleep =
+{
+  {
+    -1,
+    (gchar *) "PrepareForSleep",
+    (GDBusArgInfo **) &_gf_console_kit_manager_gen_signal_info_prepare_for_sleep_ARG_pointers,
+    NULL
+  },
+  "prepare-for-sleep"
+};
+
+static const GDBusSignalInfo * const _gf_console_kit_manager_gen_signal_info_pointers[] =
+{
+  &_gf_console_kit_manager_gen_signal_info_prepare_for_sleep.parent_struct,
+  NULL
+};
+
+static const _ExtendedGDBusInterfaceInfo _gf_console_kit_manager_gen_interface_info =
+{
+  {
+    -1,
+    (gchar *) "org.freedesktop.ConsoleKit.Manager",
+    (GDBusMethodInfo **) &_gf_console_kit_manager_gen_method_info_pointers,
+    (GDBusSignalInfo **) &_gf_console_kit_manager_gen_signal_info_pointers,
+    NULL,
+    NULL
+  },
+  "console-kit-manager-gen",
+};
+
+
+/**
+ * gf_console_kit_manager_gen_interface_info:
+ *
+ * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.Manager</link> D-Bus interface.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
+ */
+GDBusInterfaceInfo *
+gf_console_kit_manager_gen_interface_info (void)
+{
+  return (GDBusInterfaceInfo *) &_gf_console_kit_manager_gen_interface_info.parent_struct;
+}
+
+/**
+ * gf_console_kit_manager_gen_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 #GfConsoleKitManagerGen interface for a concrete class.
+ * The properties are overridden in the order they are defined.
+ *
+ * Returns: The last property id.
+ */
+guint
+gf_console_kit_manager_gen_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin)
+{
+  return property_id_begin - 1;
+}
+
+
+
+/**
+ * GfConsoleKitManagerGen:
+ *
+ * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.Manager</link>.
+ */
+
+/**
+ * GfConsoleKitManagerGenIface:
+ * @parent_iface: The parent interface.
+ * @handle_get_session_for_cookie: Handler for the #GfConsoleKitManagerGen::handle-get-session-for-cookie signal.
+ * @handle_inhibit: Handler for the #GfConsoleKitManagerGen::handle-inhibit signal.
+ * @prepare_for_sleep: Handler for the #GfConsoleKitManagerGen::prepare-for-sleep signal.
+ *
+ * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.Manager</link>.
+ */
+
+typedef GfConsoleKitManagerGenIface GfConsoleKitManagerGenInterface;
+G_DEFINE_INTERFACE (GfConsoleKitManagerGen, gf_console_kit_manager_gen, G_TYPE_OBJECT)
+
+static void
+gf_console_kit_manager_gen_default_init (GfConsoleKitManagerGenIface *iface)
+{
+  /* GObject signals for incoming D-Bus method calls: */
+  /**
+   * GfConsoleKitManagerGen::handle-get-session-for-cookie:
+   * @object: A #GfConsoleKitManagerGen.
+   * @invocation: A #GDBusMethodInvocation.
+   * @arg_session_id: Argument passed by remote caller.
+   *
+   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForCookie">GetSessionForCookie()</link> 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 gf_console_kit_manager_gen_complete_get_session_for_cookie() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
+   *
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
+   */
+  g_signal_new ("handle-get-session-for-cookie",
+    G_TYPE_FROM_INTERFACE (iface),
+    G_SIGNAL_RUN_LAST,
+    G_STRUCT_OFFSET (GfConsoleKitManagerGenIface, handle_get_session_for_cookie),
+    g_signal_accumulator_true_handled,
+    NULL,
+    g_cclosure_marshal_generic,
+    G_TYPE_BOOLEAN,
+    2,
+    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
+
+  /**
+   * GfConsoleKitManagerGen::handle-inhibit:
+   * @object: A #GfConsoleKitManagerGen.
+   * @invocation: A #GDBusMethodInvocation.
+   * @fd_list: (nullable): A #GUnixFDList or %NULL.
+   * @arg_what: Argument passed by remote caller.
+   * @arg_who: Argument passed by remote caller.
+   * @arg_why: Argument passed by remote caller.
+   * @arg_mode: Argument passed by remote caller.
+   *
+   * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.Inhibit">Inhibit()</link> 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 gf_console_kit_manager_gen_complete_inhibit() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
+   *
+   * Returns: %G_DBUS_METHOD_INVOCATION_HANDLED or %TRUE if the invocation was handled, %G_DBUS_METHOD_INVOCATION_UNHANDLED or %FALSE to let other signal handlers run.
+   */
+  g_signal_new ("handle-inhibit",
+    G_TYPE_FROM_INTERFACE (iface),
+    G_SIGNAL_RUN_LAST,
+    G_STRUCT_OFFSET (GfConsoleKitManagerGenIface, handle_inhibit),
+    g_signal_accumulator_true_handled,
+    NULL,
+    g_cclosure_marshal_generic,
+    G_TYPE_BOOLEAN,
+    6,
+    G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UNIX_FD_LIST, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
+
+  /* GObject signals for received D-Bus signals: */
+  /**
+   * GfConsoleKitManagerGen::prepare-for-sleep:
+   * @object: A #GfConsoleKitManagerGen.
+   * @arg_start: Argument.
+   *
+   * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Manager.PrepareForSleep">"PrepareForSleep"</link> 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 (GfConsoleKitManagerGenIface, prepare_for_sleep),
+    NULL,
+    NULL,
+    g_cclosure_marshal_generic,
+    G_TYPE_NONE,
+    1, G_TYPE_BOOLEAN);
+
+}
+
+/**
+ * gf_console_kit_manager_gen_emit_prepare_for_sleep:
+ * @object: A #GfConsoleKitManagerGen.
+ * @arg_start: Argument to pass with the signal.
+ *
+ * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Manager.PrepareForSleep">"PrepareForSleep"</link> D-Bus signal.
+ */
+void
+gf_console_kit_manager_gen_emit_prepare_for_sleep (
+    GfConsoleKitManagerGen *object,
+    gboolean arg_start)
+{
+  g_signal_emit_by_name (object, "prepare-for-sleep", arg_start);
+}
+
+/**
+ * gf_console_kit_manager_gen_call_get_session_for_cookie:
+ * @proxy: A #GfConsoleKitManagerGenProxy.
+ * @arg_session_id: Argument to pass with the method invocation.
+ * @cancellable: (nullable): 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 <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForCookie">GetSessionForCookie()</link> 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 (see g_main_context_push_thread_default()).
+ * You can then call gf_console_kit_manager_gen_call_get_session_for_cookie_finish() to get the result of the operation.
+ *
+ * See gf_console_kit_manager_gen_call_get_session_for_cookie_sync() for the synchronous, blocking version of this method.
+ */
+void
+gf_console_kit_manager_gen_call_get_session_for_cookie (
+    GfConsoleKitManagerGen *proxy,
+    const gchar *arg_session_id,
+    GCancellable *cancellable,
+    GAsyncReadyCallback callback,
+    gpointer user_data)
+{
+  g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+    "GetSessionForCookie",
+    g_variant_new ("(s)",
+                   arg_session_id),
+    G_DBUS_CALL_FLAGS_NONE,
+    -1,
+    cancellable,
+    callback,
+    user_data);
+}
+
+/**
+ * gf_console_kit_manager_gen_call_get_session_for_cookie_finish:
+ * @proxy: A #GfConsoleKitManagerGenProxy.
+ * @out_object_path: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gf_console_kit_manager_gen_call_get_session_for_cookie().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with gf_console_kit_manager_gen_call_get_session_for_cookie().
+ *
+ * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
+ */
+gboolean
+gf_console_kit_manager_gen_call_get_session_for_cookie_finish (
+    GfConsoleKitManagerGen *proxy,
+    gchar **out_object_path,
+    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_object_path);
+  g_variant_unref (_ret);
+_out:
+  return _ret != NULL;
+}
+
+/**
+ * gf_console_kit_manager_gen_call_get_session_for_cookie_sync:
+ * @proxy: A #GfConsoleKitManagerGenProxy.
+ * @arg_session_id: Argument to pass with the method invocation.
+ * @out_object_path: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForCookie">GetSessionForCookie()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See gf_console_kit_manager_gen_call_get_session_for_cookie() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
+ */
+gboolean
+gf_console_kit_manager_gen_call_get_session_for_cookie_sync (
+    GfConsoleKitManagerGen *proxy,
+    const gchar *arg_session_id,
+    gchar **out_object_path,
+    GCancellable *cancellable,
+    GError **error)
+{
+  GVariant *_ret;
+  _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+    "GetSessionForCookie",
+    g_variant_new ("(s)",
+                   arg_session_id),
+    G_DBUS_CALL_FLAGS_NONE,
+    -1,
+    cancellable,
+    error);
+  if (_ret == NULL)
+    goto _out;
+  g_variant_get (_ret,
+                 "(o)",
+                 out_object_path);
+  g_variant_unref (_ret);
+_out:
+  return _ret != NULL;
+}
+
+/**
+ * gf_console_kit_manager_gen_call_inhibit:
+ * @proxy: A #GfConsoleKitManagerGenProxy.
+ * @arg_what: Argument to pass with the method invocation.
+ * @arg_who: Argument to pass with the method invocation.
+ * @arg_why: Argument to pass with the method invocation.
+ * @arg_mode: Argument to pass with the method invocation.
+ * @fd_list: (nullable): A #GUnixFDList or %NULL.
+ * @cancellable: (nullable): 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 <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.Inhibit">Inhibit()</link> 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 (see g_main_context_push_thread_default()).
+ * You can then call gf_console_kit_manager_gen_call_inhibit_finish() to get the result of the operation.
+ *
+ * See gf_console_kit_manager_gen_call_inhibit_sync() for the synchronous, blocking version of this method.
+ */
+void
+gf_console_kit_manager_gen_call_inhibit (
+    GfConsoleKitManagerGen *proxy,
+    const gchar *arg_what,
+    const gchar *arg_who,
+    const gchar *arg_why,
+    const gchar *arg_mode,
+    GUnixFDList *fd_list,
+    GCancellable *cancellable,
+    GAsyncReadyCallback callback,
+    gpointer user_data)
+{
+  g_dbus_proxy_call_with_unix_fd_list (G_DBUS_PROXY (proxy),
+    "Inhibit",
+    g_variant_new ("(ssss)",
+                   arg_what,
+                   arg_who,
+                   arg_why,
+                   arg_mode),
+    G_DBUS_CALL_FLAGS_NONE,
+    -1,
+    fd_list,
+    cancellable,
+    callback,
+    user_data);
+}
+
+/**
+ * gf_console_kit_manager_gen_call_inhibit_finish:
+ * @proxy: A #GfConsoleKitManagerGenProxy.
+ * @out_pipe_fd: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @out_fd_list: (out) (optional): Return location for a #GUnixFDList or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gf_console_kit_manager_gen_call_inhibit().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with gf_console_kit_manager_gen_call_inhibit().
+ *
+ * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
+ */
+gboolean
+gf_console_kit_manager_gen_call_inhibit_finish (
+    GfConsoleKitManagerGen *proxy,
+    GVariant **out_pipe_fd,
+    GUnixFDList **out_fd_list,
+    GAsyncResult *res,
+    GError **error)
+{
+  GVariant *_ret;
+  _ret = g_dbus_proxy_call_with_unix_fd_list_finish (G_DBUS_PROXY (proxy), out_fd_list, res, error);
+  if (_ret == NULL)
+    goto _out;
+  g_variant_get (_ret,
+                 "(@h)",
+                 out_pipe_fd);
+  g_variant_unref (_ret);
+_out:
+  return _ret != NULL;
+}
+
+/**
+ * gf_console_kit_manager_gen_call_inhibit_sync:
+ * @proxy: A #GfConsoleKitManagerGenProxy.
+ * @arg_what: Argument to pass with the method invocation.
+ * @arg_who: Argument to pass with the method invocation.
+ * @arg_why: Argument to pass with the method invocation.
+ * @arg_mode: Argument to pass with the method invocation.
+ * @fd_list: (nullable): A #GUnixFDList or %NULL.
+ * @out_pipe_fd: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @out_fd_list: (out): Return location for a #GUnixFDList or %NULL.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.Inhibit">Inhibit()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See gf_console_kit_manager_gen_call_inhibit() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeeded, %FALSE if @error is set.
+ */
+gboolean
+gf_console_kit_manager_gen_call_inhibit_sync (
+    GfConsoleKitManagerGen *proxy,
+    const gchar *arg_what,
+    const gchar *arg_who,
+    const gchar *arg_why,
+    const gchar *arg_mode,
+    GUnixFDList  *fd_list,
+    GVariant **out_pipe_fd,
+    GUnixFDList **out_fd_list,
+    GCancellable *cancellable,
+    GError **error)
+{
+  GVariant *_ret;
+  _ret = g_dbus_proxy_call_with_unix_fd_list_sync (G_DBUS_PROXY (proxy),
+    "Inhibit",
+    g_variant_new ("(ssss)",
+                   arg_what,
+                   arg_who,
+                   arg_why,
+                   arg_mode),
+    G_DBUS_CALL_FLAGS_NONE,
+    -1,
+    fd_list,
+    out_fd_list,
+    cancellable,
+    error);
+  if (_ret == NULL)
+    goto _out;
+  g_variant_get (_ret,
+                 "(@h)",
+                 out_pipe_fd);
+  g_variant_unref (_ret);
+_out:
+  return _ret != NULL;
+}
+
+/**
+ * gf_console_kit_manager_gen_complete_get_session_for_cookie:
+ * @object: A #GfConsoleKitManagerGen.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @object_path: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForCookie">GetSessionForCookie()</link> 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
+gf_console_kit_manager_gen_complete_get_session_for_cookie (
+    GfConsoleKitManagerGen *object G_GNUC_UNUSED,
+    GDBusMethodInvocation *invocation,
+    const gchar *object_path)
+{
+  g_dbus_method_invocation_return_value (invocation,
+    g_variant_new ("(o)",
+                   object_path));
+}
+
+/**
+ * gf_console_kit_manager_gen_complete_inhibit:
+ * @object: A #GfConsoleKitManagerGen.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @fd_list: (nullable): A #GUnixFDList or %NULL.
+ * @pipe_fd: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.Inhibit">Inhibit()</link> 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
+gf_console_kit_manager_gen_complete_inhibit (
+    GfConsoleKitManagerGen *object G_GNUC_UNUSED,
+    GDBusMethodInvocation *invocation,
+    GUnixFDList *fd_list,
+    GVariant *pipe_fd)
+{
+  g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
+    g_variant_new ("(@h)",
+                   pipe_fd),
+    fd_list);
+}
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * GfConsoleKitManagerGenProxy:
+ *
+ * The #GfConsoleKitManagerGenProxy structure contains only private data and should only be accessed using the provided API.
+ */
+
+/**
+ * GfConsoleKitManagerGenProxyClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #GfConsoleKitManagerGenProxy.
+ */
+
+struct _GfConsoleKitManagerGenProxyPrivate
+{
+  GData *qdata;
+};
+
+static void gf_console_kit_manager_gen_proxy_iface_init (GfConsoleKitManagerGenIface *iface);
+
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (GfConsoleKitManagerGenProxy, gf_console_kit_manager_gen_proxy, G_TYPE_DBUS_PROXY,
+                         G_ADD_PRIVATE (GfConsoleKitManagerGenProxy)
+                         G_IMPLEMENT_INTERFACE (GF_TYPE_CONSOLE_KIT_MANAGER_GEN, gf_console_kit_manager_gen_proxy_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (GfConsoleKitManagerGenProxy, gf_console_kit_manager_gen_proxy, G_TYPE_DBUS_PROXY,
+                         G_IMPLEMENT_INTERFACE (GF_TYPE_CONSOLE_KIT_MANAGER_GEN, gf_console_kit_manager_gen_proxy_iface_init))
+
+#endif
+static void
+gf_console_kit_manager_gen_proxy_finalize (GObject *object)
+{
+  GfConsoleKitManagerGenProxy *proxy = GF_CONSOLE_KIT_MANAGER_GEN_PROXY (object);
+  g_datalist_clear (&proxy->priv->qdata);
+  G_OBJECT_CLASS (gf_console_kit_manager_gen_proxy_parent_class)->finalize (object);
+}
+
+static void
+gf_console_kit_manager_gen_proxy_get_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
+  GValue       *value G_GNUC_UNUSED,
+  GParamSpec   *pspec G_GNUC_UNUSED)
+{
+}
+
+static void
+gf_console_kit_manager_gen_proxy_set_property (GObject      *object G_GNUC_UNUSED,
+  guint         prop_id G_GNUC_UNUSED,
*** 3719 LINES SKIPPED ***