summaryrefslogtreecommitdiff
path: root/xfce4-session
diff options
context:
space:
mode:
Diffstat (limited to 'xfce4-session')
-rw-r--r--xfce4-session/Makefile.am160
-rw-r--r--xfce4-session/Makefile.in1430
-rw-r--r--xfce4-session/ice-layer.c384
-rw-r--r--xfce4-session/ice-layer.h37
-rw-r--r--xfce4-session/main.c363
-rw-r--r--xfce4-session/org.xfce.session.policy.in234
-rw-r--r--xfce4-session/sm-layer.c431
-rw-r--r--xfce4-session/sm-layer.h34
-rw-r--r--xfce4-session/xfce-screensaver.c585
-rw-r--r--xfce4-session/xfce-screensaver.h58
-rw-r--r--xfce4-session/xfce4-session.184
-rw-r--r--xfce4-session/xfsm-chooser-icon.h327
-rw-r--r--xfce4-session/xfsm-chooser-icon.pngbin0 -> 8957 bytes
-rw-r--r--xfce4-session/xfsm-chooser.c242
-rw-r--r--xfce4-session/xfsm-chooser.h64
-rw-r--r--xfce4-session/xfsm-client-dbus.c2905
-rw-r--r--xfce4-session/xfsm-client-dbus.h431
-rw-r--r--xfce4-session/xfsm-client-dbus.xml230
-rw-r--r--xfce4-session/xfsm-client.c963
-rw-r--r--xfce4-session/xfsm-client.h102
-rw-r--r--xfce4-session/xfsm-compat-gnome.c272
-rw-r--r--xfce4-session/xfsm-compat-gnome.h30
-rw-r--r--xfce4-session/xfsm-compat-kde.c156
-rw-r--r--xfce4-session/xfsm-compat-kde.h29
-rw-r--r--xfce4-session/xfsm-consolekit.c523
-rw-r--r--xfce4-session/xfsm-consolekit.h79
-rw-r--r--xfce4-session/xfsm-dns.c179
-rw-r--r--xfce4-session/xfsm-dns.h28
-rw-r--r--xfce4-session/xfsm-error.c83
-rw-r--r--xfce4-session/xfsm-error.h48
-rw-r--r--xfce4-session/xfsm-fadeout.c177
-rw-r--r--xfce4-session/xfsm-fadeout.h38
-rw-r--r--xfce4-session/xfsm-global.c434
-rw-r--r--xfce4-session/xfsm-global.h71
-rw-r--r--xfce4-session/xfsm-legacy.c671
-rw-r--r--xfce4-session/xfsm-legacy.h37
-rw-r--r--xfce4-session/xfsm-logout-dialog.c891
-rw-r--r--xfce4-session/xfsm-logout-dialog.h44
-rw-r--r--xfce4-session/xfsm-manager-dbus.c4263
-rw-r--r--xfce4-session/xfsm-manager-dbus.h669
-rw-r--r--xfce4-session/xfsm-manager-dbus.xml235
-rw-r--r--xfce4-session/xfsm-manager.c2711
-rw-r--r--xfce4-session/xfsm-manager.h166
-rw-r--r--xfce4-session/xfsm-marshal.c124
-rw-r--r--xfce4-session/xfsm-marshal.h30
-rw-r--r--xfce4-session/xfsm-marshal.list2
-rw-r--r--xfce4-session/xfsm-properties.c726
-rw-r--r--xfce4-session/xfsm-properties.h111
-rw-r--r--xfce4-session/xfsm-shutdown-fallback.c599
-rw-r--r--xfce4-session/xfsm-shutdown-fallback.h41
-rw-r--r--xfce4-session/xfsm-shutdown.c629
-rw-r--r--xfce4-session/xfsm-shutdown.h119
-rw-r--r--xfce4-session/xfsm-startup.c757
-rw-r--r--xfce4-session/xfsm-startup.h37
-rw-r--r--xfce4-session/xfsm-systemd.c371
-rw-r--r--xfce4-session/xfsm-systemd.h81
56 files changed, 24325 insertions, 0 deletions
diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am
new file mode 100644
index 0000000..2d0727a
--- /dev/null
+++ b/xfce4-session/Makefile.am
@@ -0,0 +1,160 @@
+
+AM_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/libxfsm \
+ -DG_LOG_DOMAIN=\"xfce4-session\" \
+ -DLIBDIR=\"$(libdir)\" \
+ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DXFSM_SHUTDOWN_HELPER_CMD=\"$(HELPER_PATH_PREFIX)/xfce4/session/xfsm-shutdown-helper\" \
+ -DDBUS_API_SUBJECT_TO_CHANGE \
+ -DWNCK_I_KNOW_THIS_IS_UNSTABLE \
+ -DUPOWER_ENABLE_DEPRECATED \
+ $(PLATFORM_CPPFLAGS)
+
+man_MANS = xfce4-session.1
+
+bin_PROGRAMS = xfce4-session
+
+xfce4_session_built_sources = \
+ xfsm-chooser-icon.h \
+ xfsm-client-dbus.c \
+ xfsm-client-dbus.h \
+ xfsm-manager-dbus.c \
+ xfsm-manager-dbus.h \
+ xfsm-marshal.c \
+ xfsm-marshal.h
+
+xfce4_session_SOURCES = \
+ $(xfce4_session_built_sources) \
+ ice-layer.c \
+ ice-layer.h \
+ main.c \
+ sm-layer.c \
+ sm-layer.h \
+ xfsm-chooser.c \
+ xfsm-chooser.h \
+ xfsm-client.c \
+ xfsm-client.h \
+ xfsm-client-dbus.h \
+ xfsm-compat-gnome.c \
+ xfsm-compat-gnome.h \
+ xfsm-compat-kde.c \
+ xfsm-compat-kde.h \
+ xfsm-consolekit.c \
+ xfsm-consolekit.h \
+ xfsm-dns.c \
+ xfsm-dns.h \
+ xfsm-error.c \
+ xfsm-error.h \
+ xfsm-fadeout.c \
+ xfsm-fadeout.h \
+ xfsm-global.c \
+ xfsm-global.h \
+ xfsm-legacy.c \
+ xfsm-legacy.h \
+ xfsm-logout-dialog.c \
+ xfsm-logout-dialog.h \
+ xfsm-manager.c \
+ xfsm-manager.h \
+ xfsm-properties.c \
+ xfsm-properties.h \
+ xfsm-shutdown-fallback.c \
+ xfsm-shutdown-fallback.h \
+ xfsm-shutdown.c \
+ xfsm-shutdown.h \
+ xfsm-startup.c \
+ xfsm-startup.h \
+ xfce-screensaver.c \
+ xfce-screensaver.h \
+ xfsm-systemd.c \
+ xfsm-systemd.h
+
+
+xfce4_session_CFLAGS = \
+ $(LIBSM_CFLAGS) \
+ $(LIBX11_CFLAGS) \
+ $(LIBXFCE4UI_CFLAGS) \
+ $(GIO_CFLAGS) \
+ $(LIBWNCK_CFLAGS) \
+ $(POLKIT_CFLAGS) \
+ $(XFCONF_CFLAGS) \
+ $(GMODULE_CFLAGS) \
+ $(PLATFORM_CFLAGS)
+
+xfce4_session_LDFLAGS = \
+ -no-undefined \
+ $(PLATFORM_LDFLAGS)
+
+xfce4_session_LDADD = \
+ $(top_builddir)/libxfsm/libxfsm.la \
+ $(LIBSM_LDFLAGS) \
+ $(LIBSM_LIBS) \
+ $(LIBX11_LDFLAGS) \
+ $(LIBX11_LIBS) \
+ $(LIBXFCE4UI_LIBS) \
+ $(GMODULE_LIBS) \
+ $(GIO_LIBS) \
+ $(LIBWNCK_LIBS) \
+ $(POLKIT_LIBS) \
+ $(XFCONF_LIBS) \
+ $(LIBM)
+
+if HAVE_POLKIT
+
+@INTLTOOL_POLICY_RULE@
+
+polkit_policydir = $(datadir)/polkit-1/actions
+polkit_policy_DATA = \
+ org.xfce.session.policy
+.in2.in:
+ sed "s|[@]HELPER_PATH_PREFIX@|${HELPER_PATH_PREFIX}|" $< > $@
+
+endif
+
+if MAINTAINER_MODE
+
+xfsm-chooser-icon.h: $(srcdir)/xfsm-chooser-icon.png
+ $(AM_V_GEN) gdk-pixbuf-csource --static --raw --stream --name=xfsm_chooser_icon_data $< > $@
+
+xfsm-marshal.h: $(srcdir)/xfsm-marshal.list Makefile
+ $(AM_V_GEN) glib-genmarshal --prefix=xfsm_marshal --internal --header $< > $@
+
+xfsm-marshal.c: $(srcdir)/xfsm-marshal.list Makefile
+ $(AM_V_GEN) echo "#include <xfce4-session/xfsm-marshal.h>" > $@ \
+ && glib-genmarshal --prefix=xfsm_marshal --body $< >> $@
+
+xfsm-client-dbus.c xfsm-client-dbus.h : $(srcdir)/xfsm-client-dbus.xml Makefile.am
+ gdbus-codegen \
+ --c-namespace=XfsmDbus \
+ --interface-prefix=org.xfce.Session. \
+ --generate-c-code=xfsm-client-dbus \
+ $(srcdir)/xfsm-client-dbus.xml
+
+xfsm-manager-dbus.c xfsm-manager-dbus.h : $(srcdir)/xfsm-manager-dbus.xml Makefile.am
+ gdbus-codegen \
+ --c-namespace=XfsmDbus \
+ --interface-prefix=org.xfce.Session. \
+ --generate-c-code=xfsm-manager-dbus \
+ $(srcdir)/xfsm-manager-dbus.xml
+
+BUILT_SOURCES = \
+ $(xfce4_session_built_sources)
+
+endif
+
+EXTRA_DIST = \
+ $(man_MANS) \
+ xfsm-chooser-icon.png \
+ xfsm-marshal.list \
+ xfsm-client-dbus.xml \
+ xfsm-manager-dbus.xml \
+ org.xfce.session.policy.in2
+
+DISTCLEANFILES = \
+ $(BUILT_SOURCES) \
+ org.xfce.session.policy \
+ org.xfce.session.policy.in
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/xfce4-session/Makefile.in b/xfce4-session/Makefile.in
new file mode 100644
index 0000000..3715249
--- /dev/null
+++ b/xfce4-session/Makefile.in
@@ -0,0 +1,1430 @@
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = xfce4-session$(EXEEXT)
+subdir = xfce4-session
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(polkit_policydir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__objects_1 = xfce4_session-xfsm-client-dbus.$(OBJEXT) \
+ xfce4_session-xfsm-manager-dbus.$(OBJEXT) \
+ xfce4_session-xfsm-marshal.$(OBJEXT)
+am_xfce4_session_OBJECTS = $(am__objects_1) \
+ xfce4_session-ice-layer.$(OBJEXT) xfce4_session-main.$(OBJEXT) \
+ xfce4_session-sm-layer.$(OBJEXT) \
+ xfce4_session-xfsm-chooser.$(OBJEXT) \
+ xfce4_session-xfsm-client.$(OBJEXT) \
+ xfce4_session-xfsm-compat-gnome.$(OBJEXT) \
+ xfce4_session-xfsm-compat-kde.$(OBJEXT) \
+ xfce4_session-xfsm-consolekit.$(OBJEXT) \
+ xfce4_session-xfsm-dns.$(OBJEXT) \
+ xfce4_session-xfsm-error.$(OBJEXT) \
+ xfce4_session-xfsm-fadeout.$(OBJEXT) \
+ xfce4_session-xfsm-global.$(OBJEXT) \
+ xfce4_session-xfsm-legacy.$(OBJEXT) \
+ xfce4_session-xfsm-logout-dialog.$(OBJEXT) \
+ xfce4_session-xfsm-manager.$(OBJEXT) \
+ xfce4_session-xfsm-properties.$(OBJEXT) \
+ xfce4_session-xfsm-shutdown-fallback.$(OBJEXT) \
+ xfce4_session-xfsm-shutdown.$(OBJEXT) \
+ xfce4_session-xfsm-startup.$(OBJEXT) \
+ xfce4_session-xfce-screensaver.$(OBJEXT) \
+ xfce4_session-xfsm-systemd.$(OBJEXT)
+xfce4_session_OBJECTS = $(am_xfce4_session_OBJECTS)
+am__DEPENDENCIES_1 =
+xfce4_session_DEPENDENCIES = $(top_builddir)/libxfsm/libxfsm.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+xfce4_session_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(xfce4_session_CFLAGS) \
+ $(CFLAGS) $(xfce4_session_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/xfce4_session-ice-layer.Po \
+ ./$(DEPDIR)/xfce4_session-main.Po \
+ ./$(DEPDIR)/xfce4_session-sm-layer.Po \
+ ./$(DEPDIR)/xfce4_session-xfce-screensaver.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-chooser.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-client-dbus.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-client.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-compat-gnome.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-compat-kde.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-consolekit.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-dns.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-error.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-fadeout.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-global.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-legacy.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-logout-dialog.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-manager-dbus.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-manager.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-marshal.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-properties.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-shutdown-fallback.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-shutdown.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-startup.Po \
+ ./$(DEPDIR)/xfce4_session-xfsm-systemd.Po
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(xfce4_session_SOURCES)
+DIST_SOURCES = $(xfce4_session_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+DATA = $(polkit_policy_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BACKEND = @BACKEND@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GIO_REQUIRED_VERSION = @GIO_REQUIRED_VERSION@
+GIO_VERSION = @GIO_VERSION@
+GMODULE_CFLAGS = @GMODULE_CFLAGS@
+GMODULE_LIBS = @GMODULE_LIBS@
+GMODULE_REQUIRED_VERSION = @GMODULE_REQUIRED_VERSION@
+GMODULE_VERSION = @GMODULE_VERSION@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@
+GTK_VERSION = @GTK_VERSION@
+HELPER_PATH_PREFIX = @HELPER_PATH_PREFIX@
+ICEAUTH = @ICEAUTH@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBM = @LIBM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSM_CFLAGS = @LIBSM_CFLAGS@
+LIBSM_LDFLAGS = @LIBSM_LDFLAGS@
+LIBSM_LIBS = @LIBSM_LIBS@
+LIBTOOL = @LIBTOOL@
+LIBWNCK_CFLAGS = @LIBWNCK_CFLAGS@
+LIBWNCK_LIBS = @LIBWNCK_LIBS@
+LIBWNCK_REQUIRED_VERSION = @LIBWNCK_REQUIRED_VERSION@
+LIBWNCK_VERSION = @LIBWNCK_VERSION@
+LIBX11_CFLAGS = @LIBX11_CFLAGS@
+LIBX11_LDFLAGS = @LIBX11_LDFLAGS@
+LIBX11_LIBS = @LIBX11_LIBS@
+LIBXFCE4UI_CFLAGS = @LIBXFCE4UI_CFLAGS@
+LIBXFCE4UI_LIBS = @LIBXFCE4UI_LIBS@
+LIBXFCE4UI_REQUIRED_VERSION = @LIBXFCE4UI_REQUIRED_VERSION@
+LIBXFCE4UI_VERSION = @LIBXFCE4UI_VERSION@
+LIBXFCE4UTIL_CFLAGS = @LIBXFCE4UTIL_CFLAGS@
+LIBXFCE4UTIL_LIBS = @LIBXFCE4UTIL_LIBS@
+LIBXFCE4UTIL_REQUIRED_VERSION = @LIBXFCE4UTIL_REQUIRED_VERSION@
+LIBXFCE4UTIL_VERSION = @LIBXFCE4UTIL_VERSION@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POLKIT_CFLAGS = @POLKIT_CFLAGS@
+POLKIT_LIBS = @POLKIT_LIBS@
+POLKIT_REQUIRED_VERSION = @POLKIT_REQUIRED_VERSION@
+POLKIT_VERSION = @POLKIT_VERSION@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XFCONF_CFLAGS = @XFCONF_CFLAGS@
+XFCONF_LIBS = @XFCONF_LIBS@
+XFCONF_REQUIRED_VERSION = @XFCONF_REQUIRED_VERSION@
+XFCONF_VERSION = @XFCONF_VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_ARGS = @XGETTEXT_ARGS@
+XMKMF = @XMKMF@
+XSESSION_PREFIX = @XSESSION_PREFIX@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/libxfsm \
+ -DG_LOG_DOMAIN=\"xfce4-session\" \
+ -DLIBDIR=\"$(libdir)\" \
+ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DXFSM_SHUTDOWN_HELPER_CMD=\"$(HELPER_PATH_PREFIX)/xfce4/session/xfsm-shutdown-helper\" \
+ -DDBUS_API_SUBJECT_TO_CHANGE \
+ -DWNCK_I_KNOW_THIS_IS_UNSTABLE \
+ -DUPOWER_ENABLE_DEPRECATED \
+ $(PLATFORM_CPPFLAGS)
+
+man_MANS = xfce4-session.1
+xfce4_session_built_sources = \
+ xfsm-chooser-icon.h \
+ xfsm-client-dbus.c \
+ xfsm-client-dbus.h \
+ xfsm-manager-dbus.c \
+ xfsm-manager-dbus.h \
+ xfsm-marshal.c \
+ xfsm-marshal.h
+
+xfce4_session_SOURCES = \
+ $(xfce4_session_built_sources) \
+ ice-layer.c \
+ ice-layer.h \
+ main.c \
+ sm-layer.c \
+ sm-layer.h \
+ xfsm-chooser.c \
+ xfsm-chooser.h \
+ xfsm-client.c \
+ xfsm-client.h \
+ xfsm-client-dbus.h \
+ xfsm-compat-gnome.c \
+ xfsm-compat-gnome.h \
+ xfsm-compat-kde.c \
+ xfsm-compat-kde.h \
+ xfsm-consolekit.c \
+ xfsm-consolekit.h \
+ xfsm-dns.c \
+ xfsm-dns.h \
+ xfsm-error.c \
+ xfsm-error.h \
+ xfsm-fadeout.c \
+ xfsm-fadeout.h \
+ xfsm-global.c \
+ xfsm-global.h \
+ xfsm-legacy.c \
+ xfsm-legacy.h \
+ xfsm-logout-dialog.c \
+ xfsm-logout-dialog.h \
+ xfsm-manager.c \
+ xfsm-manager.h \
+ xfsm-properties.c \
+ xfsm-properties.h \
+ xfsm-shutdown-fallback.c \
+ xfsm-shutdown-fallback.h \
+ xfsm-shutdown.c \
+ xfsm-shutdown.h \
+ xfsm-startup.c \
+ xfsm-startup.h \
+ xfce-screensaver.c \
+ xfce-screensaver.h \
+ xfsm-systemd.c \
+ xfsm-systemd.h
+
+xfce4_session_CFLAGS = \
+ $(LIBSM_CFLAGS) \
+ $(LIBX11_CFLAGS) \
+ $(LIBXFCE4UI_CFLAGS) \
+ $(GIO_CFLAGS) \
+ $(LIBWNCK_CFLAGS) \
+ $(POLKIT_CFLAGS) \
+ $(XFCONF_CFLAGS) \
+ $(GMODULE_CFLAGS) \
+ $(PLATFORM_CFLAGS)
+
+xfce4_session_LDFLAGS = \
+ -no-undefined \
+ $(PLATFORM_LDFLAGS)
+
+xfce4_session_LDADD = \
+ $(top_builddir)/libxfsm/libxfsm.la \
+ $(LIBSM_LDFLAGS) \
+ $(LIBSM_LIBS) \
+ $(LIBX11_LDFLAGS) \
+ $(LIBX11_LIBS) \
+ $(LIBXFCE4UI_LIBS) \
+ $(GMODULE_LIBS) \
+ $(GIO_LIBS) \
+ $(LIBWNCK_LIBS) \
+ $(POLKIT_LIBS) \
+ $(XFCONF_LIBS) \
+ $(LIBM)
+
+@HAVE_POLKIT_TRUE@polkit_policydir = $(datadir)/polkit-1/actions
+@HAVE_POLKIT_TRUE@polkit_policy_DATA = \
+@HAVE_POLKIT_TRUE@ org.xfce.session.policy
+
+@MAINTAINER_MODE_TRUE@BUILT_SOURCES = \
+@MAINTAINER_MODE_TRUE@ $(xfce4_session_built_sources)
+
+EXTRA_DIST = \
+ $(man_MANS) \
+ xfsm-chooser-icon.png \
+ xfsm-marshal.list \
+ xfsm-client-dbus.xml \
+ xfsm-manager-dbus.xml \
+ org.xfce.session.policy.in2
+
+DISTCLEANFILES = \
+ $(BUILT_SOURCES) \
+ org.xfce.session.policy \
+ org.xfce.session.policy.in
+
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .in .in2 .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign xfce4-session/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign xfce4-session/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+xfce4-session$(EXEEXT): $(xfce4_session_OBJECTS) $(xfce4_session_DEPENDENCIES) $(EXTRA_xfce4_session_DEPENDENCIES)
+ @rm -f xfce4-session$(EXEEXT)
+ $(AM_V_CCLD)$(xfce4_session_LINK) $(xfce4_session_OBJECTS) $(xfce4_session_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-ice-layer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-sm-layer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfce-screensaver.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-chooser.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-client-dbus.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-compat-gnome.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-compat-kde.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-consolekit.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-dns.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-fadeout.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-global.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-legacy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-logout-dialog.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-manager-dbus.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-manager.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-marshal.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-properties.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-shutdown-fallback.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-shutdown.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-startup.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfce4_session-xfsm-systemd.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+xfce4_session-xfsm-client-dbus.o: xfsm-client-dbus.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-client-dbus.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-client-dbus.Tpo -c -o xfce4_session-xfsm-client-dbus.o `test -f 'xfsm-client-dbus.c' || echo '$(srcdir)/'`xfsm-client-dbus.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-client-dbus.Tpo $(DEPDIR)/xfce4_session-xfsm-client-dbus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-client-dbus.c' object='xfce4_session-xfsm-client-dbus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-client-dbus.o `test -f 'xfsm-client-dbus.c' || echo '$(srcdir)/'`xfsm-client-dbus.c
+
+xfce4_session-xfsm-client-dbus.obj: xfsm-client-dbus.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-client-dbus.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-client-dbus.Tpo -c -o xfce4_session-xfsm-client-dbus.obj `if test -f 'xfsm-client-dbus.c'; then $(CYGPATH_W) 'xfsm-client-dbus.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-client-dbus.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-client-dbus.Tpo $(DEPDIR)/xfce4_session-xfsm-client-dbus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-client-dbus.c' object='xfce4_session-xfsm-client-dbus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-client-dbus.obj `if test -f 'xfsm-client-dbus.c'; then $(CYGPATH_W) 'xfsm-client-dbus.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-client-dbus.c'; fi`
+
+xfce4_session-xfsm-manager-dbus.o: xfsm-manager-dbus.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-manager-dbus.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-manager-dbus.Tpo -c -o xfce4_session-xfsm-manager-dbus.o `test -f 'xfsm-manager-dbus.c' || echo '$(srcdir)/'`xfsm-manager-dbus.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-manager-dbus.Tpo $(DEPDIR)/xfce4_session-xfsm-manager-dbus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-manager-dbus.c' object='xfce4_session-xfsm-manager-dbus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-manager-dbus.o `test -f 'xfsm-manager-dbus.c' || echo '$(srcdir)/'`xfsm-manager-dbus.c
+
+xfce4_session-xfsm-manager-dbus.obj: xfsm-manager-dbus.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-manager-dbus.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-manager-dbus.Tpo -c -o xfce4_session-xfsm-manager-dbus.obj `if test -f 'xfsm-manager-dbus.c'; then $(CYGPATH_W) 'xfsm-manager-dbus.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-manager-dbus.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-manager-dbus.Tpo $(DEPDIR)/xfce4_session-xfsm-manager-dbus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-manager-dbus.c' object='xfce4_session-xfsm-manager-dbus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-manager-dbus.obj `if test -f 'xfsm-manager-dbus.c'; then $(CYGPATH_W) 'xfsm-manager-dbus.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-manager-dbus.c'; fi`
+
+xfce4_session-xfsm-marshal.o: xfsm-marshal.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-marshal.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-marshal.Tpo -c -o xfce4_session-xfsm-marshal.o `test -f 'xfsm-marshal.c' || echo '$(srcdir)/'`xfsm-marshal.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-marshal.Tpo $(DEPDIR)/xfce4_session-xfsm-marshal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-marshal.c' object='xfce4_session-xfsm-marshal.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-marshal.o `test -f 'xfsm-marshal.c' || echo '$(srcdir)/'`xfsm-marshal.c
+
+xfce4_session-xfsm-marshal.obj: xfsm-marshal.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-marshal.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-marshal.Tpo -c -o xfce4_session-xfsm-marshal.obj `if test -f 'xfsm-marshal.c'; then $(CYGPATH_W) 'xfsm-marshal.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-marshal.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-marshal.Tpo $(DEPDIR)/xfce4_session-xfsm-marshal.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-marshal.c' object='xfce4_session-xfsm-marshal.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-marshal.obj `if test -f 'xfsm-marshal.c'; then $(CYGPATH_W) 'xfsm-marshal.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-marshal.c'; fi`
+
+xfce4_session-ice-layer.o: ice-layer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-ice-layer.o -MD -MP -MF $(DEPDIR)/xfce4_session-ice-layer.Tpo -c -o xfce4_session-ice-layer.o `test -f 'ice-layer.c' || echo '$(srcdir)/'`ice-layer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-ice-layer.Tpo $(DEPDIR)/xfce4_session-ice-layer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ice-layer.c' object='xfce4_session-ice-layer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-ice-layer.o `test -f 'ice-layer.c' || echo '$(srcdir)/'`ice-layer.c
+
+xfce4_session-ice-layer.obj: ice-layer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-ice-layer.obj -MD -MP -MF $(DEPDIR)/xfce4_session-ice-layer.Tpo -c -o xfce4_session-ice-layer.obj `if test -f 'ice-layer.c'; then $(CYGPATH_W) 'ice-layer.c'; else $(CYGPATH_W) '$(srcdir)/ice-layer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-ice-layer.Tpo $(DEPDIR)/xfce4_session-ice-layer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ice-layer.c' object='xfce4_session-ice-layer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-ice-layer.obj `if test -f 'ice-layer.c'; then $(CYGPATH_W) 'ice-layer.c'; else $(CYGPATH_W) '$(srcdir)/ice-layer.c'; fi`
+
+xfce4_session-main.o: main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-main.o -MD -MP -MF $(DEPDIR)/xfce4_session-main.Tpo -c -o xfce4_session-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-main.Tpo $(DEPDIR)/xfce4_session-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='xfce4_session-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+
+xfce4_session-main.obj: main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-main.obj -MD -MP -MF $(DEPDIR)/xfce4_session-main.Tpo -c -o xfce4_session-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-main.Tpo $(DEPDIR)/xfce4_session-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='xfce4_session-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+
+xfce4_session-sm-layer.o: sm-layer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-sm-layer.o -MD -MP -MF $(DEPDIR)/xfce4_session-sm-layer.Tpo -c -o xfce4_session-sm-layer.o `test -f 'sm-layer.c' || echo '$(srcdir)/'`sm-layer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-sm-layer.Tpo $(DEPDIR)/xfce4_session-sm-layer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sm-layer.c' object='xfce4_session-sm-layer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-sm-layer.o `test -f 'sm-layer.c' || echo '$(srcdir)/'`sm-layer.c
+
+xfce4_session-sm-layer.obj: sm-layer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-sm-layer.obj -MD -MP -MF $(DEPDIR)/xfce4_session-sm-layer.Tpo -c -o xfce4_session-sm-layer.obj `if test -f 'sm-layer.c'; then $(CYGPATH_W) 'sm-layer.c'; else $(CYGPATH_W) '$(srcdir)/sm-layer.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-sm-layer.Tpo $(DEPDIR)/xfce4_session-sm-layer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sm-layer.c' object='xfce4_session-sm-layer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-sm-layer.obj `if test -f 'sm-layer.c'; then $(CYGPATH_W) 'sm-layer.c'; else $(CYGPATH_W) '$(srcdir)/sm-layer.c'; fi`
+
+xfce4_session-xfsm-chooser.o: xfsm-chooser.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-chooser.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-chooser.Tpo -c -o xfce4_session-xfsm-chooser.o `test -f 'xfsm-chooser.c' || echo '$(srcdir)/'`xfsm-chooser.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-chooser.Tpo $(DEPDIR)/xfce4_session-xfsm-chooser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-chooser.c' object='xfce4_session-xfsm-chooser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-chooser.o `test -f 'xfsm-chooser.c' || echo '$(srcdir)/'`xfsm-chooser.c
+
+xfce4_session-xfsm-chooser.obj: xfsm-chooser.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-chooser.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-chooser.Tpo -c -o xfce4_session-xfsm-chooser.obj `if test -f 'xfsm-chooser.c'; then $(CYGPATH_W) 'xfsm-chooser.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-chooser.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-chooser.Tpo $(DEPDIR)/xfce4_session-xfsm-chooser.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-chooser.c' object='xfce4_session-xfsm-chooser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-chooser.obj `if test -f 'xfsm-chooser.c'; then $(CYGPATH_W) 'xfsm-chooser.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-chooser.c'; fi`
+
+xfce4_session-xfsm-client.o: xfsm-client.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-client.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-client.Tpo -c -o xfce4_session-xfsm-client.o `test -f 'xfsm-client.c' || echo '$(srcdir)/'`xfsm-client.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-client.Tpo $(DEPDIR)/xfce4_session-xfsm-client.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-client.c' object='xfce4_session-xfsm-client.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-client.o `test -f 'xfsm-client.c' || echo '$(srcdir)/'`xfsm-client.c
+
+xfce4_session-xfsm-client.obj: xfsm-client.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-client.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-client.Tpo -c -o xfce4_session-xfsm-client.obj `if test -f 'xfsm-client.c'; then $(CYGPATH_W) 'xfsm-client.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-client.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-client.Tpo $(DEPDIR)/xfce4_session-xfsm-client.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-client.c' object='xfce4_session-xfsm-client.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-client.obj `if test -f 'xfsm-client.c'; then $(CYGPATH_W) 'xfsm-client.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-client.c'; fi`
+
+xfce4_session-xfsm-compat-gnome.o: xfsm-compat-gnome.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-compat-gnome.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-compat-gnome.Tpo -c -o xfce4_session-xfsm-compat-gnome.o `test -f 'xfsm-compat-gnome.c' || echo '$(srcdir)/'`xfsm-compat-gnome.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-compat-gnome.Tpo $(DEPDIR)/xfce4_session-xfsm-compat-gnome.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-compat-gnome.c' object='xfce4_session-xfsm-compat-gnome.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-compat-gnome.o `test -f 'xfsm-compat-gnome.c' || echo '$(srcdir)/'`xfsm-compat-gnome.c
+
+xfce4_session-xfsm-compat-gnome.obj: xfsm-compat-gnome.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-compat-gnome.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-compat-gnome.Tpo -c -o xfce4_session-xfsm-compat-gnome.obj `if test -f 'xfsm-compat-gnome.c'; then $(CYGPATH_W) 'xfsm-compat-gnome.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-compat-gnome.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-compat-gnome.Tpo $(DEPDIR)/xfce4_session-xfsm-compat-gnome.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-compat-gnome.c' object='xfce4_session-xfsm-compat-gnome.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-compat-gnome.obj `if test -f 'xfsm-compat-gnome.c'; then $(CYGPATH_W) 'xfsm-compat-gnome.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-compat-gnome.c'; fi`
+
+xfce4_session-xfsm-compat-kde.o: xfsm-compat-kde.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-compat-kde.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-compat-kde.Tpo -c -o xfce4_session-xfsm-compat-kde.o `test -f 'xfsm-compat-kde.c' || echo '$(srcdir)/'`xfsm-compat-kde.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-compat-kde.Tpo $(DEPDIR)/xfce4_session-xfsm-compat-kde.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-compat-kde.c' object='xfce4_session-xfsm-compat-kde.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-compat-kde.o `test -f 'xfsm-compat-kde.c' || echo '$(srcdir)/'`xfsm-compat-kde.c
+
+xfce4_session-xfsm-compat-kde.obj: xfsm-compat-kde.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-compat-kde.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-compat-kde.Tpo -c -o xfce4_session-xfsm-compat-kde.obj `if test -f 'xfsm-compat-kde.c'; then $(CYGPATH_W) 'xfsm-compat-kde.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-compat-kde.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-compat-kde.Tpo $(DEPDIR)/xfce4_session-xfsm-compat-kde.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-compat-kde.c' object='xfce4_session-xfsm-compat-kde.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-compat-kde.obj `if test -f 'xfsm-compat-kde.c'; then $(CYGPATH_W) 'xfsm-compat-kde.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-compat-kde.c'; fi`
+
+xfce4_session-xfsm-consolekit.o: xfsm-consolekit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-consolekit.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-consolekit.Tpo -c -o xfce4_session-xfsm-consolekit.o `test -f 'xfsm-consolekit.c' || echo '$(srcdir)/'`xfsm-consolekit.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-consolekit.Tpo $(DEPDIR)/xfce4_session-xfsm-consolekit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-consolekit.c' object='xfce4_session-xfsm-consolekit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-consolekit.o `test -f 'xfsm-consolekit.c' || echo '$(srcdir)/'`xfsm-consolekit.c
+
+xfce4_session-xfsm-consolekit.obj: xfsm-consolekit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-consolekit.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-consolekit.Tpo -c -o xfce4_session-xfsm-consolekit.obj `if test -f 'xfsm-consolekit.c'; then $(CYGPATH_W) 'xfsm-consolekit.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-consolekit.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-consolekit.Tpo $(DEPDIR)/xfce4_session-xfsm-consolekit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-consolekit.c' object='xfce4_session-xfsm-consolekit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-consolekit.obj `if test -f 'xfsm-consolekit.c'; then $(CYGPATH_W) 'xfsm-consolekit.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-consolekit.c'; fi`
+
+xfce4_session-xfsm-dns.o: xfsm-dns.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-dns.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-dns.Tpo -c -o xfce4_session-xfsm-dns.o `test -f 'xfsm-dns.c' || echo '$(srcdir)/'`xfsm-dns.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-dns.Tpo $(DEPDIR)/xfce4_session-xfsm-dns.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-dns.c' object='xfce4_session-xfsm-dns.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-dns.o `test -f 'xfsm-dns.c' || echo '$(srcdir)/'`xfsm-dns.c
+
+xfce4_session-xfsm-dns.obj: xfsm-dns.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-dns.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-dns.Tpo -c -o xfce4_session-xfsm-dns.obj `if test -f 'xfsm-dns.c'; then $(CYGPATH_W) 'xfsm-dns.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-dns.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-dns.Tpo $(DEPDIR)/xfce4_session-xfsm-dns.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-dns.c' object='xfce4_session-xfsm-dns.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-dns.obj `if test -f 'xfsm-dns.c'; then $(CYGPATH_W) 'xfsm-dns.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-dns.c'; fi`
+
+xfce4_session-xfsm-error.o: xfsm-error.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-error.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-error.Tpo -c -o xfce4_session-xfsm-error.o `test -f 'xfsm-error.c' || echo '$(srcdir)/'`xfsm-error.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-error.Tpo $(DEPDIR)/xfce4_session-xfsm-error.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-error.c' object='xfce4_session-xfsm-error.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-error.o `test -f 'xfsm-error.c' || echo '$(srcdir)/'`xfsm-error.c
+
+xfce4_session-xfsm-error.obj: xfsm-error.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-error.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-error.Tpo -c -o xfce4_session-xfsm-error.obj `if test -f 'xfsm-error.c'; then $(CYGPATH_W) 'xfsm-error.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-error.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-error.Tpo $(DEPDIR)/xfce4_session-xfsm-error.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-error.c' object='xfce4_session-xfsm-error.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-error.obj `if test -f 'xfsm-error.c'; then $(CYGPATH_W) 'xfsm-error.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-error.c'; fi`
+
+xfce4_session-xfsm-fadeout.o: xfsm-fadeout.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-fadeout.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-fadeout.Tpo -c -o xfce4_session-xfsm-fadeout.o `test -f 'xfsm-fadeout.c' || echo '$(srcdir)/'`xfsm-fadeout.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-fadeout.Tpo $(DEPDIR)/xfce4_session-xfsm-fadeout.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-fadeout.c' object='xfce4_session-xfsm-fadeout.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-fadeout.o `test -f 'xfsm-fadeout.c' || echo '$(srcdir)/'`xfsm-fadeout.c
+
+xfce4_session-xfsm-fadeout.obj: xfsm-fadeout.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-fadeout.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-fadeout.Tpo -c -o xfce4_session-xfsm-fadeout.obj `if test -f 'xfsm-fadeout.c'; then $(CYGPATH_W) 'xfsm-fadeout.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-fadeout.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-fadeout.Tpo $(DEPDIR)/xfce4_session-xfsm-fadeout.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-fadeout.c' object='xfce4_session-xfsm-fadeout.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-fadeout.obj `if test -f 'xfsm-fadeout.c'; then $(CYGPATH_W) 'xfsm-fadeout.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-fadeout.c'; fi`
+
+xfce4_session-xfsm-global.o: xfsm-global.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-global.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-global.Tpo -c -o xfce4_session-xfsm-global.o `test -f 'xfsm-global.c' || echo '$(srcdir)/'`xfsm-global.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-global.Tpo $(DEPDIR)/xfce4_session-xfsm-global.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-global.c' object='xfce4_session-xfsm-global.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-global.o `test -f 'xfsm-global.c' || echo '$(srcdir)/'`xfsm-global.c
+
+xfce4_session-xfsm-global.obj: xfsm-global.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-global.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-global.Tpo -c -o xfce4_session-xfsm-global.obj `if test -f 'xfsm-global.c'; then $(CYGPATH_W) 'xfsm-global.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-global.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-global.Tpo $(DEPDIR)/xfce4_session-xfsm-global.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-global.c' object='xfce4_session-xfsm-global.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-global.obj `if test -f 'xfsm-global.c'; then $(CYGPATH_W) 'xfsm-global.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-global.c'; fi`
+
+xfce4_session-xfsm-legacy.o: xfsm-legacy.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-legacy.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-legacy.Tpo -c -o xfce4_session-xfsm-legacy.o `test -f 'xfsm-legacy.c' || echo '$(srcdir)/'`xfsm-legacy.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-legacy.Tpo $(DEPDIR)/xfce4_session-xfsm-legacy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-legacy.c' object='xfce4_session-xfsm-legacy.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-legacy.o `test -f 'xfsm-legacy.c' || echo '$(srcdir)/'`xfsm-legacy.c
+
+xfce4_session-xfsm-legacy.obj: xfsm-legacy.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-legacy.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-legacy.Tpo -c -o xfce4_session-xfsm-legacy.obj `if test -f 'xfsm-legacy.c'; then $(CYGPATH_W) 'xfsm-legacy.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-legacy.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-legacy.Tpo $(DEPDIR)/xfce4_session-xfsm-legacy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-legacy.c' object='xfce4_session-xfsm-legacy.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-legacy.obj `if test -f 'xfsm-legacy.c'; then $(CYGPATH_W) 'xfsm-legacy.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-legacy.c'; fi`
+
+xfce4_session-xfsm-logout-dialog.o: xfsm-logout-dialog.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-logout-dialog.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-logout-dialog.Tpo -c -o xfce4_session-xfsm-logout-dialog.o `test -f 'xfsm-logout-dialog.c' || echo '$(srcdir)/'`xfsm-logout-dialog.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-logout-dialog.Tpo $(DEPDIR)/xfce4_session-xfsm-logout-dialog.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-logout-dialog.c' object='xfce4_session-xfsm-logout-dialog.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-logout-dialog.o `test -f 'xfsm-logout-dialog.c' || echo '$(srcdir)/'`xfsm-logout-dialog.c
+
+xfce4_session-xfsm-logout-dialog.obj: xfsm-logout-dialog.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-logout-dialog.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-logout-dialog.Tpo -c -o xfce4_session-xfsm-logout-dialog.obj `if test -f 'xfsm-logout-dialog.c'; then $(CYGPATH_W) 'xfsm-logout-dialog.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-logout-dialog.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-logout-dialog.Tpo $(DEPDIR)/xfce4_session-xfsm-logout-dialog.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-logout-dialog.c' object='xfce4_session-xfsm-logout-dialog.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-logout-dialog.obj `if test -f 'xfsm-logout-dialog.c'; then $(CYGPATH_W) 'xfsm-logout-dialog.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-logout-dialog.c'; fi`
+
+xfce4_session-xfsm-manager.o: xfsm-manager.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-manager.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-manager.Tpo -c -o xfce4_session-xfsm-manager.o `test -f 'xfsm-manager.c' || echo '$(srcdir)/'`xfsm-manager.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-manager.Tpo $(DEPDIR)/xfce4_session-xfsm-manager.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-manager.c' object='xfce4_session-xfsm-manager.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-manager.o `test -f 'xfsm-manager.c' || echo '$(srcdir)/'`xfsm-manager.c
+
+xfce4_session-xfsm-manager.obj: xfsm-manager.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-manager.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-manager.Tpo -c -o xfce4_session-xfsm-manager.obj `if test -f 'xfsm-manager.c'; then $(CYGPATH_W) 'xfsm-manager.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-manager.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-manager.Tpo $(DEPDIR)/xfce4_session-xfsm-manager.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-manager.c' object='xfce4_session-xfsm-manager.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-manager.obj `if test -f 'xfsm-manager.c'; then $(CYGPATH_W) 'xfsm-manager.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-manager.c'; fi`
+
+xfce4_session-xfsm-properties.o: xfsm-properties.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-properties.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-properties.Tpo -c -o xfce4_session-xfsm-properties.o `test -f 'xfsm-properties.c' || echo '$(srcdir)/'`xfsm-properties.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-properties.Tpo $(DEPDIR)/xfce4_session-xfsm-properties.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-properties.c' object='xfce4_session-xfsm-properties.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-properties.o `test -f 'xfsm-properties.c' || echo '$(srcdir)/'`xfsm-properties.c
+
+xfce4_session-xfsm-properties.obj: xfsm-properties.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-properties.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-properties.Tpo -c -o xfce4_session-xfsm-properties.obj `if test -f 'xfsm-properties.c'; then $(CYGPATH_W) 'xfsm-properties.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-properties.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-properties.Tpo $(DEPDIR)/xfce4_session-xfsm-properties.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-properties.c' object='xfce4_session-xfsm-properties.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-properties.obj `if test -f 'xfsm-properties.c'; then $(CYGPATH_W) 'xfsm-properties.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-properties.c'; fi`
+
+xfce4_session-xfsm-shutdown-fallback.o: xfsm-shutdown-fallback.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-shutdown-fallback.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-shutdown-fallback.Tpo -c -o xfce4_session-xfsm-shutdown-fallback.o `test -f 'xfsm-shutdown-fallback.c' || echo '$(srcdir)/'`xfsm-shutdown-fallback.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-shutdown-fallback.Tpo $(DEPDIR)/xfce4_session-xfsm-shutdown-fallback.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-shutdown-fallback.c' object='xfce4_session-xfsm-shutdown-fallback.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-shutdown-fallback.o `test -f 'xfsm-shutdown-fallback.c' || echo '$(srcdir)/'`xfsm-shutdown-fallback.c
+
+xfce4_session-xfsm-shutdown-fallback.obj: xfsm-shutdown-fallback.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-shutdown-fallback.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-shutdown-fallback.Tpo -c -o xfce4_session-xfsm-shutdown-fallback.obj `if test -f 'xfsm-shutdown-fallback.c'; then $(CYGPATH_W) 'xfsm-shutdown-fallback.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-shutdown-fallback.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-shutdown-fallback.Tpo $(DEPDIR)/xfce4_session-xfsm-shutdown-fallback.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-shutdown-fallback.c' object='xfce4_session-xfsm-shutdown-fallback.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-shutdown-fallback.obj `if test -f 'xfsm-shutdown-fallback.c'; then $(CYGPATH_W) 'xfsm-shutdown-fallback.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-shutdown-fallback.c'; fi`
+
+xfce4_session-xfsm-shutdown.o: xfsm-shutdown.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-shutdown.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-shutdown.Tpo -c -o xfce4_session-xfsm-shutdown.o `test -f 'xfsm-shutdown.c' || echo '$(srcdir)/'`xfsm-shutdown.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-shutdown.Tpo $(DEPDIR)/xfce4_session-xfsm-shutdown.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-shutdown.c' object='xfce4_session-xfsm-shutdown.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-shutdown.o `test -f 'xfsm-shutdown.c' || echo '$(srcdir)/'`xfsm-shutdown.c
+
+xfce4_session-xfsm-shutdown.obj: xfsm-shutdown.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-shutdown.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-shutdown.Tpo -c -o xfce4_session-xfsm-shutdown.obj `if test -f 'xfsm-shutdown.c'; then $(CYGPATH_W) 'xfsm-shutdown.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-shutdown.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-shutdown.Tpo $(DEPDIR)/xfce4_session-xfsm-shutdown.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-shutdown.c' object='xfce4_session-xfsm-shutdown.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-shutdown.obj `if test -f 'xfsm-shutdown.c'; then $(CYGPATH_W) 'xfsm-shutdown.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-shutdown.c'; fi`
+
+xfce4_session-xfsm-startup.o: xfsm-startup.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-startup.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-startup.Tpo -c -o xfce4_session-xfsm-startup.o `test -f 'xfsm-startup.c' || echo '$(srcdir)/'`xfsm-startup.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-startup.Tpo $(DEPDIR)/xfce4_session-xfsm-startup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-startup.c' object='xfce4_session-xfsm-startup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-startup.o `test -f 'xfsm-startup.c' || echo '$(srcdir)/'`xfsm-startup.c
+
+xfce4_session-xfsm-startup.obj: xfsm-startup.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-startup.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-startup.Tpo -c -o xfce4_session-xfsm-startup.obj `if test -f 'xfsm-startup.c'; then $(CYGPATH_W) 'xfsm-startup.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-startup.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-startup.Tpo $(DEPDIR)/xfce4_session-xfsm-startup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-startup.c' object='xfce4_session-xfsm-startup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-startup.obj `if test -f 'xfsm-startup.c'; then $(CYGPATH_W) 'xfsm-startup.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-startup.c'; fi`
+
+xfce4_session-xfce-screensaver.o: xfce-screensaver.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfce-screensaver.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfce-screensaver.Tpo -c -o xfce4_session-xfce-screensaver.o `test -f 'xfce-screensaver.c' || echo '$(srcdir)/'`xfce-screensaver.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfce-screensaver.Tpo $(DEPDIR)/xfce4_session-xfce-screensaver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfce-screensaver.c' object='xfce4_session-xfce-screensaver.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfce-screensaver.o `test -f 'xfce-screensaver.c' || echo '$(srcdir)/'`xfce-screensaver.c
+
+xfce4_session-xfce-screensaver.obj: xfce-screensaver.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfce-screensaver.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfce-screensaver.Tpo -c -o xfce4_session-xfce-screensaver.obj `if test -f 'xfce-screensaver.c'; then $(CYGPATH_W) 'xfce-screensaver.c'; else $(CYGPATH_W) '$(srcdir)/xfce-screensaver.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfce-screensaver.Tpo $(DEPDIR)/xfce4_session-xfce-screensaver.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfce-screensaver.c' object='xfce4_session-xfce-screensaver.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfce-screensaver.obj `if test -f 'xfce-screensaver.c'; then $(CYGPATH_W) 'xfce-screensaver.c'; else $(CYGPATH_W) '$(srcdir)/xfce-screensaver.c'; fi`
+
+xfce4_session-xfsm-systemd.o: xfsm-systemd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-systemd.o -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-systemd.Tpo -c -o xfce4_session-xfsm-systemd.o `test -f 'xfsm-systemd.c' || echo '$(srcdir)/'`xfsm-systemd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-systemd.Tpo $(DEPDIR)/xfce4_session-xfsm-systemd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-systemd.c' object='xfce4_session-xfsm-systemd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-systemd.o `test -f 'xfsm-systemd.c' || echo '$(srcdir)/'`xfsm-systemd.c
+
+xfce4_session-xfsm-systemd.obj: xfsm-systemd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -MT xfce4_session-xfsm-systemd.obj -MD -MP -MF $(DEPDIR)/xfce4_session-xfsm-systemd.Tpo -c -o xfce4_session-xfsm-systemd.obj `if test -f 'xfsm-systemd.c'; then $(CYGPATH_W) 'xfsm-systemd.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-systemd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xfce4_session-xfsm-systemd.Tpo $(DEPDIR)/xfce4_session-xfsm-systemd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfsm-systemd.c' object='xfce4_session-xfsm-systemd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfce4_session_CFLAGS) $(CFLAGS) -c -o xfce4_session-xfsm-systemd.obj `if test -f 'xfsm-systemd.c'; then $(CYGPATH_W) 'xfsm-systemd.c'; else $(CYGPATH_W) '$(srcdir)/xfsm-systemd.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man_MANS)
+ @$(NORMAL_INSTALL)
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+install-polkit_policyDATA: $(polkit_policy_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(polkit_policy_DATA)'; test -n "$(polkit_policydir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(polkit_policydir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(polkit_policydir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(polkit_policydir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(polkit_policydir)" || exit $$?; \
+ done
+
+uninstall-polkit_policyDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(polkit_policy_DATA)'; test -n "$(polkit_policydir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(polkit_policydir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(polkit_policydir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/xfce4_session-ice-layer.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-main.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-sm-layer.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfce-screensaver.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-chooser.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-client-dbus.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-client.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-compat-gnome.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-compat-kde.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-consolekit.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-dns.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-error.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-fadeout.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-global.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-legacy.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-logout-dialog.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-manager-dbus.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-manager.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-marshal.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-properties.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-shutdown-fallback.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-shutdown.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-startup.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-systemd.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man install-polkit_policyDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ./$(DEPDIR)/xfce4_session-ice-layer.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-main.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-sm-layer.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfce-screensaver.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-chooser.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-client-dbus.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-client.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-compat-gnome.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-compat-kde.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-consolekit.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-dns.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-error.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-fadeout.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-global.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-legacy.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-logout-dialog.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-manager-dbus.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-manager.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-marshal.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-properties.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-shutdown-fallback.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-shutdown.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-startup.Po
+ -rm -f ./$(DEPDIR)/xfce4_session-xfsm-systemd.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man \
+ uninstall-polkit_policyDATA
+
+uninstall-man: uninstall-man1
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-man1 \
+ install-pdf install-pdf-am install-polkit_policyDATA \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-man uninstall-man1 uninstall-polkit_policyDATA
+
+.PRECIOUS: Makefile
+
+
+@HAVE_POLKIT_TRUE@@INTLTOOL_POLICY_RULE@
+@HAVE_POLKIT_TRUE@.in2.in:
+@HAVE_POLKIT_TRUE@ sed "s|[@]HELPER_PATH_PREFIX@|${HELPER_PATH_PREFIX}|" $< > $@
+
+@MAINTAINER_MODE_TRUE@xfsm-chooser-icon.h: $(srcdir)/xfsm-chooser-icon.png
+@MAINTAINER_MODE_TRUE@ $(AM_V_GEN) gdk-pixbuf-csource --static --raw --stream --name=xfsm_chooser_icon_data $< > $@
+
+@MAINTAINER_MODE_TRUE@xfsm-marshal.h: $(srcdir)/xfsm-marshal.list Makefile
+@MAINTAINER_MODE_TRUE@ $(AM_V_GEN) glib-genmarshal --prefix=xfsm_marshal --internal --header $< > $@
+
+@MAINTAINER_MODE_TRUE@xfsm-marshal.c: $(srcdir)/xfsm-marshal.list Makefile
+@MAINTAINER_MODE_TRUE@ $(AM_V_GEN) echo "#include <xfce4-session/xfsm-marshal.h>" > $@ \
+@MAINTAINER_MODE_TRUE@ && glib-genmarshal --prefix=xfsm_marshal --body $< >> $@
+
+@MAINTAINER_MODE_TRUE@xfsm-client-dbus.c xfsm-client-dbus.h : $(srcdir)/xfsm-client-dbus.xml Makefile.am
+@MAINTAINER_MODE_TRUE@ gdbus-codegen \
+@MAINTAINER_MODE_TRUE@ --c-namespace=XfsmDbus \
+@MAINTAINER_MODE_TRUE@ --interface-prefix=org.xfce.Session. \
+@MAINTAINER_MODE_TRUE@ --generate-c-code=xfsm-client-dbus \
+@MAINTAINER_MODE_TRUE@ $(srcdir)/xfsm-client-dbus.xml
+
+@MAINTAINER_MODE_TRUE@xfsm-manager-dbus.c xfsm-manager-dbus.h : $(srcdir)/xfsm-manager-dbus.xml Makefile.am
+@MAINTAINER_MODE_TRUE@ gdbus-codegen \
+@MAINTAINER_MODE_TRUE@ --c-namespace=XfsmDbus \
+@MAINTAINER_MODE_TRUE@ --interface-prefix=org.xfce.Session. \
+@MAINTAINER_MODE_TRUE@ --generate-c-code=xfsm-manager-dbus \
+@MAINTAINER_MODE_TRUE@ $(srcdir)/xfsm-manager-dbus.xml
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/xfce4-session/ice-layer.c b/xfce4-session/ice-layer.c
new file mode 100644
index 0000000..9ae7473
--- /dev/null
+++ b/xfce4-session/ice-layer.c
@@ -0,0 +1,384 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
+ * Copyright (c) 2008 Brian Tarricone <bjt23@cornell.edu>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <X11/ICE/ICElib.h>
+#include <X11/ICE/ICEutil.h>
+#include <X11/SM/SMlib.h>
+
+#include <libxfce4util/libxfce4util.h>
+
+#include <xfce4-session/ice-layer.h>
+#include <xfce4-session/xfsm-global.h>
+#include <xfce4-session/xfsm-manager.h>
+
+typedef struct
+{
+ XfsmManager *manager;
+ IceConn ice_conn;
+} XfsmIceConnData;
+
+
+/* prototypes */
+static void ice_error_handler (IceConn);
+static gboolean ice_process_messages (GIOChannel *channel,
+ GIOCondition condition,
+ gpointer user_data);
+static gboolean ice_connection_accept (GIOChannel *channel,
+ GIOCondition condition,
+ gpointer watch_data);
+static FILE *ice_tmpfile (char **name);
+static void ice_auth_add (FILE *,
+ FILE *,
+ char *,
+ IceListenObj);
+
+static char *auth_cleanup_file;
+
+
+Bool
+ice_auth_proc (char *hostname)
+{
+ return False;
+}
+
+
+static void
+ice_error_handler (IceConn ice_conn)
+{
+ /*
+ * The I/O error handlers does whatever is necessary to respond
+ * to the I/O error and then returns, but it does not call
+ * IceCloseConnection. The ICE connection is given a "bad IO"
+ * status, and all future reads and writes to the connection
+ * are ignored. The next time IceProcessMessages is called it
+ * will return a status of IceProcessMessagesIOError. At that
+ * time, the application should call IceCloseConnection.
+ */
+ xfsm_verbose ("ICE connection fd = %d, ICE I/O error on connection\n",
+ IceConnectionNumber (ice_conn));
+}
+
+
+static gboolean
+ice_process_messages (GIOChannel *channel,
+ GIOCondition condition,
+ gpointer user_data)
+{
+ IceProcessMessagesStatus status;
+ XfsmIceConnData *icdata = user_data;
+
+ status = IceProcessMessages (icdata->ice_conn, NULL, NULL);
+
+ if (status == IceProcessMessagesIOError)
+ {
+ xfsm_manager_close_connection_by_ice_conn (icdata->manager,
+ icdata->ice_conn);
+
+ /* remove the I/O watch */
+ return FALSE;
+ }
+
+ /* keep the I/O watch running */
+ return TRUE;
+}
+
+
+static void
+ice_connection_watch (IceConn ice_conn,
+ IcePointer client_data,
+ Bool opening,
+ IcePointer *watch_data)
+{
+ XfsmManager *manager = XFSM_MANAGER (client_data);
+ GIOChannel *channel;
+ guint watchid;
+ gint fd;
+ gint ret;
+
+ if (opening)
+ {
+ XfsmIceConnData *icdata = g_new(XfsmIceConnData, 1);
+ icdata->manager = manager;
+ icdata->ice_conn = ice_conn;
+
+ fd = IceConnectionNumber (ice_conn);
+
+ /* Make sure we don't pass on these file descriptors to an
+ * exec'd child process.
+ */
+ ret = fcntl (fd, F_SETFD, fcntl (fd, F_GETFD, 0) | FD_CLOEXEC);
+ if (ret == -1)
+ {
+ perror ("ice_connection_watch: fcntl (fd, F_SETFD, fcntl (fd, F_GETFD, 0) | FD_CLOEXEC) failed");
+ }
+
+ channel = g_io_channel_unix_new (fd);
+ watchid = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT,
+ G_IO_ERR | G_IO_HUP | G_IO_IN,
+ ice_process_messages,
+ icdata, (GDestroyNotify) g_free);
+ g_io_channel_unref (channel);
+
+ *watch_data = (IcePointer) GUINT_TO_POINTER (watchid);
+ }
+ else
+ {
+ watchid = GPOINTER_TO_UINT (*watch_data);
+ g_source_remove (watchid);
+ }
+}
+
+
+static gboolean
+ice_connection_accept (GIOChannel *channel,
+ GIOCondition condition,
+ gpointer watch_data)
+{
+ IceConnectStatus cstatus;
+ IceAcceptStatus astatus;
+ IceListenObj ice_listener = (IceListenObj) watch_data;
+ IceConn ice_conn;
+
+ ice_conn = IceAcceptConnection (ice_listener, &astatus);
+
+ if (astatus != IceAcceptSuccess)
+ {
+ g_warning ("Failed to accept ICE connection on listener %p",
+ (gpointer) ice_listener);
+ }
+ else
+ {
+ /* Wait for the connection to leave pending state */
+ do
+ {
+ IceProcessMessages (ice_conn, NULL, NULL);
+ }
+ while ((cstatus = IceConnectionStatus (ice_conn)) == IceConnectPending);
+
+ if (cstatus != IceConnectAccepted)
+ {
+ if (cstatus == IceConnectIOError)
+ {
+ g_warning ("I/O error opening ICE connection %p", (gpointer) ice_conn);
+ }
+ else
+ {
+ g_warning ("ICE connection %p rejected", (gpointer) ice_conn);
+ }
+
+ IceSetShutdownNegotiation (ice_conn, False);
+ IceCloseConnection (ice_conn);
+ }
+ }
+
+ return TRUE;
+}
+
+
+static FILE*
+ice_tmpfile (char **name)
+{
+ GError *error = NULL;
+ mode_t mode;
+ FILE *fp = NULL;
+ int fd;
+
+ mode = umask (0077);
+
+ fd = g_file_open_tmp(".xfsm-ICE-XXXXXX", name, &error);
+ if (fd < 0)
+ {
+ g_warning ("Unable to open temporary file: %s", error->message);
+ g_error_free (error);
+ }
+ else
+ {
+ fp = fdopen (fd, "wb");
+ }
+
+ umask (mode);
+
+ return fp;
+}
+
+
+static void
+fprintfhex (FILE *fp, int len, char *cp)
+{
+ static char hexchars[] = "0123456789abcdef";
+
+ for (; len > 0; len--, cp++)
+ {
+ unsigned char s = *cp;
+ putc (hexchars[s >> 4], fp);
+ putc (hexchars[s & 0x0f], fp);
+ }
+}
+
+
+static void
+ice_auth_add (FILE *setup_fp,
+ FILE *cleanup_fp,
+ char *protocol,
+ IceListenObj ice_listener)
+{
+ IceAuthDataEntry entry;
+
+ entry.protocol_name = protocol;
+ entry.network_id = IceGetListenConnectionString (ice_listener);
+ entry.auth_name = "MIT-MAGIC-COOKIE-1";
+ entry.auth_data = IceGenerateMagicCookie (16);
+ entry.auth_data_length = 16;
+
+ IceSetPaAuthData (1, &entry);
+
+ fprintf (setup_fp,
+ "add %s \"\" %s MIT-MAGIC-COOKIE-1 ",
+ protocol,
+ entry.network_id);
+ fprintfhex (setup_fp, 16, entry.auth_data);
+ fprintf (setup_fp, "\n");
+
+ fprintf (cleanup_fp,
+ "remove protoname=%s protodata=\"\" netid=%s authname=MIT-MAGIC-COOKIE-1\n",
+ protocol,
+ entry.network_id);
+
+ free (entry.network_id);
+ free (entry.auth_data);
+}
+
+
+gboolean
+ice_setup_listeners (int num_listeners,
+ IceListenObj *listen_objs,
+ XfsmManager *manager)
+{
+ GIOChannel *channel;
+ char *auth_setup_file;
+ gchar *command;
+ FILE *cleanup_fp;
+ FILE *setup_fp;
+ int fd;
+ int n;
+ int ret;
+
+ IceSetIOErrorHandler (ice_error_handler);
+ IceAddConnectionWatch (ice_connection_watch, manager);
+
+ cleanup_fp = ice_tmpfile(&auth_cleanup_file);
+ if (cleanup_fp == NULL)
+ return FALSE;
+
+ setup_fp = ice_tmpfile(&auth_setup_file);
+ if (setup_fp == NULL)
+ {
+ fclose (cleanup_fp);
+ unlink (auth_cleanup_file);
+ g_free (auth_cleanup_file);
+ return FALSE;
+ }
+
+ for (n = 0; n < num_listeners; n++)
+ {
+ fd = IceGetListenConnectionNumber (listen_objs[n]);
+
+ /* Make sure we don't pass on these file descriptors to an
+ * exec'd child process.
+ */
+ ret = fcntl (fd, F_SETFD, fcntl (fd, F_GETFD, 0) | FD_CLOEXEC);
+ if (ret == -1)
+ {
+ perror ("ice_setup_listeners: fcntl (fd, F_SETFD, fcntl (fd, F_GETFD, 0) | FD_CLOEXEC) failed");
+ }
+
+ channel = g_io_channel_unix_new (fd);
+ g_io_add_watch (channel, G_IO_ERR | G_IO_HUP | G_IO_IN,
+ ice_connection_accept,
+ listen_objs[n]);
+ g_io_channel_unref (channel);
+
+ /* setup auth for this listener */
+ ice_auth_add (setup_fp, cleanup_fp, "ICE", listen_objs[n]);
+ ice_auth_add (setup_fp, cleanup_fp, "XSMP", listen_objs[n]);
+ IceSetHostBasedAuthProc (listen_objs[n], ice_auth_proc);
+ }
+
+ fclose (setup_fp);
+ fclose (cleanup_fp);
+
+ /* setup ICE authority and remove setup file */
+ command = g_strdup_printf ("%s source %s", ICEAUTH_CMD, auth_setup_file);
+ if (system (command) != 0)
+ {
+ g_warning ("Failed to setup the ICE authentication data, session "
+ "management might not work properly.");
+ }
+ g_free (command);
+ unlink (auth_setup_file);
+ g_free (auth_setup_file);
+
+ return TRUE;
+}
+
+void
+ice_cleanup (void)
+{
+ gchar *command;
+
+ g_return_if_fail (auth_cleanup_file != NULL);
+
+ /* remove newly added ICE authority entries */
+ command = g_strdup_printf ("%s source %s", ICEAUTH_CMD, auth_cleanup_file);
+ if (system (command))
+ g_warning ("Failed to execute \"%s\"", command);
+ g_free (command);
+
+ /* remove the cleanup file, no longer needed */
+ unlink (auth_cleanup_file);
+ g_free (auth_cleanup_file);
+ auth_cleanup_file = NULL;
+}
+
+
diff --git a/xfce4-session/ice-layer.h b/xfce4-session/ice-layer.h
new file mode 100644
index 0000000..7e8d81b
--- /dev/null
+++ b/xfce4-session/ice-layer.h
@@ -0,0 +1,37 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __XFSM_ICE_LAYER_H__
+#define __XFSM_ICE_LAYER_H__
+
+#include <X11/ICE/ICElib.h>
+
+#include <glib.h>
+
+#include <xfce4-session/xfsm-manager.h>
+
+Bool ice_auth_proc (char *hostname);
+gboolean ice_setup_listeners (int num_listeners,
+ IceListenObj *listen_objs,
+ XfsmManager *manager);
+void ice_cleanup (void);
+
+#endif /* !__XFSM_ICE_LAYER_H__ */
diff --git a/xfce4-session/main.c b/xfce4-session/main.c
new file mode 100644
index 0000000..69e61e6
--- /dev/null
+++ b/xfce4-session/main.c
@@ -0,0 +1,363 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2003-2006 Benedikt Meurer <benny@xfce.org>
+ * Copyright (c) 2008 Brian Tarricone <bjt23@cornell.edu>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <gio/gio.h>
+
+#include <xfconf/xfconf.h>
+
+#include <gdk/gdkx.h>
+#include <gtk/gtk.h>
+
+#include <libxfce4util/libxfce4util.h>
+#include <libxfce4ui/libxfce4ui.h>
+
+#include <libxfsm/xfsm-util.h>
+
+#include <xfce4-session/ice-layer.h>
+#include <xfce4-session/sm-layer.h>
+#include <xfce4-session/xfsm-dns.h>
+#include <xfce4-session/xfsm-global.h>
+#include <xfce4-session/xfsm-manager.h>
+#include <xfce4-session/xfsm-shutdown.h>
+#include <xfce4-session/xfsm-startup.h>
+#include <xfce4-session/xfsm-error.h>
+
+static gboolean opt_disable_tcp = FALSE;
+static gboolean opt_version = FALSE;
+static XfconfChannel *channel = NULL;
+static guint name_id = 0;
+
+static GOptionEntry option_entries[] =
+{
+ { "disable-tcp", '\0', 0, G_OPTION_ARG_NONE, &opt_disable_tcp, N_("Disable binding to TCP ports"), NULL },
+ { "version", 'V', 0, G_OPTION_ARG_NONE, &opt_version, N_("Print version information and exit"), NULL },
+ { NULL }
+};
+
+
+static void name_lost (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data);
+
+
+static void
+setup_environment (void)
+{
+ const gchar *sm;
+ gchar *authfile;
+ int fd;
+
+ /* check that no other session manager is running */
+ sm = g_getenv ("SESSION_MANAGER");
+ if (sm != NULL && strlen (sm) > 0)
+ {
+ g_printerr ("%s: Another session manager is already running\n", PACKAGE_NAME);
+ exit (EXIT_FAILURE);
+ }
+
+ /* check if running in verbose mode */
+ if (g_getenv ("XFSM_VERBOSE") != NULL)
+ xfsm_enable_verbose ();
+
+ /* pass correct DISPLAY to children, in case of --display in argv */
+ g_setenv ("DISPLAY", gdk_display_get_name (gdk_display_get_default ()), TRUE);
+
+ /* check access to $ICEAUTHORITY or $HOME/.ICEauthority if unset */
+ if (g_getenv ("ICEAUTHORITY"))
+ authfile = g_strdup (g_getenv ("ICEAUTHORITY"));
+ else
+ authfile = xfce_get_homefile (".ICEauthority", NULL);
+ fd = open (authfile, O_RDWR | O_CREAT, 0600);
+ if (fd < 0)
+ {
+ fprintf (stderr, "xfce4-session: Unable to access file %s: %s\n",
+ authfile, g_strerror (errno));
+ exit (EXIT_FAILURE);
+ }
+ g_free (authfile);
+ close (fd);
+}
+
+static void
+init_display (XfsmManager *manager,
+ GdkDisplay *dpy,
+ gboolean disable_tcp)
+{
+ gdk_flush ();
+
+ sm_init (channel, disable_tcp, manager);
+}
+
+
+
+static void
+manager_quit_cb (XfsmManager *manager, gpointer user_data)
+{
+ GDBusConnection *connection = G_DBUS_CONNECTION (user_data);
+
+ g_bus_unown_name (name_id);
+
+ name_lost (connection, "xfce4-session", manager);
+}
+
+
+
+static void
+bus_acquired (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ XfsmManager *manager = XFSM_MANAGER (user_data);
+ GdkDisplay *dpy;
+
+ xfsm_verbose ("bus_acquired %s\n", name);
+
+ manager = xfsm_manager_new (connection);
+
+ if (manager == NULL) {
+ g_critical ("Could not create XfsmManager");
+ return;
+ }
+
+ g_signal_connect(G_OBJECT(manager),
+ "manager-quit",
+ G_CALLBACK(manager_quit_cb),
+ connection);
+
+ setup_environment ();
+
+ channel = xfsm_open_config ();
+
+ dpy = gdk_display_get_default ();
+ init_display (manager, dpy, opt_disable_tcp);
+
+ if (!opt_disable_tcp && xfconf_channel_get_bool (channel, "/security/EnableTcp", FALSE))
+ {
+ /* verify that the DNS settings are ok */
+ xfsm_dns_check ();
+ }
+
+
+ xfsm_startup_init (channel);
+ xfsm_manager_load (manager, channel);
+ xfsm_manager_restart (manager);
+}
+
+
+
+static void
+name_acquired (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ xfsm_verbose ("name_acquired\n");
+}
+
+
+
+static void
+name_lost (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ XfsmManager *manager = XFSM_MANAGER (user_data);
+ GError *error = NULL;
+ XfsmShutdownType shutdown_type;
+ XfsmShutdown *shutdown_helper;
+ gboolean succeed = TRUE;
+
+ xfsm_verbose ("name_lost\n");
+
+ /* Release the object */
+ xfsm_verbose ("Disconnected from D-Bus");
+
+ shutdown_type = xfsm_manager_get_shutdown_type (manager);
+
+ /* take over the ref before we release the manager */
+ shutdown_helper = xfsm_shutdown_get ();
+
+ ice_cleanup ();
+
+ if (shutdown_type == XFSM_SHUTDOWN_SHUTDOWN
+ || shutdown_type == XFSM_SHUTDOWN_RESTART)
+ {
+ succeed = xfsm_shutdown_try_type (shutdown_helper, shutdown_type, &error);
+ if (!succeed)
+ g_warning ("Failed to shutdown/restart: %s", ERROR_MSG (error));
+ }
+
+ g_object_unref (shutdown_helper);
+ g_object_unref (manager);
+ g_object_unref (channel);
+ g_clear_error (&error);
+
+ shutdown_helper = NULL;
+ manager = NULL;
+ channel = NULL;
+
+ gtk_main_quit ();
+}
+
+
+
+static void
+xfsm_dbus_init (XfsmManager *manager)
+{
+ name_id = g_bus_own_name (G_BUS_TYPE_SESSION,
+ "org.xfce.SessionManager",
+ G_BUS_NAME_OWNER_FLAGS_NONE,
+ bus_acquired, name_acquired, name_lost,
+ manager,
+ NULL);
+
+ if (name_id == 0)
+ {
+ g_printerr ("%s: Another session manager is already running\n", PACKAGE_NAME);
+ exit (EXIT_FAILURE);
+ }
+}
+
+
+
+static gboolean
+xfsm_dbus_require_session (gint argc, gchar **argv)
+{
+ gchar **new_argv;
+ gchar *path;
+ gint i;
+ guint m = 0;
+
+ if (g_getenv ("DBUS_SESSION_BUS_ADDRESS") != NULL)
+ return TRUE;
+
+ path = g_find_program_in_path ("dbus-launch");
+ if (path == NULL)
+ {
+ g_critical ("dbus-launch not found, the desktop will not work properly!");
+ return TRUE;
+ }
+
+ /* avoid rondtrips */
+ g_assert (!g_str_has_prefix (*argv, "dbus-launch"));
+
+ new_argv = g_new0 (gchar *, argc + 4);
+ new_argv[m++] = path;
+ new_argv[m++] = "--sh-syntax";
+ new_argv[m++] = "--exit-with-session";
+
+ for (i = 0; i < argc; i++)
+ new_argv[m++] = argv[i];
+
+ if (!execvp ("dbus-launch", new_argv))
+ {
+ g_critical ("Could not spawn %s: %s", path, g_strerror (errno));
+ }
+
+ g_free (path);
+ g_free (new_argv);
+
+ return FALSE;
+}
+
+int
+main (int argc, char **argv)
+{
+ XfsmManager *manager = NULL;
+ GError *error = NULL;
+
+ if (!xfsm_dbus_require_session (argc, argv))
+ return EXIT_SUCCESS;
+
+ xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
+
+ /* install required signal handlers */
+ signal (SIGPIPE, SIG_IGN);
+
+ if (!gtk_init_with_args (&argc, &argv, NULL, option_entries, GETTEXT_PACKAGE, &error))
+ {
+ g_print ("%s: %s.\n", G_LOG_DOMAIN, error->message);
+ g_print (_("Type '%s --help' for usage."), G_LOG_DOMAIN);
+ g_print ("\n");
+ g_error_free (error);
+ return EXIT_FAILURE;
+ }
+
+ if (opt_version)
+ {
+ g_print ("%s %s (Xfce %s)\n\n", G_LOG_DOMAIN, PACKAGE_VERSION, xfce_version_string ());
+ g_print ("%s\n", "Copyright (c) 2003-2020");
+ g_print ("\t%s\n\n", _("The Xfce development team. All rights reserved."));
+ g_print (_("Please report bugs to <%s>."), PACKAGE_BUGREPORT);
+ g_print ("\n");
+
+ return EXIT_SUCCESS;
+ }
+
+ if (!xfconf_init (&error))
+ {
+ xfce_dialog_show_error (NULL, error, _("Unable to contact settings server"));
+ g_error_free (error);
+ }
+
+ /* Process all pending events prior to start DBUS */
+ while (gtk_events_pending ())
+ gtk_main_iteration ();
+
+ /* fake a client id for the manager, so the legacy management does not
+ * recognize us to be a session client.
+ */
+ gdk_x11_set_sm_client_id (xfsm_generate_client_id (NULL));
+
+ xfsm_dbus_init (manager);
+
+ gtk_main ();
+
+ xfsm_startup_shutdown ();
+
+ return EXIT_SUCCESS;
+}
diff --git a/xfce4-session/org.xfce.session.policy.in2 b/xfce4-session/org.xfce.session.policy.in2
new file mode 100644
index 0000000..7f7c5ae
--- /dev/null
+++ b/xfce4-session/org.xfce.session.policy.in2
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
+<policyconfig>
+
+ <!--
+ Policy definitions for XFCE Session Manager system-wide actions.
+ Copyright (c) 2014 Eric Koegel <eric@xfce.org>
+ Based on the XFCE Power Manager policy file.
+ -->
+
+ <vendor>XFCE Session Manager</vendor>
+ <vendor_url>http://xfce.org/</vendor_url>
+ <icon_name>xfce4-session</icon_name>
+
+
+ <action id="org.xfce.session.xfsm-shutdown-helper">
+ <!-- SECURITY:
+ - A normal active user on the local machine does not need permission
+ to suspend or hibernate their system.
+ -->
+ <_description>Shutdown, restart, suspend, or hibernate the system</_description>
+ <_message>Authentication is required to shutdown, restart, suspend, or hibernate the system.</_message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">@HELPER_PATH_PREFIX@/xfce4/session/xfsm-shutdown-helper</annotate>
+ </action>
+
+</policyconfig>
+
diff --git a/xfce4-session/sm-layer.c b/xfce4-session/sm-layer.c
new file mode 100644
index 0000000..f930369
--- /dev/null
+++ b/xfce4-session/sm-layer.c
@@ -0,0 +1,431 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include <X11/ICE/ICElib.h>
+#include <X11/SM/SMlib.h>
+
+#include <libxfce4util/libxfce4util.h>
+
+#include <xfce4-session/ice-layer.h>
+#include <xfce4-session/sm-layer.h>
+#include <xfce4-session/xfsm-global.h>
+#include <xfce4-session/xfsm-manager.h>
+
+#define XFSM_CLIENT_MANAGER(c) (XFSM_MANAGER (g_object_get_data (G_OBJECT (c), "--xfsm-manager")))
+
+#ifdef HAVE__ICETRANSNOLISTEN
+extern void _IceTransNoListen (char *protocol);
+#endif
+
+/* local prototypes */
+static Status sm_new_client (SmsConn sms_conn,
+ SmPointer manager_data,
+ unsigned long *mask,
+ SmsCallbacks *callbacks,
+ char **failure_reason);
+static Status sm_register_client (SmsConn sms_conn,
+ SmPointer client_data,
+ char *previous_id);
+static void sm_interact_request (SmsConn sms_conn,
+ SmPointer client_data,
+ int dialog_type);
+static void sm_interact_done (SmsConn sms_conn,
+ SmPointer client_data,
+ Bool cancel_shutdown);
+static void sm_save_yourself_request (SmsConn sms_conn,
+ SmPointer client_data,
+ int save_type,
+ Bool shutdown,
+ int interact_style,
+ Bool fast,
+ Bool global);
+static void sm_save_yourself_phase2_request(SmsConn sms_conn,
+ SmPointer client_data);
+static void sm_save_yourself_done (SmsConn sms_conn,
+ SmPointer client_data,
+ Bool success);
+static void sm_close_connection (SmsConn sms_conn,
+ SmPointer client_data,
+ int num_reasons,
+ char **reasons);
+static void sm_set_properties (SmsConn sms_conn,
+ SmPointer client_data,
+ int num_props,
+ SmProp **props);
+static void sm_delete_properties (SmsConn sms_conn,
+ SmPointer client_data,
+ int num_props,
+ char **prop_names);
+static void sm_get_properties (SmsConn sms_conn,
+ SmPointer client_data);
+
+
+#define SET_CALLBACK(_callbacks, _callback, _client) \
+G_STMT_START{ \
+ _callbacks->_callback.callback = sm_##_callback; \
+ _callbacks->_callback.manager_data = (SmPointer) _client; \
+}G_STMT_END
+
+
+static int num_listeners;
+static IceListenObj *listen_objs;
+
+
+void
+sm_init (XfconfChannel *channel,
+ gboolean disable_tcp,
+ XfsmManager *manager)
+{
+ char *network_idlist;
+ char error[2048];
+
+ if (disable_tcp || !xfconf_channel_get_bool (channel, "/security/EnableTcp", FALSE))
+ {
+#ifdef HAVE__ICETRANSNOLISTEN
+ _IceTransNoListen ("tcp");
+#else
+ fprintf (stderr,
+ "xfce4-session: Requested to disable tcp connections, but "
+ "_IceTransNoListen is not available on this plattform. "
+ "Request will be ignored.\n");
+ xfsm_verbose ("_IceTransNoListen unavailable on this platform");
+#endif
+ }
+
+ if (!SmsInitialize (PACKAGE, VERSION, sm_new_client, manager, ice_auth_proc,
+ 2048, error))
+ {
+ fprintf (stderr, "xfce4-session: Unable to register XSM protocol: %s\n", error);
+ /* log to verbose so we don't have to look at both files */
+ xfsm_verbose ("xfce4-session: Unable to register XSM protocol: %s\n", error);
+ exit (EXIT_FAILURE);
+ }
+
+ if (!IceListenForConnections (&num_listeners, &listen_objs, 2048, error))
+ {
+ fprintf (stderr, "xfce4-session: Unable to establish ICE listeners: %s\n", error);
+ /* log to verbose so we don't have to look at both files */
+ xfsm_verbose ("xfce4-session: Unable to establish ICE listeners: %s\n", error);
+ exit (EXIT_FAILURE);
+ }
+
+ ice_setup_listeners (num_listeners, listen_objs, manager);
+
+ network_idlist = IceComposeNetworkIdList (num_listeners, listen_objs);
+ g_setenv ("SESSION_MANAGER", network_idlist, TRUE);
+ free (network_idlist);
+}
+
+
+static Status
+sm_new_client (SmsConn sms_conn,
+ SmPointer manager_data,
+ unsigned long *mask,
+ SmsCallbacks *callbacks,
+ char **failure_reason)
+{
+ XfsmManager *manager = XFSM_MANAGER (manager_data);
+ XfsmClient *client;
+ gchar *error = NULL;
+
+ xfsm_verbose ("ICE connection fd = %d, received NEW CLIENT\n\n",
+ IceConnectionNumber (SmsGetIceConnection (sms_conn)));
+
+ client = xfsm_manager_new_client (manager, sms_conn, &error);
+ if (client == NULL)
+ {
+ xfsm_verbose ("NEW CLIENT failed: %s\n", error);
+
+#ifdef HAVE_STRDUP
+ *failure_reason = strdup (error);
+#else
+ *failure_reason = (char *) malloc (strlen (error) + 1);
+ if (*failure_reason != NULL)
+ strcpy (*failure_reason, error);
+#endif
+
+ return False;
+ }
+
+ SET_CALLBACK (callbacks, register_client, client);
+ SET_CALLBACK (callbacks, interact_request, client);
+ SET_CALLBACK (callbacks, interact_done, client);
+ SET_CALLBACK (callbacks, save_yourself_request, client);
+ SET_CALLBACK (callbacks, save_yourself_phase2_request, client);
+ SET_CALLBACK (callbacks, save_yourself_done, client);
+ SET_CALLBACK (callbacks, close_connection, client);
+ SET_CALLBACK (callbacks, set_properties, client);
+ SET_CALLBACK (callbacks, delete_properties, client);
+ SET_CALLBACK (callbacks, get_properties, client);
+
+ *mask = SmsRegisterClientProcMask | SmsInteractRequestProcMask
+ | SmsInteractDoneProcMask | SmsSaveYourselfRequestProcMask
+ | SmsSaveYourselfP2RequestProcMask | SmsSaveYourselfDoneProcMask
+ | SmsCloseConnectionProcMask | SmsSetPropertiesProcMask
+ | SmsDeletePropertiesProcMask | SmsGetPropertiesProcMask;
+
+ g_object_set_data (G_OBJECT (client), "--xfsm-manager", manager);
+
+ return True;
+}
+
+
+static Status
+sm_register_client (SmsConn sms_conn,
+ SmPointer client_data,
+ char *previous_id)
+{
+ XfsmClient *client = (XfsmClient *) client_data;
+ Status result;
+
+ xfsm_verbose ("ICE connection fd = %d, received REGISTER CLIENT [Previous Id = %s]\n\n",
+ IceConnectionNumber (SmsGetIceConnection (sms_conn)),
+ previous_id != NULL ? previous_id : "None");
+
+ result = xfsm_manager_register_client (XFSM_CLIENT_MANAGER (client), client, NULL, previous_id);
+
+ if (previous_id != NULL)
+ free (previous_id);
+
+ return result;
+}
+
+
+static void
+sm_interact_request (SmsConn sms_conn,
+ SmPointer client_data,
+ int dialog_type)
+{
+ XfsmClient *client = (XfsmClient *) client_data;
+
+ xfsm_verbose ("Client Id = %s, received INTERACT REQUEST [Dialog type = %s]\n\n",
+ xfsm_client_get_id (client), dialog_type == SmDialogError ? "Error" : "Normal");
+
+ xfsm_manager_interact (XFSM_CLIENT_MANAGER (client), client, dialog_type);
+}
+
+
+static void
+sm_interact_done (SmsConn sms_conn,
+ SmPointer client_data,
+ Bool cancel_shutdown)
+{
+ XfsmClient *client = (XfsmClient *) client_data;
+
+ xfsm_verbose ("Client Id = %s, received INTERACT DONE [Cancel shutdown = %s]\n\n",
+ xfsm_client_get_id (client), cancel_shutdown ? "True" : "False");
+
+ xfsm_manager_interact_done (XFSM_CLIENT_MANAGER (client), client, cancel_shutdown);
+}
+
+
+static void
+sm_save_yourself_request (SmsConn sms_conn,
+ SmPointer client_data,
+ int save_type,
+ Bool shutdown,
+ int interact_style,
+ Bool fast,
+ Bool global)
+{
+ XfsmClient *client = (XfsmClient *) client_data;
+
+ if (G_UNLIKELY (verbose))
+ {
+ xfsm_verbose ("Client Id = %s, received SAVE YOURSELF REQUEST\n",
+ xfsm_client_get_id (client));
+ xfsm_verbose (" Save type: %s\n",
+ save_type == SmSaveLocal ? "Local"
+ : (save_type == SmSaveGlobal ? "Global" : "Both"));
+ xfsm_verbose (" Shutdown: %s\n", shutdown ? "True" : "False");
+ xfsm_verbose (" Interact Style: %s\n",
+ interact_style == SmInteractStyleNone ? "None"
+ : (interact_style == SmInteractStyleErrors ? "Errors" : "Any"));
+ xfsm_verbose (" Fast: %s\n", fast ? "True" : "False");
+ xfsm_verbose (" Global: %s\n", global ? "True" : "False");
+ xfsm_verbose ("\n");
+ }
+
+ xfsm_manager_save_yourself (XFSM_CLIENT_MANAGER (client), client, save_type, shutdown, interact_style, fast, global);
+}
+
+
+static void
+sm_save_yourself_phase2_request (SmsConn sms_conn,
+ SmPointer client_data)
+{
+ XfsmClient *client = (XfsmClient *) client_data;
+
+ xfsm_verbose ("Client Id = %s, received SAVE YOURSELF PHASE2 REQUEST\n\n",
+ xfsm_client_get_id (client));
+
+ xfsm_manager_save_yourself_phase2 (XFSM_CLIENT_MANAGER (client), client);
+}
+
+
+static void
+sm_save_yourself_done (SmsConn sms_conn,
+ SmPointer client_data,
+ Bool success)
+{
+ XfsmClient *client = (XfsmClient *) client_data;
+
+ xfsm_verbose ("Client Id = %s, received SAVE YOURSELF DONE [Success = %s]\n\n",
+ xfsm_client_get_id (client), success ? "True" : "False");
+
+ xfsm_manager_save_yourself_done (XFSM_CLIENT_MANAGER (client), client, success);
+}
+
+
+static void
+sm_close_connection (SmsConn sms_conn,
+ SmPointer client_data,
+ int num_reasons,
+ char **reasons)
+{
+ XfsmClient *client = (XfsmClient *) client_data;
+ gint n;
+
+ if (G_UNLIKELY (verbose))
+ {
+ xfsm_verbose ("Client Id = %s, received CLOSE CONNECTION [Num reasons = %d]\n",
+ xfsm_client_get_id (client), num_reasons);
+ for (n = 0; n < num_reasons; ++n)
+ xfsm_verbose (" Reason %2d: %s\n", n, reasons[n]);
+ xfsm_verbose ("\n");
+ }
+
+ xfsm_manager_close_connection (XFSM_CLIENT_MANAGER (client), client, TRUE);
+
+ if (num_reasons > 0)
+ SmFreeReasons (num_reasons, reasons);
+}
+
+
+static void
+sm_set_properties (SmsConn sms_conn,
+ SmPointer client_data,
+ int num_props,
+ SmProp **props)
+{
+ XfsmClient *client = (XfsmClient *) client_data;
+ int n;
+ int i;
+
+ if (G_UNLIKELY (verbose))
+ {
+ xfsm_verbose ("Client Id = %s, received SET PROPERTIES [Num props = %d]\n",
+ xfsm_client_get_id (client), num_props);
+ for (n = 0; n < num_props; ++n)
+ {
+ xfsm_verbose (" Name: %s\n", props[n]->name);
+ xfsm_verbose (" Type: %s\n", props[n]->type);
+ if (strcmp (props[n]->type, "ARRAY8") == 0)
+ {
+ xfsm_verbose (" Value: %s\n", (const gchar *) props[n]->vals->value);
+ }
+ else if (strcmp (props[n]->type, "CARD8") == 0)
+ {
+ const guint8 *cardptr = (const guint8 *) props[n]->vals->value;
+ xfsm_verbose (" Value: %u\n", (unsigned) *cardptr);
+ }
+ else if (strcmp (props[n]->type, "LISTofARRAY8") == 0)
+ {
+ xfsm_verbose (" Value:\n");
+ for (i = 0; i < props[n]->num_vals; ++i)
+ {
+ xfsm_verbose (" %s%s\n", (const gchar *) props[n]->vals[i].value,
+ (i == props[n]->num_vals - 1) ? "" : ",");
+ }
+ }
+ xfsm_verbose ("\n");
+ }
+ xfsm_verbose ("\n");
+ }
+
+ xfsm_client_merge_properties (client, props, num_props);
+
+ while (num_props-- > 0)
+ SmFreeProperty (props[num_props]);
+ free (props);
+}
+
+
+static void
+sm_delete_properties (SmsConn sms_conn,
+ SmPointer client_data,
+ int num_props,
+ char **prop_names)
+{
+ XfsmClient *client = (XfsmClient *) client_data;
+ int n;
+
+ if (G_UNLIKELY (verbose))
+ {
+ xfsm_verbose ("Client Id = %s, received DELETE PROPERTIES [Num props = %d]\n",
+ xfsm_client_get_id (client), num_props);
+ for (n = 0; n < num_props; ++n)
+ xfsm_verbose (" Name: %s\n", prop_names[n]);
+ xfsm_verbose ("\n");
+ }
+
+ xfsm_client_delete_properties (client, prop_names, num_props);
+
+ while (num_props-- > 0)
+ free (prop_names[num_props]);
+ free (prop_names);
+}
+
+
+static void
+sm_get_properties (SmsConn sms_conn,
+ SmPointer client_data)
+{
+ XfsmClient *client = (XfsmClient *) client_data;
+ XfsmProperties *properties = xfsm_client_get_properties (client);
+ SmProp **props = NULL;
+ gint num_props = 0;
+
+ xfsm_verbose ("Client Id = %s, received GET PROPERTIES\n\n", properties->client_id);
+
+ xfsm_properties_extract (properties, &num_props, &props);
+
+ SmsReturnProperties (sms_conn, num_props, props);
+
+ if (num_props > 0)
+ {
+ while (num_props-- > 0)
+ SmFreeProperty (props[num_props]);
+ free (props);
+ }
+}
diff --git a/xfce4-session/sm-layer.h b/xfce4-session/sm-layer.h
new file mode 100644
index 0000000..fc50487
--- /dev/null
+++ b/xfce4-session/sm-layer.h
@@ -0,0 +1,34 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __SM_LAYER_H__
+#define __SM_LAYER_H__
+
+#include <xfconf/xfconf.h>
+#include <libxfce4util/libxfce4util.h>
+
+#include <xfce4-session/xfsm-manager.h>
+
+void sm_init (XfconfChannel *channel,
+ gboolean disable_tcp,
+ XfsmManager *manager);
+
+#endif /* !__SM_LAYER_H__ */
diff --git a/xfce4-session/xfce-screensaver.c b/xfce4-session/xfce-screensaver.c
new file mode 100644
index 0000000..d7fccf2
--- /dev/null
+++ b/xfce4-session/xfce-screensaver.c
@@ -0,0 +1,585 @@
+/*
+ * * Copyright (C) 2016 Eric Koegel <eric@xfce.org>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
+#include <xfconf/xfconf.h>
+
+#include "xfce-screensaver.h"
+
+
+#define HEARTBEAT_COMMAND "heartbeat-command"
+#define LOCK_COMMAND "LockCommand"
+#define XFPM_CHANNEL "xfce4-power-manager"
+#define XFPM_PROPERTIES_PREFIX "/xfce4-power-manager/"
+#define XFSM_CHANNEL "xfce4-session"
+#define XFSM_PROPERTIES_PREFIX "/general/"
+
+static void xfce_screensvaer_finalize (GObject *object);
+
+static void xfce_screensaver_set_property(GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void xfce_screensaver_get_property(GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+
+#define XFCE_SCREENSAVER_GET_PRIVATE(o) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((o), XFCE_TYPE_SCREENSAVER, XfceScreenSaverPrivate))
+
+
+typedef enum
+{
+ SCREENSAVER_TYPE_NONE,
+ SCREENSAVER_TYPE_FREEDESKTOP,
+ SCREENSAVER_TYPE_XFCE,
+ SCREENSAVER_TYPE_CINNAMON,
+ SCREENSAVER_TYPE_MATE,
+ SCREENSAVER_TYPE_GNOME,
+ SCREENSAVER_TYPE_OTHER,
+ N_SCREENSAVER_TYPE
+} ScreenSaverType;
+
+enum
+{
+ PROP_0 = 0,
+ PROP_HEARTBEAT_COMMAND,
+ PROP_LOCK_COMMAND
+};
+
+struct XfceScreenSaverPrivate
+{
+ guint cookie;
+ gchar *heartbeat_command;
+ gchar *lock_command;
+ GDBusProxy *proxy;
+ guint screensaver_id;
+ ScreenSaverType screensaver_type;
+ XfconfChannel *xfpm_channel;
+ XfconfChannel *xfsm_channel;
+};
+
+
+G_DEFINE_TYPE (XfceScreenSaver, xfce_screensaver, G_TYPE_OBJECT)
+
+
+static void
+xfce_screensaver_class_init (XfceScreenSaverClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS(klass);
+
+ object_class->finalize = xfce_screensvaer_finalize;
+ object_class->set_property = xfce_screensaver_set_property;
+ object_class->get_property = xfce_screensaver_get_property;
+
+ g_type_class_add_private (klass, sizeof (XfceScreenSaverPrivate));
+
+#define XFCE_PARAM_FLAGS (G_PARAM_READWRITE \
+ | G_PARAM_CONSTRUCT \
+ | G_PARAM_STATIC_NAME \
+ | G_PARAM_STATIC_NICK \
+ | G_PARAM_STATIC_BLURB)
+
+ /* heartbeat command - to inhibit the screensaver from activating,
+ * i.e. xscreensaver-command -deactivate */
+ g_object_class_install_property(object_class, PROP_HEARTBEAT_COMMAND,
+ g_param_spec_string(HEARTBEAT_COMMAND,
+ HEARTBEAT_COMMAND,
+ "Inhibit the screensaver from activating, "
+ "i.e. xscreensaver-command -deactivate",
+ "xscreensaver-command -deactivate",
+ XFCE_PARAM_FLAGS));
+
+ /* lock command - to lock the desktop, i.e. xscreensaver-command -lock */
+ g_object_class_install_property(object_class, PROP_LOCK_COMMAND,
+ g_param_spec_string(LOCK_COMMAND,
+ LOCK_COMMAND,
+ "Lock the desktop, i.e. "
+ "xscreensaver-command -lock",
+ "xscreensaver-command -lock",
+ XFCE_PARAM_FLAGS));
+#undef XFCE_PARAM_FLAGS
+}
+
+static void
+xfce_screensaver_set_property(GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ XfceScreenSaver *saver = XFCE_SCREENSAVER (object);
+
+ switch(property_id) {
+ case PROP_HEARTBEAT_COMMAND:
+ {
+ g_free (saver->priv->heartbeat_command);
+ saver->priv->heartbeat_command = g_value_dup_string (value);
+ DBG ("saver->priv->heartbeat_command %s", saver->priv->heartbeat_command);
+ break;
+ }
+ case PROP_LOCK_COMMAND:
+ {
+ g_free (saver->priv->lock_command);
+ saver->priv->lock_command = g_value_dup_string (value);
+ DBG ("saver->priv->lock_command %s", saver->priv->lock_command);
+ break;
+ }
+ default:
+ {
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ break;
+ }
+ }
+}
+
+static void
+xfce_screensaver_get_property(GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ XfceScreenSaver *saver = XFCE_SCREENSAVER (object);
+
+ switch(property_id) {
+ case PROP_HEARTBEAT_COMMAND:
+ g_value_set_string (value, saver->priv->heartbeat_command);
+ break;
+
+ case PROP_LOCK_COMMAND:
+ g_value_set_string (value, saver->priv->lock_command);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ break;
+ }
+}
+
+static gboolean
+screen_saver_proxy_setup(XfceScreenSaver *saver,
+ const gchar *name,
+ const gchar *object_path,
+ const gchar *interface)
+{
+ GDBusProxy *proxy;
+
+ proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
+ G_DBUS_PROXY_FLAGS_NONE,
+ NULL,
+ name,
+ object_path,
+ interface,
+ NULL,
+ NULL);
+
+ if (proxy != NULL)
+ {
+ gchar *owner = NULL;
+ /* is there anyone actually providing a service? */
+ owner = g_dbus_proxy_get_name_owner (proxy);
+ if (owner != NULL)
+ {
+ DBG ("proxy owner: %s", owner);
+ saver->priv->proxy = proxy;
+ g_free (owner);
+ return TRUE;
+ }
+ else
+ {
+ /* not using this proxy, nobody's home */
+ g_object_unref (proxy);
+ }
+ }
+
+ return FALSE;
+}
+
+static void
+xfce_screensaver_setup(XfceScreenSaver *saver)
+{
+ /* Try to use the freedesktop dbus API */
+ if (screen_saver_proxy_setup (saver,
+ "org.freedesktop.ScreenSaver",
+ "/org/freedesktop/ScreenSaver",
+ "org.freedesktop.ScreenSaver"))
+ {
+ DBG ("using freedesktop compliant screensaver daemon");
+ saver->priv->screensaver_type = SCREENSAVER_TYPE_FREEDESKTOP;
+ } else if (screen_saver_proxy_setup (saver,
+ "org.xfce.ScreenSaver",
+ "/org/xfce/ScreenSaver",
+ "org.xfce.ScreenSaver"))
+ {
+ DBG ("using xfce screensaver daemon");
+ saver->priv->screensaver_type = SCREENSAVER_TYPE_XFCE;
+ } else if (screen_saver_proxy_setup (saver,
+ "org.cinnamon.ScreenSaver",
+ "/org/cinnamon/ScreenSaver",
+ "org.cinnamon.ScreenSaver"))
+ {
+ DBG ("using cinnamon screensaver daemon");
+ saver->priv->screensaver_type = SCREENSAVER_TYPE_CINNAMON;
+ } else if (screen_saver_proxy_setup (saver,
+ "org.mate.ScreenSaver",
+ "/org/mate/ScreenSaver",
+ "org.mate.ScreenSaver"))
+ {
+ DBG ("using mate screensaver daemon");
+ saver->priv->screensaver_type = SCREENSAVER_TYPE_MATE;
+ } else if (screen_saver_proxy_setup (saver,
+ "org.gnome.ScreenSaver",
+ "/org/gnome/ScreenSaver",
+ "org.gnome.ScreenSaver"))
+ {
+ DBG ("using gnome screensaver daemon");
+ saver->priv->screensaver_type = SCREENSAVER_TYPE_GNOME;
+ }
+ else
+ {
+ DBG ("using command line screensaver interface");
+ saver->priv->screensaver_type = SCREENSAVER_TYPE_OTHER;
+ }
+}
+
+static void
+xfce_screensaver_init (XfceScreenSaver *saver)
+{
+ GError *error = NULL;
+
+ saver->priv = XFCE_SCREENSAVER_GET_PRIVATE (saver);
+
+ if ( !xfconf_init (&error) )
+ {
+ g_critical ("xfconf_init failed: %s\n", error->message);
+ g_clear_error (&error);
+ }
+ else
+ {
+ saver->priv->xfpm_channel = xfconf_channel_get (XFPM_CHANNEL);
+ saver->priv->xfsm_channel = xfconf_channel_get (XFSM_CHANNEL);
+
+ }
+
+ xfce_screensaver_setup (saver);
+}
+
+static void
+xfce_screensvaer_finalize (GObject *object)
+{
+ XfceScreenSaver *saver = XFCE_SCREENSAVER (object);
+
+ if (saver->priv->screensaver_id != 0)
+ {
+ g_source_remove (saver->priv->screensaver_id);
+ saver->priv->screensaver_id = 0;
+ }
+
+ if (saver->priv->proxy)
+ {
+ g_object_unref (saver->priv->proxy);
+ saver->priv->proxy = NULL;
+ }
+
+ if (saver->priv->heartbeat_command)
+ {
+ g_free (saver->priv->heartbeat_command);
+ saver->priv->heartbeat_command = NULL;
+ }
+
+ if (saver->priv->lock_command)
+ {
+ g_free (saver->priv->heartbeat_command);
+ saver->priv->heartbeat_command = NULL;
+ }
+}
+
+/**
+ * xfce_screensaver_new:
+ *
+ * Creates a new XfceScreenSaver object or increases the refrence count
+ * of the current object. Call g_object_unref when finished.
+ *
+ * RETURNS: an XfceScreenSaver object
+ **/
+XfceScreenSaver *
+xfce_screensaver_new (void)
+{
+ static gpointer *saver = NULL;
+
+ if (saver != NULL)
+ {
+ g_object_ref (saver);
+ }
+ else
+ {
+ saver = g_object_new (XFCE_TYPE_SCREENSAVER, NULL);
+
+ g_object_add_weak_pointer (G_OBJECT (saver), (gpointer *) &saver);
+
+ xfconf_g_property_bind (XFCE_SCREENSAVER (saver)->priv->xfpm_channel,
+ XFPM_PROPERTIES_PREFIX HEARTBEAT_COMMAND,
+ G_TYPE_STRING,
+ G_OBJECT(saver),
+ HEARTBEAT_COMMAND);
+
+ xfconf_g_property_bind (XFCE_SCREENSAVER (saver)->priv->xfsm_channel,
+ XFSM_PROPERTIES_PREFIX LOCK_COMMAND,
+ G_TYPE_STRING,
+ G_OBJECT(saver),
+ LOCK_COMMAND);
+ }
+
+ return XFCE_SCREENSAVER (saver);
+}
+
+static gboolean
+xfce_reset_screen_saver (gpointer user_data)
+{
+ XfceScreenSaver *saver = user_data;
+
+ TRACE("entering\n");
+
+ /* If we found an interface during the setup, use it */
+ if (saver->priv->proxy)
+ {
+ GVariant *response = g_dbus_proxy_call_sync (saver->priv->proxy,
+ "SimulateUserActivity",
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ NULL);
+ if (response != NULL)
+ {
+ g_variant_unref (response);
+ }
+ } else if (saver->priv->heartbeat_command)
+ {
+ DBG ("running heartbeat command: %s", saver->priv->heartbeat_command);
+ g_spawn_command_line_async (saver->priv->heartbeat_command, NULL);
+ }
+
+ /* continue until we're removed */
+ return TRUE;
+}
+
+/**
+ * xfce_screensaver_inhibit:
+ * @saver: The XfceScreenSaver object
+ * @inhibit: Wether to inhibit the screensaver from activating.
+ *
+ * Calling this function with inhibit as TRUE will prevent the user's
+ * screensaver from activating. This is useful when the user is watching
+ * a movie or giving a presentation.
+ *
+ * Calling this function with inhibit as FALSE will remove any current
+ * screensaver inhibit the XfceScreenSaver object has.
+ *
+ **/
+void
+xfce_screensaver_inhibit (XfceScreenSaver *saver,
+ gboolean inhibit)
+{
+ if (saver->priv->screensaver_type != SCREENSAVER_TYPE_FREEDESKTOP &&
+ saver->priv->screensaver_type != SCREENSAVER_TYPE_XFCE &&
+ saver->priv->screensaver_type != SCREENSAVER_TYPE_MATE)
+ {
+ /* remove any existing keepalive */
+ if (saver->priv->screensaver_id != 0)
+ {
+ g_source_remove (saver->priv->screensaver_id);
+ saver->priv->screensaver_id = 0;
+ }
+
+ if (inhibit)
+ {
+ /* Reset the screensaver timers every so often so they don't activate */
+ saver->priv->screensaver_id = g_timeout_add_seconds (20,
+ xfce_reset_screen_saver,
+ saver);
+ }
+ return;
+ }
+
+ /* SCREENSAVER_TYPE_FREEDESKTOP & SCREENSAVER_TYPE_MATE
+ * don't need a periodic timer because they have an actual
+ * inhibit/uninhibit setup */
+ if (inhibit)
+ {
+ GVariant *response = NULL;
+ response = g_dbus_proxy_call_sync (saver->priv->proxy,
+ "Inhibit",
+ g_variant_new ("(ss)",
+ PACKAGE_NAME,
+ "Inhibit requested"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ NULL);
+ if (response != NULL)
+ {
+ g_variant_get (response, "(u)", &saver->priv->cookie);
+ g_variant_unref (response);
+ }
+ }
+ else
+ {
+ GVariant *response = NULL;
+ response = g_dbus_proxy_call_sync (saver->priv->proxy,
+ "UnInhibit",
+ g_variant_new ("(u)",
+ saver->priv->cookie),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ NULL);
+
+ saver->priv->cookie = 0;
+ if (response != NULL)
+ {
+ g_variant_unref (response);
+ }
+ }
+}
+
+/**
+ * xfce_screensaver_lock:
+ * @saver: The XfceScreenSaver object
+ *
+ * Attempts to lock the screen, either with one of the screensaver
+ * dbus proxies, the xfconf lock command, or one of the
+ * fallback scripts such as xdg-screensaver.
+ *
+ * RETURNS TRUE if the lock attempt returns success.
+ **/
+gboolean
+xfce_screensaver_lock (XfceScreenSaver *saver)
+{
+ switch (saver->priv->screensaver_type) {
+ case SCREENSAVER_TYPE_FREEDESKTOP:
+ case SCREENSAVER_TYPE_XFCE:
+ case SCREENSAVER_TYPE_MATE:
+ case SCREENSAVER_TYPE_GNOME:
+ {
+ GVariant *response = NULL;
+ response = g_dbus_proxy_call_sync (saver->priv->proxy,
+ "Lock",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ NULL);
+ if (response != NULL)
+ {
+ g_variant_unref (response);
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+ break;
+ }
+ case SCREENSAVER_TYPE_CINNAMON:
+ {
+ GVariant *response = NULL;
+ response = g_dbus_proxy_call_sync (saver->priv->proxy,
+ "Lock",
+ g_variant_new ("(s)", PACKAGE_NAME),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ NULL);
+ if (response != NULL)
+ {
+ g_variant_unref (response);
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+ break;
+ }
+ case SCREENSAVER_TYPE_OTHER:
+ {
+ gboolean ret = FALSE;
+
+ if (saver->priv->lock_command != NULL)
+ {
+ DBG ("running lock command: %s", saver->priv->lock_command);
+ ret = g_spawn_command_line_async (saver->priv->lock_command, NULL);
+ }
+
+ if (!ret)
+ {
+ g_warning ("Screensaver lock command not set when attempting to lock the screen.\n"
+ "Please set the xfconf property %s%s in xfce4-session to the desired lock command",
+ XFSM_PROPERTIES_PREFIX, LOCK_COMMAND);
+
+ ret = g_spawn_command_line_async ("xflock4", NULL);
+ }
+
+ if (!ret)
+ {
+ ret = g_spawn_command_line_async ("xdg-screensaver lock", NULL);
+ }
+
+ if (!ret)
+ {
+ ret = g_spawn_command_line_async ("xscreensaver-command -lock", NULL);
+ }
+
+ return ret;
+ /* obviously we don't need this break statement but I'm sure some
+ * compiler or static analysis tool will complain */
+ break;
+ }
+ default:
+ {
+ g_warning ("Unknown screensaver type set when calling xfce_screensaver_lock");
+ break;
+ }
+ }
+
+ return FALSE;
+}
diff --git a/xfce4-session/xfce-screensaver.h b/xfce4-session/xfce-screensaver.h
new file mode 100644
index 0000000..260e1c2
--- /dev/null
+++ b/xfce4-session/xfce-screensaver.h
@@ -0,0 +1,58 @@
+/*
+ * * Copyright (C) 2016 Eric Koegel <eric@xfce.org>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __XFCE_SCREENSAVER_H
+#define __XFCE_SCREENSAVER_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define XFCE_TYPE_SCREENSAVER (xfce_screensaver_get_type () )
+#define XFCE_SCREENSAVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), XFCE_TYPE_SCREENSAVER, XfceScreenSaver))
+#define XFCE_IS_POWER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), XFCE_TYPE_SCREENSAVER))
+
+typedef struct XfceScreenSaverPrivate XfceScreenSaverPrivate;
+
+typedef struct
+{
+ GObject parent;
+ XfceScreenSaverPrivate *priv;
+} XfceScreenSaver;
+
+typedef struct
+{
+ GObjectClass parent_class;
+} XfceScreenSaverClass;
+
+GType xfce_screensaver_get_type (void) G_GNUC_CONST;
+
+XfceScreenSaver *xfce_screensaver_new (void);
+
+void xfce_screensaver_inhibit (XfceScreenSaver *saver,
+ gboolean suspend);
+
+gboolean xfce_screensaver_lock (XfceScreenSaver *saver);
+
+
+
+G_END_DECLS
+
+#endif /* __XFCE_SCREENSAVER_H */
diff --git a/xfce4-session/xfce4-session.1 b/xfce4-session/xfce4-session.1
new file mode 100644
index 0000000..47cc135
--- /dev/null
+++ b/xfce4-session/xfce4-session.1
@@ -0,0 +1,84 @@
+.TH xfce4-session 1 "Sep 28, 2014"
+.SH NAME
+xfce4-session \- Starts up the Xfce Desktop Environment
+.SH SYNOPSIS
+.B xfce4-session
+.br
+.SH DESCRIPTION
+This manual page documents briefly the
+.B xfce4-session
+command.
+.PP
+The \fBxfce4-session\fP program starts up the Xfce Desktop Environment and
+is typically executed by your login manager (e.g. xdm, gdm, kdm, wdm or from
+your X startup scripts). It will load your last session or a default session
+that includes the standard Xfce programs if no saved session is available.
+
+\fBxfce4-session\fP is an standard X11R6 session manager that can manage
+any X11R6 SM compliant program, including GNOME and KDE programs.
+
+\fBxfce4-session\fP uses the contents of the ~/.cache/sessions/ directory
+for starting previously saved sessions.
+
+
+.SH OPTIONS
+\fBxfce4-session\fP takes the following command line options:
+.TP
+.B \-\-disable\-tcp
+Disable binding to TCP ports in the ICE layer. This is not possible on every
+platform. If you use this option on a platform that does not support it,
+\fBxfce4-session\fP will print a warning message and ignore the setting.
+.TP
+.B \-\-help
+Print a help screen and exit.
+.TP
+.B \-\-version
+Output version information and exit.
+
+
+.SH ENVIRONMENT
+\fBxfce4-session\fP's behaviour is affected by the following environment
+variables.
+.PP
+.TP
+.B XDG_CONFIG_HOME
+Specifies the root for all user-specific configuration files. If this
+environment variable is unset, it defaults to
+.I ~/.config/
+.TP
+.B XDG_CONFIG_DIRS
+Set of preference ordered base directories relative to which configuration
+files should be searched in addition to the
+.B $XDG_CONFIG_HOME
+base directory. The directories should be separated with a colon.
+.TP
+.B XDG_CACHE_HOME
+Specifies the root for all user-specific cache data. If this environment
+variable is unset, it defaults to
+.I ~/.cache/
+.TP
+.B XFSM_VERBOSE
+When defined, this environment variable enables debugging messages to be
+saved to
+.I ~/.xfce4-session.verbose-log
+The log file from the last session run with this environment variable
+set is retained at
+.I ~/.xfce4-session.verbose-log.last
+These debugging messages are useful for troubleshooting and development.
+
+.SH FILES
+\fBxfce4-session\fP reads its configuration from Xfconf.
+\fBxfce4-session\fP stores its session data into
+.IR $XDG_CACHE_HOME/sessions/ .
+
+.SH AUTHOR
+\fBxfce4-session\fP was written by Benedikt Meurer
+<benny@xfce.org> as part of the Xfce project.
+This manual page was written by Oliver M. Bolzer <oliver@debian.org>
+and Benedikt Meurer <benny@xfce.org>.
+
+.SH "REPORTING BUGS"
+Report bugs to http://bugzilla.xfce.org/.
+
+.SH COPYRIGHT
+Copyright \(co 2003-2014 Benedikt Meurer.
diff --git a/xfce4-session/xfsm-chooser-icon.h b/xfce4-session/xfsm-chooser-icon.h
new file mode 100644
index 0000000..9718ac5
--- /dev/null
+++ b/xfce4-session/xfsm-chooser-icon.h
@@ -0,0 +1,327 @@
+/* GdkPixbuf RGBA C-Source image dump */
+
+#ifdef __SUNPRO_C
+#pragma align 4 (xfsm_chooser_icon_data)
+#endif
+#ifdef __GNUC__
+static const guint8 xfsm_chooser_icon_data[] __attribute__ ((__aligned__ (4))) =
+#else
+static const guint8 xfsm_chooser_icon_data[] =
+#endif
+{ ""
+ /* Pixbuf magic (0x47646b50) */
+ "GdkP"
+ /* length: header (24) + pixel_data (8736) */
+ "\0\0\"8"
+ /* pixdata_type (0x1010002) */
+ "\1\1\0\2"
+ /* rowstride (208) */
+ "\0\0\0\320"
+ /* width (52) */
+ "\0\0\0""4"
+ /* height (42) */
+ "\0\0\0*"
+ /* pixel_data: */
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\0\37\37*\2\23\23\32\5\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0!!-\0!!-\0\32\32#\2\21\21\27\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0!!-\0!!-\1!!-\4!!-\13&'4\33\247\255\265r\232\237\243\243\17\17\24"
+ "\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\1!!-\4!!"
+ "-\12!\".\24*,;%\252\262\274\207\225\234\243\250\15\15\22\17\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!"
+ "!-\1!!-\5!!-\13&'4\25""78J&RTkB\243\251\267\220\367\371\372\374\364\366"
+ "\370\375lpuu\26\26\37\2\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\1!!-\5!!-\15"
+ "$%2\31""24G,LPiF\217\227\252\207\334\346\356\373\335\347\357\377\223"
+ "\233\242\252\15\15\22\17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0!!-\1!!-\4!!-\10''5\17""67I\31ILa(cf\200@\203\207\242a\261\267\307"
+ "\242\367\371\372\374\374\375\376\377\372\374\375\377\336\342\345\362"
+ "\77BGB\35\35'\0!!-\0!!-\2!!-\6##0\15+,<\26<\77T&V[v@{\202\242d\245\256"
+ "\307\230\330\342\353\366\336\350\360\377\334\347\357\377\331\345\356"
+ "\377\221\232\241\253\15\15\22\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\1!!-\3!!-\6()7\14""9"
+ ":M\30KMa,NPYYkn\211J\226\232\265l\276\302\326\220\320\325\341\303\367"
+ "\371\373\375\374\375\376\377\372\374\375\377\370\372\374\377\366\371"
+ "\373\377\300\305\312\330\23\23\27\35!!-\5!!-\14'(7\27<\77T(X^z\77|\205"
+ "\250^\244\256\314\203\306\316\341\254\330\342\353\362\336\350\360\377"
+ "\333\347\357\377\331\345\356\377\327\344\355\377\325\342\354\377\221"
+ "\232\242\254\15\15\22\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\2!!-\7&&4\20""77I\40NPf:qt\217cz{\212"
+ "\263rsz\320\251\253\264\274\335\342\350\326\370\371\373\376\374\375\376"
+ "\377\372\374\375\377\370\372\374\377\366\371\373\377\364\367\372\377"
+ "\361\366\371\377\230\236\243\256\24\24\34\16!!-\15\"\".\31,->-\77BXK"
+ "Z_zv}\205\246\245X\\e\353ptx\377\330\343\353\377\331\345\356\377\327"
+ "\344\355\377\325\342\354\377\325\342\354\377\325\342\354\377\222\233"
+ "\242\256\15\15\22\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0!!-\0!!-\3!!-\12##0\26""12B'GG\\Ahh\202c\221\222\256\215"
+ "\247\251\275\274\220\222\230\361\202\202\202\377\247\247\250\377\345"
+ "\346\347\377\370\372\374\377\366\371\373\377\364\367\372\377\362\366"
+ "\371\377\360\365\370\377\350\356\363\375lqvz\40\40,\26%&5/24EZILb\225"
+ "**-\356kpy\361=\77@\377\37\40\40\377\300\312\322\377\327\344\355\377"
+ "\325\342\354\377\325\342\354\377\316\332\344\377\325\342\353\377\325"
+ "\342\354\377\222\233\243\256\14\14\20\15\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0!!-\0!!-\2!!-\6\"#/\17""12C\36KMb3mp\214O\224\227\263"
+ "t\300\303\327\236\331\334\347\311\355\360\363\374\354\355\355\377\250"
+ "\251\252\377jjj\377\246\247\250\377\360\363\366\377\362\366\371\377\360"
+ "\365\370\377\356\363\367\377\354\362\366\377\324\334\341\3649<C`\"#0"
+ "<*+:l9:L\256\36\36\37\375''(\377EHJ\377\20\21\21\377\256\270\300\377"
+ "\325\342\354\377\325\342\354\377\304\320\331\377\203\213\221\377\230"
+ "\241\250\377\324\341\353\377\200\210\217\266\14\14\20\20\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\1!!-\4!!-\13()7\26<>S'Z]"
+ "wA\201\205\243c\256\262\312\212\324\327\346\262\327\333\342\342\365\370"
+ "\372\377\367\371\373\377\333\336\340\377z{|\377tuv\377\340\345\350\377"
+ "\356\363\367\377\354\362\366\377\352\360\365\377\350\357\364\377\270"
+ "\277\306\337\34\35&R%%3uORa\304)+,\375\20\20\20\377\22\22\23\377\5\5"
+ "\5\377\37\40\"\377IMP\377{\202\210\377\237\251\260\377bgl\377\263\276"
+ "\307\377\220\231\240\305\12\12\16\34!!-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\1!!-\6!!-\15&&4\32""68J-QTkIuy\226"
+ "k\236\243\276\220\303\307\332\271\315\322\334\352\364\370\372\377\364"
+ "\367\372\377\354\360\364\377\226\230\232\377]^_\377\305\311\315\377\213"
+ "\216\220\377}\200\202\377\231\235\241\377\273\302\307\377{\200\210\324"
+ "\77AQ\302\213\222\232\372\16\16\16\377\10\10\10\377\3\3\3\377\11\11\12"
+ "\377kqv\377\0\0\0\377\0\0\0\377\6\7\7\377\\ae\377\225\236\246\324\16"
+ "\17\23'\40\40+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\4!!-\12\"\".\27/0@,EG]Igj\206o\225\232"
+ "\270\236\276\303\330\314\321\327\340\366\361\366\371\377\360\364\370"
+ "\377\354\362\366\377\217\222\225\377333\377---\377'''\377\"\"\"\377\34"
+ "\34\34\377\30\30\31\377\26\26\27\376\13\13\14\377\2\2\2\377\0\0\0\377"
+ "\0\0\0\377$%'\377135\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\14\14"
+ "\16z\32\32#\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\2!!-\7!!-\21&'4\"23D9DEZVZ^x{|\201"
+ "\240\245\236\244\277\320\315\324\336\370\356\363\367\377\354\362\366"
+ "\377moq\377+++\377%%%\377\37\37\37\377\30\30\30\377\13\13\13\377\2\2"
+ "\2\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
+ "\0\0\377\31\32\33\377\1\1\1\377\0\0\0\377\1\1\1\374\13\13\16}\25\25\35"
+ "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0!!-\0!!-\0!!-\1!!-\5!!-\15!\".\32##0-()7H68JmMPh\233"
+ "im\206\316\311\320\331\372\337\345\352\377++,\377\"\"\"\377\34\34\34"
+ "\377\14\14\14\377\1\1\1\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0"
+ "\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\23\24\24\377DGJ\377\20\21\21\377"
+ "\3\3\4\364\13\13\16\246\17\17\24\40\31\31\"\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0!!-\0!!-\2!!-\7!!-\22!!-\"!\".;%%3`.0@\223KN^\322\246"
+ "\254\262\375\40\40\40\377\30\30\30\377\4\4\4\377\0\0\0\377\0\0\0\377"
+ "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
+ "\0\0\0\377\0\0\0\377\34\35\36\375\10\10\11\321\16\16\22f\20\20\27\21"
+ "\31\31!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\1!!-\2!!-\5"
+ "!!-\14!!-\34!!-/!!-G!!-m##0\242,-6\343\27\27\27\377\3\3\3\377\0\0\0\377"
+ "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
+ "\0\0\0\377\0\0\0\377\0\0\0\377\21\22\23\374\32\33\36\233\17\17\25\37"
+ "\25\25\35\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0!!-\0!!-\1!!-\4!!-\16!!-\32!!-+!!-T!!-\222\37\37(\330\11"
+ "\11\11\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
+ "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\2\2\2\367"
+ "\15\15\20""9\31\31!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\2!!-\5!!-\13!!-\23!!-\33!!--!!-_\"\""
+ ".\255\21\21\25\364\3\3\3\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
+ "\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377\0\0\0\377"
+ "\12\13\13\376\1\1\1\375\4\4\4\321\22\22\27\21\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\3!!-\6!!-\14"
+ "!!-\25!!-\"!!-;!!-j\40\40+\263\20\20\24\361\6\6\7\375\4\4\4\37758:\377"
+ "\40\"#\377\13\14\14\377\4\4\4\377\2\2\2\377\4\4\5\377\13\14\15\377\32"
+ "\33\34\377\14\15\15\377\0\0\0\377\20\21\22\377>AE\313\13\13\15\222\17"
+ "\17\23/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0!!-\0!!-\2!!-\5!!-\14!!.\25&(9$14G:AE\\\\[a\177\221nv\222\321"
+ "\11\12\13\376afk\377\301\314\325\377\306\322\333\377\267\302\313\377"
+ "\253\265\275\377\244\256\266\377\250\262\272\377\260\272\303\377\272"
+ "\306\316\377\266\301\311\377cim\377\27\30\31\377JNR\374gmt~\23\23\33"
+ "\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!"
+ "-\0!!-\3!!-\11$%3\22""03F\37BH_1Zb\177J{\204\241m\237\247\301\231\275"
+ "\305\331\310\273\305\321\364\202\211\216\377\306\322\333\377\325\342"
+ "\354\377\325\342\354\377\325\342\354\377\325\342\354\377\325\342\354"
+ "\377\325\342\354\377\325\342\354\377\325\342\354\377\325\342\354\377"
+ "\324\341\352\377\303\317\330\377\254\267\277\377\311\326\337\370\\ag"
+ "b\27\27\40\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\1!!-\4!!-\11$(9"
+ "\23""1<T$E]}\77e\216\257j\261\322\337\313Y|\237\202\224\266\326\234\300"
+ "\334\356\310\255\330\350\362\220\307\333\377\323\337\351\377\325\342"
+ "\354\377\304\336\353\377\302\335\352\377\275\334\351\377\271\332\351"
+ "\377\262\330\350\377\320\335\347\377\325\342\354\377\325\342\354\377"
+ "\325\342\354\377\325\342\354\377\311\334\350\377\266\331\350\377\251"
+ "\310\325\377\303\317\331\361\200\245\264\207\244\325\346\177\221\314"
+ "\340~~\304\333}l\276\330z6}\224B\31\31#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-"
+ "\0!!-\1!!-\4!!.\11&+;\21""6@W\40L`}6i\206\245V\214\257\313\177\247\320"
+ "\345\254\330\357\367\357\336\364\373\377\206\277\324\343\205\313\344"
+ "\303\252\332\352\356h\313\352\377G\301\346\377\200\273\321\377\323\340"
+ "\352\377\330\361\370\377\323\360\371\377\267\347\366\377\233\336\362"
+ "\377v\321\355\377\256\271\301\377\325\342\354\377\325\342\354\377\314"
+ "\336\351\377\302\340\354\377\276\350\365\377\245\341\363\377z\264\307"
+ "\377\322\337\351\377\312\345\360\377\323\360\371\377\267\347\366\377"
+ "\234\336\362\377\201\325\357\3775w\214\240\32\32$\1\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0!!-\0!!-\1!!-\5!!-\14\"%5\30""08O*FVtBd\201\244_\217\262\320\205\274"
+ "\333\354\261\310\346\360\340\323\357\367\376\301\352\367\377\241\340"
+ "\363\377{\275\320\366t\314\350\377I\302\347\377+\270\344\377F\224\255"
+ "\377\315\332\343\377\270\346\364\377\256\344\365\377\216\331\357\377"
+ "n\314\351\377N\302\345\377\254\267\277\377\325\342\354\377\311\336\352"
+ "\377\323\355\365\377\307\354\370\377\235\336\362\377s\320\355\377N\256"
+ "\314\377\313\327\341\377\274\341\357\377\265\346\365\377\227\334\362"
+ "\377\\\247\277\356L\244\300\346\40^s\220\32\32#\1\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0!!-\0!!-\0!!-\3!!-\12!#1\24&2H%4Mj>Iy\240bl\257\322\217\230\330"
+ "\355\275\233\326\345\352\237\336\362\377\206\327\357\377e\313\352\377"
+ "J\303\350\377,\271\344\3776\223\261\377\273\306\317\377\324\341\353\377"
+ "\230\333\360\377\211\330\360\377b\251\300\377\244\260\271\376|\206\216"
+ "\346\306\321\331\365\314\337\352\377\321\355\366\377\277\352\367\377"
+ "\224\333\361\377n\267\316\377\215\267\307\377\270\310\322\377\323\340"
+ "\352\377\256\334\355\377\227\334\361\377v\321\355\377\10\27\37e\23\23"
+ "\33\32\22\22\30\15\33\33&\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0!!-\1!!-\5!!-\13!\"1\25\"/F'*Ef@:m\227eP\245\317\221w\321\354\301x"
+ "\311\337\360h\315\353\377K\303\350\377-\271\344\377*\230\272\377\260"
+ "\275\306\377\325\342\354\377\324\341\353\377x\321\354\377d\313\353\377"
+ "H\263\324\377S\250\305\366R\261\323\333\304\331\343\330\267\333\350\374"
+ "\267\347\366\377\215\331\360\377o\254\301\377\307\323\334\377\325\342"
+ "\354\377\325\342\354\377\325\342\354\377\240\330\353\377y\322\356\377"
+ "]\311\352\3777\263\332\365\37\260\335\355\10!,>\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\2!!-\6!!-\15!&7\32$8R10V|P\77\211\270"
+ "zZ\275\342\252\203\332\357\327\231\322\345\373K\302\347\377.\271\344"
+ "\377\21\260\340\377!\245\316\377\302\324\337\377\325\342\354\377\324"
+ "\341\353\377X\306\350\377@\277\346\377$\266\343\377\12\255\337\377\5"
+ "\236\315\374\226\305\322\323\236\336\360\367\205\326\357\377[\310\352"
+ "\377\226\262\276\377\325\342\354\377\325\342\354\377\325\342\354\377"
+ "\325\342\354\377\222\323\351\377[\310\352\377\77\277\346\377$\266\343"
+ "\377\12\255\337\377\6\34%P\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0!!-\0!!-\4!!-\15!%7\33\"7S1+T{N:\203\257tQ\270\337\242v\332\361\316"
+ "\227\324\347\371M\303\347\377/\272\344\377\24\252\330\377\1\252\336\377"
+ "\0\252\336\3777\253\321\377\313\331\343\377\324\341\353\3778\273\344"
+ "\377\33\263\341\377\6\232\310\371\10\202\253\342\17\205\252\345j\302"
+ "\327\316p\321\353\365S\306\351\377)\270\343\377l\254\302\377\322\337"
+ "\351\377\325\342\354\377\325\342\354\377\325\342\354\377\205\316\350"
+ "\377=\276\346\377!\265\342\377b\226\250\377n\241\264\371\22\30\35P\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\1!!-\6!!-\17!'9\34!7T2#R{"
+ "T+\200\256~7\267\340\256I\320\356\337J\302\346\3760\272\344\377\32\246"
+ "\321\377\204\241\255\377&\257\332\377\0\252\336\377\0\252\336\377K\256"
+ "\316\377\317\334\346\377\30\261\340\377\2\253\336\377\2\203\254\345\37"
+ "Ls`'\203\262\202/\274\345\2646\310\351\351!\265\342\377\4\253\337\377"
+ "\2\251\335\3772\255\324\377U\270\331\377R\271\333\377\253\305\322\377"
+ "w\312\346\377\37\264\342\377\7\254\337\377Z\253\306\377/\211\246\323"
+ "\6i\213K\30\30!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\1!!-\3!!-\7!!/\21!*B"
+ "\40!;_5#V\204S,\201\262{;\264\337\255C\277\341\3410\271\343\377\24\256"
+ "\335\377g\225\246\377\322\337\350\377\266\323\341\377\21\253\333\377"
+ "\0\252\336\377A\216\250\377\307\324\336\376\7\252\334\376\0\252\336\377"
+ "\2\203\254\341\35""8[A\"[\216X\"\211\276\206\40\270\344\273\10\255\334"
+ "\366\0\252\336\377\0\252\336\377\0\252\336\377\0\252\336\377\0\252\336"
+ "\377\220\261\300\377i\305\344\377\5\254\337\377\0\252\336\377\0\252\336"
+ "\377\0\252\336\377\2j\213\252\27\27\37\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "!!-\0!!-\1!!-\2!!-\6!$2\15!/B\27%<W&.Ot:9l\224ZJ\216\267\2040\233\304"
+ "\310%\177\237\347\260\277\314\346\325\342\354\377\325\342\354\377\233"
+ "\312\335\377;\223\260\377\300\313\324\377t\210\227\322\1\236\317\364"
+ "\0\237\320\372\2|\242\331\33!3+!6X5\"P\177Q\"y\260x\36\241\321\250\16"
+ "\241\316\333\6\241\321\366\5\246\327\376\7\247\330\377\24\244\320\377"
+ "\234\270\305\377j\301\337\377\10\235\313\376\1\232\311\371\1\232\312"
+ "\367\1\232\312\366\3a\177\244\27\27\37\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\1!!-\3!!-\7\"#0\16*-=\27:@U&NWr>`i\204"
+ "b\214\227\264\203\270\304\322\331\325\342\354\377\325\342\354\377\316"
+ "\333\345\377\240\252\262\330\17\21\31*\15\20\31(\13\13\20""2\12\12\16"
+ ")\34\34'\10!!.\15!$3\26'.B\"3\77W4GVsRav\230|\204\222\252\260\300\314"
+ "\326\372\313\327\341\377\323\340\352\377\302\316\327\370:>C\210\17\22"
+ "\32/\16\20\27+\16\16\24*\16\16\23\33\31\31#\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\1!!-\2!!-\5!!.\13"
+ "&(6\26""14F%CG^<Y_y_\266\301\315\322\325\342\354\377\271\304\315\355"
+ "%'+D\35\35'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\1!!-\5!!-\13!!-\23'"
+ ")8!8;O7RXrV\216\227\250\241\324\341\353\376\310\324\336\370QU[{\22\22"
+ "\31\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0!!-\0!!-\3!!-\7!!-\14##0\27""7:G9\260\273\304\311EIOl\26\26\36"
+ "\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!!-\0!!-\0!!-\1!!-"
+ "\3!!-\11\"#/\23()8)\234\245\256\237RV\\|\22\22\30\6\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0!!-\0!!-\0!!-\1\17\17\25\16\20\20\26\6\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0!!-\0!!-\0!!-\1\24\24\34\5\23\23\32\4\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+ "\0\0\0\0"};
+
+
diff --git a/xfce4-session/xfsm-chooser-icon.png b/xfce4-session/xfsm-chooser-icon.png
new file mode 100644
index 0000000..7bb5979
--- /dev/null
+++ b/xfce4-session/xfsm-chooser-icon.png
Binary files differ
diff --git a/xfce4-session/xfsm-chooser.c b/xfce4-session/xfsm-chooser.c
new file mode 100644
index 0000000..e1e1fdf
--- /dev/null
+++ b/xfce4-session/xfsm-chooser.c
@@ -0,0 +1,242 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+
+#include <libxfce4util/libxfce4util.h>
+#include <libxfce4ui/libxfce4ui.h>
+
+#include <libxfsm/xfsm-util.h>
+
+#include <xfce4-session/xfsm-chooser.h>
+
+
+#define BORDER 6
+
+
+static void xfsm_chooser_row_activated (GtkTreeView *treeview,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ XfsmChooser *chooser);
+static void xfsm_chooser_realized (GtkWidget *widget,
+ XfsmChooser *chooser);
+
+
+
+G_DEFINE_TYPE (XfsmChooser, xfsm_chooser, GTK_TYPE_DIALOG)
+
+
+
+void
+xfsm_chooser_set_sessions (XfsmChooser *chooser,
+ GList *sessions,
+ const gchar *default_session)
+{
+ GtkTreeModel *model;
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (chooser->tree));
+
+ settings_list_sessions_populate (GTK_TREE_MODEL (model), sessions);
+}
+
+
+static void
+xfsm_chooser_new_session (GtkButton *button,
+ XfsmChooser *chooser)
+{
+ gtk_dialog_response (GTK_DIALOG (chooser), XFSM_RESPONSE_NEW);
+}
+
+
+static void
+xfsm_chooser_logout (GtkButton *button,
+ XfsmChooser *chooser)
+{
+ gtk_dialog_response (GTK_DIALOG (chooser), GTK_RESPONSE_CANCEL);
+}
+
+
+static void
+xfsm_chooser_start_session (GtkButton *button,
+ XfsmChooser *chooser)
+{
+ gtk_dialog_response (GTK_DIALOG (chooser), XFSM_RESPONSE_LOAD);
+}
+
+
+gchar*
+xfsm_chooser_get_session (const XfsmChooser *chooser)
+{
+ GtkTreeSelection *selection;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GValue value;
+ gchar *name;
+
+ bzero (&value, sizeof (value));
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (chooser->tree));
+ if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+ {
+ g_warning ("xfsm_chooser_get_session: !gtk_tree_selection_get_selected");
+ return NULL;
+ }
+ gtk_tree_model_get_value (model, &iter, NAME_COLUMN, &value);
+ name = g_value_dup_string (&value);
+ g_value_unset (&value);
+
+ return name;
+}
+
+
+static void
+xfsm_chooser_class_init (XfsmChooserClass *klass)
+{
+}
+
+
+static void
+xfsm_chooser_init (XfsmChooser *chooser)
+{
+ GtkWidget *button;
+ GtkWidget *swin;
+ GtkWidget *vbox;
+ GtkWidget *hbox;
+ GtkWidget *label;
+ GtkWidget *dbox;
+ gchar title[256];
+
+ dbox = gtk_dialog_get_content_area(GTK_DIALOG (chooser));
+
+ g_signal_connect_after (G_OBJECT (chooser), "realize",
+ G_CALLBACK (xfsm_chooser_realized), chooser);
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 9);
+ gtk_box_pack_start (GTK_BOX (dbox), vbox, TRUE, TRUE, 0);
+ g_snprintf (title, 256, "<big><b>%s</b></big>",
+ _("Session Manager"));
+ label = gtk_label_new (title);
+ gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+ gtk_widget_set_margin_bottom (label, 12);
+ gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0);
+
+ /* scrolled window */
+ swin = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin),
+ GTK_POLICY_NEVER,
+ GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (swin),
+ GTK_SHADOW_ETCHED_IN);
+ gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (swin),
+ 200);
+ gtk_box_pack_start (GTK_BOX (vbox), swin, TRUE, TRUE, 0);
+
+ /* tree view */
+ chooser->tree = gtk_tree_view_new ();
+ settings_list_sessions_treeview_init (GTK_TREE_VIEW (chooser->tree));
+ gtk_widget_set_tooltip_text (chooser->tree,
+ _("Choose the session you want to restore. "
+ "You can simply double-click the session "
+ "name to restore it."));
+ g_signal_connect (G_OBJECT (chooser->tree), "row-activated",
+ G_CALLBACK (xfsm_chooser_row_activated), chooser);
+ gtk_container_add (GTK_CONTAINER (swin), chooser->tree);
+ gtk_widget_set_size_request (chooser->tree, -1, 150);
+
+ /* Session Treeview inline toolbar */
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0);
+ gtk_widget_set_margin_bottom (hbox, 12);
+ gtk_style_context_add_class (gtk_widget_get_style_context (hbox), "inline-toolbar");
+
+ /* "New" button */
+ button = gtk_button_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_BUTTON);
+ gtk_widget_set_tooltip_text (button, _("Create a new session."));
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (xfsm_chooser_new_session), chooser);
+ gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+
+ /* "Delete" button */
+ button = gtk_button_new_from_icon_name ("list-remove-symbolic", GTK_ICON_SIZE_BUTTON);
+ gtk_widget_set_tooltip_text (button, _("Delete a saved session."));
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (settings_list_sessions_delete_session), GTK_TREE_VIEW (chooser->tree));
+ gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+
+ /* Button box */
+ hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_EDGE);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0);
+
+ /* "Logout" button */
+ button = xfce_gtk_button_new_mixed ("application-exit", _("Log Out"));
+ gtk_widget_set_tooltip_text (button,
+ _("Cancel the login attempt and return to "
+ "the login screen."));
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (xfsm_chooser_logout), chooser);
+ gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+
+ /* "Start" button */
+ button = xfce_gtk_button_new_mixed ("", _("Start"));
+ gtk_widget_set_tooltip_text (button, _("Start an existing session."));
+ gtk_style_context_add_class (gtk_widget_get_style_context (button), "suggested-action");
+ gtk_dialog_set_default_response (GTK_DIALOG (chooser), XFSM_RESPONSE_LOAD);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (xfsm_chooser_start_session), chooser);
+ gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+
+ gtk_widget_show_all (vbox);
+}
+
+
+static void
+xfsm_chooser_row_activated (GtkTreeView *treeview,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ XfsmChooser *chooser)
+{
+ gtk_dialog_response (GTK_DIALOG (chooser), XFSM_RESPONSE_LOAD);
+}
+
+
+static void
+xfsm_chooser_realized (GtkWidget *widget,
+ XfsmChooser *chooser)
+{
+ GdkCursor *cursor;
+
+ cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), GDK_LEFT_PTR);
+ gdk_window_set_cursor (gtk_widget_get_window(widget), cursor);
+ g_object_unref (cursor);
+}
diff --git a/xfce4-session/xfsm-chooser.h b/xfce4-session/xfsm-chooser.h
new file mode 100644
index 0000000..e75f60a
--- /dev/null
+++ b/xfce4-session/xfsm-chooser.h
@@ -0,0 +1,64 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __XFSM_CHOOSER_H__
+#define __XFSM_CHOOSER_H__
+
+#include <gtk/gtk.h>
+
+
+G_BEGIN_DECLS;
+
+#define XFSM_TYPE_CHOOSER xfsm_chooser_get_type()
+#define XFSM_CHOOSER(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, XFSM_TYPE_CHOOSER, XfsmChooser)
+#define XFSM_CHOOSER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, XFSM_TYPE_CHOOSER, XfsmChooserClass)
+#define XFSM_IS_CHOOSER(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, XFSM_TYPE_CHOOSER)
+
+#define XFSM_RESPONSE_LOAD 1
+#define XFSM_RESPONSE_NEW 2
+
+typedef struct _XfsmChooser XfsmChooser;
+typedef struct _XfsmChooserClass XfsmChooserClass;
+
+struct _XfsmChooserClass
+{
+ GtkDialogClass parent_class;
+};
+
+struct _XfsmChooser
+{
+ GtkDialog dialog;
+
+ GtkWidget *tree;
+};
+
+GType xfsm_chooser_get_type (void) G_GNUC_CONST;
+
+void xfsm_chooser_set_sessions (XfsmChooser *chooser,
+ GList *sessions,
+ const gchar *default_session);
+
+gchar *xfsm_chooser_get_session (const XfsmChooser *chooser);
+
+G_END_DECLS;
+
+
+#endif /* !__XFSM_CHOOSER_H__ */
diff --git a/xfce4-session/xfsm-client-dbus.c b/xfce4-session/xfsm-client-dbus.c
new file mode 100644
index 0000000..78f3fdc
--- /dev/null
+++ b/xfce4-session/xfsm-client-dbus.c
@@ -0,0 +1,2905 @@
+/*
+ * Generated by gdbus-codegen 2.62.4 from xfsm-client-dbus.xml. DO NOT EDIT.
+ *
+ * The license of this code is the same as for the D-Bus interface description
+ * it was derived from.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "xfsm-client-dbus.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.xfce.Session.Client
+ * ------------------------------------------------------------------------
+ */
+
+/**
+ * SECTION:XfsmDbusClient
+ * @title: XfsmDbusClient
+ * @short_description: Generated C code for the org.xfce.Session.Client D-Bus interface
+ *
+ * This section contains code for working with the <link linkend="gdbus-interface-org-xfce-Session-Client.top_of_page">org.xfce.Session.Client</link> D-Bus interface in C.
+ */
+
+/* ---- Introspection data for org.xfce.Session.Client ---- */
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_method_info_get_id_OUT_ARG_id =
+{
+ {
+ -1,
+ (gchar *) "id",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_method_info_get_id_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_method_info_get_id_OUT_ARG_id.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_client_method_info_get_id =
+{
+ {
+ -1,
+ (gchar *) "GetID",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_client_method_info_get_id_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-get-id",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_method_info_get_state_OUT_ARG_state =
+{
+ {
+ -1,
+ (gchar *) "state",
+ (gchar *) "u",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_method_info_get_state_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_method_info_get_state_OUT_ARG_state.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_client_method_info_get_state =
+{
+ {
+ -1,
+ (gchar *) "GetState",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_client_method_info_get_state_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-get-state",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_method_info_get_all_sm_properties_OUT_ARG_properties =
+{
+ {
+ -1,
+ (gchar *) "properties",
+ (gchar *) "a{sv}",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_method_info_get_all_sm_properties_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_method_info_get_all_sm_properties_OUT_ARG_properties.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_client_method_info_get_all_sm_properties =
+{
+ {
+ -1,
+ (gchar *) "GetAllSmProperties",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_client_method_info_get_all_sm_properties_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-get-all-sm-properties",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_method_info_get_sm_properties_IN_ARG_names =
+{
+ {
+ -1,
+ (gchar *) "names",
+ (gchar *) "as",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_method_info_get_sm_properties_IN_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_method_info_get_sm_properties_IN_ARG_names.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_method_info_get_sm_properties_OUT_ARG_values =
+{
+ {
+ -1,
+ (gchar *) "values",
+ (gchar *) "a{sv}",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_method_info_get_sm_properties_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_method_info_get_sm_properties_OUT_ARG_values.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_client_method_info_get_sm_properties =
+{
+ {
+ -1,
+ (gchar *) "GetSmProperties",
+ (GDBusArgInfo **) &_xfsm_dbus_client_method_info_get_sm_properties_IN_ARG_pointers,
+ (GDBusArgInfo **) &_xfsm_dbus_client_method_info_get_sm_properties_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-get-sm-properties",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_method_info_set_sm_properties_IN_ARG_properties =
+{
+ {
+ -1,
+ (gchar *) "properties",
+ (gchar *) "a{sv}",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_method_info_set_sm_properties_IN_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_method_info_set_sm_properties_IN_ARG_properties.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_client_method_info_set_sm_properties =
+{
+ {
+ -1,
+ (gchar *) "SetSmProperties",
+ (GDBusArgInfo **) &_xfsm_dbus_client_method_info_set_sm_properties_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-set-sm-properties",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_method_info_delete_sm_properties_IN_ARG_names =
+{
+ {
+ -1,
+ (gchar *) "names",
+ (gchar *) "as",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_method_info_delete_sm_properties_IN_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_method_info_delete_sm_properties_IN_ARG_names.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_client_method_info_delete_sm_properties =
+{
+ {
+ -1,
+ (gchar *) "DeleteSmProperties",
+ (GDBusArgInfo **) &_xfsm_dbus_client_method_info_delete_sm_properties_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-delete-sm-properties",
+ FALSE
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_client_method_info_terminate =
+{
+ {
+ -1,
+ (gchar *) "Terminate",
+ NULL,
+ NULL,
+ NULL
+ },
+ "handle-terminate",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_method_info_end_session_response_IN_ARG_is_ok =
+{
+ {
+ -1,
+ (gchar *) "is_ok",
+ (gchar *) "b",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_method_info_end_session_response_IN_ARG_reason =
+{
+ {
+ -1,
+ (gchar *) "reason",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_method_info_end_session_response_IN_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_method_info_end_session_response_IN_ARG_is_ok.parent_struct,
+ &_xfsm_dbus_client_method_info_end_session_response_IN_ARG_reason.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_client_method_info_end_session_response =
+{
+ {
+ -1,
+ (gchar *) "EndSessionResponse",
+ (GDBusArgInfo **) &_xfsm_dbus_client_method_info_end_session_response_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-end-session-response",
+ FALSE
+};
+
+static const GDBusMethodInfo * const _xfsm_dbus_client_method_info_pointers[] =
+{
+ &_xfsm_dbus_client_method_info_get_id.parent_struct,
+ &_xfsm_dbus_client_method_info_get_state.parent_struct,
+ &_xfsm_dbus_client_method_info_get_all_sm_properties.parent_struct,
+ &_xfsm_dbus_client_method_info_get_sm_properties.parent_struct,
+ &_xfsm_dbus_client_method_info_set_sm_properties.parent_struct,
+ &_xfsm_dbus_client_method_info_delete_sm_properties.parent_struct,
+ &_xfsm_dbus_client_method_info_terminate.parent_struct,
+ &_xfsm_dbus_client_method_info_end_session_response.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_signal_info_state_changed_ARG_old_state =
+{
+ {
+ -1,
+ (gchar *) "old_state",
+ (gchar *) "u",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_signal_info_state_changed_ARG_new_state =
+{
+ {
+ -1,
+ (gchar *) "new_state",
+ (gchar *) "u",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_signal_info_state_changed_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_signal_info_state_changed_ARG_old_state.parent_struct,
+ &_xfsm_dbus_client_signal_info_state_changed_ARG_new_state.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusSignalInfo _xfsm_dbus_client_signal_info_state_changed =
+{
+ {
+ -1,
+ (gchar *) "StateChanged",
+ (GDBusArgInfo **) &_xfsm_dbus_client_signal_info_state_changed_ARG_pointers,
+ NULL
+ },
+ "state-changed"
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_signal_info_sm_property_changed_ARG_name =
+{
+ {
+ -1,
+ (gchar *) "name",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_signal_info_sm_property_changed_ARG_value =
+{
+ {
+ -1,
+ (gchar *) "value",
+ (gchar *) "v",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_signal_info_sm_property_changed_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_signal_info_sm_property_changed_ARG_name.parent_struct,
+ &_xfsm_dbus_client_signal_info_sm_property_changed_ARG_value.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusSignalInfo _xfsm_dbus_client_signal_info_sm_property_changed =
+{
+ {
+ -1,
+ (gchar *) "SmPropertyChanged",
+ (GDBusArgInfo **) &_xfsm_dbus_client_signal_info_sm_property_changed_ARG_pointers,
+ NULL
+ },
+ "sm-property-changed"
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_signal_info_sm_property_deleted_ARG_name =
+{
+ {
+ -1,
+ (gchar *) "name",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_signal_info_sm_property_deleted_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_signal_info_sm_property_deleted_ARG_name.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusSignalInfo _xfsm_dbus_client_signal_info_sm_property_deleted =
+{
+ {
+ -1,
+ (gchar *) "SmPropertyDeleted",
+ (GDBusArgInfo **) &_xfsm_dbus_client_signal_info_sm_property_deleted_ARG_pointers,
+ NULL
+ },
+ "sm-property-deleted"
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_signal_info_query_end_session_ARG_flags =
+{
+ {
+ -1,
+ (gchar *) "flags",
+ (gchar *) "u",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_signal_info_query_end_session_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_signal_info_query_end_session_ARG_flags.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusSignalInfo _xfsm_dbus_client_signal_info_query_end_session =
+{
+ {
+ -1,
+ (gchar *) "QueryEndSession",
+ (GDBusArgInfo **) &_xfsm_dbus_client_signal_info_query_end_session_ARG_pointers,
+ NULL
+ },
+ "query-end-session"
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_client_signal_info_end_session_ARG_flags =
+{
+ {
+ -1,
+ (gchar *) "flags",
+ (gchar *) "u",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_client_signal_info_end_session_ARG_pointers[] =
+{
+ &_xfsm_dbus_client_signal_info_end_session_ARG_flags.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusSignalInfo _xfsm_dbus_client_signal_info_end_session =
+{
+ {
+ -1,
+ (gchar *) "EndSession",
+ (GDBusArgInfo **) &_xfsm_dbus_client_signal_info_end_session_ARG_pointers,
+ NULL
+ },
+ "end-session"
+};
+
+static const _ExtendedGDBusSignalInfo _xfsm_dbus_client_signal_info_cancel_end_session =
+{
+ {
+ -1,
+ (gchar *) "CancelEndSession",
+ NULL,
+ NULL
+ },
+ "cancel-end-session"
+};
+
+static const _ExtendedGDBusSignalInfo _xfsm_dbus_client_signal_info_stop =
+{
+ {
+ -1,
+ (gchar *) "Stop",
+ NULL,
+ NULL
+ },
+ "stop"
+};
+
+static const GDBusSignalInfo * const _xfsm_dbus_client_signal_info_pointers[] =
+{
+ &_xfsm_dbus_client_signal_info_state_changed.parent_struct,
+ &_xfsm_dbus_client_signal_info_sm_property_changed.parent_struct,
+ &_xfsm_dbus_client_signal_info_sm_property_deleted.parent_struct,
+ &_xfsm_dbus_client_signal_info_query_end_session.parent_struct,
+ &_xfsm_dbus_client_signal_info_end_session.parent_struct,
+ &_xfsm_dbus_client_signal_info_cancel_end_session.parent_struct,
+ &_xfsm_dbus_client_signal_info_stop.parent_struct,
+ NULL
+};
+
+static const GDBusAnnotationInfo _xfsm_dbus_client_annotation_info_0 =
+{
+ -1,
+ (gchar *) "org.freedesktop.DBus.GLib.CSymbol",
+ (gchar *) "xfsm_client_dbus",
+ NULL
+};
+
+static const GDBusAnnotationInfo _xfsm_dbus_client_annotation_info_1 =
+{
+ -1,
+ (gchar *) "org.freedesktop.DBus.GLib.ClientCSymbol",
+ (gchar *) "xfsm_client_dbus_client",
+ NULL
+};
+
+static const GDBusAnnotationInfo * const _xfsm_dbus_client_annotation_info_pointers[] =
+{
+ &_xfsm_dbus_client_annotation_info_0,
+ &_xfsm_dbus_client_annotation_info_1,
+ NULL
+};
+
+static const _ExtendedGDBusInterfaceInfo _xfsm_dbus_client_interface_info =
+{
+ {
+ -1,
+ (gchar *) "org.xfce.Session.Client",
+ (GDBusMethodInfo **) &_xfsm_dbus_client_method_info_pointers,
+ (GDBusSignalInfo **) &_xfsm_dbus_client_signal_info_pointers,
+ NULL,
+ (GDBusAnnotationInfo **) &_xfsm_dbus_client_annotation_info_pointers
+ },
+ "client",
+};
+
+
+/**
+ * xfsm_dbus_client_interface_info:
+ *
+ * Gets a machine-readable description of the <link linkend="gdbus-interface-org-xfce-Session-Client.top_of_page">org.xfce.Session.Client</link> D-Bus interface.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
+ */
+GDBusInterfaceInfo *
+xfsm_dbus_client_interface_info (void)
+{
+ return (GDBusInterfaceInfo *) &_xfsm_dbus_client_interface_info.parent_struct;
+}
+
+/**
+ * xfsm_dbus_client_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 #XfsmDbusClient interface for a concrete class.
+ * The properties are overridden in the order they are defined.
+ *
+ * Returns: The last property id.
+ */
+guint
+xfsm_dbus_client_override_properties (GObjectClass *klass, guint property_id_begin)
+{
+ return property_id_begin - 1;
+}
+
+
+
+/**
+ * XfsmDbusClient:
+ *
+ * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-xfce-Session-Client.top_of_page">org.xfce.Session.Client</link>.
+ */
+
+/**
+ * XfsmDbusClientIface:
+ * @parent_iface: The parent interface.
+ * @handle_delete_sm_properties: Handler for the #XfsmDbusClient::handle-delete-sm-properties signal.
+ * @handle_end_session_response: Handler for the #XfsmDbusClient::handle-end-session-response signal.
+ * @handle_get_all_sm_properties: Handler for the #XfsmDbusClient::handle-get-all-sm-properties signal.
+ * @handle_get_id: Handler for the #XfsmDbusClient::handle-get-id signal.
+ * @handle_get_sm_properties: Handler for the #XfsmDbusClient::handle-get-sm-properties signal.
+ * @handle_get_state: Handler for the #XfsmDbusClient::handle-get-state signal.
+ * @handle_set_sm_properties: Handler for the #XfsmDbusClient::handle-set-sm-properties signal.
+ * @handle_terminate: Handler for the #XfsmDbusClient::handle-terminate signal.
+ * @cancel_end_session: Handler for the #XfsmDbusClient::cancel-end-session signal.
+ * @end_session: Handler for the #XfsmDbusClient::end-session signal.
+ * @query_end_session: Handler for the #XfsmDbusClient::query-end-session signal.
+ * @sm_property_changed: Handler for the #XfsmDbusClient::sm-property-changed signal.
+ * @sm_property_deleted: Handler for the #XfsmDbusClient::sm-property-deleted signal.
+ * @state_changed: Handler for the #XfsmDbusClient::state-changed signal.
+ * @stop: Handler for the #XfsmDbusClient::stop signal.
+ *
+ * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-xfce-Session-Client.top_of_page">org.xfce.Session.Client</link>.
+ */
+
+typedef XfsmDbusClientIface XfsmDbusClientInterface;
+G_DEFINE_INTERFACE (XfsmDbusClient, xfsm_dbus_client, G_TYPE_OBJECT)
+
+static void
+xfsm_dbus_client_default_init (XfsmDbusClientIface *iface)
+{
+ /* GObject signals for incoming D-Bus method calls: */
+ /**
+ * XfsmDbusClient::handle-get-id:
+ * @object: A #XfsmDbusClient.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Client.GetID">GetID()</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 xfsm_dbus_client_complete_get_id() 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-id",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, handle_get_id),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusClient::handle-get-state:
+ * @object: A #XfsmDbusClient.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Client.GetState">GetState()</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 xfsm_dbus_client_complete_get_state() 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-state",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, handle_get_state),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusClient::handle-get-all-sm-properties:
+ * @object: A #XfsmDbusClient.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Client.GetAllSmProperties">GetAllSmProperties()</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 xfsm_dbus_client_complete_get_all_sm_properties() 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-all-sm-properties",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, handle_get_all_sm_properties),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusClient::handle-get-sm-properties:
+ * @object: A #XfsmDbusClient.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_names: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Client.GetSmProperties">GetSmProperties()</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 xfsm_dbus_client_complete_get_sm_properties() 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-sm-properties",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, handle_get_sm_properties),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 2,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);
+
+ /**
+ * XfsmDbusClient::handle-set-sm-properties:
+ * @object: A #XfsmDbusClient.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_properties: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Client.SetSmProperties">SetSmProperties()</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 xfsm_dbus_client_complete_set_sm_properties() 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-sm-properties",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, handle_set_sm_properties),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 2,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
+
+ /**
+ * XfsmDbusClient::handle-delete-sm-properties:
+ * @object: A #XfsmDbusClient.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_names: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Client.DeleteSmProperties">DeleteSmProperties()</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 xfsm_dbus_client_complete_delete_sm_properties() 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-delete-sm-properties",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, handle_delete_sm_properties),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 2,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);
+
+ /**
+ * XfsmDbusClient::handle-terminate:
+ * @object: A #XfsmDbusClient.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Client.Terminate">Terminate()</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 xfsm_dbus_client_complete_terminate() 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",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, handle_terminate),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusClient::handle-end-session-response:
+ * @object: A #XfsmDbusClient.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_is_ok: Argument passed by remote caller.
+ * @arg_reason: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Client.EndSessionResponse">EndSessionResponse()</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 xfsm_dbus_client_complete_end_session_response() 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-end-session-response",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, handle_end_session_response),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 3,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN, G_TYPE_STRING);
+
+ /* GObject signals for received D-Bus signals: */
+ /**
+ * XfsmDbusClient::state-changed:
+ * @object: A #XfsmDbusClient.
+ * @arg_old_state: Argument.
+ * @arg_new_state: Argument.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-xfce-Session-Client.StateChanged">"StateChanged"</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 ("state-changed",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, state_changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 2, G_TYPE_UINT, G_TYPE_UINT);
+
+ /**
+ * XfsmDbusClient::sm-property-changed:
+ * @object: A #XfsmDbusClient.
+ * @arg_name: Argument.
+ * @arg_value: Argument.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-xfce-Session-Client.SmPropertyChanged">"SmPropertyChanged"</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 ("sm-property-changed",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, sm_property_changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 2, G_TYPE_STRING, G_TYPE_VARIANT);
+
+ /**
+ * XfsmDbusClient::sm-property-deleted:
+ * @object: A #XfsmDbusClient.
+ * @arg_name: Argument.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-xfce-Session-Client.SmPropertyDeleted">"SmPropertyDeleted"</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 ("sm-property-deleted",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, sm_property_deleted),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 1, G_TYPE_STRING);
+
+ /**
+ * XfsmDbusClient::query-end-session:
+ * @object: A #XfsmDbusClient.
+ * @arg_flags: Argument.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-xfce-Session-Client.QueryEndSession">"QueryEndSession"</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 ("query-end-session",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, query_end_session),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 1, G_TYPE_UINT);
+
+ /**
+ * XfsmDbusClient::end-session:
+ * @object: A #XfsmDbusClient.
+ * @arg_flags: Argument.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-xfce-Session-Client.EndSession">"EndSession"</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 ("end-session",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, end_session),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 1, G_TYPE_UINT);
+
+ /**
+ * XfsmDbusClient::cancel-end-session:
+ * @object: A #XfsmDbusClient.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-xfce-Session-Client.CancelEndSession">"CancelEndSession"</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 ("cancel-end-session",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, cancel_end_session),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 0);
+
+ /**
+ * XfsmDbusClient::stop:
+ * @object: A #XfsmDbusClient.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-xfce-Session-Client.Stop">"Stop"</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 ("stop",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusClientIface, stop),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 0);
+
+}
+
+/**
+ * xfsm_dbus_client_emit_state_changed:
+ * @object: A #XfsmDbusClient.
+ * @arg_old_state: Argument to pass with the signal.
+ * @arg_new_state: Argument to pass with the signal.
+ *
+ * Emits the <link linkend="gdbus-signal-org-xfce-Session-Client.StateChanged">"StateChanged"</link> D-Bus signal.
+ */
+void
+xfsm_dbus_client_emit_state_changed (
+ XfsmDbusClient *object,
+ guint arg_old_state,
+ guint arg_new_state)
+{
+ g_signal_emit_by_name (object, "state-changed", arg_old_state, arg_new_state);
+}
+
+/**
+ * xfsm_dbus_client_emit_sm_property_changed:
+ * @object: A #XfsmDbusClient.
+ * @arg_name: Argument to pass with the signal.
+ * @arg_value: Argument to pass with the signal.
+ *
+ * Emits the <link linkend="gdbus-signal-org-xfce-Session-Client.SmPropertyChanged">"SmPropertyChanged"</link> D-Bus signal.
+ */
+void
+xfsm_dbus_client_emit_sm_property_changed (
+ XfsmDbusClient *object,
+ const gchar *arg_name,
+ GVariant *arg_value)
+{
+ g_signal_emit_by_name (object, "sm-property-changed", arg_name, arg_value);
+}
+
+/**
+ * xfsm_dbus_client_emit_sm_property_deleted:
+ * @object: A #XfsmDbusClient.
+ * @arg_name: Argument to pass with the signal.
+ *
+ * Emits the <link linkend="gdbus-signal-org-xfce-Session-Client.SmPropertyDeleted">"SmPropertyDeleted"</link> D-Bus signal.
+ */
+void
+xfsm_dbus_client_emit_sm_property_deleted (
+ XfsmDbusClient *object,
+ const gchar *arg_name)
+{
+ g_signal_emit_by_name (object, "sm-property-deleted", arg_name);
+}
+
+/**
+ * xfsm_dbus_client_emit_query_end_session:
+ * @object: A #XfsmDbusClient.
+ * @arg_flags: Argument to pass with the signal.
+ *
+ * Emits the <link linkend="gdbus-signal-org-xfce-Session-Client.QueryEndSession">"QueryEndSession"</link> D-Bus signal.
+ */
+void
+xfsm_dbus_client_emit_query_end_session (
+ XfsmDbusClient *object,
+ guint arg_flags)
+{
+ g_signal_emit_by_name (object, "query-end-session", arg_flags);
+}
+
+/**
+ * xfsm_dbus_client_emit_end_session:
+ * @object: A #XfsmDbusClient.
+ * @arg_flags: Argument to pass with the signal.
+ *
+ * Emits the <link linkend="gdbus-signal-org-xfce-Session-Client.EndSession">"EndSession"</link> D-Bus signal.
+ */
+void
+xfsm_dbus_client_emit_end_session (
+ XfsmDbusClient *object,
+ guint arg_flags)
+{
+ g_signal_emit_by_name (object, "end-session", arg_flags);
+}
+
+/**
+ * xfsm_dbus_client_emit_cancel_end_session:
+ * @object: A #XfsmDbusClient.
+ *
+ * Emits the <link linkend="gdbus-signal-org-xfce-Session-Client.CancelEndSession">"CancelEndSession"</link> D-Bus signal.
+ */
+void
+xfsm_dbus_client_emit_cancel_end_session (
+ XfsmDbusClient *object)
+{
+ g_signal_emit_by_name (object, "cancel-end-session");
+}
+
+/**
+ * xfsm_dbus_client_emit_stop:
+ * @object: A #XfsmDbusClient.
+ *
+ * Emits the <link linkend="gdbus-signal-org-xfce-Session-Client.Stop">"Stop"</link> D-Bus signal.
+ */
+void
+xfsm_dbus_client_emit_stop (
+ XfsmDbusClient *object)
+{
+ g_signal_emit_by_name (object, "stop");
+}
+
+/**
+ * xfsm_dbus_client_call_get_id:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @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-xfce-Session-Client.GetID">GetID()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_client_call_get_id_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_client_call_get_id_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_client_call_get_id (
+ XfsmDbusClient *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "GetID",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_client_call_get_id_finish:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @out_id: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_client_call_get_id().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_client_call_get_id().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_get_id_finish (
+ XfsmDbusClient *proxy,
+ gchar **out_id,
+ 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_id);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_client_call_get_id_sync:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @out_id: (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-xfce-Session-Client.GetID">GetID()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_client_call_get_id() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_get_id_sync (
+ XfsmDbusClient *proxy,
+ gchar **out_id,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "GetID",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(s)",
+ out_id);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_client_call_get_state:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @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-xfce-Session-Client.GetState">GetState()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_client_call_get_state_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_client_call_get_state_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_client_call_get_state (
+ XfsmDbusClient *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "GetState",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_client_call_get_state_finish:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @out_state: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_client_call_get_state().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_client_call_get_state().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_get_state_finish (
+ XfsmDbusClient *proxy,
+ guint *out_state,
+ 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,
+ "(u)",
+ out_state);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_client_call_get_state_sync:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @out_state: (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-xfce-Session-Client.GetState">GetState()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_client_call_get_state() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_get_state_sync (
+ XfsmDbusClient *proxy,
+ guint *out_state,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "GetState",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(u)",
+ out_state);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_client_call_get_all_sm_properties:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @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-xfce-Session-Client.GetAllSmProperties">GetAllSmProperties()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_client_call_get_all_sm_properties_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_client_call_get_all_sm_properties_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_client_call_get_all_sm_properties (
+ XfsmDbusClient *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "GetAllSmProperties",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_client_call_get_all_sm_properties_finish:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @out_properties: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_client_call_get_all_sm_properties().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_client_call_get_all_sm_properties().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_get_all_sm_properties_finish (
+ XfsmDbusClient *proxy,
+ GVariant **out_properties,
+ 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{sv})",
+ out_properties);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_client_call_get_all_sm_properties_sync:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @out_properties: (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-xfce-Session-Client.GetAllSmProperties">GetAllSmProperties()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_client_call_get_all_sm_properties() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_get_all_sm_properties_sync (
+ XfsmDbusClient *proxy,
+ GVariant **out_properties,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "GetAllSmProperties",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(@a{sv})",
+ out_properties);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_client_call_get_sm_properties:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @arg_names: 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-xfce-Session-Client.GetSmProperties">GetSmProperties()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_client_call_get_sm_properties_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_client_call_get_sm_properties_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_client_call_get_sm_properties (
+ XfsmDbusClient *proxy,
+ const gchar *const *arg_names,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "GetSmProperties",
+ g_variant_new ("(^as)",
+ arg_names),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_client_call_get_sm_properties_finish:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @out_values: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_client_call_get_sm_properties().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_client_call_get_sm_properties().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_get_sm_properties_finish (
+ XfsmDbusClient *proxy,
+ GVariant **out_values,
+ 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{sv})",
+ out_values);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_client_call_get_sm_properties_sync:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @arg_names: Argument to pass with the method invocation.
+ * @out_values: (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-xfce-Session-Client.GetSmProperties">GetSmProperties()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_client_call_get_sm_properties() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_get_sm_properties_sync (
+ XfsmDbusClient *proxy,
+ const gchar *const *arg_names,
+ GVariant **out_values,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "GetSmProperties",
+ g_variant_new ("(^as)",
+ arg_names),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(@a{sv})",
+ out_values);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_client_call_set_sm_properties:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @arg_properties: 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-xfce-Session-Client.SetSmProperties">SetSmProperties()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_client_call_set_sm_properties_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_client_call_set_sm_properties_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_client_call_set_sm_properties (
+ XfsmDbusClient *proxy,
+ GVariant *arg_properties,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "SetSmProperties",
+ g_variant_new ("(@a{sv})",
+ arg_properties),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_client_call_set_sm_properties_finish:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_client_call_set_sm_properties().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_client_call_set_sm_properties().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_set_sm_properties_finish (
+ XfsmDbusClient *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;
+}
+
+/**
+ * xfsm_dbus_client_call_set_sm_properties_sync:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @arg_properties: Argument to pass with the method invocation.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Client.SetSmProperties">SetSmProperties()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_client_call_set_sm_properties() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_set_sm_properties_sync (
+ XfsmDbusClient *proxy,
+ GVariant *arg_properties,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "SetSmProperties",
+ g_variant_new ("(@a{sv})",
+ arg_properties),
+ 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;
+}
+
+/**
+ * xfsm_dbus_client_call_delete_sm_properties:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @arg_names: 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-xfce-Session-Client.DeleteSmProperties">DeleteSmProperties()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_client_call_delete_sm_properties_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_client_call_delete_sm_properties_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_client_call_delete_sm_properties (
+ XfsmDbusClient *proxy,
+ const gchar *const *arg_names,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "DeleteSmProperties",
+ g_variant_new ("(^as)",
+ arg_names),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_client_call_delete_sm_properties_finish:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_client_call_delete_sm_properties().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_client_call_delete_sm_properties().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_delete_sm_properties_finish (
+ XfsmDbusClient *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;
+}
+
+/**
+ * xfsm_dbus_client_call_delete_sm_properties_sync:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @arg_names: Argument to pass with the method invocation.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Client.DeleteSmProperties">DeleteSmProperties()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_client_call_delete_sm_properties() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_delete_sm_properties_sync (
+ XfsmDbusClient *proxy,
+ const gchar *const *arg_names,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "DeleteSmProperties",
+ g_variant_new ("(^as)",
+ arg_names),
+ 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;
+}
+
+/**
+ * xfsm_dbus_client_call_terminate:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @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-xfce-Session-Client.Terminate">Terminate()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_client_call_terminate_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_client_call_terminate_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_client_call_terminate (
+ XfsmDbusClient *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Terminate",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_client_call_terminate_finish:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_client_call_terminate().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_client_call_terminate().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_terminate_finish (
+ XfsmDbusClient *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;
+}
+
+/**
+ * xfsm_dbus_client_call_terminate_sync:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Client.Terminate">Terminate()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_client_call_terminate() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_terminate_sync (
+ XfsmDbusClient *proxy,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Terminate",
+ 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;
+}
+
+/**
+ * xfsm_dbus_client_call_end_session_response:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @arg_is_ok: Argument to pass with the method invocation.
+ * @arg_reason: 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-xfce-Session-Client.EndSessionResponse">EndSessionResponse()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_client_call_end_session_response_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_client_call_end_session_response_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_client_call_end_session_response (
+ XfsmDbusClient *proxy,
+ gboolean arg_is_ok,
+ const gchar *arg_reason,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "EndSessionResponse",
+ g_variant_new ("(bs)",
+ arg_is_ok,
+ arg_reason),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_client_call_end_session_response_finish:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_client_call_end_session_response().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_client_call_end_session_response().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_end_session_response_finish (
+ XfsmDbusClient *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;
+}
+
+/**
+ * xfsm_dbus_client_call_end_session_response_sync:
+ * @proxy: A #XfsmDbusClientProxy.
+ * @arg_is_ok: Argument to pass with the method invocation.
+ * @arg_reason: Argument to pass with the method invocation.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Client.EndSessionResponse">EndSessionResponse()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_client_call_end_session_response() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_client_call_end_session_response_sync (
+ XfsmDbusClient *proxy,
+ gboolean arg_is_ok,
+ const gchar *arg_reason,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "EndSessionResponse",
+ g_variant_new ("(bs)",
+ arg_is_ok,
+ arg_reason),
+ 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;
+}
+
+/**
+ * xfsm_dbus_client_complete_get_id:
+ * @object: A #XfsmDbusClient.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @id: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Client.GetID">GetID()</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
+xfsm_dbus_client_complete_get_id (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *id)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(s)",
+ id));
+}
+
+/**
+ * xfsm_dbus_client_complete_get_state:
+ * @object: A #XfsmDbusClient.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @state: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Client.GetState">GetState()</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
+xfsm_dbus_client_complete_get_state (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ guint state)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(u)",
+ state));
+}
+
+/**
+ * xfsm_dbus_client_complete_get_all_sm_properties:
+ * @object: A #XfsmDbusClient.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @properties: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Client.GetAllSmProperties">GetAllSmProperties()</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
+xfsm_dbus_client_complete_get_all_sm_properties (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *properties)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(@a{sv})",
+ properties));
+}
+
+/**
+ * xfsm_dbus_client_complete_get_sm_properties:
+ * @object: A #XfsmDbusClient.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @values: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Client.GetSmProperties">GetSmProperties()</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
+xfsm_dbus_client_complete_get_sm_properties (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *values)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(@a{sv})",
+ values));
+}
+
+/**
+ * xfsm_dbus_client_complete_set_sm_properties:
+ * @object: A #XfsmDbusClient.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Client.SetSmProperties">SetSmProperties()</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
+xfsm_dbus_client_complete_set_sm_properties (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_client_complete_delete_sm_properties:
+ * @object: A #XfsmDbusClient.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Client.DeleteSmProperties">DeleteSmProperties()</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
+xfsm_dbus_client_complete_delete_sm_properties (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_client_complete_terminate:
+ * @object: A #XfsmDbusClient.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Client.Terminate">Terminate()</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
+xfsm_dbus_client_complete_terminate (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_client_complete_end_session_response:
+ * @object: A #XfsmDbusClient.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Client.EndSessionResponse">EndSessionResponse()</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
+xfsm_dbus_client_complete_end_session_response (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * XfsmDbusClientProxy:
+ *
+ * The #XfsmDbusClientProxy structure contains only private data and should only be accessed using the provided API.
+ */
+
+/**
+ * XfsmDbusClientProxyClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #XfsmDbusClientProxy.
+ */
+
+struct _XfsmDbusClientProxyPrivate
+{
+ GData *qdata;
+};
+
+static void xfsm_dbus_client_proxy_iface_init (XfsmDbusClientIface *iface);
+
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (XfsmDbusClientProxy, xfsm_dbus_client_proxy, G_TYPE_DBUS_PROXY,
+ G_ADD_PRIVATE (XfsmDbusClientProxy)
+ G_IMPLEMENT_INTERFACE (XFSM_DBUS_TYPE_CLIENT, xfsm_dbus_client_proxy_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (XfsmDbusClientProxy, xfsm_dbus_client_proxy, G_TYPE_DBUS_PROXY,
+ G_IMPLEMENT_INTERFACE (XFSM_DBUS_TYPE_CLIENT, xfsm_dbus_client_proxy_iface_init))
+
+#endif
+static void
+xfsm_dbus_client_proxy_finalize (GObject *object)
+{
+ XfsmDbusClientProxy *proxy = XFSM_DBUS_CLIENT_PROXY (object);
+ g_datalist_clear (&proxy->priv->qdata);
+ G_OBJECT_CLASS (xfsm_dbus_client_proxy_parent_class)->finalize (object);
+}
+
+static void
+xfsm_dbus_client_proxy_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+}
+
+static void
+xfsm_dbus_client_proxy_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+}
+
+static void
+xfsm_dbus_client_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;
+ gsize num_params;
+ gsize n;
+ guint signal_id;
+ info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xfsm_dbus_client_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 (&paramv[0], XFSM_DBUS_TYPE_CLIENT);
+ g_value_set_object (&paramv[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 (&paramv[n], G_TYPE_VARIANT);
+ g_value_set_variant (&paramv[n], child);
+ n++;
+ }
+ else
+ g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
+ g_variant_unref (child);
+ }
+ signal_id = g_signal_lookup (info->signal_name, XFSM_DBUS_TYPE_CLIENT);
+ g_signal_emitv (paramv, signal_id, 0, NULL);
+ for (n = 0; n < num_params + 1; n++)
+ g_value_unset (&paramv[n]);
+ g_free (paramv);
+}
+
+static void
+xfsm_dbus_client_proxy_g_properties_changed (GDBusProxy *_proxy,
+ GVariant *changed_properties,
+ const gchar *const *invalidated_properties)
+{
+ XfsmDbusClientProxy *proxy = XFSM_DBUS_CLIENT_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 *) &_xfsm_dbus_client_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 *) &_xfsm_dbus_client_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 void
+xfsm_dbus_client_proxy_init (XfsmDbusClientProxy *proxy)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ proxy->priv = xfsm_dbus_client_proxy_get_instance_private (proxy);
+#else
+ proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XFSM_DBUS_TYPE_CLIENT_PROXY, XfsmDbusClientProxyPrivate);
+#endif
+
+ g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xfsm_dbus_client_interface_info ());
+}
+
+static void
+xfsm_dbus_client_proxy_class_init (XfsmDbusClientProxyClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusProxyClass *proxy_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = xfsm_dbus_client_proxy_finalize;
+ gobject_class->get_property = xfsm_dbus_client_proxy_get_property;
+ gobject_class->set_property = xfsm_dbus_client_proxy_set_property;
+
+ proxy_class = G_DBUS_PROXY_CLASS (klass);
+ proxy_class->g_signal = xfsm_dbus_client_proxy_g_signal;
+ proxy_class->g_properties_changed = xfsm_dbus_client_proxy_g_properties_changed;
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (XfsmDbusClientProxyPrivate));
+#endif
+}
+
+static void
+xfsm_dbus_client_proxy_iface_init (XfsmDbusClientIface *iface)
+{
+}
+
+/**
+ * xfsm_dbus_client_proxy_new:
+ * @connection: A #GDBusConnection.
+ * @flags: Flags from the #GDBusProxyFlags enumeration.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @object_path: An object path.
+ * @cancellable: (nullable): 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 <link linkend="gdbus-interface-org-xfce-Session-Client.top_of_page">org.xfce.Session.Client</link>. See g_dbus_proxy_new() for more details.
+ *
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_client_proxy_new_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_client_proxy_new_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+xfsm_dbus_client_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 (XFSM_DBUS_TYPE_CLIENT_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.xfce.Session.Client", NULL);
+}
+
+/**
+ * xfsm_dbus_client_proxy_new_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_client_proxy_new().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with xfsm_dbus_client_proxy_new().
+ *
+ * Returns: (transfer full) (type XfsmDbusClientProxy): The constructed proxy object or %NULL if @error is set.
+ */
+XfsmDbusClient *
+xfsm_dbus_client_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 XFSM_DBUS_CLIENT (ret);
+ else
+ return NULL;
+}
+
+/**
+ * xfsm_dbus_client_proxy_new_sync:
+ * @connection: A #GDBusConnection.
+ * @flags: Flags from the #GDBusProxyFlags enumeration.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @object_path: An object path.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL
+ *
+ * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-xfce-Session-Client.top_of_page">org.xfce.Session.Client</link>. See g_dbus_proxy_new_sync() for more details.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_client_proxy_new() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type XfsmDbusClientProxy): The constructed proxy object or %NULL if @error is set.
+ */
+XfsmDbusClient *
+xfsm_dbus_client_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GInitable *ret;
+ ret = g_initable_new (XFSM_DBUS_TYPE_CLIENT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.xfce.Session.Client", NULL);
+ if (ret != NULL)
+ return XFSM_DBUS_CLIENT (ret);
+ else
+ return NULL;
+}
+
+
+/**
+ * xfsm_dbus_client_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: (nullable): A #GCancellable or %NULL.
+ * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
+ * @user_data: User data to pass to @callback.
+ *
+ * Like xfsm_dbus_client_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_client_proxy_new_for_bus_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_client_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+xfsm_dbus_client_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 (XFSM_DBUS_TYPE_CLIENT_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.xfce.Session.Client", NULL);
+}
+
+/**
+ * xfsm_dbus_client_proxy_new_for_bus_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_client_proxy_new_for_bus().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with xfsm_dbus_client_proxy_new_for_bus().
+ *
+ * Returns: (transfer full) (type XfsmDbusClientProxy): The constructed proxy object or %NULL if @error is set.
+ */
+XfsmDbusClient *
+xfsm_dbus_client_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 XFSM_DBUS_CLIENT (ret);
+ else
+ return NULL;
+}
+
+/**
+ * xfsm_dbus_client_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: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL
+ *
+ * Like xfsm_dbus_client_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_client_proxy_new_for_bus() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type XfsmDbusClientProxy): The constructed proxy object or %NULL if @error is set.
+ */
+XfsmDbusClient *
+xfsm_dbus_client_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 (XFSM_DBUS_TYPE_CLIENT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.xfce.Session.Client", NULL);
+ if (ret != NULL)
+ return XFSM_DBUS_CLIENT (ret);
+ else
+ return NULL;
+}
+
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * XfsmDbusClientSkeleton:
+ *
+ * The #XfsmDbusClientSkeleton structure contains only private data and should only be accessed using the provided API.
+ */
+
+/**
+ * XfsmDbusClientSkeletonClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #XfsmDbusClientSkeleton.
+ */
+
+struct _XfsmDbusClientSkeletonPrivate
+{
+ GValue *properties;
+ GList *changed_properties;
+ GSource *changed_properties_idle_source;
+ GMainContext *context;
+ GMutex lock;
+};
+
+static void
+_xfsm_dbus_client_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)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_SKELETON (user_data);
+ _ExtendedGDBusMethodInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ guint num_extra;
+ gsize 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 (&paramv[n], XFSM_DBUS_TYPE_CLIENT);
+ g_value_set_object (&paramv[n++], skeleton);
+ g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
+ g_value_set_object (&paramv[n++], invocation);
+ if (info->pass_fdlist)
+ {
+#ifdef G_OS_UNIX
+ g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
+ g_value_set_object (&paramv[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 (&paramv[n], G_TYPE_VARIANT);
+ g_value_set_variant (&paramv[n], child);
+ n++;
+ }
+ else
+ g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
+ g_variant_unref (child);
+ }
+ signal_id = g_signal_lookup (info->signal_name, XFSM_DBUS_TYPE_CLIENT);
+ 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 (&paramv[n]);
+ g_free (paramv);
+}
+
+static GVariant *
+_xfsm_dbus_client_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)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_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 *) &_xfsm_dbus_client_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
+_xfsm_dbus_client_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)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_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 *) &_xfsm_dbus_client_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 _xfsm_dbus_client_skeleton_vtable =
+{
+ _xfsm_dbus_client_skeleton_handle_method_call,
+ _xfsm_dbus_client_skeleton_handle_get_property,
+ _xfsm_dbus_client_skeleton_handle_set_property,
+ {NULL}
+};
+
+static GDBusInterfaceInfo *
+xfsm_dbus_client_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return xfsm_dbus_client_interface_info ();
+}
+
+static GDBusInterfaceVTable *
+xfsm_dbus_client_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return (GDBusInterfaceVTable *) &_xfsm_dbus_client_skeleton_vtable;
+}
+
+static GVariant *
+xfsm_dbus_client_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_SKELETON (_skeleton);
+
+ GVariantBuilder builder;
+ guint n;
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ if (_xfsm_dbus_client_interface_info.parent_struct.properties == NULL)
+ goto out;
+ for (n = 0; _xfsm_dbus_client_interface_info.parent_struct.properties[n] != NULL; n++)
+ {
+ GDBusPropertyInfo *info = _xfsm_dbus_client_interface_info.parent_struct.properties[n];
+ if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
+ {
+ GVariant *value;
+ value = _xfsm_dbus_client_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.xfce.Session.Client", 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 void
+xfsm_dbus_client_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+{
+}
+
+static void
+_xfsm_dbus_client_on_signal_state_changed (
+ XfsmDbusClient *object,
+ guint arg_old_state,
+ guint arg_new_state)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_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 ("(uu)",
+ arg_old_state,
+ arg_new_state));
+ 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.xfce.Session.Client", "StateChanged",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void
+_xfsm_dbus_client_on_signal_sm_property_changed (
+ XfsmDbusClient *object,
+ const gchar *arg_name,
+ GVariant *arg_value)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_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 ("(s@v)",
+ arg_name,
+ arg_value));
+ 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.xfce.Session.Client", "SmPropertyChanged",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void
+_xfsm_dbus_client_on_signal_sm_property_deleted (
+ XfsmDbusClient *object,
+ const gchar *arg_name)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_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 ("(s)",
+ arg_name));
+ 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.xfce.Session.Client", "SmPropertyDeleted",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void
+_xfsm_dbus_client_on_signal_query_end_session (
+ XfsmDbusClient *object,
+ guint arg_flags)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_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 ("(u)",
+ arg_flags));
+ 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.xfce.Session.Client", "QueryEndSession",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void
+_xfsm_dbus_client_on_signal_end_session (
+ XfsmDbusClient *object,
+ guint arg_flags)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_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 ("(u)",
+ arg_flags));
+ 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.xfce.Session.Client", "EndSession",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void
+_xfsm_dbus_client_on_signal_cancel_end_session (
+ XfsmDbusClient *object)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_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 ("()"));
+ 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.xfce.Session.Client", "CancelEndSession",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void
+_xfsm_dbus_client_on_signal_stop (
+ XfsmDbusClient *object)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_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 ("()"));
+ 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.xfce.Session.Client", "Stop",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void xfsm_dbus_client_skeleton_iface_init (XfsmDbusClientIface *iface);
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (XfsmDbusClientSkeleton, xfsm_dbus_client_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_ADD_PRIVATE (XfsmDbusClientSkeleton)
+ G_IMPLEMENT_INTERFACE (XFSM_DBUS_TYPE_CLIENT, xfsm_dbus_client_skeleton_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (XfsmDbusClientSkeleton, xfsm_dbus_client_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_IMPLEMENT_INTERFACE (XFSM_DBUS_TYPE_CLIENT, xfsm_dbus_client_skeleton_iface_init))
+
+#endif
+static void
+xfsm_dbus_client_skeleton_finalize (GObject *object)
+{
+ XfsmDbusClientSkeleton *skeleton = XFSM_DBUS_CLIENT_SKELETON (object);
+ 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 (xfsm_dbus_client_skeleton_parent_class)->finalize (object);
+}
+
+static void
+xfsm_dbus_client_skeleton_init (XfsmDbusClientSkeleton *skeleton)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ skeleton->priv = xfsm_dbus_client_skeleton_get_instance_private (skeleton);
+#else
+ skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XFSM_DBUS_TYPE_CLIENT_SKELETON, XfsmDbusClientSkeletonPrivate);
+#endif
+
+ g_mutex_init (&skeleton->priv->lock);
+ skeleton->priv->context = g_main_context_ref_thread_default ();
+}
+
+static void
+xfsm_dbus_client_skeleton_class_init (XfsmDbusClientSkeletonClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusInterfaceSkeletonClass *skeleton_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = xfsm_dbus_client_skeleton_finalize;
+
+ skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
+ skeleton_class->get_info = xfsm_dbus_client_skeleton_dbus_interface_get_info;
+ skeleton_class->get_properties = xfsm_dbus_client_skeleton_dbus_interface_get_properties;
+ skeleton_class->flush = xfsm_dbus_client_skeleton_dbus_interface_flush;
+ skeleton_class->get_vtable = xfsm_dbus_client_skeleton_dbus_interface_get_vtable;
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (XfsmDbusClientSkeletonPrivate));
+#endif
+}
+
+static void
+xfsm_dbus_client_skeleton_iface_init (XfsmDbusClientIface *iface)
+{
+ iface->state_changed = _xfsm_dbus_client_on_signal_state_changed;
+ iface->sm_property_changed = _xfsm_dbus_client_on_signal_sm_property_changed;
+ iface->sm_property_deleted = _xfsm_dbus_client_on_signal_sm_property_deleted;
+ iface->query_end_session = _xfsm_dbus_client_on_signal_query_end_session;
+ iface->end_session = _xfsm_dbus_client_on_signal_end_session;
+ iface->cancel_end_session = _xfsm_dbus_client_on_signal_cancel_end_session;
+ iface->stop = _xfsm_dbus_client_on_signal_stop;
+}
+
+/**
+ * xfsm_dbus_client_skeleton_new:
+ *
+ * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-xfce-Session-Client.top_of_page">org.xfce.Session.Client</link>.
+ *
+ * Returns: (transfer full) (type XfsmDbusClientSkeleton): The skeleton object.
+ */
+XfsmDbusClient *
+xfsm_dbus_client_skeleton_new (void)
+{
+ return XFSM_DBUS_CLIENT (g_object_new (XFSM_DBUS_TYPE_CLIENT_SKELETON, NULL));
+}
+
diff --git a/xfce4-session/xfsm-client-dbus.h b/xfce4-session/xfsm-client-dbus.h
new file mode 100644
index 0000000..3bd5d4a
--- /dev/null
+++ b/xfce4-session/xfsm-client-dbus.h
@@ -0,0 +1,431 @@
+/*
+ * Generated by gdbus-codegen 2.62.4 from xfsm-client-dbus.xml. DO NOT EDIT.
+ *
+ * The license of this code is the same as for the D-Bus interface description
+ * it was derived from.
+ */
+
+#ifndef __XFSM_CLIENT_DBUS_H__
+#define __XFSM_CLIENT_DBUS_H__
+
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+
+/* ------------------------------------------------------------------------ */
+/* Declarations for org.xfce.Session.Client */
+
+#define XFSM_DBUS_TYPE_CLIENT (xfsm_dbus_client_get_type ())
+#define XFSM_DBUS_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), XFSM_DBUS_TYPE_CLIENT, XfsmDbusClient))
+#define XFSM_DBUS_IS_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), XFSM_DBUS_TYPE_CLIENT))
+#define XFSM_DBUS_CLIENT_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), XFSM_DBUS_TYPE_CLIENT, XfsmDbusClientIface))
+
+struct _XfsmDbusClient;
+typedef struct _XfsmDbusClient XfsmDbusClient;
+typedef struct _XfsmDbusClientIface XfsmDbusClientIface;
+
+struct _XfsmDbusClientIface
+{
+ GTypeInterface parent_iface;
+
+
+ gboolean (*handle_delete_sm_properties) (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *const *arg_names);
+
+ gboolean (*handle_end_session_response) (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ gboolean arg_is_ok,
+ const gchar *arg_reason);
+
+ gboolean (*handle_get_all_sm_properties) (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_get_id) (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_get_sm_properties) (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *const *arg_names);
+
+ gboolean (*handle_get_state) (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_set_sm_properties) (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *arg_properties);
+
+ gboolean (*handle_terminate) (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+
+ void (*cancel_end_session) (
+ XfsmDbusClient *object);
+
+ void (*end_session) (
+ XfsmDbusClient *object,
+ guint arg_flags);
+
+ void (*query_end_session) (
+ XfsmDbusClient *object,
+ guint arg_flags);
+
+ void (*sm_property_changed) (
+ XfsmDbusClient *object,
+ const gchar *arg_name,
+ GVariant *arg_value);
+
+ void (*sm_property_deleted) (
+ XfsmDbusClient *object,
+ const gchar *arg_name);
+
+ void (*state_changed) (
+ XfsmDbusClient *object,
+ guint arg_old_state,
+ guint arg_new_state);
+
+ void (*stop) (
+ XfsmDbusClient *object);
+
+};
+
+GType xfsm_dbus_client_get_type (void) G_GNUC_CONST;
+
+GDBusInterfaceInfo *xfsm_dbus_client_interface_info (void);
+guint xfsm_dbus_client_override_properties (GObjectClass *klass, guint property_id_begin);
+
+
+/* D-Bus method call completion functions: */
+void xfsm_dbus_client_complete_get_id (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *id);
+
+void xfsm_dbus_client_complete_get_state (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ guint state);
+
+void xfsm_dbus_client_complete_get_all_sm_properties (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *properties);
+
+void xfsm_dbus_client_complete_get_sm_properties (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *values);
+
+void xfsm_dbus_client_complete_set_sm_properties (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_client_complete_delete_sm_properties (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_client_complete_terminate (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_client_complete_end_session_response (
+ XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+
+
+
+/* D-Bus signal emissions functions: */
+void xfsm_dbus_client_emit_state_changed (
+ XfsmDbusClient *object,
+ guint arg_old_state,
+ guint arg_new_state);
+
+void xfsm_dbus_client_emit_sm_property_changed (
+ XfsmDbusClient *object,
+ const gchar *arg_name,
+ GVariant *arg_value);
+
+void xfsm_dbus_client_emit_sm_property_deleted (
+ XfsmDbusClient *object,
+ const gchar *arg_name);
+
+void xfsm_dbus_client_emit_query_end_session (
+ XfsmDbusClient *object,
+ guint arg_flags);
+
+void xfsm_dbus_client_emit_end_session (
+ XfsmDbusClient *object,
+ guint arg_flags);
+
+void xfsm_dbus_client_emit_cancel_end_session (
+ XfsmDbusClient *object);
+
+void xfsm_dbus_client_emit_stop (
+ XfsmDbusClient *object);
+
+
+
+/* D-Bus method calls: */
+void xfsm_dbus_client_call_get_id (
+ XfsmDbusClient *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_client_call_get_id_finish (
+ XfsmDbusClient *proxy,
+ gchar **out_id,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_client_call_get_id_sync (
+ XfsmDbusClient *proxy,
+ gchar **out_id,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_client_call_get_state (
+ XfsmDbusClient *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_client_call_get_state_finish (
+ XfsmDbusClient *proxy,
+ guint *out_state,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_client_call_get_state_sync (
+ XfsmDbusClient *proxy,
+ guint *out_state,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_client_call_get_all_sm_properties (
+ XfsmDbusClient *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_client_call_get_all_sm_properties_finish (
+ XfsmDbusClient *proxy,
+ GVariant **out_properties,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_client_call_get_all_sm_properties_sync (
+ XfsmDbusClient *proxy,
+ GVariant **out_properties,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_client_call_get_sm_properties (
+ XfsmDbusClient *proxy,
+ const gchar *const *arg_names,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_client_call_get_sm_properties_finish (
+ XfsmDbusClient *proxy,
+ GVariant **out_values,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_client_call_get_sm_properties_sync (
+ XfsmDbusClient *proxy,
+ const gchar *const *arg_names,
+ GVariant **out_values,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_client_call_set_sm_properties (
+ XfsmDbusClient *proxy,
+ GVariant *arg_properties,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_client_call_set_sm_properties_finish (
+ XfsmDbusClient *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_client_call_set_sm_properties_sync (
+ XfsmDbusClient *proxy,
+ GVariant *arg_properties,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_client_call_delete_sm_properties (
+ XfsmDbusClient *proxy,
+ const gchar *const *arg_names,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_client_call_delete_sm_properties_finish (
+ XfsmDbusClient *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_client_call_delete_sm_properties_sync (
+ XfsmDbusClient *proxy,
+ const gchar *const *arg_names,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_client_call_terminate (
+ XfsmDbusClient *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_client_call_terminate_finish (
+ XfsmDbusClient *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_client_call_terminate_sync (
+ XfsmDbusClient *proxy,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_client_call_end_session_response (
+ XfsmDbusClient *proxy,
+ gboolean arg_is_ok,
+ const gchar *arg_reason,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_client_call_end_session_response_finish (
+ XfsmDbusClient *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_client_call_end_session_response_sync (
+ XfsmDbusClient *proxy,
+ gboolean arg_is_ok,
+ const gchar *arg_reason,
+ GCancellable *cancellable,
+ GError **error);
+
+
+
+/* ---- */
+
+#define XFSM_DBUS_TYPE_CLIENT_PROXY (xfsm_dbus_client_proxy_get_type ())
+#define XFSM_DBUS_CLIENT_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), XFSM_DBUS_TYPE_CLIENT_PROXY, XfsmDbusClientProxy))
+#define XFSM_DBUS_CLIENT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), XFSM_DBUS_TYPE_CLIENT_PROXY, XfsmDbusClientProxyClass))
+#define XFSM_DBUS_CLIENT_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), XFSM_DBUS_TYPE_CLIENT_PROXY, XfsmDbusClientProxyClass))
+#define XFSM_DBUS_IS_CLIENT_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), XFSM_DBUS_TYPE_CLIENT_PROXY))
+#define XFSM_DBUS_IS_CLIENT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), XFSM_DBUS_TYPE_CLIENT_PROXY))
+
+typedef struct _XfsmDbusClientProxy XfsmDbusClientProxy;
+typedef struct _XfsmDbusClientProxyClass XfsmDbusClientProxyClass;
+typedef struct _XfsmDbusClientProxyPrivate XfsmDbusClientProxyPrivate;
+
+struct _XfsmDbusClientProxy
+{
+ /*< private >*/
+ GDBusProxy parent_instance;
+ XfsmDbusClientProxyPrivate *priv;
+};
+
+struct _XfsmDbusClientProxyClass
+{
+ GDBusProxyClass parent_class;
+};
+
+GType xfsm_dbus_client_proxy_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (XfsmDbusClientProxy, g_object_unref)
+#endif
+
+void xfsm_dbus_client_proxy_new (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+XfsmDbusClient *xfsm_dbus_client_proxy_new_finish (
+ GAsyncResult *res,
+ GError **error);
+XfsmDbusClient *xfsm_dbus_client_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_client_proxy_new_for_bus (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+XfsmDbusClient *xfsm_dbus_client_proxy_new_for_bus_finish (
+ GAsyncResult *res,
+ GError **error);
+XfsmDbusClient *xfsm_dbus_client_proxy_new_for_bus_sync (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+
+/* ---- */
+
+#define XFSM_DBUS_TYPE_CLIENT_SKELETON (xfsm_dbus_client_skeleton_get_type ())
+#define XFSM_DBUS_CLIENT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), XFSM_DBUS_TYPE_CLIENT_SKELETON, XfsmDbusClientSkeleton))
+#define XFSM_DBUS_CLIENT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), XFSM_DBUS_TYPE_CLIENT_SKELETON, XfsmDbusClientSkeletonClass))
+#define XFSM_DBUS_CLIENT_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), XFSM_DBUS_TYPE_CLIENT_SKELETON, XfsmDbusClientSkeletonClass))
+#define XFSM_DBUS_IS_CLIENT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), XFSM_DBUS_TYPE_CLIENT_SKELETON))
+#define XFSM_DBUS_IS_CLIENT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), XFSM_DBUS_TYPE_CLIENT_SKELETON))
+
+typedef struct _XfsmDbusClientSkeleton XfsmDbusClientSkeleton;
+typedef struct _XfsmDbusClientSkeletonClass XfsmDbusClientSkeletonClass;
+typedef struct _XfsmDbusClientSkeletonPrivate XfsmDbusClientSkeletonPrivate;
+
+struct _XfsmDbusClientSkeleton
+{
+ /*< private >*/
+ GDBusInterfaceSkeleton parent_instance;
+ XfsmDbusClientSkeletonPrivate *priv;
+};
+
+struct _XfsmDbusClientSkeletonClass
+{
+ GDBusInterfaceSkeletonClass parent_class;
+};
+
+GType xfsm_dbus_client_skeleton_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (XfsmDbusClientSkeleton, g_object_unref)
+#endif
+
+XfsmDbusClient *xfsm_dbus_client_skeleton_new (void);
+
+
+G_END_DECLS
+
+#endif /* __XFSM_CLIENT_DBUS_H__ */
diff --git a/xfce4-session/xfsm-client-dbus.xml b/xfce4-session/xfsm-client-dbus.xml
new file mode 100644
index 0000000..f15d09e
--- /dev/null
+++ b/xfce4-session/xfsm-client-dbus.xml
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<node name="/org/xfce/SessionClients">
+ <interface name="org.xfce.Session.Client">
+ <annotation name="org.freedesktop.DBus.GLib.CSymbol"
+ value="xfsm_client_dbus"/>
+ <annotation name="org.freedesktop.DBus.GLib.ClientCSymbol"
+ value="xfsm_client_dbus_client"/>
+
+ <!--
+ String org.xfce.Session.Client.GetID()
+
+ Retrieves the client's SM client ID.
+ -->
+ <method name="GetID">
+ <arg direction="out" name="id" type="s"/>
+ </method>
+
+ <!--
+ Unsigned Int org.xfce.Session.Client.GetState()
+
+ Queries the session manager for a client's state.
+ Valid states are:
+ 0 Idle: the client is operating normally.
+ 1 Interacting: the client is interacting with the
+ user as part of the shutdown process.
+ 2 Save Done: the client has finished saving its state.
+ 3 Saving: the client is saving its state.
+ 4 Saving Local: the client is saving its local state
+ (as opposed to global state).
+ 5 Wait for Interact: the client is waiting for the
+ session manager to allow it to interact with the
+ user.
+ 6 Wait for Phase 2: the client is waiting for the
+ session manager to enter Phase 2 so it can continue
+ saving its state.
+ 7 Disconnected: the client has disconnected from the
+ session mananger (depending on its restart style,
+ it may still remain in the session after
+ disconnecting).
+ -->
+ <method name="GetState">
+ <arg direction="out" name="state" type="u"/>
+ </method>
+
+ <!--
+ Dict[] org.xfce.Session.Client.GetAllSmProperties()
+
+ Retrieves all session management properties set on
+ the client.
+ -->
+ <method name="GetAllSmProperties">
+ <arg direction="out" name="properties" type="a{sv}"/>
+ </method>
+
+ <!--
+ Dict[] org.xfce.Session.Client.GetSmProperties(String[] names)
+
+ @names: A string array of property names to fetch.
+
+ Retrieves the values of one or more SM propertis as an
+ array of variants.
+ -->
+ <method name="GetSmProperties">
+ <arg direction="in" name="names" type="as"/>
+ <arg direction="out" name="values" type="a{sv}"/>
+ </method>
+
+ <!--
+ void org.xfce.Session.Client.SetSmProperties(HashArray properties)
+
+ @properties: A hash array of properties, with string
+ keys and variant values.
+
+ Sets properties specified in the hash array. Other
+ properties are not affected.
+
+ Implementation note: properties may be validated in
+ sequence, so an error return from this method may
+ indicate that some properties have been set, but
+ others have not.
+ -->
+ <method name="SetSmProperties">
+ <arg direction="in" name="properties" type="a{sv}"/>
+ </method>
+
+ <!--
+ void org.xfce.Session.Client.DeleteSmProperties(String[] names)
+
+ @names: An string array of property names.
+
+ Deletes one or more SM properties.
+
+ Implementation note: Some properties defined in the
+ XSMP spec have defined semantics and default values.
+ This properties may not actually be deleted, but simply
+ reset to their default values.
+ -->
+ <method name="DeleteSmProperties">
+ <arg direction="in" name="names" type="as"/>
+ </method>
+
+ <!--
+ void org.xfce.Session.Client.Terminate()
+
+ Instructs the client to exit. Whether or not the client
+ remains in the session depends on its restart hint
+ SM property. If the restart hint is RestartImmediately,
+ the client will likely indeed be restarted immediately.
+
+ To actually remove a running client from the running
+ session, it's best to set the restart hint SM property
+ to RestartIfRunning before calling Terminate.
+ -->
+ <method name="Terminate"/>
+
+ <!--
+ void org.xfce.Session.Client.EndSessionResponse(Boolean is_ok,
+ String reason)
+
+ @is_ok: Whether or not it is OK to proceed. If not, the client
+ may want to inhibit session logout.
+ @reason: The reason it's not OK to proceed. This string will be
+ shown to the user.
+
+ This method is how the client communicates with the session
+ manager (and user) in response to QueryEndSession and EndSession
+ when the session is about to end.
+ -->
+ <method name="EndSessionResponse">
+ <arg direction="in" name="is_ok" type="b" />
+ <arg direction="in" name="reason" type="s" />
+ </method>
+
+ <!--
+ void org.xfce.Session.Client.StateChanged(Unsigned Int old_state,
+ Unsigned Int new_state)
+
+ @old_state: The client's previous state.
+ @new_state: The client's new (current) state.
+
+ Emitted when a client changes state. See GetState() above
+ for valid state values.
+ -->
+ <signal name="StateChanged">
+ <arg name="old_state" type="u"/>
+ <arg name="new_state" type="u"/>
+ </signal>
+
+ <!--
+ void org.xfce.Session.Client.SmPropertyChanged(String name,
+ Variant value)
+
+ @name: The name of a property.
+ @value: the value of the named property.
+
+ Emitted when a property changes. The new value is included
+ in the message for convenience.
+ -->
+ <signal name="SmPropertyChanged">
+ <arg name="name" type="s"/>
+ <arg name="value" type="v"/>
+ </signal>
+
+ <!--
+ void org.xfce.Session.Client.SmPropertyDeleted(String name)
+
+ @name: The name of a property.
+
+ Emitted when a property is deleted.
+
+ Implementation note: this message should be rare;
+ most SM properties are defined with default values and
+ will merely be reset to their default upon deletion
+ (resulting in a SmPropertyChanged signal instead).
+ -->
+ <signal name="SmPropertyDeleted">
+ <arg name="name" type="s"/>
+ </signal>
+
+ <!--
+ void org.xfce.Session.Client.QueryEndSession(Unsigned Int flags)
+
+ @flags: 0 = a forceful quit.
+ 1 = a normal save and quit.
+
+ Emitted when the session is about to end. The client should
+ respond by calling EndSessionResponse. The client may interact
+ with the user during this time. The client should not begin
+ shutting down until the EndSession signal happens.
+ -->
+ <signal name="QueryEndSession">
+ <arg name="flags" type="u" />
+ </signal>
+
+ <!--
+ void org.xfce.Session.Client.EndSession(Unsigned Int flags)
+
+ @flags: 0 = a forceful quit.
+ 1 = a normal save and quit.
+
+ The client should save any work and then respond by
+ calling EndSessionResponse. The client must not interact with
+ the user, that should already have happened during the
+ QueryEndSession.
+ -->
+ <signal name="EndSession">
+ <arg name="flags" type="u" />
+ </signal>
+
+ <!--
+ void org.xfce.Session.Client.CancelEndSession(void)
+
+ Emitted when QueryEndSession has been canceled. Resume normal
+ operation.
+ -->
+ <signal name="CancelEndSession">
+ </signal>
+
+ <!--
+ void org.xfce.Session.Client.Stop(void)
+
+ Emitted when the client should terminate, this is the friendly
+ version giving the client time to save and exit gracefully before
+ it is forcefully killed.
+ -->
+ <signal name="Stop">
+ </signal>
+ </interface>
+</node>
diff --git a/xfce4-session/xfsm-client.c b/xfce4-session/xfsm-client.c
new file mode 100644
index 0000000..c079e0f
--- /dev/null
+++ b/xfce4-session/xfsm-client.c
@@ -0,0 +1,963 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
+ * Copyright (c) 2008 Brian Tarricone <bjt23@cornell.edu>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include <gio/gio.h>
+#include <gio/gdesktopappinfo.h>
+
+#include <libxfsm/xfsm-util.h>
+
+#include <xfce4-session/xfsm-client.h>
+#include <xfce4-session/xfsm-manager.h>
+#include <xfce4-session/xfsm-global.h>
+#include <xfce4-session/xfsm-marshal.h>
+#include <xfce4-session/xfsm-error.h>
+#include <xfce4-session/xfsm-client-dbus.h>
+
+#define XFSM_CLIENT_OBJECT_PATH_PREFIX "/org/xfce/SessionClients/"
+
+struct _XfsmClient
+{
+ XfsmDbusClientSkeleton parent;
+
+ XfsmManager *manager;
+
+ gchar *id;
+ gchar *app_id;
+ gchar *object_path;
+ gchar *service_name;
+ guint quit_timeout;
+
+ XfsmClientState state;
+ XfsmProperties *properties;
+ SmsConn sms_conn;
+ GDBusConnection *connection;
+};
+
+typedef struct _XfsmClientClass
+{
+ XfsmDbusClientSkeletonClass parent;
+} XfsmClientClass;
+
+typedef struct
+{
+ SmProp *props;
+ gint count;
+} HtToPropsData;
+
+
+
+static void xfsm_client_finalize (GObject *obj);
+
+static void xfsm_properties_discard_command_changed (XfsmProperties *properties,
+ gchar **old_discard);
+static void xfsm_client_dbus_class_init (XfsmClientClass *klass);
+static void xfsm_client_dbus_init (XfsmClient *client);
+static void xfsm_client_iface_init (XfsmDbusClientIface *iface);
+static void xfsm_client_dbus_cleanup (XfsmClient *client);
+
+
+G_DEFINE_TYPE_WITH_CODE (XfsmClient, xfsm_client, XFSM_DBUS_TYPE_CLIENT_SKELETON, G_IMPLEMENT_INTERFACE (XFSM_DBUS_TYPE_CLIENT, xfsm_client_iface_init));
+
+
+static void
+xfsm_client_class_init (XfsmClientClass *klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+
+ gobject_class->finalize = xfsm_client_finalize;
+
+ xfsm_client_dbus_class_init (klass);
+}
+
+
+static void
+xfsm_client_init (XfsmClient *client)
+{
+
+}
+
+static void
+xfsm_client_finalize (GObject *obj)
+{
+ XfsmClient *client = XFSM_CLIENT (obj);
+
+ xfsm_client_dbus_cleanup (client);
+
+ if (client->properties != NULL)
+ xfsm_properties_free (client->properties);
+
+ if (client->quit_timeout != 0)
+ g_source_remove (client->quit_timeout);
+
+ g_free (client->id);
+ g_free (client->app_id);
+ g_free (client->object_path);
+ g_free (client->service_name);
+
+ G_OBJECT_CLASS (xfsm_client_parent_class)->finalize (obj);
+}
+
+
+
+
+static const gchar*
+get_state (XfsmClientState state)
+{
+ static const gchar *client_state[XFSM_CLIENT_STATE_COUNT] =
+ {
+ "XFSM_CLIENT_IDLE",
+ "XFSM_CLIENT_INTERACTING",
+ "XFSM_CLIENT_SAVEDONE",
+ "XFSM_CLIENT_SAVING",
+ "XFSM_CLIENT_SAVINGLOCAL",
+ "XFSM_CLIENT_WAITFORINTERACT",
+ "XFSM_CLIENT_WAITFORPHASE2",
+ "XFSM_CLIENT_DISCONNECTED"
+ };
+
+ return client_state[state];
+}
+
+static void
+xfsm_properties_discard_command_changed (XfsmProperties *properties,
+ gchar **old_discard)
+{
+ gchar **new_discard;
+
+ g_return_if_fail (properties != NULL);
+ g_return_if_fail (old_discard != NULL);
+
+ new_discard = xfsm_properties_get_strv (properties, SmDiscardCommand);
+
+ if (!xfsm_strv_equal (old_discard, new_discard))
+ {
+ xfsm_verbose ("Client Id = %s, running old discard command.\n\n",
+ properties->client_id);
+
+ g_spawn_sync (xfsm_properties_get_string(properties, SmCurrentDirectory),
+ old_discard,
+ xfsm_properties_get_strv(properties, SmEnvironment),
+ G_SPAWN_SEARCH_PATH,
+ NULL, NULL,
+ NULL, NULL,
+ NULL, NULL);
+ }
+}
+
+
+static void
+xfsm_client_signal_prop_change (XfsmClient *client,
+ const gchar *name)
+{
+ const GValue *value;
+ GVariant *variant = NULL;
+ XfsmProperties *properties = client->properties;
+
+ value = xfsm_properties_get (properties, name);
+ if (value)
+ {
+ /* convert the gvalue to gvariant because gdbus requires it */
+ if (G_VALUE_HOLDS_STRING (value))
+ {
+ variant = g_dbus_gvalue_to_gvariant(value, G_VARIANT_TYPE_STRING);
+ }
+ else if (G_VALUE_HOLDS_UCHAR (value))
+ {
+ variant = g_dbus_gvalue_to_gvariant(value, G_VARIANT_TYPE ("y"));
+ }
+ else if (G_VALUE_HOLDS (value, G_TYPE_STRV))
+ {
+ variant = g_dbus_gvalue_to_gvariant(value, G_VARIANT_TYPE_STRING_ARRAY);
+ }
+ else
+ {
+ g_warning ("xfsm_client.c:xfsm_client_signal_prop_change: Value type not supported");
+ return;
+ }
+
+// xfsm_dbus_client_emit_sm_property_changed (XFSM_DBUS_CLIENT (client), name, variant);
+ g_variant_unref (variant);
+ }
+}
+
+
+
+XfsmClient*
+xfsm_client_new (XfsmManager *manager,
+ SmsConn sms_conn,
+ GDBusConnection *connection)
+{
+ XfsmClient *client;
+
+ client = g_object_new (XFSM_TYPE_CLIENT, NULL);
+
+ client->manager = manager;
+ client->sms_conn = sms_conn;
+ client->connection = g_object_ref (connection);
+ client->state = XFSM_CLIENT_IDLE;
+
+ return client;
+}
+
+
+void
+xfsm_client_set_initial_properties (XfsmClient *client,
+ XfsmProperties *properties)
+{
+ g_return_if_fail (XFSM_IS_CLIENT (client));
+ g_return_if_fail (properties != NULL);
+
+ if (client->properties != NULL)
+ xfsm_properties_free (client->properties);
+ client->properties = properties;
+
+ client->id = g_strdup (properties->client_id);
+
+ g_free (client->object_path);
+ client->object_path = g_strconcat (XFSM_CLIENT_OBJECT_PATH_PREFIX,
+ client->id, NULL);
+ g_strcanon (client->object_path + strlen (XFSM_CLIENT_OBJECT_PATH_PREFIX),
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_",
+ '_');
+
+ xfsm_client_dbus_init (client);
+}
+
+
+XfsmClientState
+xfsm_client_get_state (XfsmClient *client)
+{
+ g_return_val_if_fail (XFSM_IS_CLIENT (client), XFSM_CLIENT_DISCONNECTED);
+ return client->state;
+}
+
+
+
+static const gchar*
+get_client_id (XfsmClient *client)
+{
+ const gchar *client_id;
+
+ if (client->app_id)
+ client_id = client->app_id;
+ else
+ client_id = client->id;
+
+ return client_id;
+}
+
+
+
+void
+xfsm_client_set_state (XfsmClient *client,
+ XfsmClientState state)
+{
+ g_return_if_fail (XFSM_IS_CLIENT (client));
+
+ if (G_LIKELY (client->state != state))
+ {
+ XfsmClientState old_state = client->state;
+ client->state = state;
+ xfsm_dbus_client_emit_state_changed (XFSM_DBUS_CLIENT (client), old_state, state);
+
+ xfsm_verbose ("%s client state was %s and now is %s\n", get_client_id (client), get_state(old_state), get_state(state));
+
+ /* During a save, we need to ask the client if it's ok to shutdown */
+ if (state == XFSM_CLIENT_SAVING && xfsm_manager_get_state (client->manager) == XFSM_MANAGER_SHUTDOWN)
+ {
+ xfsm_dbus_client_emit_query_end_session (XFSM_DBUS_CLIENT (client), 1);
+ }
+ else if (state == XFSM_CLIENT_SAVING && xfsm_manager_get_state (client->manager) == XFSM_MANAGER_SHUTDOWNPHASE2)
+ {
+ xfsm_dbus_client_emit_end_session(XFSM_DBUS_CLIENT (client), 1);
+ }
+ }
+}
+
+
+const gchar *
+xfsm_client_get_id (XfsmClient *client)
+{
+ g_return_val_if_fail (XFSM_IS_CLIENT (client), NULL);
+ return client->id;
+}
+
+
+const gchar *
+xfsm_client_get_app_id (XfsmClient *client)
+{
+ g_return_val_if_fail (XFSM_IS_CLIENT (client), NULL);
+ return client->app_id;
+}
+
+
+SmsConn
+xfsm_client_get_sms_connection (XfsmClient *client)
+{
+ g_return_val_if_fail (XFSM_IS_CLIENT (client), NULL);
+ return client->sms_conn;
+}
+
+
+XfsmProperties *
+xfsm_client_get_properties (XfsmClient *client)
+{
+ g_return_val_if_fail (XFSM_IS_CLIENT (client), NULL);
+ return client->properties;
+}
+
+
+XfsmProperties *
+xfsm_client_steal_properties (XfsmClient *client)
+{
+ XfsmProperties *properties;
+
+ g_return_val_if_fail(XFSM_IS_CLIENT (client), NULL);
+
+ properties = client->properties;
+ client->properties = NULL;
+
+ return properties;
+}
+
+
+void
+xfsm_client_merge_properties (XfsmClient *client,
+ SmProp **props,
+ gint num_props)
+{
+ XfsmProperties *properties;
+ SmProp *prop;
+ gint n;
+
+ g_return_if_fail (XFSM_IS_CLIENT (client));
+ g_return_if_fail (client->properties != NULL);
+
+ properties = client->properties;
+
+ for (n = 0; n < num_props; ++n)
+ {
+ gchar **old_discard = NULL;
+
+ prop = props[n];
+
+ if (!strcmp (prop->name, SmDiscardCommand))
+ {
+ old_discard = xfsm_properties_get_strv (properties, SmDiscardCommand);
+ if (old_discard)
+ old_discard = g_strdupv (old_discard);
+ }
+
+ if (xfsm_properties_set_from_smprop (properties, prop))
+ {
+ if (old_discard)
+ xfsm_properties_discard_command_changed (properties, old_discard);
+
+ xfsm_client_signal_prop_change (client, prop->name);
+ }
+
+ g_strfreev (old_discard);
+ }
+}
+
+
+void
+xfsm_client_delete_properties (XfsmClient *client,
+ gchar **prop_names,
+ gint num_props)
+{
+ XfsmProperties *properties;
+ gint n;
+
+ g_return_if_fail (XFSM_IS_CLIENT (client));
+ g_return_if_fail (client->properties != NULL);
+
+ properties = client->properties;
+
+ for (n = 0; n < num_props; ++n)
+ {
+ if (xfsm_properties_remove (properties, prop_names[n]))
+ {
+ xfsm_dbus_client_emit_sm_property_deleted (XFSM_DBUS_CLIENT (client), prop_names[n]);
+ }
+ }
+}
+
+
+const gchar *
+xfsm_client_get_object_path (XfsmClient *client)
+{
+ g_return_val_if_fail (XFSM_IS_CLIENT (client), NULL);
+ return client->object_path;
+}
+
+
+
+
+void
+xfsm_client_set_service_name (XfsmClient *client,
+ const gchar *service_name)
+{
+ g_free (client->service_name);
+ client->service_name = g_strdup (service_name);
+}
+
+
+const gchar*
+xfsm_client_get_service_name (XfsmClient *client)
+{
+ return client->service_name;
+}
+
+
+
+static void
+xfsm_client_save_restart_command (XfsmClient *client)
+{
+ XfsmProperties *properties = client->properties;
+ gchar *input;
+ gchar *output = NULL;
+ gint exit_status;
+ GError *error = NULL;
+
+ input = g_strdup_printf ("ps -p %u -o args=", properties->pid);
+
+ if(g_spawn_command_line_sync (input, &output, NULL, &exit_status, &error))
+ {
+ gchar **strv = g_new0(gchar*, 2);
+
+ /* remove the newline at the end of the string */
+ output[strcspn(output, "\n")] = 0;
+
+ strv[0] = output;
+ strv[1] = NULL;
+
+ xfsm_verbose ("%s restart command %s\n", input, output);
+ xfsm_properties_set_strv (properties, "RestartCommand", strv);
+ }
+ else
+ {
+ xfsm_verbose ("Failed to get the process command line using the command %s, error was %s\n", input, error->message);
+ }
+
+ g_free (input);
+}
+
+
+
+static void
+xfsm_client_save_program_name (XfsmClient *client)
+{
+ XfsmProperties *properties = client->properties;
+ gchar *input;
+ gchar *output = NULL;
+ gint exit_status;
+ GError *error = NULL;
+
+ input = g_strdup_printf ("ps -p %u -o comm=", properties->pid);
+
+ if(g_spawn_command_line_sync (input, &output, NULL, &exit_status, &error))
+ {
+ /* remove the newline at the end of the string */
+ output[strcspn(output, "\n")] = 0;
+
+ xfsm_verbose ("%s program name %s\n", input, output);
+ xfsm_properties_set_string (properties, "Program", output);
+ }
+ else
+ {
+ xfsm_verbose ("Failed to get the process command line using the command %s, error was %s\n", input, error->message);
+ }
+
+ g_free (input);
+}
+
+
+
+static void
+xfsm_client_save_desktop_file (XfsmClient *client)
+{
+ XfsmProperties *properties = client->properties;
+ GDesktopAppInfo *app_info = NULL;
+ const gchar *app_id = client->app_id;
+ gchar *desktop_file = NULL;
+
+ if (app_id == NULL)
+ return;
+
+ /* First attempt to append .desktop to the filename since the desktop file
+ * may match the application id. I.e. org.gnome.Devhelp.desktop matches
+ * the GApplication org.gnome.Devhelp
+ */
+ desktop_file = g_strdup_printf("%s.desktop", app_id);
+ xfsm_verbose ("looking for desktop file %s\n", desktop_file);
+ app_info = g_desktop_app_info_new (desktop_file);
+
+ if (app_info == NULL || g_desktop_app_info_get_filename (app_info) == NULL)
+ {
+ gchar *begin;
+ g_free (desktop_file);
+ desktop_file = NULL;
+
+ /* Find the last '.' and try to load that. This is because the app_id is
+ * in the funky org.xfce.parole format and the desktop file may just be
+ * parole.desktop */
+ begin = g_strrstr (app_id, ".");
+
+ /* maybe it doesn't have dots in the name? */
+ if (begin == NULL || begin++ == NULL)
+ return;
+
+ desktop_file = g_strdup_printf ("%s.desktop", begin);
+ xfsm_verbose ("looking for desktop file %s\n", desktop_file);
+ app_info = g_desktop_app_info_new (desktop_file);
+
+ if (app_info == NULL || g_desktop_app_info_get_filename (app_info) == NULL)
+ {
+ /* Failed to get a desktop file, maybe it doesn't have one */
+ xfsm_verbose ("failed to get a desktop file for the client\n");
+ g_free (desktop_file);
+ return;
+ }
+ }
+
+ /* if we got here we found a .desktop file, save it */
+ xfsm_properties_set_string (properties, GsmDesktopFile, g_desktop_app_info_get_filename (app_info));
+
+ g_free (desktop_file);
+}
+
+
+
+
+void
+xfsm_client_set_pid (XfsmClient *client,
+ pid_t pid)
+{
+ XfsmProperties *properties;
+ gchar *pid_str;
+
+ g_return_if_fail (XFSM_IS_CLIENT (client));
+ g_return_if_fail (client->properties != NULL);
+
+ properties = client->properties;
+
+ /* save the pid */
+ properties->pid = pid;
+
+ /* convert it to a string */
+ pid_str = g_strdup_printf ("%d", pid);
+
+ /* store the string as well (so we can export it over dbus */
+ xfsm_properties_set_string (properties, "ProcessID", pid_str);
+
+ /* save the command line for the process so we can restart it if needed */
+ xfsm_client_save_restart_command (client);
+
+ /* save the program name */
+ xfsm_client_save_program_name (client);
+
+ g_free (pid_str);
+}
+
+
+void
+xfsm_client_set_app_id (XfsmClient *client,
+ const gchar *app_id)
+{
+ client->app_id = g_strdup (app_id);
+
+ /* save the desktop file */
+ xfsm_client_save_desktop_file (client);
+}
+
+
+
+static gboolean
+kill_hung_client (gpointer user_data)
+{
+ XfsmClient *client = XFSM_CLIENT (user_data);
+
+ client->quit_timeout = 0;
+
+ if (!client->properties)
+ return FALSE;
+
+ if (client->properties->pid < 2)
+ return FALSE;
+
+ xfsm_verbose ("killing unresponsive client %s\n", get_client_id (client));
+ kill (client->properties->pid, SIGKILL);
+
+ return FALSE;
+}
+
+
+
+void
+xfsm_client_terminate (XfsmClient *client)
+{
+ xfsm_verbose ("emitting stop signal for client %s\n", get_client_id (client));
+
+ /* Ask the client to shutdown gracefully */
+ xfsm_dbus_client_emit_stop (XFSM_DBUS_CLIENT (client));
+
+ /* add a timeout so we can forcefully stop the client */
+ client->quit_timeout = g_timeout_add_seconds (15, kill_hung_client, client);
+}
+
+
+
+void
+xfsm_client_end_session (XfsmClient *client)
+{
+ xfsm_verbose ("emitting end session signal for client %s\n", get_client_id (client));
+
+ /* Start the client shutdown */
+ xfsm_dbus_client_emit_end_session (XFSM_DBUS_CLIENT (client), 1);
+}
+
+
+void xfsm_client_cancel_shutdown (XfsmClient *client)
+{
+ xfsm_verbose ("emitting cancel session signal for client %s\n", get_client_id (client));
+
+ /* Cancel the client shutdown */
+ xfsm_dbus_client_emit_cancel_end_session (XFSM_DBUS_CLIENT (client));
+
+}
+
+
+
+/*
+ * dbus server impl
+ */
+
+static gboolean xfsm_client_dbus_get_id (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+static gboolean xfsm_client_dbus_get_state (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+static gboolean xfsm_client_dbus_get_all_sm_properties (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+static gboolean xfsm_client_dbus_get_sm_properties (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *const *arg_names);
+static gboolean xfsm_client_dbus_set_sm_properties (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *arg_properties);
+static gboolean xfsm_client_dbus_delete_sm_properties (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *const *arg_names);
+static gboolean xfsm_client_dbus_terminate (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation);
+static gboolean xfsm_client_dbus_end_session_response (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ gboolean arg_is_ok,
+ const gchar *arg_reason);
+
+
+
+static void
+xfsm_client_dbus_class_init (XfsmClientClass *klass)
+{
+}
+
+
+static void
+xfsm_client_dbus_init (XfsmClient *client)
+{
+ GError *error = NULL;
+
+ if (G_UNLIKELY(!client->connection))
+ {
+ g_critical ("Unable to contact D-Bus session bus: %s", error ? error->message : "Unknown error");
+ return;
+ }
+
+ xfsm_verbose ("exporting path %s\n", client->object_path);
+
+ if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (XFSM_DBUS_CLIENT (client)),
+ client->connection,
+ client->object_path,
+ &error)) {
+ if (error != NULL) {
+ g_critical ("error exporting interface: %s", error->message);
+ g_clear_error (&error);
+ return;
+ }
+ }
+
+ xfsm_verbose ("exported on %s\n", g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (XFSM_DBUS_CLIENT (client))));
+}
+
+static void
+xfsm_client_iface_init (XfsmDbusClientIface *iface)
+{
+ iface->handle_delete_sm_properties = xfsm_client_dbus_delete_sm_properties;
+ iface->handle_get_all_sm_properties = xfsm_client_dbus_get_all_sm_properties;
+ iface->handle_get_id = xfsm_client_dbus_get_id;
+ iface->handle_get_sm_properties = xfsm_client_dbus_get_sm_properties;
+ iface->handle_get_state = xfsm_client_dbus_get_state;
+ iface->handle_set_sm_properties = xfsm_client_dbus_set_sm_properties;
+ iface->handle_terminate = xfsm_client_dbus_terminate;
+ iface->handle_end_session_response = xfsm_client_dbus_end_session_response;
+}
+
+static void
+xfsm_client_dbus_cleanup (XfsmClient *client)
+{
+ if (G_LIKELY (client->connection))
+ {
+ g_object_unref (client->connection);
+ client->connection = NULL;
+ }
+}
+
+
+static gboolean
+xfsm_client_dbus_get_id (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation)
+{
+ xfsm_dbus_client_complete_get_id (object, invocation, XFSM_CLIENT(object)->id);
+ return TRUE;
+}
+
+
+static gboolean
+xfsm_client_dbus_get_state (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation)
+{
+ xfsm_dbus_client_complete_get_state (object, invocation, XFSM_CLIENT(object)->state);
+ return TRUE;
+}
+
+
+static void
+builder_add_value (GVariantBuilder *builder,
+ const gchar *name,
+ const GValue *value)
+{
+ if (name == NULL)
+ {
+ g_warning ("xfsm_client.c:builder_add_value: name must not be NULL");
+ return;
+ }
+
+ if (G_VALUE_HOLDS_STRING (value))
+ {
+ g_variant_builder_add (builder, "{sv}", name, g_dbus_gvalue_to_gvariant(value, G_VARIANT_TYPE_STRING));
+ }
+ else if (G_VALUE_HOLDS_UCHAR (value))
+ {
+ g_variant_builder_add (builder, "{sv}", name, g_dbus_gvalue_to_gvariant(value, G_VARIANT_TYPE ("y")));
+ }
+ else if (G_VALUE_HOLDS (value, G_TYPE_STRV))
+ {
+ g_variant_builder_add (builder, "{sv}", name, g_dbus_gvalue_to_gvariant(value, G_VARIANT_TYPE_STRING_ARRAY));
+ }
+ else
+ {
+ g_warning ("xfsm_client.c:builder_add_value: Value type not supported");
+ }
+}
+
+
+static gboolean
+xfsm_client_properties_tree_foreach (gpointer key,
+ gpointer value,
+ gpointer data)
+{
+ gchar *prop_name = key;
+ GValue *prop_value = value;
+ GVariantBuilder *out_properties = data;
+
+ builder_add_value (out_properties, prop_name, prop_value);
+ return FALSE;
+}
+
+static gboolean
+xfsm_client_dbus_get_all_sm_properties (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation)
+{
+ XfsmProperties *properties = XFSM_CLIENT(object)->properties;
+ GVariantBuilder out_properties;
+
+ if (G_UNLIKELY (properties == NULL))
+ {
+ throw_error (invocation, XFSM_ERROR_BAD_VALUE, "The client doesn't have any properties set yet");
+ return TRUE;
+ }
+
+ g_variant_builder_init (&out_properties, G_VARIANT_TYPE ("a{sv}"));
+
+ g_tree_foreach (properties->sm_properties,
+ xfsm_client_properties_tree_foreach,
+ &out_properties);
+
+ xfsm_dbus_client_complete_get_all_sm_properties (object, invocation, g_variant_builder_end (&out_properties));
+ return TRUE;
+}
+
+
+static gboolean
+xfsm_client_dbus_get_sm_properties (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *const *arg_names)
+{
+ XfsmProperties *properties = XFSM_CLIENT(object)->properties;
+ GVariantBuilder out_properties;
+ gint i;
+
+ if (G_UNLIKELY (properties == NULL))
+ {
+ throw_error (invocation, XFSM_ERROR_BAD_VALUE, "The client doesn't have any properties set yet");
+ return TRUE;
+ }
+
+ g_variant_builder_init (&out_properties, G_VARIANT_TYPE ("a{sv}"));
+
+ for (i = 0; arg_names[i]; ++i)
+ {
+ GValue *value = g_tree_lookup (properties->sm_properties, arg_names[i]);
+
+ if (value != NULL)
+ builder_add_value (&out_properties, arg_names[i], value);
+ }
+
+ xfsm_dbus_client_complete_get_all_sm_properties (object, invocation, g_variant_builder_end (&out_properties));
+ return TRUE;
+}
+
+
+static gboolean
+xfsm_client_dbus_set_sm_properties (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *arg_properties)
+{
+ XfsmProperties *properties = XFSM_CLIENT(object)->properties;
+ GVariantIter *iter;
+ gchar *prop_name;
+ GVariant *variant;
+
+ if (G_UNLIKELY (properties == NULL))
+ {
+ throw_error (invocation, XFSM_ERROR_BAD_VALUE, "The client doesn't have any properties set yet");
+ return TRUE;
+ }
+
+ g_variant_get (arg_properties, "a{sv}", &iter);
+
+ while (g_variant_iter_next (iter, "{sv}", &prop_name, &variant))
+ {
+ GValue value;
+
+ g_dbus_gvariant_to_gvalue (variant, &value);
+ xfsm_properties_set (properties, prop_name, &value);
+
+ g_variant_unref (variant);
+ }
+
+ xfsm_dbus_client_complete_set_sm_properties (object, invocation);
+ return TRUE;
+}
+
+
+static gboolean
+xfsm_client_dbus_delete_sm_properties (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *const *arg_names)
+{
+ XfsmProperties *properties = XFSM_CLIENT(object)->properties;
+ gchar **names = g_strdupv((gchar**)arg_names);
+
+ if (G_UNLIKELY (properties == NULL))
+ {
+ throw_error (invocation, XFSM_ERROR_BAD_VALUE, "The client doesn't have any properties set yet");
+ return TRUE;
+ }
+
+ xfsm_client_delete_properties (XFSM_CLIENT(object), names, g_strv_length (names));
+
+ g_strfreev (names);
+ xfsm_dbus_client_complete_delete_sm_properties (object, invocation);
+ return TRUE;
+}
+
+
+static gboolean
+xfsm_client_dbus_terminate (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation)
+{
+ GError *error = NULL;
+
+ xfsm_manager_terminate_client (XFSM_CLIENT(object)->manager, XFSM_CLIENT(object), &error);
+ if (error != NULL)
+ {
+ throw_error (invocation, XFSM_ERROR_BAD_STATE, "Unable to terminate client, error was: %s", error->message);
+ g_clear_error (&error);
+ return TRUE;
+ }
+
+ xfsm_dbus_client_complete_terminate (object, invocation);
+ return TRUE;
+}
+
+static gboolean
+xfsm_client_dbus_end_session_response (XfsmDbusClient *object,
+ GDBusMethodInvocation *invocation,
+ gboolean arg_is_ok,
+ const gchar *arg_reason)
+{
+ XfsmClient *client = XFSM_CLIENT (object);
+
+ xfsm_verbose ("got response for client %s, manager state is %s\n",
+ get_client_id (client),
+ xfsm_manager_get_state (client->manager) == XFSM_MANAGER_SHUTDOWN ? "XFSM_MANAGER_SHUTDOWN" :
+ xfsm_manager_get_state (client->manager) == XFSM_MANAGER_SHUTDOWNPHASE2 ? "XFSM_MANAGER_SHUTDOWNPHASE2" :
+ "Invalid time to respond");
+
+ if (xfsm_manager_get_state (client->manager) == XFSM_MANAGER_SHUTDOWN)
+ {
+ xfsm_manager_save_yourself_done (client->manager, client, arg_is_ok);
+ }
+ else if (xfsm_manager_get_state (client->manager) == XFSM_MANAGER_SHUTDOWNPHASE2)
+ {
+ xfsm_manager_close_connection (client->manager, client, TRUE);
+ }
+ else
+ {
+ throw_error (invocation, XFSM_ERROR_BAD_STATE,
+ "This method should be sent in response to a QueryEndSession or EndSession signal only");
+ return TRUE;
+ }
+
+ xfsm_dbus_client_complete_end_session_response (object, invocation);
+ return TRUE;
+}
diff --git a/xfce4-session/xfsm-client.h b/xfce4-session/xfsm-client.h
new file mode 100644
index 0000000..a396563
--- /dev/null
+++ b/xfce4-session/xfsm-client.h
@@ -0,0 +1,102 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __XFSM_CLIENT_H__
+#define __XFSM_CLIENT_H__
+
+#include <glib-object.h>
+#include <gio/gio.h>
+
+#include <xfce4-session/xfsm-properties.h>
+
+G_BEGIN_DECLS
+
+#define XFSM_TYPE_CLIENT (xfsm_client_get_type ())
+#define XFSM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), XFSM_TYPE_CLIENT, XfsmClient))
+#define XFSM_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), XFSM_TYPE_CLIENT))
+
+/* fwd decl */
+struct _XfsmManager;
+
+typedef struct _XfsmClient XfsmClient;
+
+typedef enum
+{
+ XFSM_CLIENT_IDLE = 0,
+ XFSM_CLIENT_INTERACTING,
+ XFSM_CLIENT_SAVEDONE,
+ XFSM_CLIENT_SAVING,
+ XFSM_CLIENT_SAVINGLOCAL,
+ XFSM_CLIENT_WAITFORINTERACT,
+ XFSM_CLIENT_WAITFORPHASE2,
+ XFSM_CLIENT_DISCONNECTED,
+ XFSM_CLIENT_STATE_COUNT
+} XfsmClientState;
+
+GType xfsm_client_get_type (void) G_GNUC_CONST;
+
+XfsmClient *xfsm_client_new (struct _XfsmManager *manager,
+ SmsConn sms_conn,
+ GDBusConnection *connection);
+
+void xfsm_client_set_initial_properties (XfsmClient *client,
+ XfsmProperties *properties);
+
+XfsmClientState xfsm_client_get_state (XfsmClient *client);
+void xfsm_client_set_state (XfsmClient *client,
+ XfsmClientState state);
+
+const gchar *xfsm_client_get_id (XfsmClient *client);
+const gchar *xfsm_client_get_app_id (XfsmClient *client);
+
+SmsConn xfsm_client_get_sms_connection (XfsmClient *client);
+
+XfsmProperties *xfsm_client_get_properties (XfsmClient *client);
+XfsmProperties *xfsm_client_steal_properties (XfsmClient *client);
+
+void xfsm_client_merge_properties (XfsmClient *client,
+ SmProp **props,
+ gint num_props);
+void xfsm_client_delete_properties (XfsmClient *client,
+ gchar **prop_names,
+ gint num_props);
+
+const gchar *xfsm_client_get_object_path (XfsmClient *client);
+
+void xfsm_client_set_pid (XfsmClient *client,
+ pid_t pid);
+
+void xfsm_client_set_app_id (XfsmClient *client,
+ const gchar *app_id);
+
+void xfsm_client_set_service_name (XfsmClient *client,
+ const gchar *service_name);
+const gchar *xfsm_client_get_service_name (XfsmClient *client);
+
+void xfsm_client_terminate (XfsmClient *client);
+
+void xfsm_client_end_session (XfsmClient *client);
+
+void xfsm_client_cancel_shutdown (XfsmClient *client);
+
+G_END_DECLS
+
+#endif /* !__XFSM_CLIENT_H__ */
diff --git a/xfce4-session/xfsm-compat-gnome.c b/xfce4-session/xfsm-compat-gnome.c
new file mode 100644
index 0000000..c949d66
--- /dev/null
+++ b/xfce4-session/xfsm-compat-gnome.c
@@ -0,0 +1,272 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004-2005 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ *
+ * Most parts of this file where taken from gnome-session.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+
+#include <gdk/gdkx.h>
+
+#include <libxfce4util/libxfce4util.h>
+
+#include <xfce4-session/xfsm-compat-gnome.h>
+
+#define GNOME_KEYRING_DAEMON "gnome-keyring-daemon"
+
+
+static gboolean gnome_compat_started = FALSE;
+static int keyring_lifetime_pipe[2];
+static pid_t gnome_keyring_daemon_pid = 0;
+static Window gnome_smproxy_window = None;
+
+static void
+child_setup (gpointer user_data)
+{
+ gint open_max;
+ gint fd;
+ char *fd_str;
+ int ret;
+
+ open_max = sysconf (_SC_OPEN_MAX);
+ for (fd = 3; fd < open_max; fd++)
+ {
+ if (fd != keyring_lifetime_pipe[0])
+ {
+ ret = fcntl (fd, F_SETFD, FD_CLOEXEC);
+ /* We end up trying to close a lot of non-existant FDs here */
+ if (ret == -1 && errno != EBADF)
+ {
+ perror ("child_setup: fcntl (fd, F_SETFD, FD_CLOEXEC) failed");
+ }
+ }
+ }
+
+ fd_str = g_strdup_printf ("%d", keyring_lifetime_pipe[0]);
+ g_setenv ("GNOME_KEYRING_LIFETIME_FD", fd_str, TRUE);
+ g_free (fd_str);
+}
+
+
+static void
+gnome_keyring_daemon_startup (void)
+{
+ GError *error = NULL;
+ gchar *sout;
+ gchar **lines;
+ gsize lineno;
+ gint status;
+ glong pid;
+ gchar *end;
+ gchar *argv[3];
+ gchar *p;
+ gchar *name;
+ const gchar *value;
+
+ /* Pipe to slave keyring lifetime to */
+ if (pipe (keyring_lifetime_pipe))
+ {
+ g_warning ("Failed to set up pipe for gnome-keyring: %s", strerror (errno));
+ return;
+ }
+
+ error = NULL;
+ argv[0] = GNOME_KEYRING_DAEMON;
+ argv[1] = "--start";
+ argv[2] = NULL;
+ g_spawn_sync (NULL, argv, NULL,
+ G_SPAWN_SEARCH_PATH | G_SPAWN_LEAVE_DESCRIPTORS_OPEN,
+ child_setup, NULL,
+ &sout, NULL, &status, &error);
+
+ close (keyring_lifetime_pipe[0]);
+ /* We leave keyring_lifetime_pipe[1] open for the lifetime of the session,
+ in order to slave the keyring daemon lifecycle to the session. */
+
+ if (error != NULL)
+ {
+ g_printerr ("Failed to run gnome-keyring-daemon: %s\n",
+ error->message);
+ g_error_free (error);
+ }
+ else
+ {
+ if (WIFEXITED (status) && WEXITSTATUS (status) == 0 && sout != NULL)
+ {
+ lines = g_strsplit (sout, "\n", 0);
+
+ for (lineno = 0; lines[lineno] != NULL; lineno++)
+ {
+ p = strchr (lines[lineno], '=');
+ if (p == NULL)
+ continue;
+
+ name = g_strndup (lines[lineno], p - lines[lineno]);
+ value = p + 1;
+
+ g_setenv (name, value, TRUE);
+
+ if (g_strcmp0 (name, "GNOME_KEYRING_PID") == 0)
+ {
+ pid = strtol (value, &end, 10);
+ if (end != value)
+ gnome_keyring_daemon_pid = pid;
+ }
+
+ g_free (name);
+ }
+
+ g_strfreev (lines);
+ }
+ else
+ {
+ /* daemon failed for some reason */
+ g_printerr ("gnome-keyring-daemon failed to start correctly, "
+ "exit code: %d\n", WEXITSTATUS (status));
+ }
+
+ g_free (sout);
+ }
+}
+
+static void
+gnome_keyring_daemon_shutdown (void)
+{
+ if (gnome_keyring_daemon_pid != 0)
+ {
+ kill (gnome_keyring_daemon_pid, SIGTERM);
+ gnome_keyring_daemon_pid = 0;
+ }
+}
+
+
+
+static void
+xfsm_compat_gnome_smproxy_startup (void)
+{
+ Atom gnome_sm_proxy;
+ Display *dpy;
+ Window root;
+
+ gdk_error_trap_push ();
+
+ /* Set GNOME_SM_PROXY property, since some apps (like OOo) seem to require
+ * it to behave properly. Thanks to Jasper/Francois for reporting this.
+ * This has another advantage, since it prevents people from running
+ * gnome-smproxy in xfce4, which would cause trouble otherwise.
+ */
+ dpy = gdk_x11_get_default_xdisplay ();
+ root = RootWindow (dpy, 0);
+
+ if (gnome_smproxy_window != None)
+ XDestroyWindow (dpy, gnome_smproxy_window);
+
+ gnome_sm_proxy = XInternAtom (dpy, "GNOME_SM_PROXY", False);
+ gnome_smproxy_window = XCreateSimpleWindow (dpy, root, 1, 1, 1, 1, 0, 0, 0);
+
+ XChangeProperty (dpy, gnome_smproxy_window, gnome_sm_proxy,
+ XA_CARDINAL, 32, PropModeReplace,
+ (unsigned char *) (void *) &gnome_smproxy_window, 1);
+ XChangeProperty (dpy, root, gnome_sm_proxy,
+ XA_CARDINAL, 32, PropModeReplace,
+ (unsigned char *) (void *) &gnome_smproxy_window, 1);
+
+ XSync (dpy, False);
+
+ gdk_error_trap_pop_ignored ();
+}
+
+
+static void
+xfsm_compat_gnome_smproxy_shutdown (void)
+{
+ gdk_error_trap_push ();
+
+ if (gnome_smproxy_window != None)
+ {
+ XDestroyWindow (gdk_x11_get_default_xdisplay (), gnome_smproxy_window);
+ XSync (gdk_x11_get_default_xdisplay (), False);
+ gnome_smproxy_window = None;
+ }
+
+ gdk_error_trap_pop_ignored ();
+}
+
+
+void
+xfsm_compat_gnome_startup (void)
+{
+ if (G_UNLIKELY (gnome_compat_started))
+ return;
+
+ xfsm_compat_gnome_smproxy_startup ();
+
+ /* fire up the keyring daemon */
+ gnome_keyring_daemon_startup ();
+
+ gnome_compat_started = TRUE;
+}
+
+
+void
+xfsm_compat_gnome_shutdown (void)
+{
+ if (G_UNLIKELY (!gnome_compat_started))
+ return;
+
+ /* shutdown the keyring daemon */
+ gnome_keyring_daemon_shutdown ();
+
+ xfsm_compat_gnome_smproxy_shutdown ();
+
+ gnome_compat_started = FALSE;
+}
diff --git a/xfce4-session/xfsm-compat-gnome.h b/xfce4-session/xfsm-compat-gnome.h
new file mode 100644
index 0000000..6016c98
--- /dev/null
+++ b/xfce4-session/xfsm-compat-gnome.h
@@ -0,0 +1,30 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ *
+ * Most parts of this file where taken from gnome-session.
+ */
+
+#ifndef __XFSM_COMPAT_GNOME_H__
+#define __XFSM_COMPAT_GNOME_H__
+
+void xfsm_compat_gnome_startup (void);
+void xfsm_compat_gnome_shutdown (void);
+
+#endif /* !__XFSM_COMPAT_GNOME_H__ */
diff --git a/xfce4-session/xfsm-compat-kde.c b/xfce4-session/xfsm-compat-kde.c
new file mode 100644
index 0000000..1c68343
--- /dev/null
+++ b/xfce4-session/xfsm-compat-kde.c
@@ -0,0 +1,156 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
+
+#include <libxfce4util/libxfce4util.h>
+
+#include <xfce4-session/xfsm-compat-kde.h>
+
+
+static gboolean kde_compat_started = FALSE;
+
+
+static gboolean
+run_timeout (gpointer user_data)
+{
+ int status;
+ int result;
+ pid_t pid = *((pid_t *) user_data);
+
+ result = waitpid (pid, &status, WNOHANG);
+
+ if (result == pid)
+ {
+ gtk_main_quit ();
+ }
+ else if (result == -1)
+ {
+ g_warning ("Failed to wait for process %d: %s",
+ (int)pid, g_strerror (errno));
+ gtk_main_quit ();
+ }
+
+ return TRUE;
+}
+
+
+static void
+run (const gchar *command)
+{
+ gchar buffer[2048];
+ GError *error = NULL;
+ gchar **argv;
+ gint argc;
+ pid_t pid;
+
+ g_snprintf (buffer, 2048, "env DYLD_FORCE_FLAT_NAMESPACE= LD_BIND_NOW=true "
+ "SESSION_MANAGER= %s", command);
+
+ if (!g_shell_parse_argv (buffer, &argc, &argv, &error))
+ {
+ g_warning ("Unable to parse \"%s\": %s", buffer, error->message);
+ g_error_free (error);
+ return;
+ }
+
+ if (g_spawn_async (NULL, argv, NULL,
+ G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
+ NULL, NULL, &pid, &error))
+ {
+ guint id = g_timeout_add (300, run_timeout, &pid);
+ gtk_main ();
+ g_source_remove (id);
+ }
+ else
+ {
+ g_warning ("Unable to exec \"%s\": %s", buffer, error->message);
+ g_error_free (error);
+ }
+
+ g_strfreev (argv);
+}
+
+
+void
+xfsm_compat_kde_startup (void)
+{
+ gchar command[256];
+
+ if (G_UNLIKELY (kde_compat_started))
+ return;
+
+ run ("kdeinit4");
+
+ /* tell klauncher about the session manager */
+ g_snprintf (command, 256, "qdbus org.kde.klauncher /KLauncher setLaunchEnv "
+ "SESSION_MANAGER \"%s\"",
+ g_getenv ("SESSION_MANAGER"));
+ run (command);
+
+ /* tell kde if we are running multi-head */
+ if (XScreenCount (gdk_x11_display_get_xdisplay (gdk_display_get_default ())) > 1)
+ {
+ g_snprintf (command, 256, "qdbus org.kde.klauncher /KLauncher setLaunchEnv "
+ "KDE_MULTIHEAD \"true\"");
+ run (command);
+ }
+
+ kde_compat_started = TRUE;
+}
+
+
+void
+xfsm_compat_kde_shutdown (void)
+{
+ if (G_UNLIKELY (!kde_compat_started))
+ return;
+
+ /* shutdown KDE services */
+ run ("kdeinit4_shutdown");
+
+ kde_compat_started = FALSE;
+}
diff --git a/xfce4-session/xfsm-compat-kde.h b/xfce4-session/xfsm-compat-kde.h
new file mode 100644
index 0000000..60b868a
--- /dev/null
+++ b/xfce4-session/xfsm-compat-kde.h
@@ -0,0 +1,29 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __XFSM_COMPAT_KDE_H__
+#define __XFSM_COMPAT_KDE_H__
+
+
+void xfsm_compat_kde_startup (void);
+void xfsm_compat_kde_shutdown (void);
+
+#endif /* !__XFSM_COMPAT_KDE_H__ */
diff --git a/xfce4-session/xfsm-consolekit.c b/xfce4-session/xfsm-consolekit.c
new file mode 100644
index 0000000..9fd4c87
--- /dev/null
+++ b/xfce4-session/xfsm-consolekit.c
@@ -0,0 +1,523 @@
+/*-
+ * Copyright (c) 2010 Ali Abdallah <aliov@xfce.org>
+ * Copyright (c) 2011 Nick Schermer <nick@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+
+#include <gio/gio.h>
+
+#include <xfce4-session/xfsm-consolekit.h>
+#include <xfce4-session/xfce-screensaver.h>
+#include <libxfsm/xfsm-util.h>
+#include "xfsm-global.h"
+
+#define CK_NAME "org.freedesktop.ConsoleKit"
+#define CK_MANAGER_PATH "/org/freedesktop/ConsoleKit/Manager"
+#define CK_MANAGER_NAME CK_NAME ".Manager"
+
+
+
+static void xfsm_consolekit_finalize (GObject *object);
+static void xfsm_consolekit_proxy_free (XfsmConsolekit *consolekit);
+
+
+
+struct _XfsmConsolekitClass
+{
+ GObjectClass __parent__;
+};
+
+struct _XfsmConsolekit
+{
+ GObject __parent__;
+
+ GDBusProxy *proxy;
+ guint name_id;
+ XfceScreenSaver *screensaver;
+};
+
+
+
+G_DEFINE_TYPE (XfsmConsolekit, xfsm_consolekit, G_TYPE_OBJECT)
+
+
+
+static void
+xfsm_consolekit_class_init (XfsmConsolekitClass *klass)
+{
+ GObjectClass *gobject_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = xfsm_consolekit_finalize;
+}
+
+
+
+static void
+name_acquired (GDBusConnection *connection,
+ const gchar *name,
+ const gchar *name_owner,
+ gpointer user_data)
+{
+ XfsmConsolekit *consolekit = user_data;
+
+ xfsm_verbose ("%s started up, owned by %s\n", name, name_owner);
+
+ if (consolekit->proxy != NULL)
+ {
+ xfsm_verbose ("already have a connection to consolekit\n");
+ return;
+ }
+
+ consolekit->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
+ NULL,
+ CK_NAME,
+ CK_MANAGER_PATH,
+ CK_MANAGER_NAME,
+ NULL,
+ NULL);
+}
+
+
+
+static void
+name_lost (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ XfsmConsolekit *consolekit = user_data;
+
+ xfsm_verbose ("ck lost\n");
+
+ xfsm_consolekit_proxy_free (consolekit);
+}
+
+
+
+static void
+xfsm_consolekit_init (XfsmConsolekit *consolekit)
+{
+ consolekit->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_NONE,
+ NULL,
+ CK_NAME,
+ CK_MANAGER_PATH,
+ CK_MANAGER_NAME,
+ NULL,
+ NULL);
+
+ consolekit->name_id = g_bus_watch_name (G_BUS_TYPE_SYSTEM,
+ CK_NAME,
+ G_BUS_NAME_WATCHER_FLAGS_AUTO_START,
+ name_acquired,
+ name_lost,
+ consolekit,
+ NULL);
+
+ consolekit->screensaver = xfce_screensaver_new ();
+}
+
+
+
+static void
+xfsm_consolekit_finalize (GObject *object)
+{
+ xfsm_consolekit_proxy_free (XFSM_CONSOLEKIT (object));
+
+ (*G_OBJECT_CLASS (xfsm_consolekit_parent_class)->finalize) (object);
+}
+
+
+
+static void
+xfsm_consolekit_proxy_free (XfsmConsolekit *consolekit)
+{
+ if (consolekit->proxy != NULL)
+ {
+ g_object_unref (G_OBJECT (consolekit->proxy));
+ consolekit->proxy = NULL;
+ }
+
+ if (consolekit->screensaver != NULL)
+ {
+ g_object_unref (G_OBJECT (consolekit->screensaver));
+ consolekit->screensaver = NULL;
+ }
+}
+
+
+
+static gboolean
+xfsm_consolekit_can_method (XfsmConsolekit *consolekit,
+ const gchar *method,
+ gboolean *can_method,
+ GError **error)
+{
+ GVariant *variant = NULL;
+
+ g_return_val_if_fail (can_method != NULL, FALSE);
+
+ /* never return true if something fails */
+ *can_method = FALSE;
+
+ if (!consolekit->proxy)
+ {
+ xfsm_verbose ("no ck proxy\n");
+ return FALSE;
+ }
+
+ variant = g_dbus_proxy_call_sync (consolekit->proxy,
+ method,
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ error);
+
+ if (variant == NULL)
+ return FALSE;
+
+ g_variant_get_child (variant, 0, "b", can_method);
+
+ g_variant_unref (variant);
+ return TRUE;
+}
+
+
+
+static gboolean
+xfsm_consolekit_can_sleep (XfsmConsolekit *consolekit,
+ const gchar *method,
+ gboolean *can_method,
+ gboolean *auth_method,
+ GError **error)
+{
+ gchar *can_string;
+ GVariant *variant = NULL;
+
+ g_return_val_if_fail (can_method != NULL, FALSE);
+
+ /* never return true if something fails */
+ *can_method = FALSE;
+ *auth_method = FALSE;
+
+ if (!consolekit->proxy)
+ {
+ xfsm_verbose ("no ck proxy\n");
+ return FALSE;
+ }
+
+ variant = g_dbus_proxy_call_sync (consolekit->proxy,
+ method,
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ error);
+
+ if (variant == NULL)
+ return FALSE;
+
+ g_variant_get_child (variant, 0, "s", &can_string);
+
+ /* If yes or challenge then we can sleep, it just might take a password */
+ if (g_strcmp0 (can_string, "yes") == 0 || g_strcmp0 (can_string, "challenge") == 0)
+ {
+ *can_method = TRUE;
+ *auth_method = TRUE;
+ }
+ else
+ {
+ *can_method = FALSE;
+ *auth_method = FALSE;
+ }
+
+ g_variant_unref (variant);
+ return TRUE;
+}
+
+
+
+static gboolean
+xfsm_consolekit_try_method (XfsmConsolekit *consolekit,
+ const gchar *method,
+ GError **error)
+{
+ GVariant *variant = NULL;
+
+ if (!consolekit->proxy)
+ {
+ xfsm_verbose ("no ck proxy\n");
+ return FALSE;
+ }
+
+ xfsm_verbose ("calling %s\n", method);
+
+ variant = g_dbus_proxy_call_sync (consolekit->proxy,
+ method,
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ error);
+
+ if (variant == NULL)
+ return FALSE;
+
+ g_variant_unref (variant);
+ return TRUE;
+}
+
+
+
+static gboolean
+xfsm_consolekit_try_sleep (XfsmConsolekit *consolekit,
+ const gchar *method,
+ GError **error)
+{
+ GVariant *variant = NULL;
+
+ if (!consolekit->proxy)
+ {
+ xfsm_verbose ("no ck proxy\n");
+ return FALSE;
+ }
+
+ xfsm_verbose ("calling %s\n", method);
+
+ variant = g_dbus_proxy_call_sync (consolekit->proxy,
+ method,
+ g_variant_new_boolean (TRUE),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL,
+ error);
+
+ if (variant == NULL)
+ return FALSE;
+
+ g_variant_unref (variant);
+ return TRUE;
+}
+
+
+
+XfsmConsolekit *
+xfsm_consolekit_get (void)
+{
+ static XfsmConsolekit *object = NULL;
+
+ if (G_LIKELY (object != NULL))
+ {
+ g_object_ref (G_OBJECT (object));
+ }
+ else
+ {
+ object = g_object_new (XFSM_TYPE_CONSOLEKIT, NULL);
+ g_object_add_weak_pointer (G_OBJECT (object), (gpointer) &object);
+ }
+
+ return object;
+}
+
+
+
+gboolean
+xfsm_consolekit_try_restart (XfsmConsolekit *consolekit,
+ GError **error)
+{
+ g_return_val_if_fail (XFSM_IS_CONSOLEKIT (consolekit), FALSE);
+
+ return xfsm_consolekit_try_method (consolekit, "Restart", error);
+}
+
+
+
+gboolean
+xfsm_consolekit_try_shutdown (XfsmConsolekit *consolekit,
+ GError **error)
+{
+ g_return_val_if_fail (XFSM_IS_CONSOLEKIT (consolekit), FALSE);
+
+ return xfsm_consolekit_try_method (consolekit, "Stop", error);
+}
+
+
+
+gboolean
+xfsm_consolekit_can_restart (XfsmConsolekit *consolekit,
+ gboolean *can_restart,
+ GError **error)
+{
+ g_return_val_if_fail (XFSM_IS_CONSOLEKIT (consolekit), FALSE);
+
+
+ return xfsm_consolekit_can_method (consolekit, "CanRestart",
+ can_restart, error);
+}
+
+
+
+gboolean
+xfsm_consolekit_can_shutdown (XfsmConsolekit *consolekit,
+ gboolean *can_shutdown,
+ GError **error)
+{
+ g_return_val_if_fail (XFSM_IS_CONSOLEKIT (consolekit), FALSE);
+
+ return xfsm_consolekit_can_method (consolekit, "CanStop",
+ can_shutdown, error);
+}
+
+
+static gboolean
+lock_screen (XfsmConsolekit *consolekit,
+ GError **error)
+{
+ XfconfChannel *channel;
+ gboolean ret = TRUE;
+
+ channel = xfsm_open_config ();
+ if (xfconf_channel_get_bool (channel, "/shutdown/LockScreen", FALSE))
+ ret = xfce_screensaver_lock (consolekit->screensaver);
+
+ return ret;
+}
+
+gboolean
+xfsm_consolekit_try_suspend (XfsmConsolekit *consolekit,
+ GError **error)
+{
+ gboolean can_suspend, auth_suspend;
+
+ g_return_val_if_fail (XFSM_IS_CONSOLEKIT (consolekit), FALSE);
+
+ /* Check if consolekit can suspend before we call lock screen. */
+ if (xfsm_consolekit_can_suspend (consolekit, &can_suspend, &auth_suspend, NULL))
+ {
+ if (!can_suspend)
+ return FALSE;
+ }
+ else
+ {
+ return FALSE;
+ }
+
+ if (!lock_screen (consolekit, error))
+ return FALSE;
+
+ return xfsm_consolekit_try_sleep (consolekit, "Suspend", error);
+}
+
+
+
+gboolean
+xfsm_consolekit_try_hibernate (XfsmConsolekit *consolekit,
+ GError **error)
+{
+ gboolean can_hibernate, auth_hibernate;
+
+ g_return_val_if_fail (XFSM_IS_CONSOLEKIT (consolekit), FALSE);
+
+ /* Check if consolekit can hibernate before we call lock screen. */
+ if (xfsm_consolekit_can_hibernate (consolekit, &can_hibernate, &auth_hibernate, NULL))
+ {
+ if (!can_hibernate)
+ return FALSE;
+ }
+ else
+ {
+ return FALSE;
+ }
+
+ if (!lock_screen (consolekit, error))
+ return FALSE;
+
+ return xfsm_consolekit_try_sleep (consolekit, "Hibernate", error);
+}
+
+
+
+gboolean
+xfsm_consolekit_try_hybrid_sleep (XfsmConsolekit *consolekit,
+ GError **error)
+{
+ gboolean can_hybrid_sleep, auth_hybrid_sleep;
+
+ g_return_val_if_fail (XFSM_IS_CONSOLEKIT (consolekit), FALSE);
+
+ /* Check if consolekit can hybrid sleep before we call lock screen. */
+ if (xfsm_consolekit_can_hybrid_sleep (consolekit, &can_hybrid_sleep, &auth_hybrid_sleep, NULL))
+ {
+ if (!can_hybrid_sleep)
+ return FALSE;
+ }
+ else
+ {
+ return FALSE;
+ }
+
+ if (!lock_screen (consolekit, error))
+ return FALSE;
+
+ return xfsm_consolekit_try_sleep (consolekit, "HybridSleep", error);
+}
+
+
+
+gboolean
+xfsm_consolekit_can_suspend (XfsmConsolekit *consolekit,
+ gboolean *can_suspend,
+ gboolean *auth_suspend,
+ GError **error)
+{
+ g_return_val_if_fail (XFSM_IS_CONSOLEKIT (consolekit), FALSE);
+
+ return xfsm_consolekit_can_sleep (consolekit, "CanSuspend",
+ can_suspend, auth_suspend, error);
+}
+
+
+
+gboolean
+xfsm_consolekit_can_hibernate (XfsmConsolekit *consolekit,
+ gboolean *can_hibernate,
+ gboolean *auth_hibernate,
+ GError **error)
+{
+ g_return_val_if_fail (XFSM_IS_CONSOLEKIT (consolekit), FALSE);
+
+ return xfsm_consolekit_can_sleep (consolekit, "CanHibernate",
+ can_hibernate, auth_hibernate, error);
+}
+
+
+
+gboolean
+xfsm_consolekit_can_hybrid_sleep (XfsmConsolekit *consolekit,
+ gboolean *can_hybrid_sleep,
+ gboolean *auth_hybrid_sleep,
+ GError **error)
+{
+ g_return_val_if_fail (XFSM_IS_CONSOLEKIT (consolekit), FALSE);
+
+ return xfsm_consolekit_can_sleep (consolekit, "CanHybridSleep",
+ can_hybrid_sleep, auth_hybrid_sleep, error);
+}
diff --git a/xfce4-session/xfsm-consolekit.h b/xfce4-session/xfsm-consolekit.h
new file mode 100644
index 0000000..556e716
--- /dev/null
+++ b/xfce4-session/xfsm-consolekit.h
@@ -0,0 +1,79 @@
+/*-
+ * Copyright (c) 2003-2006 Benedikt Meurer <benny@xfce.org>
+ * Copyright (c) 2010 Ali Abdallah <aliov@xfce.org>
+ * Copyright (c) 2011 Nick Schermer <nick@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __XFSM_CONSOLEKIT_HELPER_H__
+#define __XFSM_CONSOLEKIT_HELPER_H__
+
+typedef struct _XfsmConsolekitClass XfsmConsolekitClass;
+typedef struct _XfsmConsolekit XfsmConsolekit;
+
+#define XFSM_TYPE_CONSOLEKIT (xfsm_consolekit_get_type ())
+#define XFSM_CONSOLEKIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFSM_TYPE_CONSOLEKIT, XfsmConsolekit))
+#define XFSM_CONSOLEKIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFSM_TYPE_CONSOLEKIT, XfsmConsolekitClass))
+#define XFSM_IS_CONSOLEKIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFSM_TYPE_CONSOLEKIT))
+#define XFSM_IS_CONSOLEKIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFSM_TYPE_CONSOLEKIT))
+#define XFSM_CONSOLEKIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFSM_TYPE_CONSOLEKIT, XfsmConsolekitClass))
+
+GType xfsm_consolekit_get_type (void) G_GNUC_CONST;
+
+XfsmConsolekit *xfsm_consolekit_get (void);
+
+gboolean xfsm_consolekit_try_restart (XfsmConsolekit *consolekit,
+ GError **error);
+
+gboolean xfsm_consolekit_try_shutdown (XfsmConsolekit *consolekit,
+ GError **error);
+
+gboolean xfsm_consolekit_can_restart (XfsmConsolekit *consolekit,
+ gboolean *can_restart,
+ GError **error);
+
+gboolean xfsm_consolekit_can_shutdown (XfsmConsolekit *consolekit,
+ gboolean *can_shutdown,
+ GError **error);
+
+gboolean xfsm_consolekit_try_suspend (XfsmConsolekit *consolekit,
+ GError **error);
+
+gboolean xfsm_consolekit_try_hibernate (XfsmConsolekit *consolekit,
+ GError **error);
+
+gboolean xfsm_consolekit_try_hybrid_sleep (XfsmConsolekit *consolekit,
+ GError **error);
+
+gboolean xfsm_consolekit_can_suspend (XfsmConsolekit *consolekit,
+ gboolean *can_suspend,
+ gboolean *auth_suspend,
+ GError **error);
+
+gboolean xfsm_consolekit_can_hibernate (XfsmConsolekit *consolekit,
+ gboolean *can_hibernate,
+ gboolean *auth_hibernate,
+ GError **error);
+
+gboolean xfsm_consolekit_can_hybrid_sleep (XfsmConsolekit *consolekit,
+ gboolean *can_hybrid_sleep,
+ gboolean *auth_hybrid_sleep,
+ GError **error);
+
+
+#endif /* !__XFSM_CONSOLEKIT_HELPER_H__ */
diff --git a/xfce4-session/xfsm-dns.c b/xfce4-session/xfsm-dns.c
new file mode 100644
index 0000000..55ec6a6
--- /dev/null
+++ b/xfce4-session/xfsm-dns.c
@@ -0,0 +1,179 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ *
+ * Parts of this file where taken from gnome-session/main.c, which
+ * was written by Tom Tromey.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_UTSNAME_H
+#include <sys/utsname.h>
+#endif
+
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <gtk/gtk.h>
+
+#include <libxfce4ui/libxfce4ui.h>
+
+#include <libxfsm/xfsm-util.h>
+
+#include <xfce4-session/xfsm-dns.h>
+#include <xfce4-session/xfsm-global.h>
+
+
+static gchar*
+queryhostname (gchar *buffer, gsize length, gboolean readable)
+{
+#ifdef HAVE_GETHOSTNAME
+ if (gethostname (buffer, length) == 0)
+ return buffer;
+#else
+ struct utsname utsname;
+ if (uname (&utsname) == 0)
+ {
+ g_strlcpy (buffer, utsname.nodename, length);
+ return buffer;
+ }
+#endif
+ if (readable)
+ {
+ g_strlcpy (buffer, _("(Unknown)"), length);
+ return buffer;
+ }
+ return NULL;
+}
+
+
+static gboolean
+check_for_dns (void)
+{
+#ifdef HAVE_GETADDRINFO
+ struct addrinfo *result = NULL;
+ struct addrinfo hints;
+#endif
+ char buffer[256];
+ gchar *hostname;
+
+ hostname = queryhostname (buffer, 256, FALSE);
+ if (hostname == NULL)
+ return FALSE;
+
+#ifdef HAVE_GETADDRINFO
+ bzero (&hints, sizeof (hints));
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_CANONNAME;
+
+ if (getaddrinfo (hostname, NULL, &hints, &result) != 0)
+ return FALSE;
+
+ if (g_ascii_strncasecmp (result->ai_canonname, hostname, 0) != 0)
+ {
+ freeaddrinfo (result);
+ return FALSE;
+ }
+
+ freeaddrinfo (result);
+#else
+#ifdef HAVE_GETHOSTBYNAME
+ if (gethostbyname (hostname) == NULL)
+ {
+ return FALSE;
+ }
+#endif
+#endif
+
+ return TRUE;
+}
+
+
+enum
+{
+ RESPONSE_LOG_IN,
+ RESPONSE_TRY_AGAIN,
+};
+
+
+void
+xfsm_dns_check (void)
+{
+ GtkWidget *msgbox = NULL;
+ gchar hostname[256];
+ gint response;
+
+ while (!check_for_dns ())
+ {
+ if (msgbox == NULL)
+ {
+ GdkScreen *screen = xfce_gdk_screen_get_active (NULL);
+
+ queryhostname (hostname, 256, TRUE);
+
+ msgbox = gtk_message_dialog_new (NULL, 0,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_NONE,
+ _("Could not look up internet address for %s.\n"
+ "This will prevent Xfce from operating correctly.\n"
+ "It may be possible to correct the problem by adding\n"
+ "%s to the file /etc/hosts on your system."),
+ hostname, hostname);
+
+ gtk_dialog_add_buttons (GTK_DIALOG (msgbox),
+ _("Continue anyway"), RESPONSE_LOG_IN,
+ _("Try again"), RESPONSE_TRY_AGAIN,
+ NULL);
+
+ gtk_window_set_screen (GTK_WINDOW (msgbox), screen);
+ gtk_container_set_border_width (GTK_CONTAINER (msgbox), 6);
+ gtk_window_set_position (GTK_WINDOW (msgbox), GTK_WIN_POS_CENTER);
+ }
+
+ gtk_dialog_set_default_response (GTK_DIALOG (msgbox), RESPONSE_TRY_AGAIN);
+
+ response = gtk_dialog_run (GTK_DIALOG (msgbox));
+ if (response != RESPONSE_TRY_AGAIN)
+ break;
+
+ gtk_widget_hide (msgbox);
+ }
+
+ if (msgbox != NULL)
+ gtk_widget_destroy (msgbox);
+}
diff --git a/xfce4-session/xfsm-dns.h b/xfce4-session/xfsm-dns.h
new file mode 100644
index 0000000..08d652e
--- /dev/null
+++ b/xfce4-session/xfsm-dns.h
@@ -0,0 +1,28 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __XFSM_DNS_H__
+#define __XFSM_DNS_H__
+
+void xfsm_dns_check (void);
+
+#endif /* !__XFSM_DNS_H__ */
+
diff --git a/xfce4-session/xfsm-error.c b/xfce4-session/xfsm-error.c
new file mode 100644
index 0000000..f0766f5
--- /dev/null
+++ b/xfce4-session/xfsm-error.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2008 Brian Tarricone <bjt23@cornell.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License ONLY.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <xfce4-session/xfsm-error.h>
+
+#define XFSM_DBUS_NAME "org.xfce.SessionManager"
+
+static const GDBusErrorEntry xfsm_error_entries[] =
+{
+ { XFSM_ERROR_BAD_STATE, XFSM_DBUS_NAME ".Error.Failed" },
+ { XFSM_ERROR_BAD_VALUE, XFSM_DBUS_NAME ".Error.General" },
+ { XFSM_ERROR_UNSUPPORTED, XFSM_DBUS_NAME ".Error.Unsupported" },
+};
+
+GQuark
+xfsm_error_get_quark (void)
+{
+ static volatile gsize quark_volatile = 0;
+
+ g_dbus_error_register_error_domain ("xfsm_error",
+ &quark_volatile,
+ xfsm_error_entries,
+ G_N_ELEMENTS (xfsm_error_entries));
+
+ return (GQuark) quark_volatile;
+}
+
+GType
+xfsm_error_get_type (void)
+{
+ static GType xfsm_error_type = 0;
+
+ if (G_UNLIKELY (xfsm_error_type == 0))
+ {
+ static const GEnumValue values[] = {
+ { XFSM_ERROR_BAD_STATE, "XFSM_ERROR_BAD_STATE", "BadState" },
+ { XFSM_ERROR_BAD_VALUE, "XFSM_ERROR_BAD_VALUE", "BadValue" },
+ { XFSM_ERROR_UNSUPPORTED, "XFSM_ERROR_UNSUPPORTED", "Unsupported" },
+ { 0, NULL, NULL },
+ };
+
+ xfsm_error_type = g_enum_register_static ("XfsmError", values);
+ }
+
+ return xfsm_error_type;
+}
+
+void
+throw_error (GDBusMethodInvocation *context,
+ gint error_code,
+ const gchar *format,
+ ...)
+{
+ va_list args;
+ gchar *message;
+
+ va_start (args, format);
+ message = g_strdup_vprintf (format, args);
+ va_end (args);
+
+ g_dbus_method_invocation_return_error (context, XFSM_ERROR, error_code, "%s", message);
+
+ g_free (message);
+}
diff --git a/xfce4-session/xfsm-error.h b/xfce4-session/xfsm-error.h
new file mode 100644
index 0000000..9b15b81
--- /dev/null
+++ b/xfce4-session/xfsm-error.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2008 Brian Tarricone <bjt23@cornell.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License ONLY.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __XFSM_ERRORS_H__
+#define __XFSM_ERRORS_H__
+
+#include <glib-object.h>
+#include <gio/gio.h>
+
+#define XFSM_TYPE_ERROR (xfsm_error_get_type ())
+#define XFSM_ERROR (xfsm_error_get_quark ())
+
+#define ERROR_MSG(err) ((err) != NULL ? (err)->message : "Error not set")
+
+G_BEGIN_DECLS
+
+typedef enum
+{
+ XFSM_ERROR_BAD_STATE = 0,
+ XFSM_ERROR_BAD_VALUE,
+ XFSM_ERROR_UNSUPPORTED,
+} XfsmError;
+
+GType xfsm_error_get_type (void) G_GNUC_CONST;
+GQuark xfsm_error_get_quark (void) G_GNUC_CONST;
+
+void throw_error (GDBusMethodInvocation *context,
+ gint error_code,
+ const gchar *format,
+ ...);
+
+G_END_DECLS
+
+#endif /* !__XFSM_ERRORS_H__ */
diff --git a/xfce4-session/xfsm-fadeout.c b/xfce4-session/xfsm-fadeout.c
new file mode 100644
index 0000000..3320383
--- /dev/null
+++ b/xfce4-session/xfsm-fadeout.c
@@ -0,0 +1,177 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004-2006 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <xfce4-session/xfsm-fadeout.h>
+
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <cairo-xlib.h>
+#endif
+
+
+
+struct _XfsmFadeout
+{
+#ifdef GDK_WINDOWING_X11
+ Display *xdisplay;
+ Window *xwindow;
+#endif
+};
+
+
+
+#ifdef GDK_WINDOWING_X11
+static Window
+xfsm_x11_fadeout_new_window (GdkDisplay *display,
+ GdkScreen *screen)
+{
+ XSetWindowAttributes attr;
+ Display *xdisplay;
+ Window xwindow;
+ GdkWindow *root;
+ GdkCursor *cursor;
+ cairo_t *cr;
+ gint width;
+ gint height;
+ GdkPixbuf *root_pixbuf;
+ cairo_surface_t *surface;
+ gulong mask = 0;
+ gulong opacity;
+ gboolean composited;
+ gint scale;
+
+ gdk_error_trap_push ();
+
+ xdisplay = gdk_x11_display_get_xdisplay (display);
+ root = gdk_screen_get_root_window (screen);
+
+ width = gdk_window_get_width (root);
+ height = gdk_window_get_height (root);
+
+ composited = gdk_screen_is_composited (screen)
+ && gdk_screen_get_rgba_visual (screen) != NULL;
+
+ cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
+
+ scale = gdk_window_get_scale_factor (root);
+ width *= scale;
+ height *= scale;
+
+ if (!composited)
+ {
+ /* create a copy of root window before showing the fadeout */
+ root_pixbuf = gdk_pixbuf_get_from_window (root, 0, 0, width, height);
+ }
+
+ attr.cursor = gdk_x11_cursor_get_xcursor (cursor);
+ mask |= CWCursor;
+
+ attr.override_redirect = TRUE;
+ mask |= CWOverrideRedirect;
+
+ attr.background_pixel = BlackPixel (xdisplay, gdk_x11_screen_get_screen_number (screen));
+ mask |= CWBackPixel;
+
+ xwindow = XCreateWindow (xdisplay, gdk_x11_window_get_xid (root),
+ 0, 0, width, height, 0, CopyFromParent,
+ InputOutput, CopyFromParent, mask, &attr);
+
+ g_object_unref (cursor);
+
+ if (composited)
+ {
+ /* apply transparency before map */
+ opacity = 0.5 * 0xffffffff;
+ XChangeProperty (xdisplay, xwindow,
+ gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_WINDOW_OPACITY"),
+ XA_CARDINAL, 32, PropModeReplace, (guchar *)&opacity, 1);
+ }
+
+ XMapWindow (xdisplay, xwindow);
+
+ if (!composited)
+ {
+ /* create background for window */
+ surface = cairo_xlib_surface_create (xdisplay, xwindow,
+ gdk_x11_visual_get_xvisual (gdk_screen_get_system_visual (screen)),
+ 0, 0);
+ cairo_xlib_surface_set_size (surface, width, height);
+ cr = cairo_create (surface);
+
+ /* draw the copy of the root window */
+ gdk_cairo_set_source_pixbuf (cr, root_pixbuf, 0, 0);
+ cairo_paint (cr);
+ g_object_unref (root_pixbuf);
+
+ /* draw black transparent layer */
+ cairo_set_source_rgba (cr, 0, 0, 0, 0.5);
+ cairo_paint (cr);
+ cairo_destroy (cr);
+ cairo_surface_destroy (surface);
+ }
+
+ gdk_flush ();
+ gdk_error_trap_pop_ignored ();
+
+ return xwindow;
+}
+#endif
+
+
+
+XfsmFadeout*
+xfsm_fadeout_new (GdkDisplay *display)
+{
+ XfsmFadeout *fadeout;
+ GdkScreen *screen;
+
+ fadeout = g_slice_new0 (XfsmFadeout);
+
+#ifdef GDK_WINDOWING_X11
+ fadeout->xdisplay = gdk_x11_display_get_xdisplay (display);
+ screen = gdk_display_get_default_screen (display);
+ fadeout->xwindow = GINT_TO_POINTER (xfsm_x11_fadeout_new_window (display, screen));
+#endif
+
+ return fadeout;
+}
+
+
+
+void
+xfsm_fadeout_destroy (XfsmFadeout *fadeout)
+{
+#ifdef GDK_WINDOWING_X11
+ gdk_error_trap_push ();
+ XDestroyWindow (fadeout->xdisplay, GPOINTER_TO_INT (fadeout->xwindow));
+ gdk_flush ();
+ gdk_error_trap_pop_ignored ();
+#endif
+
+ g_slice_free (XfsmFadeout, fadeout);
+}
diff --git a/xfce4-session/xfsm-fadeout.h b/xfce4-session/xfsm-fadeout.h
new file mode 100644
index 0000000..9b31af2
--- /dev/null
+++ b/xfce4-session/xfsm-fadeout.h
@@ -0,0 +1,38 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __XFSM_FADEOUT_H__
+#define __XFSM_FADEOUT_H__
+
+#include <gdk/gdk.h>
+
+
+G_BEGIN_DECLS;
+
+typedef struct _XfsmFadeout XfsmFadeout;
+
+XfsmFadeout *xfsm_fadeout_new (GdkDisplay *display);
+void xfsm_fadeout_destroy (XfsmFadeout *fadeout);
+
+G_END_DECLS;
+
+
+#endif /* !__XFSM_FADEOUT_H__ */
diff --git a/xfce4-session/xfsm-global.c b/xfce4-session/xfsm-global.c
new file mode 100644
index 0000000..c8af6bd
--- /dev/null
+++ b/xfce4-session/xfsm-global.c
@@ -0,0 +1,434 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
+ * Copyright (c) 2008 Brian Tarricone <bjt23@cornell.edu>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_SYS_TYPE_SH
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#include <glib/gprintf.h>
+#include <gio/gio.h>
+
+#include <libxfce4util/libxfce4util.h>
+#include <libxfce4ui/libxfce4ui.h>
+
+#include <xfce4-session/xfsm-global.h>
+
+#include <libxfsm/xfsm-util.h>
+
+
+/* global variables */
+gboolean verbose = FALSE;
+
+
+void
+xfsm_enable_verbose (void)
+{
+ if (!verbose)
+ {
+ verbose = TRUE;
+ printf ("xfce4-session: Session Manager running in verbose mode.\n");
+ }
+}
+
+gboolean
+xfsm_is_verbose_enabled (void)
+{
+ return verbose;
+}
+
+void
+xfsm_verbose_real (const char *func,
+ const char *file,
+ int line,
+ const char *format,
+ ...)
+{
+ static FILE *fp = NULL;
+ gchar *logfile;
+ va_list valist;
+
+ if (G_UNLIKELY (fp == NULL))
+ {
+ logfile = xfce_get_homefile (".xfce4-session.verbose-log", NULL);
+
+ /* rename an existing log file to -log.last */
+ if (logfile && g_file_test (logfile, G_FILE_TEST_EXISTS))
+ {
+ gchar *oldlogfile = g_strdup_printf ("%s.last", logfile);
+ if (oldlogfile)
+ {
+ if (rename (logfile, oldlogfile) != 0)
+ {
+ g_warning ("unable to rename logfile");
+ }
+ g_free (oldlogfile);
+ }
+ }
+
+ if (logfile)
+ {
+ fp = fopen (logfile, "w");
+ g_free (logfile);
+ fprintf(fp, "log file opened\n");
+ }
+ }
+
+ if (fp == NULL)
+ {
+ return;
+ }
+
+ fprintf (fp, "TRACE[%s:%d] %s(): ", file, line, func);
+ va_start (valist, format);
+ vfprintf (fp, format, valist);
+ fflush (fp);
+ va_end (valist);
+}
+
+
+gchar *
+xfsm_generate_client_id (SmsConn sms_conn)
+{
+ static char *addr = NULL;
+ static int sequence = 0;
+ char *sms_id;
+ char *id = NULL;
+
+ if (sms_conn != NULL)
+ {
+ sms_id = SmsGenerateClientID (sms_conn);
+ if (sms_id != NULL)
+ {
+ id = g_strdup (sms_id);
+ free (sms_id);
+ }
+ }
+
+ if (id == NULL)
+ {
+ if (addr == NULL)
+ {
+ /*
+ * Faking our IP address, the 0 below is "unknown"
+ * address format (1 would be IP, 2 would be DEC-NET
+ * format). Stolen from KDE :-)
+ */
+ addr = g_strdup_printf ("0%.8x", g_random_int ());
+ }
+
+ id = (char *) g_malloc (50);
+ g_snprintf (id, 50, "1%s%.13ld%.10d%.4d", addr,
+ (long) time (NULL), (int) getpid (), sequence);
+ sequence = (sequence + 1) % 10000;
+ }
+
+ return id;
+}
+
+
+GValue *
+xfsm_g_value_new (GType gtype)
+{
+ GValue *value = g_new0 (GValue, 1);
+ g_value_init (value, gtype);
+ return value;
+}
+
+
+void
+xfsm_g_value_free (GValue *value)
+{
+ if (G_LIKELY (value))
+ {
+ g_value_unset (value);
+ g_free (value);
+ }
+}
+
+
+static gboolean
+xfsm_check_valid_exec (const gchar *exec)
+{
+ gboolean result = TRUE;
+ gchar *tmp;
+ gchar *p;
+
+ if (*exec == '/')
+ {
+ result = (access (exec, X_OK) == 0);
+ }
+ else
+ {
+ tmp = g_strdup (exec);
+ p = strchr (tmp, ' ');
+ if (G_UNLIKELY (p != NULL))
+ *p = '\0';
+
+ p = g_find_program_in_path (tmp);
+ g_free (tmp);
+
+ if (G_UNLIKELY (p == NULL))
+ {
+ result = FALSE;
+ }
+ else
+ {
+ result = (access (p, X_OK) == 0);
+ g_free (p);
+ }
+ }
+
+ return result;
+}
+
+gint
+xfsm_launch_desktop_files_on_shutdown (gboolean start_at_spi,
+ XfsmShutdownType shutdown_type)
+{
+ switch (shutdown_type)
+ {
+ case XFSM_SHUTDOWN_LOGOUT:
+ return xfsm_launch_desktop_files_on_run_hook (start_at_spi, XFSM_RUN_HOOK_LOGOUT);
+
+ case XFSM_SHUTDOWN_SHUTDOWN:
+ return xfsm_launch_desktop_files_on_run_hook (start_at_spi, XFSM_RUN_HOOK_SHUTDOWN);
+
+ case XFSM_SHUTDOWN_RESTART:
+ return xfsm_launch_desktop_files_on_run_hook (start_at_spi, XFSM_RUN_HOOK_RESTART);
+
+ case XFSM_SHUTDOWN_SUSPEND:
+ return xfsm_launch_desktop_files_on_run_hook (start_at_spi, XFSM_RUN_HOOK_SUSPEND);
+
+ case XFSM_SHUTDOWN_HIBERNATE:
+ return xfsm_launch_desktop_files_on_run_hook (start_at_spi, XFSM_RUN_HOOK_HIBERNATE);
+
+ case XFSM_SHUTDOWN_HYBRID_SLEEP:
+ return xfsm_launch_desktop_files_on_run_hook (start_at_spi, XFSM_RUN_HOOK_HYBRID_SLEEP);
+
+ case XFSM_SHUTDOWN_SWITCH_USER:
+ return xfsm_launch_desktop_files_on_run_hook (start_at_spi, XFSM_RUN_HOOK_SWITCH_USER);
+
+ default:
+ g_error ("Failed to convert shutdown type '%d' to run hook name.", shutdown_type);
+ return FALSE;
+ }
+}
+
+
+
+gint
+xfsm_launch_desktop_files_on_login (gboolean start_at_spi)
+{
+ return xfsm_launch_desktop_files_on_run_hook (start_at_spi, XFSM_RUN_HOOK_LOGIN);
+}
+
+
+
+gint
+xfsm_launch_desktop_files_on_run_hook (gboolean start_at_spi,
+ XfsmRunHook run_hook)
+{
+ const gchar *try_exec;
+ const gchar *type;
+ XfsmRunHook run_hook_from_file;
+ gchar *exec;
+ gboolean startup_notify;
+ gboolean terminal;
+ gboolean skip;
+ GError *error = NULL;
+ XfceRc *rc;
+ gchar **files;
+ gchar **only_show_in;
+ gchar **not_show_in;
+ gint started = 0;
+ gint n, m;
+ gchar *filename;
+ const gchar *pattern;
+ gchar *uri;
+
+ /* pattern for only at-spi desktop files or everything */
+ if (start_at_spi)
+ pattern = "autostart/at-spi-*.desktop";
+ else
+ pattern = "autostart/*.desktop";
+
+ files = xfce_resource_match (XFCE_RESOURCE_CONFIG, pattern, TRUE);
+ for (n = 0; files[n] != NULL; ++n)
+ {
+ rc = xfce_rc_config_open (XFCE_RESOURCE_CONFIG, files[n], TRUE);
+ if (G_UNLIKELY (rc == NULL))
+ continue;
+
+ xfce_rc_set_group (rc, "Desktop Entry");
+
+ /* check the Hidden key */
+ skip = xfce_rc_read_bool_entry (rc, "Hidden", FALSE);
+ run_hook_from_file = xfce_rc_read_int_entry (rc, "RunHook", XFSM_RUN_HOOK_LOGIN);
+
+ /* only execute scripts with match the requested run hook */
+ if (run_hook != run_hook_from_file)
+ skip = TRUE;
+
+ if (G_LIKELY (!skip))
+ {
+ xfsm_verbose("hidden set\n");
+
+ if (xfce_rc_read_bool_entry (rc, "X-XFCE-Autostart-Override", FALSE))
+ {
+ /* override the OnlyShowIn check */
+ skip = FALSE;
+ xfsm_verbose ("X-XFCE-Autostart-Override set, launching\n");
+ }
+ else
+ {
+ /* check the OnlyShowIn setting */
+ only_show_in = xfce_rc_read_list_entry (rc, "OnlyShowIn", ";");
+ if (G_UNLIKELY (only_show_in != NULL))
+ {
+ /* check if "XFCE" is specified */
+ for (m = 0, skip = TRUE; only_show_in[m] != NULL; ++m)
+ {
+ if (g_ascii_strcasecmp (only_show_in[m], "XFCE") == 0)
+ {
+ skip = FALSE;
+ xfsm_verbose ("only show in XFCE set, launching\n");
+ break;
+ }
+ }
+
+ g_strfreev (only_show_in);
+ }
+ }
+
+ /* check the NotShowIn setting */
+ not_show_in = xfce_rc_read_list_entry (rc, "NotShowIn", ";");
+ if (G_UNLIKELY (not_show_in != NULL))
+ {
+ /* check if "Xfce" is not specified */
+ for (m = 0; not_show_in[m] != NULL; ++m)
+ if (g_ascii_strcasecmp (not_show_in[m], "XFCE") == 0)
+ {
+ skip = TRUE;
+ xfsm_verbose ("NotShowIn Xfce set, skipping\n");
+ break;
+ }
+
+ g_strfreev (not_show_in);
+ }
+
+ /* skip at-spi launchers if not in at-spi mode or don't skip
+ * them no matter what the OnlyShowIn key says if only
+ * launching at-spi */
+ filename = g_path_get_basename (files[n]);
+ if (g_str_has_prefix (filename, "at-spi-"))
+ {
+ skip = !start_at_spi;
+ xfsm_verbose ("start_at_spi (a11y support), %s\n", skip ? "skipping" : "showing");
+ }
+ g_free (filename);
+ }
+
+ /* check the "Type" key */
+ type = xfce_rc_read_entry (rc, "Type", NULL);
+ if (G_UNLIKELY (!skip && type != NULL && g_ascii_strcasecmp (type, "Application") != 0))
+ {
+ skip = TRUE;
+ xfsm_verbose ("Type == Application, skipping\n");
+ }
+
+ /* check the "TryExec" key */
+ try_exec = xfce_rc_read_entry (rc, "TryExec", NULL);
+ if (G_UNLIKELY (!skip && try_exec != NULL))
+ {
+ skip = !xfsm_check_valid_exec (try_exec);
+ if (skip)
+ xfsm_verbose ("TryExec set and xfsm_check_valid_exec failed, skipping\n");
+ }
+
+ /* expand the field codes */
+ filename = xfce_resource_lookup (XFCE_RESOURCE_CONFIG, files[n]);
+ uri = g_filename_to_uri (filename, NULL, NULL);
+ g_free (filename);
+ exec = xfce_expand_desktop_entry_field_codes (xfce_rc_read_entry (rc, "Exec", NULL),
+ NULL,
+ xfce_rc_read_entry (rc, "Icon", NULL),
+ xfce_rc_read_entry (rc, "Name", NULL),
+ uri,
+ FALSE);
+ g_free (uri);
+
+ /* execute the item */
+ if (G_LIKELY (!skip && exec != NULL))
+ {
+ /* query launch parameters */
+ startup_notify = xfce_rc_read_bool_entry (rc, "StartupNotify", FALSE);
+ terminal = xfce_rc_read_bool_entry (rc, "Terminal", FALSE);
+
+ /* try to launch the command */
+ xfsm_verbose ("Autostart: running command \"%s\"\n", exec);
+ if (!xfce_spawn_command_line_on_screen (gdk_screen_get_default (),
+ exec,
+ terminal,
+ startup_notify,
+ &error))
+ {
+ g_warning ("Unable to launch \"%s\" (specified by %s): %s", exec, files[n], error->message);
+ xfsm_verbose ("Unable to launch \"%s\" (specified by %s): %s\n", exec, files[n], error->message);
+ g_error_free (error);
+ error = NULL;
+ }
+ else
+ {
+ ++started;
+ }
+ }
+
+ /* cleanup */
+ xfce_rc_close (rc);
+ g_free (exec);
+ }
+ g_strfreev (files);
+
+ return started;
+}
diff --git a/xfce4-session/xfsm-global.h b/xfce4-session/xfsm-global.h
new file mode 100644
index 0000000..f70884a
--- /dev/null
+++ b/xfce4-session/xfsm-global.h
@@ -0,0 +1,71 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __XFSM_GLOBAL_H__
+#define __XFSM_GLOBAL_H__
+
+#include <glib.h>
+#include <gdk/gdkx.h>
+#include <X11/SM/SMlib.h>
+
+#include <xfce4-session/xfsm-shutdown.h> /* XfsmShutdownType */
+
+#include "settings/xfae-model.h" /* XfsmRunHook */
+
+
+#define DEFAULT_SESSION_NAME "Default"
+
+extern gboolean verbose;
+
+#if defined(G_HAVE_ISO_VARARGS)
+
+#define xfsm_verbose(...)\
+G_STMT_START{ \
+ if (G_UNLIKELY (verbose)) \
+ xfsm_verbose_real (__func__, __FILE__, __LINE__, __VA_ARGS__); \
+}G_STMT_END
+
+#else
+
+#define xfsm_verbose(...)
+
+#endif
+
+void xfsm_enable_verbose (void);
+gboolean xfsm_is_verbose_enabled (void);
+void xfsm_verbose_real (const char *func,
+ const char *file,
+ int line,
+ const char *format,
+ ...) G_GNUC_PRINTF (4, 5);
+
+gchar *xfsm_generate_client_id (SmsConn sms_conn) G_GNUC_PURE;
+
+GValue *xfsm_g_value_new (GType gtype);
+void xfsm_g_value_free (GValue *value);
+
+gint xfsm_launch_desktop_files_on_login (gboolean start_at_spi);
+gint xfsm_launch_desktop_files_on_shutdown (gboolean start_at_spi,
+ XfsmShutdownType shutdown_type);
+gint xfsm_launch_desktop_files_on_run_hook (gboolean start_at_spi,
+ XfsmRunHook run_hook);
+
+#endif /* !__XFSM_GLOBAL_H__ */
diff --git a/xfce4-session/xfsm-legacy.c b/xfce4-session/xfsm-legacy.c
new file mode 100644
index 0000000..92b0c3b
--- /dev/null
+++ b/xfce4-session/xfsm-legacy.c
@@ -0,0 +1,671 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ *
+ * Most of the code in this file is borred from ksmserver, the KDE session
+ * management server.
+ * Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+/* After all, this code is mostly a hack now, one should cleanup the
+ * stuff before 4.2!
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#ifdef HAVE_MEMORY_H
+#include <memory.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+#include <gdk/gdkx.h>
+
+#include <libxfce4ui/libxfce4ui.h>
+
+#include <libwnck/libwnck.h>
+
+#include <xfce4-session/xfsm-global.h>
+#include <xfce4-session/xfsm-legacy.h>
+#include <libxfsm/xfsm-util.h>
+
+
+#ifdef LEGACY_SESSION_MANAGEMENT
+
+#define WM_SAVE_YOURSELF_TIMEOUT 4000
+
+enum
+{
+ SM_ERROR,
+ SM_WMCOMMAND,
+ SM_WMSAVEYOURSELF,
+};
+
+
+typedef struct _SmWindow SmWindow;
+struct _SmWindow
+{
+ gint type;
+ gchar **wm_command;
+ gchar *wm_client_machine;
+ gchar *wm_class1;
+ gchar *wm_class2;
+ Window wid;
+ gint screen_num;
+};
+#define SM_WINDOW(window) ((SmWindow *) (window))
+
+typedef struct
+{
+ gint screen_num;
+ gchar **command;
+} SmRestartApp;
+#define SM_RESTART_APP(a) ((SmRestartApp *) (a))
+
+
+static GList *restart_apps = NULL;
+static GList *window_list = NULL;
+
+
+/* X Atoms */
+static Atom _XA_WM_PROTOCOLS = None;
+static Atom _XA_WM_SAVE_YOURSELF = None;
+static Atom _XA_WM_CLIENT_LEADER = None;
+static Atom _XA_SM_CLIENT_ID = None;
+
+
+static SmWindow*
+sm_window_new (Window wid, gint screen_num, gint type,
+ gchar *wm_class1, gchar *wm_class2)
+{
+ SmWindow *smw;
+
+ smw = g_new0 (SmWindow, 1);
+ smw->wid = wid;
+ smw->type = type;
+ smw->wm_class1 = wm_class1;
+ smw->wm_class2 = wm_class2;
+ smw->screen_num = screen_num;
+
+ return smw;
+}
+
+
+static void
+sm_window_free (SmWindow *window)
+{
+ g_return_if_fail (window != NULL);
+
+ if (window->wm_command != NULL)
+ g_strfreev (window->wm_command);
+ if (window->wm_client_machine != NULL)
+ g_free (window->wm_client_machine);
+ if (window->wm_class1)
+ g_free (window->wm_class1);
+ if (window->wm_class2)
+ g_free (window->wm_class2);
+ g_free (window);
+}
+
+
+static void
+sm_window_list_clear (void)
+{
+ GList *lp;
+
+ for (lp = window_list; lp != NULL; lp = lp->next)
+ sm_window_free (SM_WINDOW (lp->data));
+
+ g_list_free (window_list);
+ window_list = NULL;
+}
+
+
+static gboolean
+sm_window_list_contains (Window window)
+{
+ GList *lp;
+
+ for (lp = window_list; lp != NULL; lp = lp->next)
+ if (SM_WINDOW (lp->data)->wid == window)
+ return TRUE;
+
+ return FALSE;
+}
+
+
+static int
+wins_error_handler (Display *display, XErrorEvent *event)
+{
+ GList *lp;
+ for (lp = window_list; lp != NULL; lp = lp->next)
+ if (SM_WINDOW (lp->data)->wid == event->resourceid)
+ SM_WINDOW (lp->data)->type = SM_ERROR;
+ return 0;
+}
+
+
+static gboolean
+has_xsmp_support (Window window)
+{
+ XTextProperty tp;
+ gboolean has_it = FALSE;
+
+ if (XGetTextProperty (gdk_x11_get_default_xdisplay (), window, &tp, _XA_SM_CLIENT_ID))
+ {
+ if (tp.encoding == XA_STRING && tp.format == 8 && tp.nitems != 0)
+ has_it = TRUE;
+
+ if (tp.value != NULL)
+ XFree ((char *) tp.value);
+ }
+
+ return has_it;
+}
+
+
+static gchar**
+get_wmcommand (Window window)
+{
+ gchar **result = NULL;
+ Status status;
+ char **argv;
+ int argc, i;
+
+ gdk_error_trap_push ();
+ status = XGetCommand (gdk_x11_get_default_xdisplay (), window, &argv, &argc);
+ if (gdk_error_trap_pop ())
+ return NULL;
+
+ if (status && argv && argc > 0)
+ {
+ result = g_new0 (gchar *, argc + 1);
+ for (i = 0; i < argc; ++i)
+ result[i] = g_strdup (argv[i]);
+ XFreeStringList (argv);
+ }
+
+ return result;
+}
+
+
+static gchar*
+get_wmclientmachine (Window window)
+{
+ XTextProperty tp;
+ gchar *result = NULL;
+ Status status;
+
+ gdk_error_trap_push ();
+ status = XGetWMClientMachine (gdk_x11_get_default_xdisplay (), window, &tp);
+ if (gdk_error_trap_pop ())
+ return NULL;
+
+ if (status)
+ {
+ if (tp.encoding == XA_STRING && tp.format == 8 && tp.nitems != 0)
+ result = g_strdup ((char *) tp.value);
+
+ if (tp.value != NULL)
+ XFree ((char *) tp.value);
+ }
+
+ if (result == NULL)
+ result = g_strdup ("localhost");
+
+ return result;
+}
+
+static Window
+get_clientleader (Window window)
+{
+ Atom type;
+ int format, status;
+ unsigned long nitems = 0;
+ unsigned long extra = 0;
+ unsigned char *data = 0;
+ Window result = window;
+
+ status = XGetWindowProperty (gdk_x11_get_default_xdisplay (), window, _XA_WM_CLIENT_LEADER,
+ 0, 10000, FALSE, XA_WINDOW, &type, &format,
+ &nitems, &extra, &data);
+ if (status == Success)
+ {
+ if (data != NULL && nitems > 0)
+ result = *((Window *) data);
+ XFree(data);
+ }
+
+ return result;
+}
+
+#endif
+
+
+void
+xfsm_legacy_perform_session_save (void)
+{
+#ifdef LEGACY_SESSION_MANAGEMENT
+ XErrorHandler old_handler;
+ WnckScreen *screen;
+ GList *windows;
+ GList *lp;
+ Window leader;
+ Display *display;
+ Atom *protocols;
+ int nprotocols;
+ XClassHint class_hint;
+ SmWindow *sm_window;
+ int n, i;
+ int type;
+ gchar *wmclass1;
+ gchar *wmclass2;
+ Window root, window;
+ XEvent ev;
+ int awaiting_replies = 0;
+ GTimer *timer;
+
+ /* clear window list */
+ sm_window_list_clear ();
+
+ /* query X atoms */
+ if (_XA_WM_SAVE_YOURSELF == None)
+ {
+ _XA_SM_CLIENT_ID = XInternAtom (gdk_x11_get_default_xdisplay (), "SM_CLIENT_ID", False);
+ _XA_WM_PROTOCOLS = XInternAtom (gdk_x11_get_default_xdisplay (), "WM_PROTOCOLS", False);
+ _XA_WM_SAVE_YOURSELF = XInternAtom (gdk_x11_get_default_xdisplay (), "WM_SAVE_YOURSELF",
+ False);
+ _XA_WM_CLIENT_LEADER = XInternAtom (gdk_x11_get_default_xdisplay (), "WM_CLIENT_LEADER",
+ False);
+ }
+
+ /* install custom X error handler */
+ old_handler = XSetErrorHandler (wins_error_handler);
+
+ /* query mapped windows on all screens */
+ for (n = 0; n < ScreenCount (gdk_x11_get_default_xdisplay ()); ++n)
+ {
+ screen = wnck_screen_get (n);
+ wnck_screen_force_update (screen);
+
+ windows = wnck_screen_get_windows (screen);
+
+ for (lp = windows; lp != NULL; lp = lp->next)
+ {
+ window = wnck_window_get_xid (WNCK_WINDOW (lp->data));
+ leader = get_clientleader (window);
+ if (leader == None || sm_window_list_contains (leader)
+ || has_xsmp_support (window) || has_xsmp_support (leader))
+ {
+ xfsm_verbose ("window has no client leader or supports xspm, skipping\n");
+ continue;
+ }
+
+ type = SM_WMCOMMAND;
+ wmclass1 = NULL;
+ wmclass2 = NULL;
+
+ nprotocols = 0;
+ protocols = NULL;
+
+ if (XGetWMProtocols (gdk_x11_get_default_xdisplay (), leader, &protocols, &nprotocols))
+ {
+ for (i = 0; i < nprotocols; ++i)
+ if (protocols[i] == _XA_WM_SAVE_YOURSELF)
+ {
+ type = SM_WMSAVEYOURSELF;
+ break;
+ }
+ XFree ((void *) protocols);
+ }
+
+ if (XGetClassHint (gdk_x11_get_default_xdisplay (), leader, &class_hint))
+ {
+ wmclass2 = g_strdup (class_hint.res_class);
+ wmclass1 = g_strdup (class_hint.res_name);
+ XFree (class_hint.res_class);
+ XFree (class_hint.res_name);
+ }
+
+ sm_window = sm_window_new (leader, n, type, wmclass1, wmclass2);
+ window_list = g_list_append (window_list, sm_window);
+ }
+ }
+
+ /* open fresh display for sending WM_SAVE_YOURSELF commands */
+ XSync (gdk_x11_get_default_xdisplay (), False);
+ display = XOpenDisplay (DisplayString (gdk_x11_get_default_xdisplay ()));
+ if (display == NULL)
+ {
+ XSetErrorHandler (old_handler);
+ return;
+ }
+
+ /* grab keyboard/pointer (XXX - check pointer pos first?) */
+ root = DefaultRootWindow (display);
+ XGrabKeyboard (display, root, False, GrabModeAsync, GrabModeAsync,
+ CurrentTime);
+ XGrabPointer (display, root, False, Button1Mask | Button2Mask | Button3Mask,
+ GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
+ for (lp = window_list; lp != NULL; lp = lp->next)
+ {
+ sm_window = SM_WINDOW (lp->data);
+ if (sm_window->type == SM_WMSAVEYOURSELF)
+ {
+ ++awaiting_replies;
+
+ bzero (&ev, sizeof (ev));
+
+ ev.xclient.type = ClientMessage;
+ ev.xclient.window = sm_window->wid;
+ ev.xclient.message_type = _XA_WM_PROTOCOLS;
+ ev.xclient.format = 32;
+ ev.xclient.data.l[0] = _XA_WM_SAVE_YOURSELF;
+ ev.xclient.data.l[1] = CurrentTime;
+ XSelectInput (display, sm_window->wid,
+ PropertyChangeMask | StructureNotifyMask);
+ XSendEvent (display, sm_window->wid, False, 0, &ev);
+ }
+ }
+
+ /* wait for change in WM_COMMAND with timeout */
+ XFlush (display);
+ timer = g_timer_new ();
+ while (awaiting_replies > 0)
+ {
+ if (XPending (display))
+ {
+ XNextEvent (display, &ev);
+ if (ev.type == UnmapNotify || (ev.type == PropertyNotify
+ && ev.xproperty.atom == XA_WM_COMMAND))
+ {
+ for (lp = window_list; lp != NULL; lp = lp->next)
+ {
+ if (SM_WINDOW (lp->data)->wid == ev.xany.window
+ && SM_WINDOW (lp->data)->type != SM_WMCOMMAND)
+ {
+ --awaiting_replies;
+ if (SM_WINDOW (lp->data)->type != SM_ERROR)
+ SM_WINDOW (lp->data)->type = SM_WMCOMMAND;
+ }
+ }
+ }
+ }
+ else
+ {
+ struct timeval tv;
+ fd_set fds;
+ fd_set exceptfds;
+ int msecs;
+ int fd;
+ int ret;
+
+ msecs = (int)(g_timer_elapsed (timer, NULL) * 1000);
+ if (msecs >= WM_SAVE_YOURSELF_TIMEOUT)
+ break;
+
+ fd = ConnectionNumber (display);
+ FD_ZERO (&fds);
+ FD_SET (fd, &fds);
+ FD_ZERO (&exceptfds);
+ FD_SET (fd, &exceptfds);
+ tv.tv_sec = (WM_SAVE_YOURSELF_TIMEOUT - msecs) / 1000;
+ tv.tv_usec = ((WM_SAVE_YOURSELF_TIMEOUT - msecs) % 1000) * 1000;
+ ret = select (fd + 1, &fds, NULL, &exceptfds, &tv);
+ if (ret == -1)
+ {
+ perror ("select");
+ }
+ else if (ret == 0)
+ {
+ g_warning ("xfsm_legacy_perform_session_save, select: no data before timeout reached");
+ }
+ }
+ }
+ g_timer_destroy (timer);
+
+ /* Terminate work in new display */
+ XAllowEvents (display, ReplayPointer, CurrentTime);
+ XAllowEvents (display, ReplayKeyboard, CurrentTime);
+ XSync (display, False);
+ XCloseDisplay (display);
+ XSetErrorHandler (old_handler);
+
+ for (lp = window_list; lp != NULL; lp = lp->next)
+ {
+ sm_window = SM_WINDOW (lp->data);
+ if (sm_window->type != SM_ERROR)
+ {
+ sm_window->wm_command = get_wmcommand (sm_window->wid);
+ sm_window->wm_client_machine = get_wmclientmachine (sm_window->wid);
+ if (sm_window->wm_command == NULL || sm_window->wm_client_machine == NULL)
+ sm_window->type = SM_ERROR;
+ }
+ }
+#endif
+}
+
+
+void
+xfsm_legacy_store_session (XfceRc *rc)
+{
+#ifdef LEGACY_SESSION_MANAGEMENT
+ int count = 0;
+ SmWindow *sm_window;
+ GList *lp;
+ gchar buffer[256];
+
+ for (lp = window_list; lp != NULL; lp = lp->next)
+ {
+ sm_window = SM_WINDOW (lp->data);
+ if (sm_window->type != SM_ERROR)
+ {
+ /* xmms is b0rked, surprise, surprise */
+ if ((sm_window->wm_class1 != NULL
+ && strcmp (sm_window->wm_class1, "xmms") == 0)
+ || (sm_window->wm_class2 != NULL
+ && strcmp (sm_window->wm_class2, "xmms") == 0))
+ continue;
+
+ if (sm_window->wm_command == NULL
+ || sm_window->wm_client_machine == NULL)
+ continue;
+
+ if (xfsm_is_verbose_enabled ())
+ {
+ gchar *command = g_strjoinv (" ", sm_window->wm_command);
+ xfsm_verbose ("saving screen %d, command %s, machine %s\n",
+ sm_window->screen_num,
+ command,
+ sm_window->wm_client_machine);
+ g_free (command);
+ }
+
+ g_snprintf (buffer, 256, "Legacy%d_Screen", count);
+ xfce_rc_write_int_entry (rc, buffer, sm_window->screen_num);
+
+ g_snprintf (buffer, 256, "Legacy%d_Command", count);
+ xfce_rc_write_list_entry (rc, buffer, sm_window->wm_command, NULL);
+
+ g_snprintf (buffer, 256, "Legacy%d_ClientMachine", count);
+ xfce_rc_write_entry (rc, buffer, sm_window->wm_client_machine);
+
+ ++count;
+ }
+ }
+
+ xfce_rc_write_int_entry (rc, "LegacyCount", count);
+#endif
+}
+
+
+void
+xfsm_legacy_load_session (XfceRc *rc)
+{
+#ifdef LEGACY_SESSION_MANAGEMENT
+ gchar buffer[256];
+ int count;
+ int i;
+ gchar **command;
+ SmRestartApp *app;
+ int screen_num;
+
+ count = xfce_rc_read_int_entry (rc, "LegacyCount", 0);
+ for (i = 0; i < count; ++i)
+ {
+ g_snprintf (buffer, 256, "Legacy%d_Screen", i);
+ screen_num = xfce_rc_read_int_entry (rc, buffer, 0);
+
+ g_snprintf (buffer, 256, "Legacy%d_Command", i);
+ command = xfce_rc_read_list_entry (rc, buffer, NULL);
+ if (command == NULL)
+ {
+ xfsm_verbose ("legacy command == NULL\n");
+ continue;
+ }
+ else if (xfsm_is_verbose_enabled ())
+ {
+ gchar *dbg_command = g_strjoinv (" ", command);
+ xfsm_verbose ("legacy command %s\n", dbg_command);
+ g_free (dbg_command);
+ }
+
+ app = g_new0 (SmRestartApp, 1);
+ app->screen_num = screen_num;
+ app->command = command;
+
+ restart_apps = g_list_append (restart_apps, app);
+ }
+#endif
+}
+
+
+void
+xfsm_legacy_init (void)
+{
+#ifdef LEGACY_SESSION_MANAGEMENT
+ Atom dt_save_mode;
+ Atom dt_restore_mode;
+ Display *dpy;
+ Window root;
+ int n;
+
+ dpy = gdk_x11_get_default_xdisplay ();
+
+ /* Some CDE apps are broken (thanks again to Craig for the Sun Box :).
+ * Bugfix found on http://bugzilla.gnome.org/long_list.cgi?buglist=81343
+ * and implemented in gnome-session. The following code extends what
+ * gnome does, since it seems to be necessary to set both properties
+ * per screen, not just for the first screen. Anybody with access to
+ * CDE source code to enlighten me?
+ * -- bm, 20040530
+ */
+ dt_save_mode = XInternAtom (dpy, "_DT_SAVE_MODE", False);
+ dt_restore_mode = XInternAtom (dpy, "_DT_RESTORE_MODE", False);
+ for (n = 0; n < ScreenCount (dpy); ++n)
+ {
+ root = RootWindow (dpy, n);
+ XChangeProperty (dpy, root, dt_save_mode, XA_STRING, 8,
+ PropModeReplace, (unsigned char *)"xfce4", sizeof ("xfce4"));
+ XChangeProperty (dpy, root, dt_restore_mode, XA_STRING, 8,
+ PropModeReplace, (unsigned char *)"xfce4", sizeof ("xfce4"));
+ }
+#endif
+}
+
+
+void
+xfsm_legacy_startup (void)
+{
+#ifdef LEGACY_SESSION_MANAGEMENT
+ GdkScreen *screen;
+ GList *lp;
+
+ for (lp = restart_apps; lp != NULL; lp = lp->next)
+ {
+ screen = gdk_screen_get_default ();
+ xfsm_start_application (SM_RESTART_APP (lp->data)->command, NULL,
+ screen, NULL, NULL, NULL);
+ g_strfreev (SM_RESTART_APP (lp->data)->command);
+ g_free (lp->data);
+ }
+
+ g_list_free (restart_apps);
+ restart_apps = NULL;
+#endif
+}
+
+
+void
+xfsm_legacy_shutdown (void)
+{
+#ifdef LEGACY_SESSION_MANAGEMENT
+ SmWindow *sm_window;
+ GList *lp;
+
+ gdk_error_trap_push ();
+
+ /* kill 'em all! */
+ for (lp = window_list; lp != NULL; lp = lp->next)
+ {
+ sm_window = SM_WINDOW (lp->data);
+ if (sm_window->wid != None)
+ XKillClient (gdk_x11_get_default_xdisplay (), sm_window->wid);
+ }
+
+ sm_window_list_clear ();
+
+ gdk_flush ();
+
+ gdk_error_trap_pop_ignored ();
+#endif
+}
diff --git a/xfce4-session/xfsm-legacy.h b/xfce4-session/xfsm-legacy.h
new file mode 100644
index 0000000..54602af
--- /dev/null
+++ b/xfce4-session/xfsm-legacy.h
@@ -0,0 +1,37 @@
+/* $Id$ */
+/*-
+ * Copyright (c) 2004 Benedikt Meurer <benny@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __XFSM_LEGACY_H__
+#define __XFSM_LEGACY_H__
+
+#include <gdk/gdk.h>
+
+#include <libxfce4util/libxfce4util.h>
+
+
+void xfsm_legacy_perform_session_save (void);
+void xfsm_legacy_store_session (XfceRc *rc);
+void xfsm_legacy_load_session (XfceRc *rc);
+void xfsm_legacy_init (void);
+void xfsm_legacy_startup (void);
+void xfsm_legacy_shutdown (void);
+
+#endif /* !__XFSM_LEGACY_H__ */
diff --git a/xfce4-session/xfsm-logout-dialog.c b/xfce4-session/xfsm-logout-dialog.c
new file mode 100644
index 0000000..552a675
--- /dev/null
+++ b/xfce4-session/xfsm-logout-dialog.c
@@ -0,0 +1,891 @@
+/*-
+ * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
+ * Copyright (c) 2011 Nick Schermer <nick@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ *
+ * Parts of this file where taken from gnome-session/logout.c, which
+ * was written by Owen Taylor <otaylor@redhat.com>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+#include <libxfce4util/libxfce4util.h>
+#include <gtk/gtk.h>
+
+#include <libxfsm/xfsm-util.h>
+
+#include <xfce4-session/xfsm-logout-dialog.h>
+#include <xfce4-session/xfsm-fadeout.h>
+#include <xfce4-session/xfsm-global.h>
+#include <xfce4-session/xfsm-legacy.h>
+#include <xfce4-session/xfsm-error.h>
+
+#ifdef GDK_WINDOWING_X11
+#include <X11/Xlib.h>
+#include <gdk/gdkx.h>
+#endif
+
+
+
+#define BORDER 6
+#define SHOTSIZE 64
+
+
+
+static void xfsm_logout_dialog_finalize (GObject *object);
+static GtkWidget *xfsm_logout_dialog_button (const gchar *title,
+ const gchar *icon_name,
+ const gchar *icon_name_fallback,
+ const gchar *icon_name_fallback2,
+ XfsmShutdownType type,
+ XfsmLogoutDialog *dialog);
+
+
+
+enum
+{
+ MODE_LOGOUT_BUTTONS,
+ MODE_SHOW_ERROR,
+ N_MODES
+};
+
+struct _XfsmLogoutDialogClass
+{
+ GtkDialogClass __parent__;
+};
+
+struct _XfsmLogoutDialog
+{
+ GtkDialog __parent__;
+
+ /* set when a button is clicked */
+ XfsmShutdownType type_clicked;
+
+ /* save session checkbox */
+ GtkWidget *save_session;
+
+ /* mode widgets */
+ GtkWidget *box[N_MODES];
+
+ /* dialog buttons */
+ GtkWidget *button_cancel;
+
+ /* error label */
+ GtkWidget *error_label;
+
+ /* pm instance */
+ XfsmShutdown *shutdown;
+};
+
+
+
+G_DEFINE_TYPE (XfsmLogoutDialog, xfsm_logout_dialog, GTK_TYPE_DIALOG)
+
+
+
+static void
+xfsm_logout_dialog_class_init (XfsmLogoutDialogClass *klass)
+{
+ GObjectClass *gobject_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = xfsm_logout_dialog_finalize;
+}
+
+
+
+static void
+xfsm_logout_dialog_init (XfsmLogoutDialog *dialog)
+{
+ const gchar *username;
+ GtkWidget *label;
+ gchar *label_str;
+ PangoAttrList *attrs;
+ GtkWidget *vbox;
+ GtkWidget *button_vbox;
+ GtkWidget *main_vbox;
+ GtkWidget *hbox;
+ GtkWidget *button;
+ gboolean can_shutdown;
+ gboolean save_session = FALSE;
+ gboolean can_restart;
+ gboolean can_suspend = FALSE;
+ gboolean can_hibernate = FALSE;
+ gboolean can_hybrid_sleep = FALSE;
+ gboolean can_switch_user = FALSE;
+ gboolean auth_suspend = FALSE;
+ gboolean auth_hibernate = FALSE;
+ gboolean auth_hybrid_sleep = FALSE;
+ GError *error = NULL;
+ XfconfChannel *channel;
+ GtkWidget *image;
+ GtkWidget *separator;
+ gboolean upower_not_found = FALSE;
+ GtkCssProvider *provider;
+
+ dialog->type_clicked = XFSM_SHUTDOWN_LOGOUT;
+ dialog->shutdown = xfsm_shutdown_get ();
+
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
+ gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
+ gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+ /* Use Adwaita's keycap style to get a meaningful look out of the box */
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (dialog)), "keycap");
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (dialog)), "xfsm-logout-dialog");
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_data (provider, ".xfsm-logout-dialog { font-size: initial; }", -1, NULL);
+ gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (dialog)),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
+
+ /* load xfconf settings */
+ channel = xfsm_open_config ();
+ if (xfsm_shutdown_can_save_session (dialog->shutdown))
+ save_session = xfconf_channel_get_bool (channel, "/general/SaveOnExit", TRUE);
+
+ main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BORDER);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), main_vbox, TRUE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
+ gtk_widget_show (main_vbox);
+
+ /* label showing the users' name */
+ username = g_get_real_name ();
+ if (username == NULL
+ || *username == '\0'
+ || strcmp ("Unknown", username) == 0)
+ username = g_get_user_name ();
+
+ label_str = g_strdup_printf (_("Log out %s"), username);
+ label = gtk_label_new (label_str);
+ gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (label)), "xfsm-logout-label");
+ gtk_box_pack_start (GTK_BOX (main_vbox), label, FALSE, TRUE, 0);
+ gtk_widget_show (label);
+ g_free (label_str);
+
+ attrs = pango_attr_list_new ();
+ pango_attr_list_insert (attrs, pango_attr_scale_new (PANGO_SCALE_LARGE));
+ pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
+ gtk_label_set_attributes (GTK_LABEL (label), attrs);
+ pango_attr_list_unref (attrs);
+
+ separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
+ gtk_box_pack_start (GTK_BOX (main_vbox), separator, FALSE, TRUE, 0);
+ gtk_widget_show (separator);
+
+ /**
+ * Start mode MODE_LOGOUT_BUTTONS
+ **/
+ dialog->box[MODE_LOGOUT_BUTTONS] = vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BORDER);
+ gtk_box_pack_start (GTK_BOX (main_vbox), vbox, TRUE, TRUE, 0);
+
+ /**
+ * Cancel
+ **/
+ dialog->button_cancel = gtk_dialog_add_button (GTK_DIALOG (dialog),
+ _("_Cancel"),
+ GTK_RESPONSE_CANCEL);
+
+ button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BORDER);
+ gtk_box_pack_start (GTK_BOX (vbox), button_vbox, FALSE, TRUE, 0);
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (button_vbox)), "xfsm-logout-buttons");
+ gtk_widget_show (button_vbox);
+
+ /* row for logout/shutdown and reboot */
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BORDER);
+ gtk_box_pack_start (GTK_BOX (button_vbox), hbox, FALSE, TRUE, 0);
+ gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
+ gtk_widget_show (hbox);
+
+ /**
+ * Logout
+ **/
+ button = xfsm_logout_dialog_button (_("_Log Out"), "xfsm-logout",
+ "system-log-out", NULL,
+ XFSM_SHUTDOWN_LOGOUT, dialog);
+
+ gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+ gtk_widget_show (button);
+ gtk_widget_grab_focus (button);
+
+ /**
+ * Reboot
+ **/
+ if (!xfsm_shutdown_can_restart (dialog->shutdown, &can_restart, &error))
+ {
+ g_printerr ("%s: Querying CanRestart failed, %s\n\n",
+ PACKAGE_NAME, ERROR_MSG (error));
+ g_clear_error (&error);
+
+ can_restart = FALSE;
+ }
+
+ button = xfsm_logout_dialog_button (_("_Restart"), "xfsm-reboot",
+ "system-reboot", NULL,
+ XFSM_SHUTDOWN_RESTART, dialog);
+
+ gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+ gtk_widget_set_sensitive (button, can_restart);
+ gtk_widget_show (button);
+
+ /**
+ * Shutdown
+ **/
+ if (!xfsm_shutdown_can_shutdown (dialog->shutdown, &can_shutdown, &error))
+ {
+ g_printerr ("%s: Querying CanShutdown failed. %s\n\n",
+ PACKAGE_NAME, ERROR_MSG (error));
+ g_clear_error (&error);
+
+ can_shutdown = FALSE;
+ }
+
+ button = xfsm_logout_dialog_button (_("Shut _Down"), "xfsm-shutdown",
+ "system-shutdown", NULL,
+ XFSM_SHUTDOWN_SHUTDOWN, dialog);
+
+ gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+ gtk_widget_set_sensitive (button, can_shutdown);
+ gtk_widget_show (button);
+
+ /* new row for suspend/hibernate/hybrid sleep */
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BORDER);
+ gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
+ gtk_box_pack_start (GTK_BOX (button_vbox), hbox, FALSE, TRUE, 0);
+
+ /**
+ * Suspend
+ *
+ * Hide the button if UPower is not installed or system cannot suspend
+ **/
+ if (xfconf_channel_get_bool (channel, "/shutdown/ShowSuspend", TRUE))
+ {
+ if (xfsm_shutdown_can_suspend (dialog->shutdown, &can_suspend, &auth_suspend, &error))
+ {
+ if (can_suspend)
+ {
+ button = xfsm_logout_dialog_button (_("Sus_pend"), "xfsm-suspend",
+ "system-suspend", NULL,
+ XFSM_SHUTDOWN_SUSPEND, dialog);
+
+ gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+ gtk_widget_set_sensitive (button, auth_suspend);
+ gtk_widget_show (button);
+
+ gtk_widget_show (hbox);
+ }
+ }
+ else
+ {
+ g_printerr ("%s: Querying suspend failed: %s\n\n",
+ PACKAGE_NAME, ERROR_MSG (error));
+ g_clear_error (&error);
+
+ /* don't try hibernate again */
+ upower_not_found = TRUE;
+ }
+ }
+
+ /**
+ * Hibernate
+ *
+ * Hide the button if UPower is not installed or system cannot suspend
+ **/
+ if (!upower_not_found
+ && xfconf_channel_get_bool (channel, "/shutdown/ShowHibernate", TRUE))
+ {
+ if (xfsm_shutdown_can_hibernate (dialog->shutdown, &can_hibernate, &auth_hibernate, &error))
+ {
+ if (can_hibernate)
+ {
+ button = xfsm_logout_dialog_button (_("_Hibernate"), "xfsm-hibernate",
+ "system-hibernate", NULL,
+ XFSM_SHUTDOWN_HIBERNATE, dialog);
+
+ gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+ gtk_widget_set_sensitive (button, auth_hibernate);
+ gtk_widget_show (button);
+
+ gtk_widget_show (hbox);
+ }
+ }
+ else
+ {
+ g_printerr ("%s: Querying hibernate failed: %s\n\n",
+ PACKAGE_NAME, ERROR_MSG (error));
+ g_clear_error (&error);
+ }
+ }
+
+ /**
+ * Hybrid Sleep
+ *
+ * Hide the button if UPower is not installed or system cannot suspend
+ **/
+ if (!upower_not_found
+ && xfconf_channel_get_bool (channel, "/shutdown/ShowHybridSleep", TRUE))
+ {
+ if (xfsm_shutdown_can_hybrid_sleep (dialog->shutdown, &can_hybrid_sleep, &auth_hybrid_sleep, &error))
+ {
+ if (can_hybrid_sleep)
+ {
+ button = xfsm_logout_dialog_button (_("H_ybrid Sleep"), "xfsm-hibernate",
+ "system-hibernate", "system-suspend-hibernate",
+ XFSM_SHUTDOWN_HYBRID_SLEEP, dialog);
+
+ gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+ gtk_widget_set_sensitive (button, auth_hybrid_sleep);
+ gtk_widget_show (button);
+
+ gtk_widget_show (hbox);
+ }
+ }
+ else
+ {
+ g_printerr ("%s: Querying hybrid-sleep failed: %s\n\n",
+ PACKAGE_NAME, ERROR_MSG (error));
+ g_clear_error (&error);
+ }
+ }
+
+ /**
+ * Switch User
+ *
+ * Hide the button if system cannot switch user, requires the display
+ * manager to provide the org.freedesktop.DisplayManager dbus API
+ **/
+ if (xfconf_channel_get_bool (channel, "/shutdown/ShowSwitchUser", TRUE))
+ {
+ if (xfsm_shutdown_can_switch_user (dialog->shutdown, &can_switch_user, &error))
+ {
+ if (can_switch_user)
+ {
+ button = xfsm_logout_dialog_button (_("Switch _User"), "xfsm-switch-user",
+ "system-users", "system-users-symbolic",
+ XFSM_SHUTDOWN_SWITCH_USER, dialog);
+
+ gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
+ gtk_widget_set_sensitive (button, can_switch_user);
+ gtk_widget_show (button);
+
+ gtk_widget_show (hbox);
+ }
+ }
+ else
+ {
+ g_printerr ("%s: Querying switch user failed: %s\n\n",
+ PACKAGE_NAME, ERROR_MSG (error));
+ g_clear_error (&error);
+ }
+ }
+
+ /**
+ * Save session
+ **/
+ if (xfsm_shutdown_can_save_session (dialog->shutdown)
+ && !xfconf_channel_get_bool (channel, "/general/AutoSave", FALSE))
+ {
+ dialog->save_session = gtk_check_button_new_with_mnemonic (_("_Save session for future logins"));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->save_session), save_session);
+ gtk_box_pack_start (GTK_BOX (vbox), dialog->save_session, FALSE, TRUE, BORDER);
+ gtk_widget_show (dialog->save_session);
+ }
+
+ attrs = pango_attr_list_new ();
+ pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
+
+
+ /**
+ * Start mode MODE_SHOW_ERROR
+ **/
+ dialog->box[MODE_SHOW_ERROR] = vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BORDER);
+ gtk_box_pack_start (GTK_BOX (main_vbox), vbox, TRUE, TRUE, 0);
+
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BORDER * 2);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
+ gtk_widget_show (hbox);
+
+ image = gtk_image_new_from_icon_name ("dialog-error", GTK_ICON_SIZE_DIALOG);
+ gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
+ gtk_widget_show (image);
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BORDER);
+ gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
+ gtk_widget_show (vbox);
+
+ label = gtk_label_new (_("An error occurred"));
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+ gtk_label_set_xalign (GTK_LABEL (label), 0.00);
+ gtk_label_set_yalign (GTK_LABEL (label), 0.50);
+ gtk_label_set_attributes (GTK_LABEL (label), attrs);
+ gtk_widget_show (label);
+
+ pango_attr_list_unref (attrs);
+}
+
+
+
+static void
+xfsm_logout_dialog_finalize (GObject *object)
+{
+ XfsmLogoutDialog *dialog = XFSM_LOGOUT_DIALOG (object);
+
+ g_object_unref (G_OBJECT (dialog->shutdown));
+
+ (*G_OBJECT_CLASS (xfsm_logout_dialog_parent_class)->finalize) (object);
+}
+
+
+
+static void
+xfsm_logout_dialog_set_mode (XfsmLogoutDialog *dialog,
+ gint mode)
+{
+ gint i;
+
+ for (i = 0; i < N_MODES; i++)
+ gtk_widget_set_visible (dialog->box[i], i == mode);
+
+ gtk_widget_set_visible (dialog->button_cancel, mode != MODE_SHOW_ERROR);
+}
+
+
+
+static void
+xfsm_logout_dialog_button_clicked (GtkWidget *button,
+ XfsmLogoutDialog *dialog)
+{
+ gint *val;
+
+ val = g_object_get_data (G_OBJECT (button), "shutdown-type");
+ g_assert (val != NULL);
+ dialog->type_clicked = *val;
+
+ gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+}
+
+
+
+static GtkWidget *
+xfsm_logout_dialog_button (const gchar *title,
+ const gchar *icon_name,
+ const gchar *icon_name_fallback,
+ const gchar *icon_name_fallback2,
+ XfsmShutdownType type,
+ XfsmLogoutDialog *dialog)
+{
+ GtkWidget *button;
+ GtkWidget *vbox;
+ GtkWidget *image;
+ GtkWidget *label;
+ gint *val;
+ GtkIconTheme *icon_theme;
+
+ g_return_val_if_fail (XFSM_IS_LOGOUT_DIALOG (dialog), NULL);
+
+ val = g_new0 (gint, 1);
+ *val = type;
+
+ button = gtk_button_new ();
+ g_object_set_data_full (G_OBJECT (button), "shutdown-type", val, g_free);
+ g_signal_connect (G_OBJECT (button), "clicked",
+ G_CALLBACK (xfsm_logout_dialog_button_clicked), dialog);
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, BORDER);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), BORDER);
+ gtk_container_add (GTK_CONTAINER (button), vbox);
+ gtk_widget_show (vbox);
+
+ icon_theme = gtk_icon_theme_get_default ();
+
+ image = gtk_image_new ();
+ if (gtk_icon_theme_has_icon (icon_theme, icon_name))
+ gtk_image_set_from_icon_name (GTK_IMAGE (image), icon_name, GTK_ICON_SIZE_DIALOG);
+ else if (gtk_icon_theme_has_icon (icon_theme, icon_name_fallback))
+ gtk_image_set_from_icon_name (GTK_IMAGE (image), icon_name_fallback, GTK_ICON_SIZE_DIALOG);
+ else if (gtk_icon_theme_has_icon (icon_theme, icon_name_fallback2))
+ gtk_image_set_from_icon_name (GTK_IMAGE (image), icon_name_fallback2, GTK_ICON_SIZE_DIALOG);
+
+ gtk_image_set_pixel_size (GTK_IMAGE (image), 48);
+ gtk_box_pack_start (GTK_BOX (vbox), image, FALSE, FALSE, 0);
+ gtk_widget_show (image);
+
+ label = gtk_label_new_with_mnemonic (title);
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
+
+ return button;
+}
+
+
+
+static GdkPixbuf *
+xfsm_logout_dialog_screenshot_new (GdkScreen *screen)
+{
+ GdkRectangle rect, screen_rect;
+ GdkWindow *window;
+ GdkPixbuf *screenshot;
+ gint x, y;
+
+ g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
+
+ screen_rect.x = 0;
+ screen_rect.y = 0;
+ screen_rect.width = gdk_screen_get_width (screen);
+ screen_rect.height = gdk_screen_get_height (screen);
+
+ window = gdk_screen_get_root_window (screen);
+
+ rect.width = gdk_window_get_width (window);
+ rect.height = gdk_window_get_height (window);
+
+ gdk_window_get_origin (window, &x, &y);
+
+ rect.x = x;
+ rect.y = y;
+
+ if (!gdk_rectangle_intersect (&rect, &screen_rect, &rect))
+ return NULL;
+
+ screenshot = gdk_pixbuf_get_from_window (window, 0, 0, rect.width, rect.height);
+
+ gdk_display_beep (gdk_screen_get_display (screen));
+
+ return screenshot;
+}
+
+
+
+static GdkPixbuf *
+exo_gdk_pixbuf_scale_ratio (GdkPixbuf *source,
+ gint dest_size)
+{
+ gdouble wratio;
+ gdouble hratio;
+ gint source_width;
+ gint source_height;
+ gint dest_width;
+ gint dest_height;
+
+ g_return_val_if_fail (GDK_IS_PIXBUF (source), NULL);
+ g_return_val_if_fail (dest_size > 0, NULL);
+
+ source_width = gdk_pixbuf_get_width (source);
+ source_height = gdk_pixbuf_get_height (source);
+
+ wratio = (gdouble) source_width / (gdouble) dest_size;
+ hratio = (gdouble) source_height / (gdouble) dest_size;
+
+ if (hratio > wratio)
+ {
+ dest_width = rint (source_width / hratio);
+ dest_height = dest_size;
+ }
+ else
+ {
+ dest_width = dest_size;
+ dest_height = rint (source_height / wratio);
+ }
+
+ return gdk_pixbuf_scale_simple (source, MAX (dest_width, 1),
+ MAX (dest_height, 1), GDK_INTERP_BILINEAR);
+}
+
+
+
+static void
+xfsm_logout_dialog_screenshot_save (GdkPixbuf *screenshot,
+ GdkScreen *screen,
+ const gchar *session_name)
+{
+ GdkPixbuf *scaled;
+ gchar *path;
+ gchar *display_name;
+ GdkDisplay *dpy;
+ GError *error = NULL;
+ gchar *filename;
+
+ g_return_if_fail (GDK_IS_PIXBUF (screenshot));
+ g_return_if_fail (GDK_IS_SCREEN (screen));
+
+ scaled = exo_gdk_pixbuf_scale_ratio (screenshot, SHOTSIZE);
+ if (G_LIKELY (scaled != NULL))
+ {
+ dpy = gdk_screen_get_display (screen);
+ display_name = xfsm_gdk_display_get_fullname (dpy);
+ path = g_strconcat ("sessions/thumbs-", display_name, "/", session_name, ".png", NULL);
+ filename = xfce_resource_save_location (XFCE_RESOURCE_CACHE, path, TRUE);
+ g_free (display_name);
+ g_free (path);
+
+ if (!filename)
+ {
+ g_warning ("Unable to save screenshot, "
+ "error calling xfce_resource_save_location with %s, "
+ "check your permissions", path);
+ return;
+ }
+
+ if (!gdk_pixbuf_save (scaled, filename, "png", &error, NULL))
+ {
+ g_warning ("Failed to save session screenshot: %s", error->message);
+ g_error_free (error);
+ }
+
+ g_free (filename);
+ g_object_unref (G_OBJECT (scaled));
+ }
+}
+
+
+
+static void
+xfsm_logout_dialog_grab_callback (GdkSeat *seat,
+ GdkWindow *window,
+ gpointer user_data)
+{
+ /* ensure window is mapped to avoid unsuccessful grabs */
+ if (!gdk_window_is_visible (window))
+ gdk_window_show (window);
+}
+
+
+
+static gint
+xfsm_logout_dialog_run (GtkDialog *dialog,
+ gboolean grab_input)
+{
+ GdkWindow *window;
+ gint ret;
+ GdkDevice *device;
+ GdkSeat *seat;
+
+ if (grab_input)
+ {
+ gtk_widget_show_now (GTK_WIDGET (dialog));
+
+ window = gtk_widget_get_window (GTK_WIDGET (dialog));
+
+ device = gtk_get_current_event_device ();
+ seat = device != NULL
+ ? gdk_device_get_seat (device)
+ : gdk_display_get_default_seat (gtk_widget_get_display (GTK_WIDGET (dialog)));
+
+ if (gdk_seat_grab (seat, window,
+ GDK_SEAT_CAPABILITY_KEYBOARD,
+ FALSE, NULL, NULL,
+ xfsm_logout_dialog_grab_callback,
+ NULL) != GDK_GRAB_SUCCESS)
+ {
+ g_critical ("Failed to grab the keyboard for logout window");
+ }
+
+#ifdef GDK_WINDOWING_X11
+ /* force input to the dialog */
+ gdk_error_trap_push ();
+ XSetInputFocus (gdk_x11_get_default_xdisplay (),
+ GDK_WINDOW_XID (window),
+ RevertToParent, CurrentTime);
+ gdk_error_trap_pop_ignored ();
+#endif
+ }
+
+ ret = gtk_dialog_run (dialog);
+
+ if (grab_input)
+ gdk_seat_ungrab (seat);
+
+ return ret;
+}
+
+
+
+gboolean
+xfsm_logout_dialog (const gchar *session_name,
+ XfsmShutdownType *return_type,
+ gboolean *return_save_session,
+ gboolean accessibility)
+{
+ gint result;
+ GtkWidget *hidden;
+ GtkWidget *dialog;
+ GdkScreen *screen;
+ gint monitor;
+ GdkPixbuf *screenshot = NULL;
+ XfsmFadeout *fadeout = NULL;
+ XfsmLogoutDialog *xfsm_dialog;
+ XfconfChannel *channel = xfsm_open_config ();
+ gboolean autosave;
+ XfsmShutdown *shutdown;
+ GdkDevice *device;
+ GdkSeat *seat;
+ gint grab_count = 0;
+
+ g_return_val_if_fail (return_type != NULL, FALSE);
+ g_return_val_if_fail (return_save_session != NULL, FALSE);
+
+ shutdown = xfsm_shutdown_get ();
+ if (xfsm_shutdown_can_save_session (shutdown))
+ autosave = xfconf_channel_get_bool (channel, "/general/AutoSave", FALSE);
+ else
+ autosave = FALSE;
+ g_object_unref (shutdown);
+
+ /* check if we need to bother the user */
+ if (!xfconf_channel_get_bool (channel, "/general/PromptOnLogout", TRUE))
+ {
+ *return_type = XFSM_SHUTDOWN_LOGOUT;
+ *return_save_session = autosave;
+
+ return TRUE;
+ }
+
+ /* decide on which screen we should show the dialog */
+ screen = xfce_gdk_screen_get_active (&monitor);
+ if (G_UNLIKELY (screen == NULL))
+ {
+ screen = gdk_screen_get_default ();
+ monitor = 0;
+ }
+
+ hidden = gtk_invisible_new_for_screen (screen);
+ gtk_widget_show (hidden);
+
+ /* check if accessibility is enabled */
+ if (G_LIKELY (!accessibility))
+ {
+ /* wait until we can grab the keyboard, we need this for
+ * the dialog when running it */
+ for (;;)
+ {
+ device = gtk_get_current_event_device ();
+ seat = device != NULL
+ ? gdk_device_get_seat (device)
+ : gdk_display_get_default_seat (gtk_widget_get_display (hidden));
+
+ if (gdk_seat_grab (seat, gtk_widget_get_window (hidden),
+ GDK_SEAT_CAPABILITY_KEYBOARD,
+ FALSE, NULL, NULL,
+ xfsm_logout_dialog_grab_callback,
+ NULL) == GDK_GRAB_SUCCESS)
+ {
+ gdk_seat_ungrab (seat);
+ break;
+ }
+
+ if (grab_count++ >= 40)
+ {
+ g_critical ("Failed to grab the keyboard for logout window");
+ break;
+ }
+
+ g_usleep (G_USEC_PER_SEC / 20);
+ }
+
+ /* make a screenshot */
+ if (xfconf_channel_get_bool (channel, "/general/ShowScreenshots", TRUE))
+ screenshot = xfsm_logout_dialog_screenshot_new (screen);
+
+ /* display fadeout */
+ fadeout = xfsm_fadeout_new (gdk_screen_get_display (screen));
+
+ dialog = g_object_new (XFSM_TYPE_LOGOUT_DIALOG,
+ "type", GTK_WINDOW_POPUP,
+ "screen", screen, NULL);
+
+ gtk_widget_realize (dialog);
+ gdk_window_set_override_redirect (gtk_widget_get_window (dialog), TRUE);
+ gdk_window_raise (gtk_widget_get_window (dialog));
+ }
+ else
+ {
+ dialog = g_object_new (XFSM_TYPE_LOGOUT_DIALOG,
+ "decorated", !accessibility,
+ "screen", screen, NULL);
+
+ gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
+ atk_object_set_role (gtk_widget_get_accessible (dialog), ATK_ROLE_ALERT);
+ }
+
+ gtk_widget_destroy (hidden);
+
+ xfsm_dialog = XFSM_LOGOUT_DIALOG (dialog);
+
+ /* set mode */
+ xfsm_logout_dialog_set_mode (xfsm_dialog, MODE_LOGOUT_BUTTONS);
+
+ result = xfsm_logout_dialog_run (GTK_DIALOG (dialog), !accessibility);
+
+ gtk_widget_hide (dialog);
+
+ if (result == GTK_RESPONSE_OK)
+ {
+ /* store autosave state */
+ if (autosave)
+ *return_save_session = TRUE;
+ else if (xfsm_dialog->save_session != NULL)
+ *return_save_session = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (xfsm_dialog->save_session));
+ else
+ *return_save_session = FALSE;
+
+ /* return the clicked action */
+ *return_type = xfsm_dialog->type_clicked;
+ }
+
+ if (fadeout != NULL)
+ xfsm_fadeout_destroy (fadeout);
+
+ gtk_widget_destroy (dialog);
+
+ /* store channel settings if everything worked fine */
+ if (result == GTK_RESPONSE_OK)
+ {
+ xfconf_channel_set_string (channel, "/general/SessionName", session_name);
+ xfconf_channel_set_bool (channel, "/general/SaveOnExit", *return_save_session);
+ }
+
+ /* save the screenshot */
+ if (screenshot != NULL)
+ {
+ if (result == GTK_RESPONSE_OK)
+ xfsm_logout_dialog_screenshot_save (screenshot, screen, session_name);
+ g_object_unref (G_OBJECT (screenshot));
+ }
+
+ return (result == GTK_RESPONSE_OK);
+}
diff --git a/xfce4-session/xfsm-logout-dialog.h b/xfce4-session/xfsm-logout-dialog.h
new file mode 100644
index 0000000..0e7f68b
--- /dev/null
+++ b/xfce4-session/xfsm-logout-dialog.h
@@ -0,0 +1,44 @@
+/*-
+ * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
+ * Copyright (c) 2011 Nick Schermer <nick@xfce.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
+ */
+
+#ifndef __XFSM_LOGOUT_DIALOG_H__
+#define __XFSM_LOGOUT_DIALOG_H__
+
+#include <xfce4-session/xfsm-shutdown.h>
+
+typedef struct _XfsmLogoutDialogClass XfsmLogoutDialogClass;
+typedef struct _XfsmLogoutDialog XfsmLogoutDialog;
+
+#define XFSM_TYPE_LOGOUT_DIALOG (xfsm_logout_dialog_get_type ())
+#define XFSM_LOGOUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFSM_TYPE_LOGOUT_DIALOG, XfsmLogoutDialog))
+#define XFSM_LOGOUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFSM_TYPE_LOGOUT_DIALOG, XfsmLogoutDialogClass))
+#define XFSM_IS_LOGOUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFSM_TYPE_LOGOUT_DIALOG))
+#define XFSM_IS_LOGOUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFSM_TYPE_LOGOUT_DIALOG))
+#define XFSM_LOGOUT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFSM_TYPE_LOGOUT_DIALOG, XfsmLogoutDialogClass))
+
+GType xfsm_logout_dialog_get_type (void) G_GNUC_CONST;
+
+gboolean xfsm_logout_dialog (const gchar *session_name,
+ XfsmShutdownType *return_type,
+ gboolean *return_save_session,
+ gboolean accessibility);
+
+#endif
diff --git a/xfce4-session/xfsm-manager-dbus.c b/xfce4-session/xfsm-manager-dbus.c
new file mode 100644
index 0000000..626ab78
--- /dev/null
+++ b/xfce4-session/xfsm-manager-dbus.c
@@ -0,0 +1,4263 @@
+/*
+ * Generated by gdbus-codegen 2.62.4 from xfsm-manager-dbus.xml. DO NOT EDIT.
+ *
+ * The license of this code is the same as for the D-Bus interface description
+ * it was derived from.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "xfsm-manager-dbus.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.xfce.Session.Manager
+ * ------------------------------------------------------------------------
+ */
+
+/**
+ * SECTION:XfsmDbusManager
+ * @title: XfsmDbusManager
+ * @short_description: Generated C code for the org.xfce.Session.Manager D-Bus interface
+ *
+ * This section contains code for working with the <link linkend="gdbus-interface-org-xfce-Session-Manager.top_of_page">org.xfce.Session.Manager</link> D-Bus interface in C.
+ */
+
+/* ---- Introspection data for org.xfce.Session.Manager ---- */
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_get_info_OUT_ARG_name =
+{
+ {
+ -1,
+ (gchar *) "name",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_get_info_OUT_ARG_version =
+{
+ {
+ -1,
+ (gchar *) "version",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_get_info_OUT_ARG_vendor =
+{
+ {
+ -1,
+ (gchar *) "vendor",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_get_info_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_get_info_OUT_ARG_name.parent_struct,
+ &_xfsm_dbus_manager_method_info_get_info_OUT_ARG_version.parent_struct,
+ &_xfsm_dbus_manager_method_info_get_info_OUT_ARG_vendor.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_get_info =
+{
+ {
+ -1,
+ (gchar *) "GetInfo",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_get_info_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-get-info",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_list_clients_OUT_ARG_clients =
+{
+ {
+ -1,
+ (gchar *) "clients",
+ (gchar *) "ao",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_list_clients_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_list_clients_OUT_ARG_clients.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_list_clients =
+{
+ {
+ -1,
+ (gchar *) "ListClients",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_list_clients_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-list-clients",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_get_state_OUT_ARG_state =
+{
+ {
+ -1,
+ (gchar *) "state",
+ (gchar *) "u",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_get_state_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_get_state_OUT_ARG_state.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_get_state =
+{
+ {
+ -1,
+ (gchar *) "GetState",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_get_state_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-get-state",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_checkpoint_IN_ARG_session_name =
+{
+ {
+ -1,
+ (gchar *) "session_name",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_checkpoint_IN_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_checkpoint_IN_ARG_session_name.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_checkpoint =
+{
+ {
+ -1,
+ (gchar *) "Checkpoint",
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_checkpoint_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-checkpoint",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_logout_IN_ARG_show_dialog =
+{
+ {
+ -1,
+ (gchar *) "show_dialog",
+ (gchar *) "b",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_logout_IN_ARG_allow_save =
+{
+ {
+ -1,
+ (gchar *) "allow_save",
+ (gchar *) "b",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_logout_IN_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_logout_IN_ARG_show_dialog.parent_struct,
+ &_xfsm_dbus_manager_method_info_logout_IN_ARG_allow_save.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_logout =
+{
+ {
+ -1,
+ (gchar *) "Logout",
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_logout_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-logout",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_shutdown_IN_ARG_allow_save =
+{
+ {
+ -1,
+ (gchar *) "allow_save",
+ (gchar *) "b",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_shutdown_IN_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_shutdown_IN_ARG_allow_save.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_shutdown =
+{
+ {
+ -1,
+ (gchar *) "Shutdown",
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_shutdown_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-shutdown",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_can_shutdown_OUT_ARG_can_shutdown =
+{
+ {
+ -1,
+ (gchar *) "can_shutdown",
+ (gchar *) "b",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_can_shutdown_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_can_shutdown_OUT_ARG_can_shutdown.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_can_shutdown =
+{
+ {
+ -1,
+ (gchar *) "CanShutdown",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_can_shutdown_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-can-shutdown",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_restart_IN_ARG_allow_save =
+{
+ {
+ -1,
+ (gchar *) "allow_save",
+ (gchar *) "b",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_restart_IN_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_restart_IN_ARG_allow_save.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_restart =
+{
+ {
+ -1,
+ (gchar *) "Restart",
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_restart_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-restart",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_can_restart_OUT_ARG_can_restart =
+{
+ {
+ -1,
+ (gchar *) "can_restart",
+ (gchar *) "b",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_can_restart_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_can_restart_OUT_ARG_can_restart.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_can_restart =
+{
+ {
+ -1,
+ (gchar *) "CanRestart",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_can_restart_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-can-restart",
+ FALSE
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_suspend =
+{
+ {
+ -1,
+ (gchar *) "Suspend",
+ NULL,
+ NULL,
+ NULL
+ },
+ "handle-suspend",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_can_suspend_OUT_ARG_can_suspend =
+{
+ {
+ -1,
+ (gchar *) "can_suspend",
+ (gchar *) "b",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_can_suspend_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_can_suspend_OUT_ARG_can_suspend.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_can_suspend =
+{
+ {
+ -1,
+ (gchar *) "CanSuspend",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_can_suspend_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-can-suspend",
+ FALSE
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_hibernate =
+{
+ {
+ -1,
+ (gchar *) "Hibernate",
+ NULL,
+ NULL,
+ NULL
+ },
+ "handle-hibernate",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_can_hibernate_OUT_ARG_can_hibernate =
+{
+ {
+ -1,
+ (gchar *) "can_hibernate",
+ (gchar *) "b",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_can_hibernate_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_can_hibernate_OUT_ARG_can_hibernate.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_can_hibernate =
+{
+ {
+ -1,
+ (gchar *) "CanHibernate",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_can_hibernate_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-can-hibernate",
+ FALSE
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_hybrid_sleep =
+{
+ {
+ -1,
+ (gchar *) "HybridSleep",
+ NULL,
+ NULL,
+ NULL
+ },
+ "handle-hybrid-sleep",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_can_hybrid_sleep_OUT_ARG_can_hybrid_sleep =
+{
+ {
+ -1,
+ (gchar *) "can_hybrid_sleep",
+ (gchar *) "b",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_can_hybrid_sleep_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_can_hybrid_sleep_OUT_ARG_can_hybrid_sleep.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_can_hybrid_sleep =
+{
+ {
+ -1,
+ (gchar *) "CanHybridSleep",
+ NULL,
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_can_hybrid_sleep_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-can-hybrid-sleep",
+ FALSE
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_switch_user =
+{
+ {
+ -1,
+ (gchar *) "SwitchUser",
+ NULL,
+ NULL,
+ NULL
+ },
+ "handle-switch-user",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_register_client_IN_ARG_app_id =
+{
+ {
+ -1,
+ (gchar *) "app_id",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_register_client_IN_ARG_client_startup_id =
+{
+ {
+ -1,
+ (gchar *) "client_startup_id",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_register_client_IN_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_register_client_IN_ARG_app_id.parent_struct,
+ &_xfsm_dbus_manager_method_info_register_client_IN_ARG_client_startup_id.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_register_client_OUT_ARG_client_id =
+{
+ {
+ -1,
+ (gchar *) "client_id",
+ (gchar *) "o",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_register_client_OUT_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_register_client_OUT_ARG_client_id.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_register_client =
+{
+ {
+ -1,
+ (gchar *) "RegisterClient",
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_register_client_IN_ARG_pointers,
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_register_client_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-register-client",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_method_info_unregister_client_IN_ARG_client_id =
+{
+ {
+ -1,
+ (gchar *) "client_id",
+ (gchar *) "o",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_method_info_unregister_client_IN_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_unregister_client_IN_ARG_client_id.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _xfsm_dbus_manager_method_info_unregister_client =
+{
+ {
+ -1,
+ (gchar *) "UnregisterClient",
+ (GDBusArgInfo **) &_xfsm_dbus_manager_method_info_unregister_client_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-unregister-client",
+ FALSE
+};
+
+static const GDBusMethodInfo * const _xfsm_dbus_manager_method_info_pointers[] =
+{
+ &_xfsm_dbus_manager_method_info_get_info.parent_struct,
+ &_xfsm_dbus_manager_method_info_list_clients.parent_struct,
+ &_xfsm_dbus_manager_method_info_get_state.parent_struct,
+ &_xfsm_dbus_manager_method_info_checkpoint.parent_struct,
+ &_xfsm_dbus_manager_method_info_logout.parent_struct,
+ &_xfsm_dbus_manager_method_info_shutdown.parent_struct,
+ &_xfsm_dbus_manager_method_info_can_shutdown.parent_struct,
+ &_xfsm_dbus_manager_method_info_restart.parent_struct,
+ &_xfsm_dbus_manager_method_info_can_restart.parent_struct,
+ &_xfsm_dbus_manager_method_info_suspend.parent_struct,
+ &_xfsm_dbus_manager_method_info_can_suspend.parent_struct,
+ &_xfsm_dbus_manager_method_info_hibernate.parent_struct,
+ &_xfsm_dbus_manager_method_info_can_hibernate.parent_struct,
+ &_xfsm_dbus_manager_method_info_hybrid_sleep.parent_struct,
+ &_xfsm_dbus_manager_method_info_can_hybrid_sleep.parent_struct,
+ &_xfsm_dbus_manager_method_info_switch_user.parent_struct,
+ &_xfsm_dbus_manager_method_info_register_client.parent_struct,
+ &_xfsm_dbus_manager_method_info_unregister_client.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_signal_info_state_changed_ARG_old_state =
+{
+ {
+ -1,
+ (gchar *) "old_state",
+ (gchar *) "u",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_signal_info_state_changed_ARG_new_state =
+{
+ {
+ -1,
+ (gchar *) "new_state",
+ (gchar *) "u",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_signal_info_state_changed_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_signal_info_state_changed_ARG_old_state.parent_struct,
+ &_xfsm_dbus_manager_signal_info_state_changed_ARG_new_state.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusSignalInfo _xfsm_dbus_manager_signal_info_state_changed =
+{
+ {
+ -1,
+ (gchar *) "StateChanged",
+ (GDBusArgInfo **) &_xfsm_dbus_manager_signal_info_state_changed_ARG_pointers,
+ NULL
+ },
+ "state-changed"
+};
+
+static const _ExtendedGDBusArgInfo _xfsm_dbus_manager_signal_info_client_registered_ARG_client =
+{
+ {
+ -1,
+ (gchar *) "client",
+ (gchar *) "o",
+ NULL
+ },
+ FALSE
+};
+
+static const GDBusArgInfo * const _xfsm_dbus_manager_signal_info_client_registered_ARG_pointers[] =
+{
+ &_xfsm_dbus_manager_signal_info_client_registered_ARG_client.parent_struct,
+ NULL
+};
+
+static const _ExtendedGDBusSignalInfo _xfsm_dbus_manager_signal_info_client_registered =
+{
+ {
+ -1,
+ (gchar *) "ClientRegistered",
+ (GDBusArgInfo **) &_xfsm_dbus_manager_signal_info_client_registered_ARG_pointers,
+ NULL
+ },
+ "client-registered"
+};
+
+static const _ExtendedGDBusSignalInfo _xfsm_dbus_manager_signal_info_shutdown_cancelled =
+{
+ {
+ -1,
+ (gchar *) "ShutdownCancelled",
+ NULL,
+ NULL
+ },
+ "shutdown-cancelled"
+};
+
+static const GDBusSignalInfo * const _xfsm_dbus_manager_signal_info_pointers[] =
+{
+ &_xfsm_dbus_manager_signal_info_state_changed.parent_struct,
+ &_xfsm_dbus_manager_signal_info_client_registered.parent_struct,
+ &_xfsm_dbus_manager_signal_info_shutdown_cancelled.parent_struct,
+ NULL
+};
+
+static const GDBusAnnotationInfo _xfsm_dbus_manager_annotation_info_0 =
+{
+ -1,
+ (gchar *) "org.freedesktop.DBus.GLib.CSymbol",
+ (gchar *) "xfsm_manager_dbus",
+ NULL
+};
+
+static const GDBusAnnotationInfo _xfsm_dbus_manager_annotation_info_1 =
+{
+ -1,
+ (gchar *) "org.freedesktop.DBus.GLib.ClientCSymbol",
+ (gchar *) "xfsm_manager_dbus_client",
+ NULL
+};
+
+static const GDBusAnnotationInfo * const _xfsm_dbus_manager_annotation_info_pointers[] =
+{
+ &_xfsm_dbus_manager_annotation_info_0,
+ &_xfsm_dbus_manager_annotation_info_1,
+ NULL
+};
+
+static const _ExtendedGDBusInterfaceInfo _xfsm_dbus_manager_interface_info =
+{
+ {
+ -1,
+ (gchar *) "org.xfce.Session.Manager",
+ (GDBusMethodInfo **) &_xfsm_dbus_manager_method_info_pointers,
+ (GDBusSignalInfo **) &_xfsm_dbus_manager_signal_info_pointers,
+ NULL,
+ (GDBusAnnotationInfo **) &_xfsm_dbus_manager_annotation_info_pointers
+ },
+ "manager",
+};
+
+
+/**
+ * xfsm_dbus_manager_interface_info:
+ *
+ * Gets a machine-readable description of the <link linkend="gdbus-interface-org-xfce-Session-Manager.top_of_page">org.xfce.Session.Manager</link> D-Bus interface.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
+ */
+GDBusInterfaceInfo *
+xfsm_dbus_manager_interface_info (void)
+{
+ return (GDBusInterfaceInfo *) &_xfsm_dbus_manager_interface_info.parent_struct;
+}
+
+/**
+ * xfsm_dbus_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 #XfsmDbusManager interface for a concrete class.
+ * The properties are overridden in the order they are defined.
+ *
+ * Returns: The last property id.
+ */
+guint
+xfsm_dbus_manager_override_properties (GObjectClass *klass, guint property_id_begin)
+{
+ return property_id_begin - 1;
+}
+
+
+
+/**
+ * XfsmDbusManager:
+ *
+ * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-xfce-Session-Manager.top_of_page">org.xfce.Session.Manager</link>.
+ */
+
+/**
+ * XfsmDbusManagerIface:
+ * @parent_iface: The parent interface.
+ * @handle_can_hibernate: Handler for the #XfsmDbusManager::handle-can-hibernate signal.
+ * @handle_can_hybrid_sleep: Handler for the #XfsmDbusManager::handle-can-hybrid-sleep signal.
+ * @handle_can_restart: Handler for the #XfsmDbusManager::handle-can-restart signal.
+ * @handle_can_shutdown: Handler for the #XfsmDbusManager::handle-can-shutdown signal.
+ * @handle_can_suspend: Handler for the #XfsmDbusManager::handle-can-suspend signal.
+ * @handle_checkpoint: Handler for the #XfsmDbusManager::handle-checkpoint signal.
+ * @handle_get_info: Handler for the #XfsmDbusManager::handle-get-info signal.
+ * @handle_get_state: Handler for the #XfsmDbusManager::handle-get-state signal.
+ * @handle_hibernate: Handler for the #XfsmDbusManager::handle-hibernate signal.
+ * @handle_hybrid_sleep: Handler for the #XfsmDbusManager::handle-hybrid-sleep signal.
+ * @handle_list_clients: Handler for the #XfsmDbusManager::handle-list-clients signal.
+ * @handle_logout: Handler for the #XfsmDbusManager::handle-logout signal.
+ * @handle_register_client: Handler for the #XfsmDbusManager::handle-register-client signal.
+ * @handle_restart: Handler for the #XfsmDbusManager::handle-restart signal.
+ * @handle_shutdown: Handler for the #XfsmDbusManager::handle-shutdown signal.
+ * @handle_suspend: Handler for the #XfsmDbusManager::handle-suspend signal.
+ * @handle_switch_user: Handler for the #XfsmDbusManager::handle-switch-user signal.
+ * @handle_unregister_client: Handler for the #XfsmDbusManager::handle-unregister-client signal.
+ * @client_registered: Handler for the #XfsmDbusManager::client-registered signal.
+ * @shutdown_cancelled: Handler for the #XfsmDbusManager::shutdown-cancelled signal.
+ * @state_changed: Handler for the #XfsmDbusManager::state-changed signal.
+ *
+ * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-xfce-Session-Manager.top_of_page">org.xfce.Session.Manager</link>.
+ */
+
+typedef XfsmDbusManagerIface XfsmDbusManagerInterface;
+G_DEFINE_INTERFACE (XfsmDbusManager, xfsm_dbus_manager, G_TYPE_OBJECT)
+
+static void
+xfsm_dbus_manager_default_init (XfsmDbusManagerIface *iface)
+{
+ /* GObject signals for incoming D-Bus method calls: */
+ /**
+ * XfsmDbusManager::handle-get-info:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.GetInfo">GetInfo()</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 xfsm_dbus_manager_complete_get_info() 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-info",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_get_info),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-list-clients:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.ListClients">ListClients()</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 xfsm_dbus_manager_complete_list_clients() 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-clients",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_list_clients),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-get-state:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.GetState">GetState()</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 xfsm_dbus_manager_complete_get_state() 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-state",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_get_state),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-checkpoint:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_session_name: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.Checkpoint">Checkpoint()</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 xfsm_dbus_manager_complete_checkpoint() 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-checkpoint",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_checkpoint),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 2,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
+
+ /**
+ * XfsmDbusManager::handle-logout:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_show_dialog: Argument passed by remote caller.
+ * @arg_allow_save: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.Logout">Logout()</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 xfsm_dbus_manager_complete_logout() 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-logout",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_logout),
+ 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);
+
+ /**
+ * XfsmDbusManager::handle-shutdown:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_allow_save: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.Shutdown">Shutdown()</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 xfsm_dbus_manager_complete_shutdown() 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-shutdown",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_shutdown),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 2,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN);
+
+ /**
+ * XfsmDbusManager::handle-can-shutdown:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.CanShutdown">CanShutdown()</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 xfsm_dbus_manager_complete_can_shutdown() 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-shutdown",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_can_shutdown),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-restart:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_allow_save: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.Restart">Restart()</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 xfsm_dbus_manager_complete_restart() 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-restart",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_restart),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 2,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN);
+
+ /**
+ * XfsmDbusManager::handle-can-restart:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.CanRestart">CanRestart()</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 xfsm_dbus_manager_complete_can_restart() 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-restart",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_can_restart),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-suspend:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.Suspend">Suspend()</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 xfsm_dbus_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 (XfsmDbusManagerIface, handle_suspend),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-can-suspend:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.CanSuspend">CanSuspend()</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 xfsm_dbus_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 (XfsmDbusManagerIface, handle_can_suspend),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-hibernate:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.Hibernate">Hibernate()</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 xfsm_dbus_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 (XfsmDbusManagerIface, handle_hibernate),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-can-hibernate:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.CanHibernate">CanHibernate()</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 xfsm_dbus_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 (XfsmDbusManagerIface, handle_can_hibernate),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-hybrid-sleep:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.HybridSleep">HybridSleep()</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 xfsm_dbus_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 (XfsmDbusManagerIface, handle_hybrid_sleep),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-can-hybrid-sleep:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.CanHybridSleep">CanHybridSleep()</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 xfsm_dbus_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 (XfsmDbusManagerIface, handle_can_hybrid_sleep),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-switch-user:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.SwitchUser">SwitchUser()</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 xfsm_dbus_manager_complete_switch_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-switch-user",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_switch_user),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 1,
+ G_TYPE_DBUS_METHOD_INVOCATION);
+
+ /**
+ * XfsmDbusManager::handle-register-client:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_app_id: Argument passed by remote caller.
+ * @arg_client_startup_id: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.RegisterClient">RegisterClient()</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 xfsm_dbus_manager_complete_register_client() 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-register-client",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_register_client),
+ 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);
+
+ /**
+ * XfsmDbusManager::handle-unregister-client:
+ * @object: A #XfsmDbusManager.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_client_id: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-xfce-Session-Manager.UnregisterClient">UnregisterClient()</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 xfsm_dbus_manager_complete_unregister_client() 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-unregister-client",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, handle_unregister_client),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 2,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
+
+ /* GObject signals for received D-Bus signals: */
+ /**
+ * XfsmDbusManager::state-changed:
+ * @object: A #XfsmDbusManager.
+ * @arg_old_state: Argument.
+ * @arg_new_state: Argument.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-xfce-Session-Manager.StateChanged">"StateChanged"</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 ("state-changed",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, state_changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 2, G_TYPE_UINT, G_TYPE_UINT);
+
+ /**
+ * XfsmDbusManager::client-registered:
+ * @object: A #XfsmDbusManager.
+ * @arg_client: Argument.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-xfce-Session-Manager.ClientRegistered">"ClientRegistered"</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 ("client-registered",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, client_registered),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 1, G_TYPE_STRING);
+
+ /**
+ * XfsmDbusManager::shutdown-cancelled:
+ * @object: A #XfsmDbusManager.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-xfce-Session-Manager.ShutdownCancelled">"ShutdownCancelled"</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 ("shutdown-cancelled",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (XfsmDbusManagerIface, shutdown_cancelled),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 0);
+
+}
+
+/**
+ * xfsm_dbus_manager_emit_state_changed:
+ * @object: A #XfsmDbusManager.
+ * @arg_old_state: Argument to pass with the signal.
+ * @arg_new_state: Argument to pass with the signal.
+ *
+ * Emits the <link linkend="gdbus-signal-org-xfce-Session-Manager.StateChanged">"StateChanged"</link> D-Bus signal.
+ */
+void
+xfsm_dbus_manager_emit_state_changed (
+ XfsmDbusManager *object,
+ guint arg_old_state,
+ guint arg_new_state)
+{
+ g_signal_emit_by_name (object, "state-changed", arg_old_state, arg_new_state);
+}
+
+/**
+ * xfsm_dbus_manager_emit_client_registered:
+ * @object: A #XfsmDbusManager.
+ * @arg_client: Argument to pass with the signal.
+ *
+ * Emits the <link linkend="gdbus-signal-org-xfce-Session-Manager.ClientRegistered">"ClientRegistered"</link> D-Bus signal.
+ */
+void
+xfsm_dbus_manager_emit_client_registered (
+ XfsmDbusManager *object,
+ const gchar *arg_client)
+{
+ g_signal_emit_by_name (object, "client-registered", arg_client);
+}
+
+/**
+ * xfsm_dbus_manager_emit_shutdown_cancelled:
+ * @object: A #XfsmDbusManager.
+ *
+ * Emits the <link linkend="gdbus-signal-org-xfce-Session-Manager.ShutdownCancelled">"ShutdownCancelled"</link> D-Bus signal.
+ */
+void
+xfsm_dbus_manager_emit_shutdown_cancelled (
+ XfsmDbusManager *object)
+{
+ g_signal_emit_by_name (object, "shutdown-cancelled");
+}
+
+/**
+ * xfsm_dbus_manager_call_get_info:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.GetInfo">GetInfo()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_get_info_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_get_info_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_get_info (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "GetInfo",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_get_info_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_name: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @out_version: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @out_vendor: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_get_info().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_get_info().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_get_info_finish (
+ XfsmDbusManager *proxy,
+ gchar **out_name,
+ gchar **out_version,
+ gchar **out_vendor,
+ 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,
+ "(sss)",
+ out_name,
+ out_version,
+ out_vendor);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_get_info_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_name: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @out_version: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @out_vendor: (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-xfce-Session-Manager.GetInfo">GetInfo()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_get_info() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_get_info_sync (
+ XfsmDbusManager *proxy,
+ gchar **out_name,
+ gchar **out_version,
+ gchar **out_vendor,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "GetInfo",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(sss)",
+ out_name,
+ out_version,
+ out_vendor);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_list_clients:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.ListClients">ListClients()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_list_clients_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_list_clients_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_list_clients (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "ListClients",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_list_clients_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_clients: (out) (optional) (array zero-terminated=1): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_list_clients().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_list_clients().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_list_clients_finish (
+ XfsmDbusManager *proxy,
+ gchar ***out_clients,
+ 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,
+ "(^ao)",
+ out_clients);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_list_clients_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_clients: (out) (optional) (array zero-terminated=1): 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-xfce-Session-Manager.ListClients">ListClients()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_list_clients() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_list_clients_sync (
+ XfsmDbusManager *proxy,
+ gchar ***out_clients,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "ListClients",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(^ao)",
+ out_clients);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_get_state:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.GetState">GetState()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_get_state_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_get_state_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_get_state (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "GetState",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_get_state_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_state: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_get_state().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_get_state().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_get_state_finish (
+ XfsmDbusManager *proxy,
+ guint *out_state,
+ 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,
+ "(u)",
+ out_state);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_get_state_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_state: (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-xfce-Session-Manager.GetState">GetState()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_get_state() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_get_state_sync (
+ XfsmDbusManager *proxy,
+ guint *out_state,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "GetState",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(u)",
+ out_state);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_checkpoint:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_session_name: 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-xfce-Session-Manager.Checkpoint">Checkpoint()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_checkpoint_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_checkpoint_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_checkpoint (
+ XfsmDbusManager *proxy,
+ const gchar *arg_session_name,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Checkpoint",
+ g_variant_new ("(s)",
+ arg_session_name),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_checkpoint_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_checkpoint().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_checkpoint().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_checkpoint_finish (
+ XfsmDbusManager *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;
+}
+
+/**
+ * xfsm_dbus_manager_call_checkpoint_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_session_name: Argument to pass with the method invocation.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Manager.Checkpoint">Checkpoint()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_checkpoint() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_checkpoint_sync (
+ XfsmDbusManager *proxy,
+ const gchar *arg_session_name,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Checkpoint",
+ g_variant_new ("(s)",
+ arg_session_name),
+ 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;
+}
+
+/**
+ * xfsm_dbus_manager_call_logout:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_show_dialog: Argument to pass with the method invocation.
+ * @arg_allow_save: 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-xfce-Session-Manager.Logout">Logout()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_logout_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_logout_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_logout (
+ XfsmDbusManager *proxy,
+ gboolean arg_show_dialog,
+ gboolean arg_allow_save,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Logout",
+ g_variant_new ("(bb)",
+ arg_show_dialog,
+ arg_allow_save),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_logout_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_logout().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_logout().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_logout_finish (
+ XfsmDbusManager *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;
+}
+
+/**
+ * xfsm_dbus_manager_call_logout_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_show_dialog: Argument to pass with the method invocation.
+ * @arg_allow_save: Argument to pass with the method invocation.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Manager.Logout">Logout()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_logout() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_logout_sync (
+ XfsmDbusManager *proxy,
+ gboolean arg_show_dialog,
+ gboolean arg_allow_save,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Logout",
+ g_variant_new ("(bb)",
+ arg_show_dialog,
+ arg_allow_save),
+ 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;
+}
+
+/**
+ * xfsm_dbus_manager_call_shutdown:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_allow_save: 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-xfce-Session-Manager.Shutdown">Shutdown()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_shutdown_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_shutdown_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_shutdown (
+ XfsmDbusManager *proxy,
+ gboolean arg_allow_save,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Shutdown",
+ g_variant_new ("(b)",
+ arg_allow_save),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_shutdown_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_shutdown().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_shutdown().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_shutdown_finish (
+ XfsmDbusManager *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;
+}
+
+/**
+ * xfsm_dbus_manager_call_shutdown_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_allow_save: Argument to pass with the method invocation.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Manager.Shutdown">Shutdown()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_shutdown() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_shutdown_sync (
+ XfsmDbusManager *proxy,
+ gboolean arg_allow_save,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Shutdown",
+ g_variant_new ("(b)",
+ arg_allow_save),
+ 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;
+}
+
+/**
+ * xfsm_dbus_manager_call_can_shutdown:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.CanShutdown">CanShutdown()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_can_shutdown_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_can_shutdown_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_can_shutdown (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "CanShutdown",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_can_shutdown_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_can_shutdown: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_can_shutdown().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_can_shutdown().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_can_shutdown_finish (
+ XfsmDbusManager *proxy,
+ gboolean *out_can_shutdown,
+ 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,
+ "(b)",
+ out_can_shutdown);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_can_shutdown_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_can_shutdown: (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-xfce-Session-Manager.CanShutdown">CanShutdown()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_can_shutdown() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_can_shutdown_sync (
+ XfsmDbusManager *proxy,
+ gboolean *out_can_shutdown,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "CanShutdown",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(b)",
+ out_can_shutdown);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_restart:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_allow_save: 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-xfce-Session-Manager.Restart">Restart()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_restart_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_restart_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_restart (
+ XfsmDbusManager *proxy,
+ gboolean arg_allow_save,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Restart",
+ g_variant_new ("(b)",
+ arg_allow_save),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_restart_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_restart().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_restart().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_restart_finish (
+ XfsmDbusManager *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;
+}
+
+/**
+ * xfsm_dbus_manager_call_restart_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_allow_save: Argument to pass with the method invocation.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Manager.Restart">Restart()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_restart() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_restart_sync (
+ XfsmDbusManager *proxy,
+ gboolean arg_allow_save,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Restart",
+ g_variant_new ("(b)",
+ arg_allow_save),
+ 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;
+}
+
+/**
+ * xfsm_dbus_manager_call_can_restart:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.CanRestart">CanRestart()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_can_restart_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_can_restart_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_can_restart (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "CanRestart",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_can_restart_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_can_restart: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_can_restart().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_can_restart().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_can_restart_finish (
+ XfsmDbusManager *proxy,
+ gboolean *out_can_restart,
+ 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,
+ "(b)",
+ out_can_restart);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_can_restart_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_can_restart: (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-xfce-Session-Manager.CanRestart">CanRestart()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_can_restart() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_can_restart_sync (
+ XfsmDbusManager *proxy,
+ gboolean *out_can_restart,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "CanRestart",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(b)",
+ out_can_restart);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_suspend:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.Suspend">Suspend()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_suspend_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_suspend_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_suspend (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Suspend",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_suspend_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_suspend().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_suspend().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_suspend_finish (
+ XfsmDbusManager *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;
+}
+
+/**
+ * xfsm_dbus_manager_call_suspend_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Manager.Suspend">Suspend()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_suspend() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_suspend_sync (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Suspend",
+ 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;
+}
+
+/**
+ * xfsm_dbus_manager_call_can_suspend:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.CanSuspend">CanSuspend()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_can_suspend_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_can_suspend_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_can_suspend (
+ XfsmDbusManager *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);
+}
+
+/**
+ * xfsm_dbus_manager_call_can_suspend_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_can_suspend: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_can_suspend().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_can_suspend().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_can_suspend_finish (
+ XfsmDbusManager *proxy,
+ gboolean *out_can_suspend,
+ 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,
+ "(b)",
+ out_can_suspend);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_can_suspend_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_can_suspend: (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-xfce-Session-Manager.CanSuspend">CanSuspend()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_can_suspend() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_can_suspend_sync (
+ XfsmDbusManager *proxy,
+ gboolean *out_can_suspend,
+ 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,
+ "(b)",
+ out_can_suspend);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_hibernate:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.Hibernate">Hibernate()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_hibernate_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_hibernate_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_hibernate (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Hibernate",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_hibernate_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_hibernate().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_hibernate().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_hibernate_finish (
+ XfsmDbusManager *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;
+}
+
+/**
+ * xfsm_dbus_manager_call_hibernate_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Manager.Hibernate">Hibernate()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_hibernate() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_hibernate_sync (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Hibernate",
+ 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;
+}
+
+/**
+ * xfsm_dbus_manager_call_can_hibernate:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.CanHibernate">CanHibernate()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_can_hibernate_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_can_hibernate_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_can_hibernate (
+ XfsmDbusManager *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);
+}
+
+/**
+ * xfsm_dbus_manager_call_can_hibernate_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_can_hibernate: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_can_hibernate().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_can_hibernate().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_can_hibernate_finish (
+ XfsmDbusManager *proxy,
+ gboolean *out_can_hibernate,
+ 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,
+ "(b)",
+ out_can_hibernate);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_can_hibernate_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_can_hibernate: (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-xfce-Session-Manager.CanHibernate">CanHibernate()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_can_hibernate() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_can_hibernate_sync (
+ XfsmDbusManager *proxy,
+ gboolean *out_can_hibernate,
+ 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,
+ "(b)",
+ out_can_hibernate);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_hybrid_sleep:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.HybridSleep">HybridSleep()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_hybrid_sleep_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_hybrid_sleep_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_hybrid_sleep (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "HybridSleep",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_hybrid_sleep_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_hybrid_sleep().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_hybrid_sleep().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_hybrid_sleep_finish (
+ XfsmDbusManager *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;
+}
+
+/**
+ * xfsm_dbus_manager_call_hybrid_sleep_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Manager.HybridSleep">HybridSleep()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_hybrid_sleep() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_hybrid_sleep_sync (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "HybridSleep",
+ 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;
+}
+
+/**
+ * xfsm_dbus_manager_call_can_hybrid_sleep:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.CanHybridSleep">CanHybridSleep()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_can_hybrid_sleep_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_can_hybrid_sleep_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_can_hybrid_sleep (
+ XfsmDbusManager *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);
+}
+
+/**
+ * xfsm_dbus_manager_call_can_hybrid_sleep_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_can_hybrid_sleep: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_can_hybrid_sleep().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_can_hybrid_sleep().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_can_hybrid_sleep_finish (
+ XfsmDbusManager *proxy,
+ gboolean *out_can_hybrid_sleep,
+ 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,
+ "(b)",
+ out_can_hybrid_sleep);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_can_hybrid_sleep_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_can_hybrid_sleep: (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-xfce-Session-Manager.CanHybridSleep">CanHybridSleep()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_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
+xfsm_dbus_manager_call_can_hybrid_sleep_sync (
+ XfsmDbusManager *proxy,
+ gboolean *out_can_hybrid_sleep,
+ 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,
+ "(b)",
+ out_can_hybrid_sleep);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_switch_user:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @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-xfce-Session-Manager.SwitchUser">SwitchUser()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_switch_user_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_switch_user_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_switch_user (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "SwitchUser",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_switch_user_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_switch_user().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_switch_user().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_switch_user_finish (
+ XfsmDbusManager *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;
+}
+
+/**
+ * xfsm_dbus_manager_call_switch_user_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Manager.SwitchUser">SwitchUser()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_switch_user() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_switch_user_sync (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "SwitchUser",
+ 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;
+}
+
+/**
+ * xfsm_dbus_manager_call_register_client:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_app_id: Argument to pass with the method invocation.
+ * @arg_client_startup_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-xfce-Session-Manager.RegisterClient">RegisterClient()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_register_client_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_register_client_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_register_client (
+ XfsmDbusManager *proxy,
+ const gchar *arg_app_id,
+ const gchar *arg_client_startup_id,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "RegisterClient",
+ g_variant_new ("(ss)",
+ arg_app_id,
+ arg_client_startup_id),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_register_client_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @out_client_id: (out) (optional): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_register_client().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_register_client().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_register_client_finish (
+ XfsmDbusManager *proxy,
+ gchar **out_client_id,
+ 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_client_id);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_register_client_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_app_id: Argument to pass with the method invocation.
+ * @arg_client_startup_id: Argument to pass with the method invocation.
+ * @out_client_id: (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-xfce-Session-Manager.RegisterClient">RegisterClient()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_register_client() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_register_client_sync (
+ XfsmDbusManager *proxy,
+ const gchar *arg_app_id,
+ const gchar *arg_client_startup_id,
+ gchar **out_client_id,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "RegisterClient",
+ g_variant_new ("(ss)",
+ arg_app_id,
+ arg_client_startup_id),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(o)",
+ out_client_id);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * xfsm_dbus_manager_call_unregister_client:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_client_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-xfce-Session-Manager.UnregisterClient">UnregisterClient()</link> D-Bus method on @proxy.
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_call_unregister_client_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_call_unregister_client_sync() for the synchronous, blocking version of this method.
+ */
+void
+xfsm_dbus_manager_call_unregister_client (
+ XfsmDbusManager *proxy,
+ const gchar *arg_client_id,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "UnregisterClient",
+ g_variant_new ("(o)",
+ arg_client_id),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * xfsm_dbus_manager_call_unregister_client_finish:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_call_unregister_client().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with xfsm_dbus_manager_call_unregister_client().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_unregister_client_finish (
+ XfsmDbusManager *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;
+}
+
+/**
+ * xfsm_dbus_manager_call_unregister_client_sync:
+ * @proxy: A #XfsmDbusManagerProxy.
+ * @arg_client_id: Argument to pass with the method invocation.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link linkend="gdbus-method-org-xfce-Session-Manager.UnregisterClient">UnregisterClient()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_call_unregister_client() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+xfsm_dbus_manager_call_unregister_client_sync (
+ XfsmDbusManager *proxy,
+ const gchar *arg_client_id,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "UnregisterClient",
+ g_variant_new ("(o)",
+ arg_client_id),
+ 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;
+}
+
+/**
+ * xfsm_dbus_manager_complete_get_info:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @name: Parameter to return.
+ * @version: Parameter to return.
+ * @vendor: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.GetInfo">GetInfo()</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
+xfsm_dbus_manager_complete_get_info (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *name,
+ const gchar *version,
+ const gchar *vendor)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(sss)",
+ name,
+ version,
+ vendor));
+}
+
+/**
+ * xfsm_dbus_manager_complete_list_clients:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @clients: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.ListClients">ListClients()</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
+xfsm_dbus_manager_complete_list_clients (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *const *clients)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(^ao)",
+ clients));
+}
+
+/**
+ * xfsm_dbus_manager_complete_get_state:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @state: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.GetState">GetState()</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
+xfsm_dbus_manager_complete_get_state (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ guint state)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(u)",
+ state));
+}
+
+/**
+ * xfsm_dbus_manager_complete_checkpoint:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.Checkpoint">Checkpoint()</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
+xfsm_dbus_manager_complete_checkpoint (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_manager_complete_logout:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.Logout">Logout()</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
+xfsm_dbus_manager_complete_logout (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_manager_complete_shutdown:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.Shutdown">Shutdown()</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
+xfsm_dbus_manager_complete_shutdown (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_manager_complete_can_shutdown:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @can_shutdown: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.CanShutdown">CanShutdown()</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
+xfsm_dbus_manager_complete_can_shutdown (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean can_shutdown)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(b)",
+ can_shutdown));
+}
+
+/**
+ * xfsm_dbus_manager_complete_restart:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.Restart">Restart()</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
+xfsm_dbus_manager_complete_restart (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_manager_complete_can_restart:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @can_restart: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.CanRestart">CanRestart()</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
+xfsm_dbus_manager_complete_can_restart (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean can_restart)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(b)",
+ can_restart));
+}
+
+/**
+ * xfsm_dbus_manager_complete_suspend:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.Suspend">Suspend()</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
+xfsm_dbus_manager_complete_suspend (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_manager_complete_can_suspend:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @can_suspend: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.CanSuspend">CanSuspend()</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
+xfsm_dbus_manager_complete_can_suspend (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean can_suspend)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(b)",
+ can_suspend));
+}
+
+/**
+ * xfsm_dbus_manager_complete_hibernate:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.Hibernate">Hibernate()</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
+xfsm_dbus_manager_complete_hibernate (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_manager_complete_can_hibernate:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @can_hibernate: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.CanHibernate">CanHibernate()</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
+xfsm_dbus_manager_complete_can_hibernate (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean can_hibernate)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(b)",
+ can_hibernate));
+}
+
+/**
+ * xfsm_dbus_manager_complete_hybrid_sleep:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.HybridSleep">HybridSleep()</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
+xfsm_dbus_manager_complete_hybrid_sleep (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_manager_complete_can_hybrid_sleep:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @can_hybrid_sleep: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.CanHybridSleep">CanHybridSleep()</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
+xfsm_dbus_manager_complete_can_hybrid_sleep (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean can_hybrid_sleep)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(b)",
+ can_hybrid_sleep));
+}
+
+/**
+ * xfsm_dbus_manager_complete_switch_user:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.SwitchUser">SwitchUser()</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
+xfsm_dbus_manager_complete_switch_user (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * xfsm_dbus_manager_complete_register_client:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @client_id: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.RegisterClient">RegisterClient()</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
+xfsm_dbus_manager_complete_register_client (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *client_id)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(o)",
+ client_id));
+}
+
+/**
+ * xfsm_dbus_manager_complete_unregister_client:
+ * @object: A #XfsmDbusManager.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-xfce-Session-Manager.UnregisterClient">UnregisterClient()</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
+xfsm_dbus_manager_complete_unregister_client (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * XfsmDbusManagerProxy:
+ *
+ * The #XfsmDbusManagerProxy structure contains only private data and should only be accessed using the provided API.
+ */
+
+/**
+ * XfsmDbusManagerProxyClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #XfsmDbusManagerProxy.
+ */
+
+struct _XfsmDbusManagerProxyPrivate
+{
+ GData *qdata;
+};
+
+static void xfsm_dbus_manager_proxy_iface_init (XfsmDbusManagerIface *iface);
+
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (XfsmDbusManagerProxy, xfsm_dbus_manager_proxy, G_TYPE_DBUS_PROXY,
+ G_ADD_PRIVATE (XfsmDbusManagerProxy)
+ G_IMPLEMENT_INTERFACE (XFSM_DBUS_TYPE_MANAGER, xfsm_dbus_manager_proxy_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (XfsmDbusManagerProxy, xfsm_dbus_manager_proxy, G_TYPE_DBUS_PROXY,
+ G_IMPLEMENT_INTERFACE (XFSM_DBUS_TYPE_MANAGER, xfsm_dbus_manager_proxy_iface_init))
+
+#endif
+static void
+xfsm_dbus_manager_proxy_finalize (GObject *object)
+{
+ XfsmDbusManagerProxy *proxy = XFSM_DBUS_MANAGER_PROXY (object);
+ g_datalist_clear (&proxy->priv->qdata);
+ G_OBJECT_CLASS (xfsm_dbus_manager_proxy_parent_class)->finalize (object);
+}
+
+static void
+xfsm_dbus_manager_proxy_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+}
+
+static void
+xfsm_dbus_manager_proxy_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+}
+
+static void
+xfsm_dbus_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;
+ gsize num_params;
+ gsize n;
+ guint signal_id;
+ info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_xfsm_dbus_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 (&paramv[0], XFSM_DBUS_TYPE_MANAGER);
+ g_value_set_object (&paramv[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 (&paramv[n], G_TYPE_VARIANT);
+ g_value_set_variant (&paramv[n], child);
+ n++;
+ }
+ else
+ g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
+ g_variant_unref (child);
+ }
+ signal_id = g_signal_lookup (info->signal_name, XFSM_DBUS_TYPE_MANAGER);
+ g_signal_emitv (paramv, signal_id, 0, NULL);
+ for (n = 0; n < num_params + 1; n++)
+ g_value_unset (&paramv[n]);
+ g_free (paramv);
+}
+
+static void
+xfsm_dbus_manager_proxy_g_properties_changed (GDBusProxy *_proxy,
+ GVariant *changed_properties,
+ const gchar *const *invalidated_properties)
+{
+ XfsmDbusManagerProxy *proxy = XFSM_DBUS_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 *) &_xfsm_dbus_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 *) &_xfsm_dbus_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 void
+xfsm_dbus_manager_proxy_init (XfsmDbusManagerProxy *proxy)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ proxy->priv = xfsm_dbus_manager_proxy_get_instance_private (proxy);
+#else
+ proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, XFSM_DBUS_TYPE_MANAGER_PROXY, XfsmDbusManagerProxyPrivate);
+#endif
+
+ g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), xfsm_dbus_manager_interface_info ());
+}
+
+static void
+xfsm_dbus_manager_proxy_class_init (XfsmDbusManagerProxyClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusProxyClass *proxy_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = xfsm_dbus_manager_proxy_finalize;
+ gobject_class->get_property = xfsm_dbus_manager_proxy_get_property;
+ gobject_class->set_property = xfsm_dbus_manager_proxy_set_property;
+
+ proxy_class = G_DBUS_PROXY_CLASS (klass);
+ proxy_class->g_signal = xfsm_dbus_manager_proxy_g_signal;
+ proxy_class->g_properties_changed = xfsm_dbus_manager_proxy_g_properties_changed;
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (XfsmDbusManagerProxyPrivate));
+#endif
+}
+
+static void
+xfsm_dbus_manager_proxy_iface_init (XfsmDbusManagerIface *iface)
+{
+}
+
+/**
+ * xfsm_dbus_manager_proxy_new:
+ * @connection: A #GDBusConnection.
+ * @flags: Flags from the #GDBusProxyFlags enumeration.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @object_path: An object path.
+ * @cancellable: (nullable): 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 <link linkend="gdbus-interface-org-xfce-Session-Manager.top_of_page">org.xfce.Session.Manager</link>. See g_dbus_proxy_new() for more details.
+ *
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_proxy_new_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_proxy_new_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+xfsm_dbus_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 (XFSM_DBUS_TYPE_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.xfce.Session.Manager", NULL);
+}
+
+/**
+ * xfsm_dbus_manager_proxy_new_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_proxy_new().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with xfsm_dbus_manager_proxy_new().
+ *
+ * Returns: (transfer full) (type XfsmDbusManagerProxy): The constructed proxy object or %NULL if @error is set.
+ */
+XfsmDbusManager *
+xfsm_dbus_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 XFSM_DBUS_MANAGER (ret);
+ else
+ return NULL;
+}
+
+/**
+ * xfsm_dbus_manager_proxy_new_sync:
+ * @connection: A #GDBusConnection.
+ * @flags: Flags from the #GDBusProxyFlags enumeration.
+ * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+ * @object_path: An object path.
+ * @cancellable: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL
+ *
+ * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-xfce-Session-Manager.top_of_page">org.xfce.Session.Manager</link>. See g_dbus_proxy_new_sync() for more details.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_proxy_new() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type XfsmDbusManagerProxy): The constructed proxy object or %NULL if @error is set.
+ */
+XfsmDbusManager *
+xfsm_dbus_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 (XFSM_DBUS_TYPE_MANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.xfce.Session.Manager", NULL);
+ if (ret != NULL)
+ return XFSM_DBUS_MANAGER (ret);
+ else
+ return NULL;
+}
+
+
+/**
+ * xfsm_dbus_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: (nullable): A #GCancellable or %NULL.
+ * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
+ * @user_data: User data to pass to @callback.
+ *
+ * Like xfsm_dbus_manager_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+ * You can then call xfsm_dbus_manager_proxy_new_for_bus_finish() to get the result of the operation.
+ *
+ * See xfsm_dbus_manager_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+xfsm_dbus_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 (XFSM_DBUS_TYPE_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.xfce.Session.Manager", NULL);
+}
+
+/**
+ * xfsm_dbus_manager_proxy_new_for_bus_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to xfsm_dbus_manager_proxy_new_for_bus().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with xfsm_dbus_manager_proxy_new_for_bus().
+ *
+ * Returns: (transfer full) (type XfsmDbusManagerProxy): The constructed proxy object or %NULL if @error is set.
+ */
+XfsmDbusManager *
+xfsm_dbus_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 XFSM_DBUS_MANAGER (ret);
+ else
+ return NULL;
+}
+
+/**
+ * xfsm_dbus_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: (nullable): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL
+ *
+ * Like xfsm_dbus_manager_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See xfsm_dbus_manager_proxy_new_for_bus() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type XfsmDbusManagerProxy): The constructed proxy object or %NULL if @error is set.
+ */
+XfsmDbusManager *
+xfsm_dbus_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 (XFSM_DBUS_TYPE_MANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.xfce.Session.Manager", NULL);
+ if (ret != NULL)
+ return XFSM_DBUS_MANAGER (ret);
+ else
+ return NULL;
+}
+
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * XfsmDbusManagerSkeleton:
+ *
+ * The #XfsmDbusManagerSkeleton structure contains only private data and should only be accessed using the provided API.
+ */
+
+/**
+ * XfsmDbusManagerSkeletonClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #XfsmDbusManagerSkeleton.
+ */
+
+struct _XfsmDbusManagerSkeletonPrivate
+{
+ GValue *properties;
+ GList *changed_properties;
+ GSource *changed_properties_idle_source;
+ GMainContext *context;
+ GMutex lock;
+};
+
+static void
+_xfsm_dbus_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)
+{
+ XfsmDbusManagerSkeleton *skeleton = XFSM_DBUS_MANAGER_SKELETON (user_data);
+ _ExtendedGDBusMethodInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ guint num_extra;
+ gsize 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 (&paramv[n], XFSM_DBUS_TYPE_MANAGER);
+ g_value_set_object (&paramv[n++], skeleton);
+ g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
+ g_value_set_object (&paramv[n++], invocation);
+ if (info->pass_fdlist)
+ {
+#ifdef G_OS_UNIX
+ g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
+ g_value_set_object (&paramv[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 (&paramv[n], G_TYPE_VARIANT);
+ g_value_set_variant (&paramv[n], child);
+ n++;
+ }
+ else
+ g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
+ g_variant_unref (child);
+ }
+ signal_id = g_signal_lookup (info->signal_name, XFSM_DBUS_TYPE_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 (&paramv[n]);
+ g_free (paramv);
+}
+
+static GVariant *
+_xfsm_dbus_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)
+{
+ XfsmDbusManagerSkeleton *skeleton = XFSM_DBUS_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 *) &_xfsm_dbus_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
+_xfsm_dbus_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)
+{
+ XfsmDbusManagerSkeleton *skeleton = XFSM_DBUS_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 *) &_xfsm_dbus_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 _xfsm_dbus_manager_skeleton_vtable =
+{
+ _xfsm_dbus_manager_skeleton_handle_method_call,
+ _xfsm_dbus_manager_skeleton_handle_get_property,
+ _xfsm_dbus_manager_skeleton_handle_set_property,
+ {NULL}
+};
+
+static GDBusInterfaceInfo *
+xfsm_dbus_manager_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return xfsm_dbus_manager_interface_info ();
+}
+
+static GDBusInterfaceVTable *
+xfsm_dbus_manager_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return (GDBusInterfaceVTable *) &_xfsm_dbus_manager_skeleton_vtable;
+}
+
+static GVariant *
+xfsm_dbus_manager_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
+{
+ XfsmDbusManagerSkeleton *skeleton = XFSM_DBUS_MANAGER_SKELETON (_skeleton);
+
+ GVariantBuilder builder;
+ guint n;
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ if (_xfsm_dbus_manager_interface_info.parent_struct.properties == NULL)
+ goto out;
+ for (n = 0; _xfsm_dbus_manager_interface_info.parent_struct.properties[n] != NULL; n++)
+ {
+ GDBusPropertyInfo *info = _xfsm_dbus_manager_interface_info.parent_struct.properties[n];
+ if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
+ {
+ GVariant *value;
+ value = _xfsm_dbus_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.xfce.Session.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 void
+xfsm_dbus_manager_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+{
+}
+
+static void
+_xfsm_dbus_manager_on_signal_state_changed (
+ XfsmDbusManager *object,
+ guint arg_old_state,
+ guint arg_new_state)
+{
+ XfsmDbusManagerSkeleton *skeleton = XFSM_DBUS_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 ("(uu)",
+ arg_old_state,
+ arg_new_state));
+ 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.xfce.Session.Manager", "StateChanged",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void
+_xfsm_dbus_manager_on_signal_client_registered (
+ XfsmDbusManager *object,
+ const gchar *arg_client)
+{
+ XfsmDbusManagerSkeleton *skeleton = XFSM_DBUS_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 ("(o)",
+ arg_client));
+ 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.xfce.Session.Manager", "ClientRegistered",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void
+_xfsm_dbus_manager_on_signal_shutdown_cancelled (
+ XfsmDbusManager *object)
+{
+ XfsmDbusManagerSkeleton *skeleton = XFSM_DBUS_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 ("()"));
+ 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.xfce.Session.Manager", "ShutdownCancelled",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void xfsm_dbus_manager_skeleton_iface_init (XfsmDbusManagerIface *iface);
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (XfsmDbusManagerSkeleton, xfsm_dbus_manager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_ADD_PRIVATE (XfsmDbusManagerSkeleton)
+ G_IMPLEMENT_INTERFACE (XFSM_DBUS_TYPE_MANAGER, xfsm_dbus_manager_skeleton_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (XfsmDbusManagerSkeleton, xfsm_dbus_manager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_IMPLEMENT_INTERFACE (XFSM_DBUS_TYPE_MANAGER, xfsm_dbus_manager_skeleton_iface_init))
+
+#endif
+static void
+xfsm_dbus_manager_skeleton_finalize (GObject *object)
+{
+ XfsmDbusManagerSkeleton *skeleton = XFSM_DBUS_MANAGER_SKELETON (object);
+ 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 (xfsm_dbus_manager_skeleton_parent_class)->finalize (object);
+}
+
+static void
+xfsm_dbus_manager_skeleton_init (XfsmDbusManagerSkeleton *skeleton)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ skeleton->priv = xfsm_dbus_manager_skeleton_get_instance_private (skeleton);
+#else
+ skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, XFSM_DBUS_TYPE_MANAGER_SKELETON, XfsmDbusManagerSkeletonPrivate);
+#endif
+
+ g_mutex_init (&skeleton->priv->lock);
+ skeleton->priv->context = g_main_context_ref_thread_default ();
+}
+
+static void
+xfsm_dbus_manager_skeleton_class_init (XfsmDbusManagerSkeletonClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusInterfaceSkeletonClass *skeleton_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = xfsm_dbus_manager_skeleton_finalize;
+
+ skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
+ skeleton_class->get_info = xfsm_dbus_manager_skeleton_dbus_interface_get_info;
+ skeleton_class->get_properties = xfsm_dbus_manager_skeleton_dbus_interface_get_properties;
+ skeleton_class->flush = xfsm_dbus_manager_skeleton_dbus_interface_flush;
+ skeleton_class->get_vtable = xfsm_dbus_manager_skeleton_dbus_interface_get_vtable;
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (XfsmDbusManagerSkeletonPrivate));
+#endif
+}
+
+static void
+xfsm_dbus_manager_skeleton_iface_init (XfsmDbusManagerIface *iface)
+{
+ iface->state_changed = _xfsm_dbus_manager_on_signal_state_changed;
+ iface->client_registered = _xfsm_dbus_manager_on_signal_client_registered;
+ iface->shutdown_cancelled = _xfsm_dbus_manager_on_signal_shutdown_cancelled;
+}
+
+/**
+ * xfsm_dbus_manager_skeleton_new:
+ *
+ * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-xfce-Session-Manager.top_of_page">org.xfce.Session.Manager</link>.
+ *
+ * Returns: (transfer full) (type XfsmDbusManagerSkeleton): The skeleton object.
+ */
+XfsmDbusManager *
+xfsm_dbus_manager_skeleton_new (void)
+{
+ return XFSM_DBUS_MANAGER (g_object_new (XFSM_DBUS_TYPE_MANAGER_SKELETON, NULL));
+}
+
diff --git a/xfce4-session/xfsm-manager-dbus.h b/xfce4-session/xfsm-manager-dbus.h
new file mode 100644
index 0000000..5af7269
--- /dev/null
+++ b/xfce4-session/xfsm-manager-dbus.h
@@ -0,0 +1,669 @@
+/*
+ * Generated by gdbus-codegen 2.62.4 from xfsm-manager-dbus.xml. DO NOT EDIT.
+ *
+ * The license of this code is the same as for the D-Bus interface description
+ * it was derived from.
+ */
+
+#ifndef __XFSM_MANAGER_DBUS_H__
+#define __XFSM_MANAGER_DBUS_H__
+
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+
+/* ------------------------------------------------------------------------ */
+/* Declarations for org.xfce.Session.Manager */
+
+#define XFSM_DBUS_TYPE_MANAGER (xfsm_dbus_manager_get_type ())
+#define XFSM_DBUS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), XFSM_DBUS_TYPE_MANAGER, XfsmDbusManager))
+#define XFSM_DBUS_IS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), XFSM_DBUS_TYPE_MANAGER))
+#define XFSM_DBUS_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), XFSM_DBUS_TYPE_MANAGER, XfsmDbusManagerIface))
+
+struct _XfsmDbusManager;
+typedef struct _XfsmDbusManager XfsmDbusManager;
+typedef struct _XfsmDbusManagerIface XfsmDbusManagerIface;
+
+struct _XfsmDbusManagerIface
+{
+ GTypeInterface parent_iface;
+
+
+ gboolean (*handle_can_hibernate) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_can_hybrid_sleep) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_can_restart) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_can_shutdown) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_can_suspend) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_checkpoint) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *arg_session_name);
+
+ gboolean (*handle_get_info) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_get_state) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_hibernate) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_hybrid_sleep) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_list_clients) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_logout) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean arg_show_dialog,
+ gboolean arg_allow_save);
+
+ gboolean (*handle_register_client) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *arg_app_id,
+ const gchar *arg_client_startup_id);
+
+ gboolean (*handle_restart) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean arg_allow_save);
+
+ gboolean (*handle_shutdown) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean arg_allow_save);
+
+ gboolean (*handle_suspend) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_switch_user) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_unregister_client) (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *arg_client_id);
+
+ void (*client_registered) (
+ XfsmDbusManager *object,
+ const gchar *arg_client);
+
+ void (*shutdown_cancelled) (
+ XfsmDbusManager *object);
+
+ void (*state_changed) (
+ XfsmDbusManager *object,
+ guint arg_old_state,
+ guint arg_new_state);
+
+};
+
+GType xfsm_dbus_manager_get_type (void) G_GNUC_CONST;
+
+GDBusInterfaceInfo *xfsm_dbus_manager_interface_info (void);
+guint xfsm_dbus_manager_override_properties (GObjectClass *klass, guint property_id_begin);
+
+
+/* D-Bus method call completion functions: */
+void xfsm_dbus_manager_complete_get_info (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *name,
+ const gchar *version,
+ const gchar *vendor);
+
+void xfsm_dbus_manager_complete_list_clients (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *const *clients);
+
+void xfsm_dbus_manager_complete_get_state (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ guint state);
+
+void xfsm_dbus_manager_complete_checkpoint (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_manager_complete_logout (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_manager_complete_shutdown (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_manager_complete_can_shutdown (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean can_shutdown);
+
+void xfsm_dbus_manager_complete_restart (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_manager_complete_can_restart (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean can_restart);
+
+void xfsm_dbus_manager_complete_suspend (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_manager_complete_can_suspend (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean can_suspend);
+
+void xfsm_dbus_manager_complete_hibernate (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_manager_complete_can_hibernate (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean can_hibernate);
+
+void xfsm_dbus_manager_complete_hybrid_sleep (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_manager_complete_can_hybrid_sleep (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ gboolean can_hybrid_sleep);
+
+void xfsm_dbus_manager_complete_switch_user (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+void xfsm_dbus_manager_complete_register_client (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *client_id);
+
+void xfsm_dbus_manager_complete_unregister_client (
+ XfsmDbusManager *object,
+ GDBusMethodInvocation *invocation);
+
+
+
+/* D-Bus signal emissions functions: */
+void xfsm_dbus_manager_emit_state_changed (
+ XfsmDbusManager *object,
+ guint arg_old_state,
+ guint arg_new_state);
+
+void xfsm_dbus_manager_emit_client_registered (
+ XfsmDbusManager *object,
+ const gchar *arg_client);
+
+void xfsm_dbus_manager_emit_shutdown_cancelled (
+ XfsmDbusManager *object);
+
+
+
+/* D-Bus method calls: */
+void xfsm_dbus_manager_call_get_info (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_manager_call_get_info_finish (
+ XfsmDbusManager *proxy,
+ gchar **out_name,
+ gchar **out_version,
+ gchar **out_vendor,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_manager_call_get_info_sync (
+ XfsmDbusManager *proxy,
+ gchar **out_name,
+ gchar **out_version,
+ gchar **out_vendor,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_manager_call_list_clients (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_manager_call_list_clients_finish (
+ XfsmDbusManager *proxy,
+ gchar ***out_clients,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_manager_call_list_clients_sync (
+ XfsmDbusManager *proxy,
+ gchar ***out_clients,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_manager_call_get_state (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_manager_call_get_state_finish (
+ XfsmDbusManager *proxy,
+ guint *out_state,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_manager_call_get_state_sync (
+ XfsmDbusManager *proxy,
+ guint *out_state,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_manager_call_checkpoint (
+ XfsmDbusManager *proxy,
+ const gchar *arg_session_name,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_manager_call_checkpoint_finish (
+ XfsmDbusManager *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_manager_call_checkpoint_sync (
+ XfsmDbusManager *proxy,
+ const gchar *arg_session_name,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_manager_call_logout (
+ XfsmDbusManager *proxy,
+ gboolean arg_show_dialog,
+ gboolean arg_allow_save,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_manager_call_logout_finish (
+ XfsmDbusManager *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_manager_call_logout_sync (
+ XfsmDbusManager *proxy,
+ gboolean arg_show_dialog,
+ gboolean arg_allow_save,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_manager_call_shutdown (
+ XfsmDbusManager *proxy,
+ gboolean arg_allow_save,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean xfsm_dbus_manager_call_shutdown_finish (
+ XfsmDbusManager *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean xfsm_dbus_manager_call_shutdown_sync (
+ XfsmDbusManager *proxy,
+ gboolean arg_allow_save,
+ GCancellable *cancellable,
+ GError **error);
+
+void xfsm_dbus_manager_call_can_shutdown (
+ XfsmDbusManager *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user