diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.in | 1188 | ||||
-rw-r--r-- | src/dbus-accounts.c | 2505 | ||||
-rw-r--r-- | src/dbus-accounts.h | 333 | ||||
-rw-r--r-- | src/dbus-consolekit-manager.c | 4139 | ||||
-rw-r--r-- | src/dbus-consolekit-manager.h | 615 | ||||
-rw-r--r-- | src/dbus-consolekit-seat.c | 2339 | ||||
-rw-r--r-- | src/dbus-consolekit-seat.h | 349 | ||||
-rw-r--r-- | src/dbus-consolekit-session.c | 5587 | ||||
-rw-r--r-- | src/dbus-consolekit-session.h | 737 | ||||
-rw-r--r-- | src/dbus-display-manager.c | 1986 | ||||
-rw-r--r-- | src/dbus-display-manager.h | 267 | ||||
-rw-r--r-- | src/dbus-upower.c | 3189 | ||||
-rw-r--r-- | src/dbus-upower.h | 381 | ||||
-rw-r--r-- | src/dbus-user.c | 5392 | ||||
-rw-r--r-- | src/dbus-user.h | 632 | ||||
-rw-r--r-- | src/gen-session-dbus.xml.c | 22 | ||||
-rw-r--r-- | src/gen-session-dbus.xml.h | 1 |
17 files changed, 29662 insertions, 0 deletions
diff --git a/src/Makefile.in b/src/Makefile.in new file mode 100644 index 0000000..73b2cdb --- /dev/null +++ b/src/Makefile.in @@ -0,0 +1,1188 @@ +# Makefile.in generated by automake 1.11.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +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@ +libexec_PROGRAMS = indicator-session-service$(EXEEXT) $(am__EXEEXT_1) +@BUILD_GTKLOGOUTHELPER_TRUE@am__append_1 = \ +@BUILD_GTKLOGOUTHELPER_TRUE@ gtk-logout-helper + +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/gtest.m4 \ + $(top_srcdir)/m4/gcov.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +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; }; \ + } +am__installdirs = "$(DESTDIR)$(sessionlibdir)" \ + "$(DESTDIR)$(libexecdir)" +LTLIBRARIES = $(sessionlib_LTLIBRARIES) +am__DEPENDENCIES_1 = +libsession_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am_libsession_la_OBJECTS = libsession_la-indicator-session.lo \ + libsession_la-user-widget.lo +libsession_la_OBJECTS = $(am_libsession_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +libsession_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libsession_la_CFLAGS) \ + $(CFLAGS) $(libsession_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_GTKLOGOUTHELPER_TRUE@am__EXEEXT_1 = gtk-logout-helper$(EXEEXT) +PROGRAMS = $(libexec_PROGRAMS) +am__gtk_logout_helper_SOURCES_DIST = dbus-consolekit-manager.c \ + dbus-consolekit-manager.h gtk-logout-helper.c dialog.c \ + dialog.h +am__objects_1 = gtk_logout_helper-dbus-consolekit-manager.$(OBJEXT) +@BUILD_GTKLOGOUTHELPER_TRUE@am_gtk_logout_helper_OBJECTS = \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(am__objects_1) \ +@BUILD_GTKLOGOUTHELPER_TRUE@ gtk_logout_helper-gtk-logout-helper.$(OBJEXT) \ +@BUILD_GTKLOGOUTHELPER_TRUE@ gtk_logout_helper-dialog.$(OBJEXT) +gtk_logout_helper_OBJECTS = $(am_gtk_logout_helper_OBJECTS) +@BUILD_GTKLOGOUTHELPER_TRUE@gtk_logout_helper_DEPENDENCIES = \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(am__DEPENDENCIES_1) \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(am__DEPENDENCIES_1) +gtk_logout_helper_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(gtk_logout_helper_CFLAGS) $(CFLAGS) \ + $(gtk_logout_helper_LDFLAGS) $(LDFLAGS) -o $@ +am__objects_2 = indicator_session_service-dbus-accounts.$(OBJEXT) +am__objects_3 = \ + indicator_session_service-dbus-consolekit-manager.$(OBJEXT) +am__objects_4 = \ + indicator_session_service-dbus-consolekit-seat.$(OBJEXT) +am__objects_5 = \ + indicator_session_service-dbus-consolekit-session.$(OBJEXT) +am__objects_6 = \ + indicator_session_service-dbus-display-manager.$(OBJEXT) +am__objects_7 = indicator_session_service-dbus-upower.$(OBJEXT) +am__objects_8 = indicator_session_service-dbus-user.$(OBJEXT) +am_indicator_session_service_OBJECTS = $(am__objects_2) \ + $(am__objects_3) $(am__objects_4) $(am__objects_5) \ + $(am__objects_6) $(am__objects_7) $(am__objects_8) \ + indicator_session_service-session-service.$(OBJEXT) \ + indicator_session_service-session-dbus.$(OBJEXT) \ + indicator_session_service-gen-session-dbus.xml.$(OBJEXT) \ + indicator_session_service-users-service-dbus.$(OBJEXT) \ + indicator_session_service-session-menu-mgr.$(OBJEXT) +indicator_session_service_OBJECTS = \ + $(am_indicator_session_service_OBJECTS) +indicator_session_service_DEPENDENCIES = $(am__DEPENDENCIES_1) +indicator_session_service_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(indicator_session_service_CFLAGS) $(CFLAGS) \ + $(indicator_session_service_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +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_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +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_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libsession_la_SOURCES) $(gtk_logout_helper_SOURCES) \ + $(indicator_session_service_SOURCES) +DIST_SOURCES = $(libsession_la_SOURCES) \ + $(am__gtk_logout_helper_SOURCES_DIST) \ + $(indicator_session_service_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPLET_CFLAGS = @APPLET_CFLAGS@ +APPLET_LIBS = @APPLET_LIBS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COVERAGE_CFLAGS = @COVERAGE_CFLAGS@ +COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DBUSSERVICEDIR = @DBUSSERVICEDIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EVEMU_CFLAGS = @EVEMU_CFLAGS@ +EVEMU_LIBS = @EVEMU_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCOVR = @GCOVR@ +GENHTML = @GENHTML@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNOMELOCALEDIR = @GNOMELOCALEDIR@ +GREP = @GREP@ +GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@ +GTEST_CPPFLAGS = @GTEST_CPPFLAGS@ +GTEST_SOURCE = @GTEST_SOURCE@ +GTKLOGOUTHELPER_CFLAGS = @GTKLOGOUTHELPER_CFLAGS@ +GTKLOGOUTHELPER_LIBS = @GTKLOGOUTHELPER_LIBS@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ +INDICATORDIR = @INDICATORDIR@ +INDICATORICONSDIR = @INDICATORICONSDIR@ +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@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +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@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +RANLIB = @RANLIB@ +SED = @SED@ +SESSIONERVICE_CFLAGS = @SESSIONERVICE_CFLAGS@ +SESSIONERVICE_LIBS = @SESSIONERVICE_LIBS@ +SESSIONSERVICE_CFLAGS = @SESSIONSERVICE_CFLAGS@ +SESSIONSERVICE_LIBS = @SESSIONSERVICE_LIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHTOOL = @SHTOOL@ +STRICT_CXXFLAGS = @STRICT_CXXFLAGS@ +STRIP = @STRIP@ +TEST_SERVICE_CFLAGS = @TEST_SERVICE_CFLAGS@ +TEST_SERVICE_LDFLAGS = @TEST_SERVICE_LDFLAGS@ +TEST_SERVICE_LIBS = @TEST_SERVICE_LIBS@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_CFLAGS = @X11_CFLAGS@ +X11_LIBS = @X11_LIBS@ +XGETTEXT = @XGETTEXT@ +XORG_GTEST_CPPFLAGS = @XORG_GTEST_CPPFLAGS@ +XORG_GTEST_SOURCE = @XORG_GTEST_SOURCE@ +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_CXX = @ac_ct_CXX@ +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@ +gsettingsschemadir = @gsettingsschemadir@ +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@ +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@ + +################### +# Indicator Stuff +################### +CLEANFILES = .libs/*.gcda .libs/*.gcno *.gcda *.gcno $(BUILT_SOURCES) +EXTRA_DIST = display-manager.xml org.freedesktop.Accounts.User.xml \ + org.freedesktop.Accounts.xml \ + org.freedesktop.ConsoleKit.Manager.xml \ + org.freedesktop.ConsoleKit.Seat.xml \ + org.freedesktop.ConsoleKit.Session.xml session-dbus.xml \ + upower.xml +sessionlibdir = $(INDICATORDIR) +sessionlib_LTLIBRARIES = libsession.la +libsession_la_SOURCES = \ + indicator-session.c \ + gen-session-dbus.xml.h \ + shared-names.h \ + user-widget.c \ + user-widget.h + +libsession_la_CFLAGS = \ + $(APPLET_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + -Wall -Wunused \ + -DG_LOG_DOMAIN=\"Indicator-Session\" + +libsession_la_LIBADD = $(APPLET_LIBS) +libsession_la_LDFLAGS = \ + $(COVERAGE_LDFLAGS) \ + -module -avoid-version + +dbus_display_manager_sources = \ + dbus-display-manager.c \ + dbus-display-manager.h + +dbus_consolekit_manager_sources = \ + dbus-consolekit-manager.c \ + dbus-consolekit-manager.h + +dbus_consolekit_seat_sources = \ + dbus-consolekit-seat.c \ + dbus-consolekit-seat.h + +dbus_consolekit_session_sources = \ + dbus-consolekit-session.c \ + dbus-consolekit-session.h + +dbus_accounts_sources = \ + dbus-accounts.c \ + dbus-accounts.h + +dbus_user_sources = \ + dbus-user.c \ + dbus-user.h + +dbus_upower_sources = \ + dbus-upower.c \ + dbus-upower.h + + +################# +# Session Stuff +################# +indicator_session_service_SOURCES = \ + $(dbus_accounts_sources) \ + $(dbus_consolekit_manager_sources) \ + $(dbus_consolekit_seat_sources) \ + $(dbus_consolekit_session_sources) \ + $(dbus_display_manager_sources) \ + $(dbus_upower_sources) \ + $(dbus_user_sources) \ + session-service.c \ + session-dbus.c \ + session-dbus.h \ + gen-session-dbus.xml.c \ + users-service-dbus.h \ + users-service-dbus.c \ + session-menu-mgr.h \ + session-menu-mgr.c + +indicator_session_service_CFLAGS = \ + $(SESSIONSERVICE_CFLAGS) \ + $(GCONF_CFLAGS) \ + -DLIBEXECDIR=\"$(libexecdir)\" \ + -Wall \ + -DG_LOG_DOMAIN=\"Indicator-Session\" \ + $(COVERAGE_CFLAGS) + +indicator_session_service_LDADD = \ + $(SESSIONSERVICE_LIBS) \ + $(GCONF_LIBS) + +indicator_session_service_LDFLAGS = \ + $(COVERAGE_LDFLAGS) + + +################# +# GTK Logout Stuff +################# +@BUILD_GTKLOGOUTHELPER_TRUE@gtk_logout_helper_SOURCES = \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(dbus_consolekit_manager_sources) \ +@BUILD_GTKLOGOUTHELPER_TRUE@ gtk-logout-helper.c \ +@BUILD_GTKLOGOUTHELPER_TRUE@ dialog.c \ +@BUILD_GTKLOGOUTHELPER_TRUE@ dialog.h + +@BUILD_GTKLOGOUTHELPER_TRUE@gtk_logout_helper_CFLAGS = \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(SESSIONSERVICE_CFLAGS) \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(GTKLOGOUTHELPER_CFLAGS) \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(GCONF_CFLAGS) \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(COVERAGE_CFLAGS) \ +@BUILD_GTKLOGOUTHELPER_TRUE@ -Wall \ +@BUILD_GTKLOGOUTHELPER_TRUE@ -DINDICATOR_ICONS_DIR="\"$(INDICATORICONSDIR)\"" + +@BUILD_GTKLOGOUTHELPER_TRUE@gtk_logout_helper_LDADD = \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(SESSIONSERVICE_LIBS) \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(GTKLOGOUTHELPER_LIBS) \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(GCONF_LIBS) + +@BUILD_GTKLOGOUTHELPER_TRUE@gtk_logout_helper_LDFLAGS = \ +@BUILD_GTKLOGOUTHELPER_TRUE@ $(COVERAGE_LDFLAGS) + + +############### +# Other Stuff +############### +BUILT_SOURCES = \ + $(dbus_accounts_sources) \ + $(dbus_consolekit_manager_sources) \ + $(dbus_consolekit_seat_sources) \ + $(dbus_consolekit_session_sources) \ + $(dbus_display_manager_sources) \ + $(dbus_upower_sources) \ + $(dbus_user_sources) \ + gen-session-dbus.xml.c \ + gen-session-dbus.xml.h + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .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) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: 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__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + 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-sessionlibLTLIBRARIES: $(sessionlib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(sessionlib_LTLIBRARIES)'; test -n "$(sessionlibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(sessionlibdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sessionlibdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(sessionlibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(sessionlibdir)"; \ + } + +uninstall-sessionlibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(sessionlib_LTLIBRARIES)'; test -n "$(sessionlibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(sessionlibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(sessionlibdir)/$$f"; \ + done + +clean-sessionlibLTLIBRARIES: + -test -z "$(sessionlib_LTLIBRARIES)" || rm -f $(sessionlib_LTLIBRARIES) + @list='$(sessionlib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libsession.la: $(libsession_la_OBJECTS) $(libsession_la_DEPENDENCIES) $(EXTRA_libsession_la_DEPENDENCIES) + $(AM_V_CCLD)$(libsession_la_LINK) -rpath $(sessionlibdir) $(libsession_la_OBJECTS) $(libsession_la_LIBADD) $(LIBS) +install-libexecPROGRAMS: $(libexec_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || 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)$(libexecdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-libexecPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || 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)$(libexecdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(libexecdir)" && rm -f $$files + +clean-libexecPROGRAMS: + @list='$(libexec_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 +gtk-logout-helper$(EXEEXT): $(gtk_logout_helper_OBJECTS) $(gtk_logout_helper_DEPENDENCIES) $(EXTRA_gtk_logout_helper_DEPENDENCIES) + @rm -f gtk-logout-helper$(EXEEXT) + $(AM_V_CCLD)$(gtk_logout_helper_LINK) $(gtk_logout_helper_OBJECTS) $(gtk_logout_helper_LDADD) $(LIBS) +indicator-session-service$(EXEEXT): $(indicator_session_service_OBJECTS) $(indicator_session_service_DEPENDENCIES) $(EXTRA_indicator_session_service_DEPENDENCIES) + @rm -f indicator-session-service$(EXEEXT) + $(AM_V_CCLD)$(indicator_session_service_LINK) $(indicator_session_service_OBJECTS) $(indicator_session_service_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_logout_helper-dbus-consolekit-manager.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_logout_helper-dialog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_logout_helper-gtk-logout-helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-dbus-accounts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-dbus-consolekit-manager.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-dbus-consolekit-seat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-dbus-consolekit-session.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-dbus-display-manager.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-dbus-upower.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-dbus-user.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-gen-session-dbus.xml.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-session-dbus.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-session-menu-mgr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-session-service.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-users-service-dbus.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsession_la-indicator-session.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsession_la-user-widget.Plo@am__quote@ + +.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 $< + +.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 `$(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 $@ $< + +libsession_la-indicator-session.lo: indicator-session.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsession_la_CFLAGS) $(CFLAGS) -MT libsession_la-indicator-session.lo -MD -MP -MF $(DEPDIR)/libsession_la-indicator-session.Tpo -c -o libsession_la-indicator-session.lo `test -f 'indicator-session.c' || echo '$(srcdir)/'`indicator-session.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsession_la-indicator-session.Tpo $(DEPDIR)/libsession_la-indicator-session.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='indicator-session.c' object='libsession_la-indicator-session.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsession_la_CFLAGS) $(CFLAGS) -c -o libsession_la-indicator-session.lo `test -f 'indicator-session.c' || echo '$(srcdir)/'`indicator-session.c + +libsession_la-user-widget.lo: user-widget.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsession_la_CFLAGS) $(CFLAGS) -MT libsession_la-user-widget.lo -MD -MP -MF $(DEPDIR)/libsession_la-user-widget.Tpo -c -o libsession_la-user-widget.lo `test -f 'user-widget.c' || echo '$(srcdir)/'`user-widget.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsession_la-user-widget.Tpo $(DEPDIR)/libsession_la-user-widget.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='user-widget.c' object='libsession_la-user-widget.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsession_la_CFLAGS) $(CFLAGS) -c -o libsession_la-user-widget.lo `test -f 'user-widget.c' || echo '$(srcdir)/'`user-widget.c + +gtk_logout_helper-dbus-consolekit-manager.o: dbus-consolekit-manager.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-dbus-consolekit-manager.o -MD -MP -MF $(DEPDIR)/gtk_logout_helper-dbus-consolekit-manager.Tpo -c -o gtk_logout_helper-dbus-consolekit-manager.o `test -f 'dbus-consolekit-manager.c' || echo '$(srcdir)/'`dbus-consolekit-manager.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-dbus-consolekit-manager.Tpo $(DEPDIR)/gtk_logout_helper-dbus-consolekit-manager.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-consolekit-manager.c' object='gtk_logout_helper-dbus-consolekit-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) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-dbus-consolekit-manager.o `test -f 'dbus-consolekit-manager.c' || echo '$(srcdir)/'`dbus-consolekit-manager.c + +gtk_logout_helper-dbus-consolekit-manager.obj: dbus-consolekit-manager.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-dbus-consolekit-manager.obj -MD -MP -MF $(DEPDIR)/gtk_logout_helper-dbus-consolekit-manager.Tpo -c -o gtk_logout_helper-dbus-consolekit-manager.obj `if test -f 'dbus-consolekit-manager.c'; then $(CYGPATH_W) 'dbus-consolekit-manager.c'; else $(CYGPATH_W) '$(srcdir)/dbus-consolekit-manager.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-dbus-consolekit-manager.Tpo $(DEPDIR)/gtk_logout_helper-dbus-consolekit-manager.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-consolekit-manager.c' object='gtk_logout_helper-dbus-consolekit-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) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-dbus-consolekit-manager.obj `if test -f 'dbus-consolekit-manager.c'; then $(CYGPATH_W) 'dbus-consolekit-manager.c'; else $(CYGPATH_W) '$(srcdir)/dbus-consolekit-manager.c'; fi` + +gtk_logout_helper-gtk-logout-helper.o: gtk-logout-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-gtk-logout-helper.o -MD -MP -MF $(DEPDIR)/gtk_logout_helper-gtk-logout-helper.Tpo -c -o gtk_logout_helper-gtk-logout-helper.o `test -f 'gtk-logout-helper.c' || echo '$(srcdir)/'`gtk-logout-helper.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-gtk-logout-helper.Tpo $(DEPDIR)/gtk_logout_helper-gtk-logout-helper.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk-logout-helper.c' object='gtk_logout_helper-gtk-logout-helper.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) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-gtk-logout-helper.o `test -f 'gtk-logout-helper.c' || echo '$(srcdir)/'`gtk-logout-helper.c + +gtk_logout_helper-gtk-logout-helper.obj: gtk-logout-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-gtk-logout-helper.obj -MD -MP -MF $(DEPDIR)/gtk_logout_helper-gtk-logout-helper.Tpo -c -o gtk_logout_helper-gtk-logout-helper.obj `if test -f 'gtk-logout-helper.c'; then $(CYGPATH_W) 'gtk-logout-helper.c'; else $(CYGPATH_W) '$(srcdir)/gtk-logout-helper.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-gtk-logout-helper.Tpo $(DEPDIR)/gtk_logout_helper-gtk-logout-helper.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk-logout-helper.c' object='gtk_logout_helper-gtk-logout-helper.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) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-gtk-logout-helper.obj `if test -f 'gtk-logout-helper.c'; then $(CYGPATH_W) 'gtk-logout-helper.c'; else $(CYGPATH_W) '$(srcdir)/gtk-logout-helper.c'; fi` + +gtk_logout_helper-dialog.o: dialog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-dialog.o -MD -MP -MF $(DEPDIR)/gtk_logout_helper-dialog.Tpo -c -o gtk_logout_helper-dialog.o `test -f 'dialog.c' || echo '$(srcdir)/'`dialog.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-dialog.Tpo $(DEPDIR)/gtk_logout_helper-dialog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dialog.c' object='gtk_logout_helper-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) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-dialog.o `test -f 'dialog.c' || echo '$(srcdir)/'`dialog.c + +gtk_logout_helper-dialog.obj: dialog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-dialog.obj -MD -MP -MF $(DEPDIR)/gtk_logout_helper-dialog.Tpo -c -o gtk_logout_helper-dialog.obj `if test -f 'dialog.c'; then $(CYGPATH_W) 'dialog.c'; else $(CYGPATH_W) '$(srcdir)/dialog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-dialog.Tpo $(DEPDIR)/gtk_logout_helper-dialog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dialog.c' object='gtk_logout_helper-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) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-dialog.obj `if test -f 'dialog.c'; then $(CYGPATH_W) 'dialog.c'; else $(CYGPATH_W) '$(srcdir)/dialog.c'; fi` + +indicator_session_service-dbus-accounts.o: dbus-accounts.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-accounts.o -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-accounts.Tpo -c -o indicator_session_service-dbus-accounts.o `test -f 'dbus-accounts.c' || echo '$(srcdir)/'`dbus-accounts.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-accounts.Tpo $(DEPDIR)/indicator_session_service-dbus-accounts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-accounts.c' object='indicator_session_service-dbus-accounts.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-accounts.o `test -f 'dbus-accounts.c' || echo '$(srcdir)/'`dbus-accounts.c + +indicator_session_service-dbus-accounts.obj: dbus-accounts.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-accounts.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-accounts.Tpo -c -o indicator_session_service-dbus-accounts.obj `if test -f 'dbus-accounts.c'; then $(CYGPATH_W) 'dbus-accounts.c'; else $(CYGPATH_W) '$(srcdir)/dbus-accounts.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-accounts.Tpo $(DEPDIR)/indicator_session_service-dbus-accounts.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-accounts.c' object='indicator_session_service-dbus-accounts.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-accounts.obj `if test -f 'dbus-accounts.c'; then $(CYGPATH_W) 'dbus-accounts.c'; else $(CYGPATH_W) '$(srcdir)/dbus-accounts.c'; fi` + +indicator_session_service-dbus-consolekit-manager.o: dbus-consolekit-manager.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-consolekit-manager.o -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-consolekit-manager.Tpo -c -o indicator_session_service-dbus-consolekit-manager.o `test -f 'dbus-consolekit-manager.c' || echo '$(srcdir)/'`dbus-consolekit-manager.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-consolekit-manager.Tpo $(DEPDIR)/indicator_session_service-dbus-consolekit-manager.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-consolekit-manager.c' object='indicator_session_service-dbus-consolekit-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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-consolekit-manager.o `test -f 'dbus-consolekit-manager.c' || echo '$(srcdir)/'`dbus-consolekit-manager.c + +indicator_session_service-dbus-consolekit-manager.obj: dbus-consolekit-manager.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-consolekit-manager.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-consolekit-manager.Tpo -c -o indicator_session_service-dbus-consolekit-manager.obj `if test -f 'dbus-consolekit-manager.c'; then $(CYGPATH_W) 'dbus-consolekit-manager.c'; else $(CYGPATH_W) '$(srcdir)/dbus-consolekit-manager.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-consolekit-manager.Tpo $(DEPDIR)/indicator_session_service-dbus-consolekit-manager.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-consolekit-manager.c' object='indicator_session_service-dbus-consolekit-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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-consolekit-manager.obj `if test -f 'dbus-consolekit-manager.c'; then $(CYGPATH_W) 'dbus-consolekit-manager.c'; else $(CYGPATH_W) '$(srcdir)/dbus-consolekit-manager.c'; fi` + +indicator_session_service-dbus-consolekit-seat.o: dbus-consolekit-seat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-consolekit-seat.o -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-consolekit-seat.Tpo -c -o indicator_session_service-dbus-consolekit-seat.o `test -f 'dbus-consolekit-seat.c' || echo '$(srcdir)/'`dbus-consolekit-seat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-consolekit-seat.Tpo $(DEPDIR)/indicator_session_service-dbus-consolekit-seat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-consolekit-seat.c' object='indicator_session_service-dbus-consolekit-seat.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-consolekit-seat.o `test -f 'dbus-consolekit-seat.c' || echo '$(srcdir)/'`dbus-consolekit-seat.c + +indicator_session_service-dbus-consolekit-seat.obj: dbus-consolekit-seat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-consolekit-seat.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-consolekit-seat.Tpo -c -o indicator_session_service-dbus-consolekit-seat.obj `if test -f 'dbus-consolekit-seat.c'; then $(CYGPATH_W) 'dbus-consolekit-seat.c'; else $(CYGPATH_W) '$(srcdir)/dbus-consolekit-seat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-consolekit-seat.Tpo $(DEPDIR)/indicator_session_service-dbus-consolekit-seat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-consolekit-seat.c' object='indicator_session_service-dbus-consolekit-seat.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-consolekit-seat.obj `if test -f 'dbus-consolekit-seat.c'; then $(CYGPATH_W) 'dbus-consolekit-seat.c'; else $(CYGPATH_W) '$(srcdir)/dbus-consolekit-seat.c'; fi` + +indicator_session_service-dbus-consolekit-session.o: dbus-consolekit-session.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-consolekit-session.o -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-consolekit-session.Tpo -c -o indicator_session_service-dbus-consolekit-session.o `test -f 'dbus-consolekit-session.c' || echo '$(srcdir)/'`dbus-consolekit-session.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-consolekit-session.Tpo $(DEPDIR)/indicator_session_service-dbus-consolekit-session.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-consolekit-session.c' object='indicator_session_service-dbus-consolekit-session.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-consolekit-session.o `test -f 'dbus-consolekit-session.c' || echo '$(srcdir)/'`dbus-consolekit-session.c + +indicator_session_service-dbus-consolekit-session.obj: dbus-consolekit-session.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-consolekit-session.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-consolekit-session.Tpo -c -o indicator_session_service-dbus-consolekit-session.obj `if test -f 'dbus-consolekit-session.c'; then $(CYGPATH_W) 'dbus-consolekit-session.c'; else $(CYGPATH_W) '$(srcdir)/dbus-consolekit-session.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-consolekit-session.Tpo $(DEPDIR)/indicator_session_service-dbus-consolekit-session.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-consolekit-session.c' object='indicator_session_service-dbus-consolekit-session.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-consolekit-session.obj `if test -f 'dbus-consolekit-session.c'; then $(CYGPATH_W) 'dbus-consolekit-session.c'; else $(CYGPATH_W) '$(srcdir)/dbus-consolekit-session.c'; fi` + +indicator_session_service-dbus-display-manager.o: dbus-display-manager.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-display-manager.o -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-display-manager.Tpo -c -o indicator_session_service-dbus-display-manager.o `test -f 'dbus-display-manager.c' || echo '$(srcdir)/'`dbus-display-manager.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-display-manager.Tpo $(DEPDIR)/indicator_session_service-dbus-display-manager.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-display-manager.c' object='indicator_session_service-dbus-display-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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-display-manager.o `test -f 'dbus-display-manager.c' || echo '$(srcdir)/'`dbus-display-manager.c + +indicator_session_service-dbus-display-manager.obj: dbus-display-manager.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-display-manager.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-display-manager.Tpo -c -o indicator_session_service-dbus-display-manager.obj `if test -f 'dbus-display-manager.c'; then $(CYGPATH_W) 'dbus-display-manager.c'; else $(CYGPATH_W) '$(srcdir)/dbus-display-manager.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-display-manager.Tpo $(DEPDIR)/indicator_session_service-dbus-display-manager.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-display-manager.c' object='indicator_session_service-dbus-display-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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-display-manager.obj `if test -f 'dbus-display-manager.c'; then $(CYGPATH_W) 'dbus-display-manager.c'; else $(CYGPATH_W) '$(srcdir)/dbus-display-manager.c'; fi` + +indicator_session_service-dbus-upower.o: dbus-upower.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-upower.o -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-upower.Tpo -c -o indicator_session_service-dbus-upower.o `test -f 'dbus-upower.c' || echo '$(srcdir)/'`dbus-upower.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-upower.Tpo $(DEPDIR)/indicator_session_service-dbus-upower.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-upower.c' object='indicator_session_service-dbus-upower.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-upower.o `test -f 'dbus-upower.c' || echo '$(srcdir)/'`dbus-upower.c + +indicator_session_service-dbus-upower.obj: dbus-upower.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-upower.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-upower.Tpo -c -o indicator_session_service-dbus-upower.obj `if test -f 'dbus-upower.c'; then $(CYGPATH_W) 'dbus-upower.c'; else $(CYGPATH_W) '$(srcdir)/dbus-upower.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-upower.Tpo $(DEPDIR)/indicator_session_service-dbus-upower.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-upower.c' object='indicator_session_service-dbus-upower.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-upower.obj `if test -f 'dbus-upower.c'; then $(CYGPATH_W) 'dbus-upower.c'; else $(CYGPATH_W) '$(srcdir)/dbus-upower.c'; fi` + +indicator_session_service-dbus-user.o: dbus-user.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-user.o -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-user.Tpo -c -o indicator_session_service-dbus-user.o `test -f 'dbus-user.c' || echo '$(srcdir)/'`dbus-user.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-user.Tpo $(DEPDIR)/indicator_session_service-dbus-user.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-user.c' object='indicator_session_service-dbus-user.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-user.o `test -f 'dbus-user.c' || echo '$(srcdir)/'`dbus-user.c + +indicator_session_service-dbus-user.obj: dbus-user.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-dbus-user.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-dbus-user.Tpo -c -o indicator_session_service-dbus-user.obj `if test -f 'dbus-user.c'; then $(CYGPATH_W) 'dbus-user.c'; else $(CYGPATH_W) '$(srcdir)/dbus-user.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-dbus-user.Tpo $(DEPDIR)/indicator_session_service-dbus-user.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dbus-user.c' object='indicator_session_service-dbus-user.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-dbus-user.obj `if test -f 'dbus-user.c'; then $(CYGPATH_W) 'dbus-user.c'; else $(CYGPATH_W) '$(srcdir)/dbus-user.c'; fi` + +indicator_session_service-session-service.o: session-service.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-session-service.o -MD -MP -MF $(DEPDIR)/indicator_session_service-session-service.Tpo -c -o indicator_session_service-session-service.o `test -f 'session-service.c' || echo '$(srcdir)/'`session-service.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-session-service.Tpo $(DEPDIR)/indicator_session_service-session-service.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='session-service.c' object='indicator_session_service-session-service.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-session-service.o `test -f 'session-service.c' || echo '$(srcdir)/'`session-service.c + +indicator_session_service-session-service.obj: session-service.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-session-service.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-session-service.Tpo -c -o indicator_session_service-session-service.obj `if test -f 'session-service.c'; then $(CYGPATH_W) 'session-service.c'; else $(CYGPATH_W) '$(srcdir)/session-service.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-session-service.Tpo $(DEPDIR)/indicator_session_service-session-service.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='session-service.c' object='indicator_session_service-session-service.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-session-service.obj `if test -f 'session-service.c'; then $(CYGPATH_W) 'session-service.c'; else $(CYGPATH_W) '$(srcdir)/session-service.c'; fi` + +indicator_session_service-session-dbus.o: session-dbus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-session-dbus.o -MD -MP -MF $(DEPDIR)/indicator_session_service-session-dbus.Tpo -c -o indicator_session_service-session-dbus.o `test -f 'session-dbus.c' || echo '$(srcdir)/'`session-dbus.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-session-dbus.Tpo $(DEPDIR)/indicator_session_service-session-dbus.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='session-dbus.c' object='indicator_session_service-session-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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-session-dbus.o `test -f 'session-dbus.c' || echo '$(srcdir)/'`session-dbus.c + +indicator_session_service-session-dbus.obj: session-dbus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-session-dbus.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-session-dbus.Tpo -c -o indicator_session_service-session-dbus.obj `if test -f 'session-dbus.c'; then $(CYGPATH_W) 'session-dbus.c'; else $(CYGPATH_W) '$(srcdir)/session-dbus.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-session-dbus.Tpo $(DEPDIR)/indicator_session_service-session-dbus.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='session-dbus.c' object='indicator_session_service-session-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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-session-dbus.obj `if test -f 'session-dbus.c'; then $(CYGPATH_W) 'session-dbus.c'; else $(CYGPATH_W) '$(srcdir)/session-dbus.c'; fi` + +indicator_session_service-gen-session-dbus.xml.o: gen-session-dbus.xml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-gen-session-dbus.xml.o -MD -MP -MF $(DEPDIR)/indicator_session_service-gen-session-dbus.xml.Tpo -c -o indicator_session_service-gen-session-dbus.xml.o `test -f 'gen-session-dbus.xml.c' || echo '$(srcdir)/'`gen-session-dbus.xml.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-gen-session-dbus.xml.Tpo $(DEPDIR)/indicator_session_service-gen-session-dbus.xml.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen-session-dbus.xml.c' object='indicator_session_service-gen-session-dbus.xml.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-gen-session-dbus.xml.o `test -f 'gen-session-dbus.xml.c' || echo '$(srcdir)/'`gen-session-dbus.xml.c + +indicator_session_service-gen-session-dbus.xml.obj: gen-session-dbus.xml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-gen-session-dbus.xml.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-gen-session-dbus.xml.Tpo -c -o indicator_session_service-gen-session-dbus.xml.obj `if test -f 'gen-session-dbus.xml.c'; then $(CYGPATH_W) 'gen-session-dbus.xml.c'; else $(CYGPATH_W) '$(srcdir)/gen-session-dbus.xml.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-gen-session-dbus.xml.Tpo $(DEPDIR)/indicator_session_service-gen-session-dbus.xml.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen-session-dbus.xml.c' object='indicator_session_service-gen-session-dbus.xml.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-gen-session-dbus.xml.obj `if test -f 'gen-session-dbus.xml.c'; then $(CYGPATH_W) 'gen-session-dbus.xml.c'; else $(CYGPATH_W) '$(srcdir)/gen-session-dbus.xml.c'; fi` + +indicator_session_service-users-service-dbus.o: users-service-dbus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-users-service-dbus.o -MD -MP -MF $(DEPDIR)/indicator_session_service-users-service-dbus.Tpo -c -o indicator_session_service-users-service-dbus.o `test -f 'users-service-dbus.c' || echo '$(srcdir)/'`users-service-dbus.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-users-service-dbus.Tpo $(DEPDIR)/indicator_session_service-users-service-dbus.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='users-service-dbus.c' object='indicator_session_service-users-service-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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-users-service-dbus.o `test -f 'users-service-dbus.c' || echo '$(srcdir)/'`users-service-dbus.c + +indicator_session_service-users-service-dbus.obj: users-service-dbus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-users-service-dbus.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-users-service-dbus.Tpo -c -o indicator_session_service-users-service-dbus.obj `if test -f 'users-service-dbus.c'; then $(CYGPATH_W) 'users-service-dbus.c'; else $(CYGPATH_W) '$(srcdir)/users-service-dbus.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-users-service-dbus.Tpo $(DEPDIR)/indicator_session_service-users-service-dbus.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='users-service-dbus.c' object='indicator_session_service-users-service-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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-users-service-dbus.obj `if test -f 'users-service-dbus.c'; then $(CYGPATH_W) 'users-service-dbus.c'; else $(CYGPATH_W) '$(srcdir)/users-service-dbus.c'; fi` + +indicator_session_service-session-menu-mgr.o: session-menu-mgr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-session-menu-mgr.o -MD -MP -MF $(DEPDIR)/indicator_session_service-session-menu-mgr.Tpo -c -o indicator_session_service-session-menu-mgr.o `test -f 'session-menu-mgr.c' || echo '$(srcdir)/'`session-menu-mgr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-session-menu-mgr.Tpo $(DEPDIR)/indicator_session_service-session-menu-mgr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='session-menu-mgr.c' object='indicator_session_service-session-menu-mgr.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-session-menu-mgr.o `test -f 'session-menu-mgr.c' || echo '$(srcdir)/'`session-menu-mgr.c + +indicator_session_service-session-menu-mgr.obj: session-menu-mgr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-session-menu-mgr.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-session-menu-mgr.Tpo -c -o indicator_session_service-session-menu-mgr.obj `if test -f 'session-menu-mgr.c'; then $(CYGPATH_W) 'session-menu-mgr.c'; else $(CYGPATH_W) '$(srcdir)/session-menu-mgr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-session-menu-mgr.Tpo $(DEPDIR)/indicator_session_service-session-menu-mgr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='session-menu-mgr.c' object='indicator_session_service-session-menu-mgr.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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-session-menu-mgr.obj `if test -f 'session-menu-mgr.c'; then $(CYGPATH_W) 'session-menu-mgr.c'; else $(CYGPATH_W) '$(srcdir)/session-menu-mgr.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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 +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(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 $(LTLIBRARIES) $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(sessionlibdir)" "$(DESTDIR)$(libexecdir)"; 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: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +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) + +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-generic clean-libexecPROGRAMS clean-libtool \ + clean-sessionlibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -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-sessionlibLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libexecPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -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-libexecPROGRAMS \ + uninstall-sessionlibLTLIBRARIES + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libexecPROGRAMS clean-libtool \ + clean-sessionlibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + 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-libexecPROGRAMS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-sessionlibLTLIBRARIES 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 uninstall uninstall-am uninstall-libexecPROGRAMS \ + uninstall-sessionlibLTLIBRARIES + + +$(dbus_display_manager_sources): display-manager.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-display-manager \ + $^ + +$(dbus_consolekit_manager_sources): org.freedesktop.ConsoleKit.Manager.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-consolekit-manager \ + $^ + +$(dbus_consolekit_seat_sources): org.freedesktop.ConsoleKit.Seat.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-consolekit-seat \ + $^ + +$(dbus_consolekit_session_sources): org.freedesktop.ConsoleKit.Session.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-consolekit-session \ + $^ + +$(dbus_accounts_sources): org.freedesktop.Accounts.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-accounts \ + $^ + +$(dbus_user_sources): org.freedesktop.Accounts.User.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-user \ + $^ + +$(dbus_upower_sources): upower.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-upower \ + --c-namespace DBus \ + $^ + +gen-%.xml.c: %.xml + @echo "Building $@ from $<" + @echo "const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<)))) = " > $@ + @sed -e "s:\":\\\\\":g" -e s:^:\": -e s:\$$:\\\\n\": $< >> $@ + @echo ";" >> $@ + +gen-%.xml.h: %.xml + @echo "Building $@ from $<" + @echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<))));" > $@ + +# 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/src/dbus-accounts.c b/src/dbus-accounts.c new file mode 100644 index 0000000..b013df0 --- /dev/null +++ b/src/dbus-accounts.c @@ -0,0 +1,2505 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "dbus-accounts.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; + gboolean use_gvariant; +} _ExtendedGDBusPropertyInfo; + +typedef struct +{ + GDBusInterfaceInfo parent_struct; + const gchar *hyphen_name; +} _ExtendedGDBusInterfaceInfo; + +typedef struct +{ + const _ExtendedGDBusPropertyInfo *info; + guint prop_id; + GValue orig_value; /* the value before the change */ +} ChangedProperty; + +static void +_changed_property_free (ChangedProperty *data) +{ + g_value_unset (&data->orig_value); + g_free (data); +} + +static gboolean +_g_strv_equal0 (gchar **a, gchar **b) +{ + gboolean ret = FALSE; + guint n; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + if (g_strv_length (a) != g_strv_length (b)) + goto out; + for (n = 0; a[n] != NULL; n++) + if (g_strcmp0 (a[n], b[n]) != 0) + goto out; + ret = TRUE; +out: + return ret; +} + +static gboolean +_g_variant_equal0 (GVariant *a, GVariant *b) +{ + gboolean ret = FALSE; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + ret = g_variant_equal (a, b); +out: + return ret; +} + +G_GNUC_UNUSED static gboolean +_g_value_equal (const GValue *a, const GValue *b) +{ + gboolean ret = FALSE; + g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); + switch (G_VALUE_TYPE (a)) + { + case G_TYPE_BOOLEAN: + ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); + break; + case G_TYPE_UCHAR: + ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); + break; + case G_TYPE_INT: + ret = (g_value_get_int (a) == g_value_get_int (b)); + break; + case G_TYPE_UINT: + ret = (g_value_get_uint (a) == g_value_get_uint (b)); + break; + case G_TYPE_INT64: + ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); + break; + case G_TYPE_UINT64: + ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); + break; + case G_TYPE_DOUBLE: + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } + break; + case G_TYPE_STRING: + ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); + break; + case G_TYPE_VARIANT: + ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); + break; + default: + if (G_VALUE_TYPE (a) == G_TYPE_STRV) + ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); + else + g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); + break; + } + return ret; +} + +/* ------------------------------------------------------------------------ + * Code for interface org.freedesktop.Accounts + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:Accounts + * @title: Accounts + * @short_description: Generated C code for the org.freedesktop.Accounts D-Bus interface + * + * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-Accounts.top_of_page">org.freedesktop.Accounts</link> D-Bus interface in C. + */ + +/* ---- Introspection data for org.freedesktop.Accounts ---- */ + +static const _ExtendedGDBusArgInfo _accounts_method_info_list_cached_users_OUT_ARG_users = +{ + { + -1, + (gchar *) "users", + (gchar *) "ao", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_method_info_list_cached_users_OUT_ARG_pointers[] = +{ + &_accounts_method_info_list_cached_users_OUT_ARG_users, + NULL +}; + +static const GDBusAnnotationInfo _accounts_method_list_cached_users_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_method_list_cached_users_annotation_info_pointers[] = +{ + &_accounts_method_list_cached_users_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_method_info_list_cached_users = +{ + { + -1, + (gchar *) "ListCachedUsers", + NULL, + (GDBusArgInfo **) &_accounts_method_info_list_cached_users_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_accounts_method_list_cached_users_annotation_info_pointers + }, + "handle-list-cached-users", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_method_info_find_user_by_id_IN_ARG_id = +{ + { + -1, + (gchar *) "id", + (gchar *) "x", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_method_info_find_user_by_id_IN_ARG_pointers[] = +{ + &_accounts_method_info_find_user_by_id_IN_ARG_id, + NULL +}; + +static const _ExtendedGDBusArgInfo _accounts_method_info_find_user_by_id_OUT_ARG_user = +{ + { + -1, + (gchar *) "user", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_method_info_find_user_by_id_OUT_ARG_pointers[] = +{ + &_accounts_method_info_find_user_by_id_OUT_ARG_user, + NULL +}; + +static const GDBusAnnotationInfo _accounts_method_find_user_by_id_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_method_find_user_by_id_annotation_info_pointers[] = +{ + &_accounts_method_find_user_by_id_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_method_info_find_user_by_id = +{ + { + -1, + (gchar *) "FindUserById", + (GDBusArgInfo **) &_accounts_method_info_find_user_by_id_IN_ARG_pointers, + (GDBusArgInfo **) &_accounts_method_info_find_user_by_id_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_accounts_method_find_user_by_id_annotation_info_pointers + }, + "handle-find-user-by-id", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_method_info_find_user_by_name_IN_ARG_name = +{ + { + -1, + (gchar *) "name", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_method_info_find_user_by_name_IN_ARG_pointers[] = +{ + &_accounts_method_info_find_user_by_name_IN_ARG_name, + NULL +}; + +static const _ExtendedGDBusArgInfo _accounts_method_info_find_user_by_name_OUT_ARG_user = +{ + { + -1, + (gchar *) "user", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_method_info_find_user_by_name_OUT_ARG_pointers[] = +{ + &_accounts_method_info_find_user_by_name_OUT_ARG_user, + NULL +}; + +static const GDBusAnnotationInfo _accounts_method_find_user_by_name_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_method_find_user_by_name_annotation_info_pointers[] = +{ + &_accounts_method_find_user_by_name_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_method_info_find_user_by_name = +{ + { + -1, + (gchar *) "FindUserByName", + (GDBusArgInfo **) &_accounts_method_info_find_user_by_name_IN_ARG_pointers, + (GDBusArgInfo **) &_accounts_method_info_find_user_by_name_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_accounts_method_find_user_by_name_annotation_info_pointers + }, + "handle-find-user-by-name", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_method_info_create_user_IN_ARG_name = +{ + { + -1, + (gchar *) "name", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_method_info_create_user_IN_ARG_fullname = +{ + { + -1, + (gchar *) "fullname", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_method_info_create_user_IN_ARG_accountType = +{ + { + -1, + (gchar *) "accountType", + (gchar *) "i", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_method_info_create_user_IN_ARG_pointers[] = +{ + &_accounts_method_info_create_user_IN_ARG_name, + &_accounts_method_info_create_user_IN_ARG_fullname, + &_accounts_method_info_create_user_IN_ARG_accountType, + NULL +}; + +static const _ExtendedGDBusArgInfo _accounts_method_info_create_user_OUT_ARG_user = +{ + { + -1, + (gchar *) "user", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_method_info_create_user_OUT_ARG_pointers[] = +{ + &_accounts_method_info_create_user_OUT_ARG_user, + NULL +}; + +static const GDBusAnnotationInfo _accounts_method_create_user_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo _accounts_method_create_user_annotation_info_1 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_method_create_user_annotation_info_pointers[] = +{ + &_accounts_method_create_user_annotation_info_0, + &_accounts_method_create_user_annotation_info_1, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_method_info_create_user = +{ + { + -1, + (gchar *) "CreateUser", + (GDBusArgInfo **) &_accounts_method_info_create_user_IN_ARG_pointers, + (GDBusArgInfo **) &_accounts_method_info_create_user_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_accounts_method_create_user_annotation_info_pointers + }, + "handle-create-user", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_method_info_delete_user_IN_ARG_id = +{ + { + -1, + (gchar *) "id", + (gchar *) "x", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_method_info_delete_user_IN_ARG_removeFiles = +{ + { + -1, + (gchar *) "removeFiles", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_method_info_delete_user_IN_ARG_pointers[] = +{ + &_accounts_method_info_delete_user_IN_ARG_id, + &_accounts_method_info_delete_user_IN_ARG_removeFiles, + NULL +}; + +static const GDBusAnnotationInfo _accounts_method_delete_user_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_method_delete_user_annotation_info_pointers[] = +{ + &_accounts_method_delete_user_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_method_info_delete_user = +{ + { + -1, + (gchar *) "DeleteUser", + (GDBusArgInfo **) &_accounts_method_info_delete_user_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_method_delete_user_annotation_info_pointers + }, + "handle-delete-user", + FALSE +}; + +static const _ExtendedGDBusMethodInfo * const _accounts_method_info_pointers[] = +{ + &_accounts_method_info_list_cached_users, + &_accounts_method_info_find_user_by_id, + &_accounts_method_info_find_user_by_name, + &_accounts_method_info_create_user, + &_accounts_method_info_delete_user, + NULL +}; + +static const _ExtendedGDBusArgInfo _accounts_signal_info_user_added_ARG_user = +{ + { + -1, + (gchar *) "user", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_signal_info_user_added_ARG_pointers[] = +{ + &_accounts_signal_info_user_added_ARG_user, + NULL +}; + +static const _ExtendedGDBusSignalInfo _accounts_signal_info_user_added = +{ + { + -1, + (gchar *) "UserAdded", + (GDBusArgInfo **) &_accounts_signal_info_user_added_ARG_pointers, + NULL + }, + "user-added" +}; + +static const _ExtendedGDBusArgInfo _accounts_signal_info_user_deleted_ARG_user = +{ + { + -1, + (gchar *) "user", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_signal_info_user_deleted_ARG_pointers[] = +{ + &_accounts_signal_info_user_deleted_ARG_user, + NULL +}; + +static const _ExtendedGDBusSignalInfo _accounts_signal_info_user_deleted = +{ + { + -1, + (gchar *) "UserDeleted", + (GDBusArgInfo **) &_accounts_signal_info_user_deleted_ARG_pointers, + NULL + }, + "user-deleted" +}; + +static const _ExtendedGDBusArgInfo _accounts_signal_info_user_changed_ARG_user = +{ + { + -1, + (gchar *) "user", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_signal_info_user_changed_ARG_pointers[] = +{ + &_accounts_signal_info_user_changed_ARG_user, + NULL +}; + +static const _ExtendedGDBusSignalInfo _accounts_signal_info_user_changed = +{ + { + -1, + (gchar *) "UserChanged", + (GDBusArgInfo **) &_accounts_signal_info_user_changed_ARG_pointers, + NULL + }, + "user-changed" +}; + +static const _ExtendedGDBusSignalInfo * const _accounts_signal_info_pointers[] = +{ + &_accounts_signal_info_user_added, + &_accounts_signal_info_user_deleted, + &_accounts_signal_info_user_changed, + NULL +}; + +static const _ExtendedGDBusPropertyInfo _accounts_property_info_daemon_version = +{ + { + -1, + (gchar *) "DaemonVersion", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "daemon-version", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo * const _accounts_property_info_pointers[] = +{ + &_accounts_property_info_daemon_version, + NULL +}; + +static const _ExtendedGDBusInterfaceInfo _accounts_interface_info = +{ + { + -1, + (gchar *) "org.freedesktop.Accounts", + (GDBusMethodInfo **) &_accounts_method_info_pointers, + (GDBusSignalInfo **) &_accounts_signal_info_pointers, + (GDBusPropertyInfo **) &_accounts_property_info_pointers, + NULL + }, + "accounts", +}; + + +/** + * accounts_interface_info: + * + * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-Accounts.top_of_page">org.freedesktop.Accounts</link> D-Bus interface. + * + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + */ +GDBusInterfaceInfo * +accounts_interface_info (void) +{ + return (GDBusInterfaceInfo *) &_accounts_interface_info.parent_struct; +} + +/** + * accounts_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 #Accounts interface for a concrete class. + * The properties are overridden in the order they are defined. + * + * Returns: The last property id. + */ +guint +accounts_override_properties (GObjectClass *klass, guint property_id_begin) +{ + g_object_class_override_property (klass, property_id_begin++, "daemon-version"); + return property_id_begin - 1; +} + + + +/** + * Accounts: + * + * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Accounts.top_of_page">org.freedesktop.Accounts</link>. + */ + +/** + * AccountsIface: + * @parent_iface: The parent interface. + * @handle_create_user: Handler for the #Accounts::handle-create-user signal. + * @handle_delete_user: Handler for the #Accounts::handle-delete-user signal. + * @handle_find_user_by_id: Handler for the #Accounts::handle-find-user-by-id signal. + * @handle_find_user_by_name: Handler for the #Accounts::handle-find-user-by-name signal. + * @handle_list_cached_users: Handler for the #Accounts::handle-list-cached-users signal. + * @get_daemon_version: Getter for the #Accounts:daemon-version property. + * @user_added: Handler for the #Accounts::user-added signal. + * @user_changed: Handler for the #Accounts::user-changed signal. + * @user_deleted: Handler for the #Accounts::user-deleted signal. + * + * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Accounts.top_of_page">org.freedesktop.Accounts</link>. + */ + +static void +accounts_default_init (AccountsIface *iface) +{ + /* GObject signals for incoming D-Bus method calls: */ + /** + * Accounts::handle-list-cached-users: + * @object: A #Accounts. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts.ListCachedUsers">ListCachedUsers()</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 accounts_complete_list_cached_users() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-list-cached-users", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsIface, handle_list_cached_users), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * Accounts::handle-find-user-by-id: + * @object: A #Accounts. + * @invocation: A #GDBusMethodInvocation. + * @arg_id: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts.FindUserById">FindUserById()</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 accounts_complete_find_user_by_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-find-user-by-id", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsIface, handle_find_user_by_id), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT64); + + /** + * Accounts::handle-find-user-by-name: + * @object: A #Accounts. + * @invocation: A #GDBusMethodInvocation. + * @arg_name: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts.FindUserByName">FindUserByName()</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 accounts_complete_find_user_by_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-find-user-by-name", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsIface, handle_find_user_by_name), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * Accounts::handle-create-user: + * @object: A #Accounts. + * @invocation: A #GDBusMethodInvocation. + * @arg_name: Argument passed by remote caller. + * @arg_fullname: Argument passed by remote caller. + * @arg_accountType: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts.CreateUser">CreateUser()</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 accounts_complete_create_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-create-user", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsIface, handle_create_user), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 4, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); + + /** + * Accounts::handle-delete-user: + * @object: A #Accounts. + * @invocation: A #GDBusMethodInvocation. + * @arg_id: Argument passed by remote caller. + * @arg_removeFiles: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts.DeleteUser">DeleteUser()</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 accounts_complete_delete_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-delete-user", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsIface, handle_delete_user), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 3, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT64, G_TYPE_BOOLEAN); + + /* GObject signals for received D-Bus signals: */ + /** + * Accounts::user-added: + * @object: A #Accounts. + * @arg_user: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Accounts.UserAdded">"UserAdded"</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 ("user-added", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsIface, user_added), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /** + * Accounts::user-deleted: + * @object: A #Accounts. + * @arg_user: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Accounts.UserDeleted">"UserDeleted"</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 ("user-deleted", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsIface, user_deleted), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /** + * Accounts::user-changed: + * @object: A #Accounts. + * @arg_user: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Accounts.UserChanged">"UserChanged"</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 ("user-changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsIface, user_changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /* GObject properties for D-Bus properties: */ + /** + * Accounts:daemon-version: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts.DaemonVersion">"DaemonVersion"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("daemon-version", "DaemonVersion", "DaemonVersion", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); +} + +typedef AccountsIface AccountsInterface; +G_DEFINE_INTERFACE (Accounts, accounts, G_TYPE_OBJECT); + +/** + * accounts_get_daemon_version: (skip) + * @object: A #Accounts. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts.DaemonVersion">"DaemonVersion"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_dup_daemon_version() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_get_daemon_version (Accounts *object) +{ + return ACCOUNTS_GET_IFACE (object)->get_daemon_version (object); +} + +/** + * accounts_dup_daemon_version: (skip) + * @object: A #Accounts. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts.DaemonVersion">"DaemonVersion"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_dup_daemon_version (Accounts *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "daemon-version", &value, NULL); + return value; +} + +/** + * accounts_set_daemon_version: (skip) + * @object: A #Accounts. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts.DaemonVersion">"DaemonVersion"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_set_daemon_version (Accounts *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "daemon-version", value, NULL); +} + +/** + * accounts_emit_user_added: + * @object: A #Accounts. + * @arg_user: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-Accounts.UserAdded">"UserAdded"</link> D-Bus signal. + */ +void +accounts_emit_user_added ( + Accounts *object, + const gchar *arg_user) +{ + g_signal_emit_by_name (object, "user-added", arg_user); +} + +/** + * accounts_emit_user_deleted: + * @object: A #Accounts. + * @arg_user: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-Accounts.UserDeleted">"UserDeleted"</link> D-Bus signal. + */ +void +accounts_emit_user_deleted ( + Accounts *object, + const gchar *arg_user) +{ + g_signal_emit_by_name (object, "user-deleted", arg_user); +} + +/** + * accounts_emit_user_changed: + * @object: A #Accounts. + * @arg_user: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-Accounts.UserChanged">"UserChanged"</link> D-Bus signal. + */ +void +accounts_emit_user_changed ( + Accounts *object, + const gchar *arg_user) +{ + g_signal_emit_by_name (object, "user-changed", arg_user); +} + +/** + * accounts_call_list_cached_users: + * @proxy: A #AccountsProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts.ListCachedUsers">ListCachedUsers()</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 accounts_call_list_cached_users_finish() to get the result of the operation. + * + * See accounts_call_list_cached_users_sync() for the synchronous, blocking version of this method. + */ +void +accounts_call_list_cached_users ( + Accounts *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "ListCachedUsers", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_call_list_cached_users_finish: + * @proxy: A #AccountsProxy. + * @out_users: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_call_list_cached_users(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_call_list_cached_users(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_call_list_cached_users_finish ( + Accounts *proxy, + gchar ***out_users, + 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_users); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * accounts_call_list_cached_users_sync: + * @proxy: A #AccountsProxy. + * @out_users: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts.ListCachedUsers">ListCachedUsers()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_call_list_cached_users() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_call_list_cached_users_sync ( + Accounts *proxy, + gchar ***out_users, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "ListCachedUsers", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(^ao)", + out_users); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * accounts_call_find_user_by_id: + * @proxy: A #AccountsProxy. + * @arg_id: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts.FindUserById">FindUserById()</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 accounts_call_find_user_by_id_finish() to get the result of the operation. + * + * See accounts_call_find_user_by_id_sync() for the synchronous, blocking version of this method. + */ +void +accounts_call_find_user_by_id ( + Accounts *proxy, + gint64 arg_id, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "FindUserById", + g_variant_new ("(x)", + arg_id), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_call_find_user_by_id_finish: + * @proxy: A #AccountsProxy. + * @out_user: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_call_find_user_by_id(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_call_find_user_by_id(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_call_find_user_by_id_finish ( + Accounts *proxy, + gchar **out_user, + 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_user); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * accounts_call_find_user_by_id_sync: + * @proxy: A #AccountsProxy. + * @arg_id: Argument to pass with the method invocation. + * @out_user: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts.FindUserById">FindUserById()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_call_find_user_by_id() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_call_find_user_by_id_sync ( + Accounts *proxy, + gint64 arg_id, + gchar **out_user, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "FindUserById", + g_variant_new ("(x)", + arg_id), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(o)", + out_user); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * accounts_call_find_user_by_name: + * @proxy: A #AccountsProxy. + * @arg_name: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts.FindUserByName">FindUserByName()</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 accounts_call_find_user_by_name_finish() to get the result of the operation. + * + * See accounts_call_find_user_by_name_sync() for the synchronous, blocking version of this method. + */ +void +accounts_call_find_user_by_name ( + Accounts *proxy, + const gchar *arg_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "FindUserByName", + g_variant_new ("(s)", + arg_name), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_call_find_user_by_name_finish: + * @proxy: A #AccountsProxy. + * @out_user: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_call_find_user_by_name(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_call_find_user_by_name(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_call_find_user_by_name_finish ( + Accounts *proxy, + gchar **out_user, + 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_user); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * accounts_call_find_user_by_name_sync: + * @proxy: A #AccountsProxy. + * @arg_name: Argument to pass with the method invocation. + * @out_user: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts.FindUserByName">FindUserByName()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_call_find_user_by_name() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_call_find_user_by_name_sync ( + Accounts *proxy, + const gchar *arg_name, + gchar **out_user, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "FindUserByName", + g_variant_new ("(s)", + arg_name), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(o)", + out_user); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * accounts_call_create_user: + * @proxy: A #AccountsProxy. + * @arg_name: Argument to pass with the method invocation. + * @arg_fullname: Argument to pass with the method invocation. + * @arg_accountType: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts.CreateUser">CreateUser()</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 accounts_call_create_user_finish() to get the result of the operation. + * + * See accounts_call_create_user_sync() for the synchronous, blocking version of this method. + */ +void +accounts_call_create_user ( + Accounts *proxy, + const gchar *arg_name, + const gchar *arg_fullname, + gint arg_accountType, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "CreateUser", + g_variant_new ("(ssi)", + arg_name, + arg_fullname, + arg_accountType), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_call_create_user_finish: + * @proxy: A #AccountsProxy. + * @out_user: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_call_create_user(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_call_create_user(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_call_create_user_finish ( + Accounts *proxy, + gchar **out_user, + 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_user); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * accounts_call_create_user_sync: + * @proxy: A #AccountsProxy. + * @arg_name: Argument to pass with the method invocation. + * @arg_fullname: Argument to pass with the method invocation. + * @arg_accountType: Argument to pass with the method invocation. + * @out_user: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts.CreateUser">CreateUser()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_call_create_user() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_call_create_user_sync ( + Accounts *proxy, + const gchar *arg_name, + const gchar *arg_fullname, + gint arg_accountType, + gchar **out_user, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "CreateUser", + g_variant_new ("(ssi)", + arg_name, + arg_fullname, + arg_accountType), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(o)", + out_user); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * accounts_call_delete_user: + * @proxy: A #AccountsProxy. + * @arg_id: Argument to pass with the method invocation. + * @arg_removeFiles: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts.DeleteUser">DeleteUser()</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 accounts_call_delete_user_finish() to get the result of the operation. + * + * See accounts_call_delete_user_sync() for the synchronous, blocking version of this method. + */ +void +accounts_call_delete_user ( + Accounts *proxy, + gint64 arg_id, + gboolean arg_removeFiles, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "DeleteUser", + g_variant_new ("(xb)", + arg_id, + arg_removeFiles), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_call_delete_user_finish: + * @proxy: A #AccountsProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_call_delete_user(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_call_delete_user(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_call_delete_user_finish ( + Accounts *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; +} + +/** + * accounts_call_delete_user_sync: + * @proxy: A #AccountsProxy. + * @arg_id: Argument to pass with the method invocation. + * @arg_removeFiles: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts.DeleteUser">DeleteUser()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_call_delete_user() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_call_delete_user_sync ( + Accounts *proxy, + gint64 arg_id, + gboolean arg_removeFiles, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "DeleteUser", + g_variant_new ("(xb)", + arg_id, + arg_removeFiles), + 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; +} + +/** + * accounts_complete_list_cached_users: + * @object: A #Accounts. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @users: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts.ListCachedUsers">ListCachedUsers()</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 +accounts_complete_list_cached_users ( + Accounts *object, + GDBusMethodInvocation *invocation, + const gchar *const *users) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(^ao)", + users)); +} + +/** + * accounts_complete_find_user_by_id: + * @object: A #Accounts. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @user: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts.FindUserById">FindUserById()</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 +accounts_complete_find_user_by_id ( + Accounts *object, + GDBusMethodInvocation *invocation, + const gchar *user) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", + user)); +} + +/** + * accounts_complete_find_user_by_name: + * @object: A #Accounts. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @user: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts.FindUserByName">FindUserByName()</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 +accounts_complete_find_user_by_name ( + Accounts *object, + GDBusMethodInvocation *invocation, + const gchar *user) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", + user)); +} + +/** + * accounts_complete_create_user: + * @object: A #Accounts. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @user: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts.CreateUser">CreateUser()</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 +accounts_complete_create_user ( + Accounts *object, + GDBusMethodInvocation *invocation, + const gchar *user) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", + user)); +} + +/** + * accounts_complete_delete_user: + * @object: A #Accounts. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts.DeleteUser">DeleteUser()</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 +accounts_complete_delete_user ( + Accounts *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/* ------------------------------------------------------------------------ */ + +/** + * AccountsProxy: + * + * The #AccountsProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * AccountsProxyClass: + * @parent_class: The parent class. + * + * Class structure for #AccountsProxy. + */ + +struct _AccountsProxyPrivate +{ + GData *qdata; +}; + +static void accounts_proxy_iface_init (AccountsIface *iface); + +G_DEFINE_TYPE_WITH_CODE (AccountsProxy, accounts_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (TYPE_ACCOUNTS, accounts_proxy_iface_init)); + +static void +accounts_proxy_finalize (GObject *object) +{ + AccountsProxy *proxy = ACCOUNTS_PROXY (object); + g_datalist_clear (&proxy->priv->qdata); + G_OBJECT_CLASS (accounts_proxy_parent_class)->finalize (object); +} + +static void +accounts_proxy_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 1); + info = _accounts_property_info_pointers[prop_id - 1]; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); + if (info->use_gvariant) + { + g_value_set_variant (value, variant); + } + else + { + if (variant != NULL) + g_dbus_gvariant_to_gvalue (variant, value); + } + if (variant != NULL) + g_variant_unref (variant); +} + +static void +accounts_proxy_set_property_cb (GDBusProxy *proxy, + GAsyncResult *res, + gpointer user_data) +{ + const _ExtendedGDBusPropertyInfo *info = user_data; + GError *error; + error = NULL; + if (!g_dbus_proxy_call_finish (proxy, res, &error)) + { + g_warning ("Error setting property `%s' on interface org.freedesktop.Accounts: %s (%s, %d)", + info->parent_struct.name, + error->message, g_quark_to_string (error->domain), error->code); + g_error_free (error); + } +} + +static void +accounts_proxy_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 1); + info = _accounts_property_info_pointers[prop_id - 1]; + variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); + g_dbus_proxy_call (G_DBUS_PROXY (object), + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", "org.freedesktop.Accounts", info->parent_struct.name, variant), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, (GAsyncReadyCallback) accounts_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); + g_variant_unref (variant); +} + +static void +accounts_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) +{ + _ExtendedGDBusSignalInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint n; + guint signal_id; + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_accounts_interface_info.parent_struct, signal_name); + if (info == NULL) + return; + num_params = g_variant_n_children (parameters); + paramv = g_new0 (GValue, num_params + 1); + g_value_init (¶mv[0], TYPE_ACCOUNTS); + g_value_set_object (¶mv[0], proxy); + g_variant_iter_init (&iter, parameters); + n = 1; + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_ACCOUNTS); + g_signal_emitv (paramv, signal_id, 0, NULL); + for (n = 0; n < num_params + 1; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static void +accounts_proxy_g_properties_changed (GDBusProxy *_proxy, + GVariant *changed_properties, + const gchar *const *invalidated_properties) +{ + AccountsProxy *proxy = ACCOUNTS_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 *) &_accounts_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 *) &_accounts_interface_info.parent_struct, invalidated_properties[n]); + g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); + if (info != NULL) + g_object_notify (G_OBJECT (proxy), info->hyphen_name); + } +} + +static const gchar * +accounts_proxy_get_daemon_version (Accounts *object) +{ + AccountsProxy *proxy = ACCOUNTS_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "DaemonVersion"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static void +accounts_proxy_init (AccountsProxy *proxy) +{ + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_ACCOUNTS_PROXY, AccountsProxyPrivate); + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), accounts_interface_info ()); +} + +static void +accounts_proxy_class_init (AccountsProxyClass *klass) +{ + GObjectClass *gobject_class; + GDBusProxyClass *proxy_class; + + g_type_class_add_private (klass, sizeof (AccountsProxyPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = accounts_proxy_finalize; + gobject_class->get_property = accounts_proxy_get_property; + gobject_class->set_property = accounts_proxy_set_property; + + proxy_class = G_DBUS_PROXY_CLASS (klass); + proxy_class->g_signal = accounts_proxy_g_signal; + proxy_class->g_properties_changed = accounts_proxy_g_properties_changed; + + + accounts_override_properties (gobject_class, 1); +} + +static void +accounts_proxy_iface_init (AccountsIface *iface) +{ + iface->get_daemon_version = accounts_proxy_get_daemon_version; +} + +/** + * accounts_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Accounts.top_of_page">org.freedesktop.Accounts</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 accounts_proxy_new_finish() to get the result of the operation. + * + * See accounts_proxy_new_sync() for the synchronous, blocking version of this constructor. + */ +void +accounts_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_ACCOUNTS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts", NULL); +} + +/** + * accounts_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_proxy_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with accounts_proxy_new(). + * + * Returns: (transfer full) (type AccountsProxy): The constructed proxy object or %NULL if @error is set. + */ +Accounts * +accounts_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 ACCOUNTS (ret); + else + return NULL; +} + +/** + * accounts_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Accounts.top_of_page">org.freedesktop.Accounts</link>. See g_dbus_proxy_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See accounts_proxy_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type AccountsProxy): The constructed proxy object or %NULL if @error is set. + */ +Accounts * +accounts_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_ACCOUNTS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts", NULL); + if (ret != NULL) + return ACCOUNTS (ret); + else + return NULL; +} + + +/** + * accounts_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like accounts_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 accounts_proxy_new_for_bus_finish() to get the result of the operation. + * + * See accounts_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +accounts_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_ACCOUNTS_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts", NULL); +} + +/** + * accounts_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_proxy_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with accounts_proxy_new_for_bus(). + * + * Returns: (transfer full) (type AccountsProxy): The constructed proxy object or %NULL if @error is set. + */ +Accounts * +accounts_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 ACCOUNTS (ret); + else + return NULL; +} + +/** + * accounts_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like accounts_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See accounts_proxy_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type AccountsProxy): The constructed proxy object or %NULL if @error is set. + */ +Accounts * +accounts_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_ACCOUNTS_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts", NULL); + if (ret != NULL) + return ACCOUNTS (ret); + else + return NULL; +} + + +/* ------------------------------------------------------------------------ */ + +/** + * AccountsSkeleton: + * + * The #AccountsSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * AccountsSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #AccountsSkeleton. + */ + +struct _AccountsSkeletonPrivate +{ + GValue *properties; + GList *changed_properties; + GSource *changed_properties_idle_source; + GMainContext *context; + GMutex lock; +}; + +static void +_accounts_skeleton_handle_method_call ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data) +{ + AccountsSkeleton *skeleton = ACCOUNTS_SKELETON (user_data); + _ExtendedGDBusMethodInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint num_extra; + guint n; + guint signal_id; + GValue return_value = G_VALUE_INIT; + info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); + g_assert (info != NULL); + num_params = g_variant_n_children (parameters); + num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); + n = 0; + g_value_init (¶mv[n], TYPE_ACCOUNTS); + g_value_set_object (¶mv[n++], skeleton); + g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); + g_value_set_object (¶mv[n++], invocation); + if (info->pass_fdlist) + { +#ifdef G_OS_UNIX + g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); + g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); +#else + g_assert_not_reached (); +#endif + } + g_variant_iter_init (&iter, parameters); + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_ACCOUNTS); + g_value_init (&return_value, G_TYPE_BOOLEAN); + g_signal_emitv (paramv, signal_id, 0, &return_value); + if (!g_value_get_boolean (&return_value)) + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); + g_value_unset (&return_value); + for (n = 0; n < num_params + num_extra; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static GVariant * +_accounts_skeleton_handle_get_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + gpointer user_data) +{ + AccountsSkeleton *skeleton = ACCOUNTS_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 *) &_accounts_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 +_accounts_skeleton_handle_set_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *variant, + GError **error, + gpointer user_data) +{ + AccountsSkeleton *skeleton = ACCOUNTS_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 *) &_accounts_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 _accounts_skeleton_vtable = +{ + _accounts_skeleton_handle_method_call, + _accounts_skeleton_handle_get_property, + _accounts_skeleton_handle_set_property +}; + +static GDBusInterfaceInfo * +accounts_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton) +{ + return accounts_interface_info (); +} + +static GDBusInterfaceVTable * +accounts_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton) +{ + return (GDBusInterfaceVTable *) &_accounts_skeleton_vtable; +} + +static GVariant * +accounts_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +{ + AccountsSkeleton *skeleton = ACCOUNTS_SKELETON (_skeleton); + + GVariantBuilder builder; + guint n; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + if (_accounts_interface_info.parent_struct.properties == NULL) + goto out; + for (n = 0; _accounts_interface_info.parent_struct.properties[n] != NULL; n++) + { + GDBusPropertyInfo *info = _accounts_interface_info.parent_struct.properties[n]; + if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) + { + GVariant *value; + value = _accounts_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Accounts", info->name, NULL, skeleton); + if (value != NULL) + { + g_variant_take_ref (value); + g_variant_builder_add (&builder, "{sv}", info->name, value); + g_variant_unref (value); + } + } + } +out: + return g_variant_builder_end (&builder); +} + +static gboolean _accounts_emit_changed (gpointer user_data); + +static void +accounts_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +{ + AccountsSkeleton *skeleton = ACCOUNTS_SKELETON (_skeleton); + gboolean emit_changed = FALSE; + + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties_idle_source != NULL) + { + g_source_destroy (skeleton->priv->changed_properties_idle_source); + skeleton->priv->changed_properties_idle_source = NULL; + emit_changed = TRUE; + } + g_mutex_unlock (&skeleton->priv->lock); + + if (emit_changed) + _accounts_emit_changed (skeleton); +} + +static void +_accounts_on_signal_user_added ( + Accounts *object, + const gchar *arg_user) +{ + AccountsSkeleton *skeleton = ACCOUNTS_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_user)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Accounts", "UserAdded", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_accounts_on_signal_user_deleted ( + Accounts *object, + const gchar *arg_user) +{ + AccountsSkeleton *skeleton = ACCOUNTS_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_user)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Accounts", "UserDeleted", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_accounts_on_signal_user_changed ( + Accounts *object, + const gchar *arg_user) +{ + AccountsSkeleton *skeleton = ACCOUNTS_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_user)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Accounts", "UserChanged", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void accounts_skeleton_iface_init (AccountsIface *iface); +G_DEFINE_TYPE_WITH_CODE (AccountsSkeleton, accounts_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (TYPE_ACCOUNTS, accounts_skeleton_iface_init)); + +static void +accounts_skeleton_finalize (GObject *object) +{ + AccountsSkeleton *skeleton = ACCOUNTS_SKELETON (object); + guint n; + for (n = 0; n < 1; n++) + g_value_unset (&skeleton->priv->properties[n]); + g_free (skeleton->priv->properties); + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + if (skeleton->priv->changed_properties_idle_source != NULL) + g_source_destroy (skeleton->priv->changed_properties_idle_source); + g_main_context_unref (skeleton->priv->context); + g_mutex_clear (&skeleton->priv->lock); + G_OBJECT_CLASS (accounts_skeleton_parent_class)->finalize (object); +} + +static void +accounts_skeleton_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + AccountsSkeleton *skeleton = ACCOUNTS_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 1); + g_mutex_lock (&skeleton->priv->lock); + g_value_copy (&skeleton->priv->properties[prop_id - 1], value); + g_mutex_unlock (&skeleton->priv->lock); +} + +static gboolean +_accounts_emit_changed (gpointer user_data) +{ + AccountsSkeleton *skeleton = ACCOUNTS_SKELETON (user_data); + GList *l; + GVariantBuilder builder; + GVariantBuilder invalidated_builder; + guint num_changes; + + g_mutex_lock (&skeleton->priv->lock); + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); + for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) + { + ChangedProperty *cp = l->data; + GVariant *variant; + const GValue *cur_value; + + cur_value = &skeleton->priv->properties[cp->prop_id - 1]; + if (!_g_value_equal (cur_value, &cp->orig_value)) + { + variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); + g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); + g_variant_unref (variant); + num_changes++; + } + } + if (num_changes > 0) + { + GList *connections, *ll; + GVariant *signal_variant; + signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.Accounts", + &builder, &invalidated_builder)); + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + for (ll = connections; ll != NULL; ll = ll->next) + { + GDBusConnection *connection = ll->data; + + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), + "org.freedesktop.DBus.Properties", + "PropertiesChanged", + signal_variant, + NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); + } + else + { + g_variant_builder_clear (&builder); + g_variant_builder_clear (&invalidated_builder); + } + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + skeleton->priv->changed_properties = NULL; + skeleton->priv->changed_properties_idle_source = NULL; + g_mutex_unlock (&skeleton->priv->lock); + return FALSE; +} + +static void +_accounts_schedule_emit_changed (AccountsSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) +{ + ChangedProperty *cp; + GList *l; + cp = NULL; + for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) + { + ChangedProperty *i_cp = l->data; + if (i_cp->info == info) + { + cp = i_cp; + break; + } + } + if (cp == NULL) + { + cp = g_new0 (ChangedProperty, 1); + cp->prop_id = prop_id; + cp->info = info; + skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); + g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); + g_value_copy (orig_value, &cp->orig_value); + } +} + +static void +accounts_skeleton_notify (GObject *object, + GParamSpec *pspec) +{ + AccountsSkeleton *skeleton = ACCOUNTS_SKELETON (object); + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties != NULL && + skeleton->priv->changed_properties_idle_source == NULL) + { + skeleton->priv->changed_properties_idle_source = g_idle_source_new (); + g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); + g_source_set_callback (skeleton->priv->changed_properties_idle_source, _accounts_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); + g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); + g_source_unref (skeleton->priv->changed_properties_idle_source); + } + g_mutex_unlock (&skeleton->priv->lock); +} + +static void +accounts_skeleton_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + AccountsSkeleton *skeleton = ACCOUNTS_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 1); + g_mutex_lock (&skeleton->priv->lock); + g_object_freeze_notify (object); + if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) + { + if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) + _accounts_schedule_emit_changed (skeleton, _accounts_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); + g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); + g_object_notify_by_pspec (object, pspec); + } + g_mutex_unlock (&skeleton->priv->lock); + g_object_thaw_notify (object); +} + +static void +accounts_skeleton_init (AccountsSkeleton *skeleton) +{ + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_ACCOUNTS_SKELETON, AccountsSkeletonPrivate); + g_mutex_init (&skeleton->priv->lock); + skeleton->priv->context = g_main_context_ref_thread_default (); + skeleton->priv->properties = g_new0 (GValue, 1); + g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING); +} + +static const gchar * +accounts_skeleton_get_daemon_version (Accounts *object) +{ + AccountsSkeleton *skeleton = ACCOUNTS_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[0])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static void +accounts_skeleton_class_init (AccountsSkeletonClass *klass) +{ + GObjectClass *gobject_class; + GDBusInterfaceSkeletonClass *skeleton_class; + + g_type_class_add_private (klass, sizeof (AccountsSkeletonPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = accounts_skeleton_finalize; + gobject_class->get_property = accounts_skeleton_get_property; + gobject_class->set_property = accounts_skeleton_set_property; + gobject_class->notify = accounts_skeleton_notify; + + + accounts_override_properties (gobject_class, 1); + + skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); + skeleton_class->get_info = accounts_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = accounts_skeleton_dbus_interface_get_properties; + skeleton_class->flush = accounts_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = accounts_skeleton_dbus_interface_get_vtable; +} + +static void +accounts_skeleton_iface_init (AccountsIface *iface) +{ + iface->user_added = _accounts_on_signal_user_added; + iface->user_deleted = _accounts_on_signal_user_deleted; + iface->user_changed = _accounts_on_signal_user_changed; + iface->get_daemon_version = accounts_skeleton_get_daemon_version; +} + +/** + * accounts_skeleton_new: + * + * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Accounts.top_of_page">org.freedesktop.Accounts</link>. + * + * Returns: (transfer full) (type AccountsSkeleton): The skeleton object. + */ +Accounts * +accounts_skeleton_new (void) +{ + return ACCOUNTS (g_object_new (TYPE_ACCOUNTS_SKELETON, NULL)); +} + diff --git a/src/dbus-accounts.h b/src/dbus-accounts.h new file mode 100644 index 0000000..4999a2b --- /dev/null +++ b/src/dbus-accounts.h @@ -0,0 +1,333 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifndef __DBUS_ACCOUNTS_H__ +#define __DBUS_ACCOUNTS_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + + +/* ------------------------------------------------------------------------ */ +/* Declarations for org.freedesktop.Accounts */ + +#define TYPE_ACCOUNTS (accounts_get_type ()) +#define ACCOUNTS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_ACCOUNTS, Accounts)) +#define IS_ACCOUNTS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_ACCOUNTS)) +#define ACCOUNTS_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_ACCOUNTS, AccountsIface)) + +struct _Accounts; +typedef struct _Accounts Accounts; +typedef struct _AccountsIface AccountsIface; + +struct _AccountsIface +{ + GTypeInterface parent_iface; + + + + gboolean (*handle_create_user) ( + Accounts *object, + GDBusMethodInvocation *invocation, + const gchar *arg_name, + const gchar *arg_fullname, + gint arg_accountType); + + gboolean (*handle_delete_user) ( + Accounts *object, + GDBusMethodInvocation *invocation, + gint64 arg_id, + gboolean arg_removeFiles); + + gboolean (*handle_find_user_by_id) ( + Accounts *object, + GDBusMethodInvocation *invocation, + gint64 arg_id); + + gboolean (*handle_find_user_by_name) ( + Accounts *object, + GDBusMethodInvocation *invocation, + const gchar *arg_name); + + gboolean (*handle_list_cached_users) ( + Accounts *object, + GDBusMethodInvocation *invocation); + + const gchar * (*get_daemon_version) (Accounts *object); + + void (*user_added) ( + Accounts *object, + const gchar *arg_user); + + void (*user_changed) ( + Accounts *object, + const gchar *arg_user); + + void (*user_deleted) ( + Accounts *object, + const gchar *arg_user); + +}; + +GType accounts_get_type (void) G_GNUC_CONST; + +GDBusInterfaceInfo *accounts_interface_info (void); +guint accounts_override_properties (GObjectClass *klass, guint property_id_begin); + + +/* D-Bus method call completion functions: */ +void accounts_complete_list_cached_users ( + Accounts *object, + GDBusMethodInvocation *invocation, + const gchar *const *users); + +void accounts_complete_find_user_by_id ( + Accounts *object, + GDBusMethodInvocation *invocation, + const gchar *user); + +void accounts_complete_find_user_by_name ( + Accounts *object, + GDBusMethodInvocation *invocation, + const gchar *user); + +void accounts_complete_create_user ( + Accounts *object, + GDBusMethodInvocation *invocation, + const gchar *user); + +void accounts_complete_delete_user ( + Accounts *object, + GDBusMethodInvocation *invocation); + + + +/* D-Bus signal emissions functions: */ +void accounts_emit_user_added ( + Accounts *object, + const gchar *arg_user); + +void accounts_emit_user_deleted ( + Accounts *object, + const gchar *arg_user); + +void accounts_emit_user_changed ( + Accounts *object, + const gchar *arg_user); + + + +/* D-Bus method calls: */ +void accounts_call_list_cached_users ( + Accounts *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_call_list_cached_users_finish ( + Accounts *proxy, + gchar ***out_users, + GAsyncResult *res, + GError **error); + +gboolean accounts_call_list_cached_users_sync ( + Accounts *proxy, + gchar ***out_users, + GCancellable *cancellable, + GError **error); + +void accounts_call_find_user_by_id ( + Accounts *proxy, + gint64 arg_id, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_call_find_user_by_id_finish ( + Accounts *proxy, + gchar **out_user, + GAsyncResult *res, + GError **error); + +gboolean accounts_call_find_user_by_id_sync ( + Accounts *proxy, + gint64 arg_id, + gchar **out_user, + GCancellable *cancellable, + GError **error); + +void accounts_call_find_user_by_name ( + Accounts *proxy, + const gchar *arg_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_call_find_user_by_name_finish ( + Accounts *proxy, + gchar **out_user, + GAsyncResult *res, + GError **error); + +gboolean accounts_call_find_user_by_name_sync ( + Accounts *proxy, + const gchar *arg_name, + gchar **out_user, + GCancellable *cancellable, + GError **error); + +void accounts_call_create_user ( + Accounts *proxy, + const gchar *arg_name, + const gchar *arg_fullname, + gint arg_accountType, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_call_create_user_finish ( + Accounts *proxy, + gchar **out_user, + GAsyncResult *res, + GError **error); + +gboolean accounts_call_create_user_sync ( + Accounts *proxy, + const gchar *arg_name, + const gchar *arg_fullname, + gint arg_accountType, + gchar **out_user, + GCancellable *cancellable, + GError **error); + +void accounts_call_delete_user ( + Accounts *proxy, + gint64 arg_id, + gboolean arg_removeFiles, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_call_delete_user_finish ( + Accounts *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_call_delete_user_sync ( + Accounts *proxy, + gint64 arg_id, + gboolean arg_removeFiles, + GCancellable *cancellable, + GError **error); + + + +/* D-Bus property accessors: */ +const gchar *accounts_get_daemon_version (Accounts *object); +gchar *accounts_dup_daemon_version (Accounts *object); +void accounts_set_daemon_version (Accounts *object, const gchar *value); + + +/* ---- */ + +#define TYPE_ACCOUNTS_PROXY (accounts_proxy_get_type ()) +#define ACCOUNTS_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_ACCOUNTS_PROXY, AccountsProxy)) +#define ACCOUNTS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_ACCOUNTS_PROXY, AccountsProxyClass)) +#define ACCOUNTS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_ACCOUNTS_PROXY, AccountsProxyClass)) +#define IS_ACCOUNTS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_ACCOUNTS_PROXY)) +#define IS_ACCOUNTS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_ACCOUNTS_PROXY)) + +typedef struct _AccountsProxy AccountsProxy; +typedef struct _AccountsProxyClass AccountsProxyClass; +typedef struct _AccountsProxyPrivate AccountsProxyPrivate; + +struct _AccountsProxy +{ + /*< private >*/ + GDBusProxy parent_instance; + AccountsProxyPrivate *priv; +}; + +struct _AccountsProxyClass +{ + GDBusProxyClass parent_class; +}; + +GType accounts_proxy_get_type (void) G_GNUC_CONST; + +void accounts_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +Accounts *accounts_proxy_new_finish ( + GAsyncResult *res, + GError **error); +Accounts *accounts_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void accounts_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +Accounts *accounts_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +Accounts *accounts_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +/* ---- */ + +#define TYPE_ACCOUNTS_SKELETON (accounts_skeleton_get_type ()) +#define ACCOUNTS_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_ACCOUNTS_SKELETON, AccountsSkeleton)) +#define ACCOUNTS_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_ACCOUNTS_SKELETON, AccountsSkeletonClass)) +#define ACCOUNTS_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_ACCOUNTS_SKELETON, AccountsSkeletonClass)) +#define IS_ACCOUNTS_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_ACCOUNTS_SKELETON)) +#define IS_ACCOUNTS_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_ACCOUNTS_SKELETON)) + +typedef struct _AccountsSkeleton AccountsSkeleton; +typedef struct _AccountsSkeletonClass AccountsSkeletonClass; +typedef struct _AccountsSkeletonPrivate AccountsSkeletonPrivate; + +struct _AccountsSkeleton +{ + /*< private >*/ + GDBusInterfaceSkeleton parent_instance; + AccountsSkeletonPrivate *priv; +}; + +struct _AccountsSkeletonClass +{ + GDBusInterfaceSkeletonClass parent_class; +}; + +GType accounts_skeleton_get_type (void) G_GNUC_CONST; + +Accounts *accounts_skeleton_new (void); + + +G_END_DECLS + +#endif /* __DBUS_ACCOUNTS_H__ */ diff --git a/src/dbus-consolekit-manager.c b/src/dbus-consolekit-manager.c new file mode 100644 index 0000000..c032cd9 --- /dev/null +++ b/src/dbus-consolekit-manager.c @@ -0,0 +1,4139 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "dbus-consolekit-manager.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; + gboolean use_gvariant; +} _ExtendedGDBusPropertyInfo; + +typedef struct +{ + GDBusInterfaceInfo parent_struct; + const gchar *hyphen_name; +} _ExtendedGDBusInterfaceInfo; + +typedef struct +{ + const _ExtendedGDBusPropertyInfo *info; + guint prop_id; + GValue orig_value; /* the value before the change */ +} ChangedProperty; + +static void +_changed_property_free (ChangedProperty *data) +{ + g_value_unset (&data->orig_value); + g_free (data); +} + +static gboolean +_g_strv_equal0 (gchar **a, gchar **b) +{ + gboolean ret = FALSE; + guint n; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + if (g_strv_length (a) != g_strv_length (b)) + goto out; + for (n = 0; a[n] != NULL; n++) + if (g_strcmp0 (a[n], b[n]) != 0) + goto out; + ret = TRUE; +out: + return ret; +} + +static gboolean +_g_variant_equal0 (GVariant *a, GVariant *b) +{ + gboolean ret = FALSE; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + ret = g_variant_equal (a, b); +out: + return ret; +} + +G_GNUC_UNUSED static gboolean +_g_value_equal (const GValue *a, const GValue *b) +{ + gboolean ret = FALSE; + g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); + switch (G_VALUE_TYPE (a)) + { + case G_TYPE_BOOLEAN: + ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); + break; + case G_TYPE_UCHAR: + ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); + break; + case G_TYPE_INT: + ret = (g_value_get_int (a) == g_value_get_int (b)); + break; + case G_TYPE_UINT: + ret = (g_value_get_uint (a) == g_value_get_uint (b)); + break; + case G_TYPE_INT64: + ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); + break; + case G_TYPE_UINT64: + ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); + break; + case G_TYPE_DOUBLE: + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } + break; + case G_TYPE_STRING: + ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); + break; + case G_TYPE_VARIANT: + ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); + break; + default: + if (G_VALUE_TYPE (a) == G_TYPE_STRV) + ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); + else + g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); + break; + } + return ret; +} + +/* ------------------------------------------------------------------------ + * Code for interface org.freedesktop.ConsoleKit.Manager + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:ConsoleKitManager + * @title: ConsoleKitManager + * @short_description: Generated C code for the org.freedesktop.ConsoleKit.Manager D-Bus interface + * + * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.Manager</link> D-Bus interface in C. + */ + +/* ---- Introspection data for org.freedesktop.ConsoleKit.Manager ---- */ + +static const GDBusAnnotationInfo _console_kit_manager_method_restart_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_restart_annotation_info_pointers[] = +{ + &_console_kit_manager_method_restart_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_restart = +{ + { + -1, + (gchar *) "Restart", + NULL, + NULL, + (GDBusAnnotationInfo **) &_console_kit_manager_method_restart_annotation_info_pointers + }, + "handle-restart", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_can_restart_OUT_ARG_can_restart = +{ + { + -1, + (gchar *) "can_restart", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_can_restart_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_can_restart_OUT_ARG_can_restart, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_can_restart_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_can_restart_annotation_info_pointers[] = +{ + &_console_kit_manager_method_can_restart_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_can_restart = +{ + { + -1, + (gchar *) "CanRestart", + NULL, + (GDBusArgInfo **) &_console_kit_manager_method_info_can_restart_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_console_kit_manager_method_can_restart_annotation_info_pointers + }, + "handle-can-restart", + FALSE +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_stop_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_stop_annotation_info_pointers[] = +{ + &_console_kit_manager_method_stop_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_stop = +{ + { + -1, + (gchar *) "Stop", + NULL, + NULL, + (GDBusAnnotationInfo **) &_console_kit_manager_method_stop_annotation_info_pointers + }, + "handle-stop", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_can_stop_OUT_ARG_can_stop = +{ + { + -1, + (gchar *) "can_stop", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_can_stop_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_can_stop_OUT_ARG_can_stop, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_can_stop_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_can_stop_annotation_info_pointers[] = +{ + &_console_kit_manager_method_can_stop_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_can_stop = +{ + { + -1, + (gchar *) "CanStop", + NULL, + (GDBusArgInfo **) &_console_kit_manager_method_info_can_stop_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_console_kit_manager_method_can_stop_annotation_info_pointers + }, + "handle-can-stop", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_open_session_OUT_ARG_cookie = +{ + { + -1, + (gchar *) "cookie", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_open_session_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_open_session_OUT_ARG_cookie, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_open_session_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_open_session_annotation_info_pointers[] = +{ + &_console_kit_manager_method_open_session_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_open_session = +{ + { + -1, + (gchar *) "OpenSession", + NULL, + (GDBusArgInfo **) &_console_kit_manager_method_info_open_session_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_console_kit_manager_method_open_session_annotation_info_pointers + }, + "handle-open-session", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_open_session_with_parameters_IN_ARG_parameters = +{ + { + -1, + (gchar *) "parameters", + (gchar *) "a(sv)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_open_session_with_parameters_IN_ARG_pointers[] = +{ + &_console_kit_manager_method_info_open_session_with_parameters_IN_ARG_parameters, + NULL +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_open_session_with_parameters_OUT_ARG_cookie = +{ + { + -1, + (gchar *) "cookie", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_open_session_with_parameters_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_open_session_with_parameters_OUT_ARG_cookie, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_open_session_with_parameters_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_open_session_with_parameters_annotation_info_pointers[] = +{ + &_console_kit_manager_method_open_session_with_parameters_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_open_session_with_parameters = +{ + { + -1, + (gchar *) "OpenSessionWithParameters", + (GDBusArgInfo **) &_console_kit_manager_method_info_open_session_with_parameters_IN_ARG_pointers, + (GDBusArgInfo **) &_console_kit_manager_method_info_open_session_with_parameters_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_console_kit_manager_method_open_session_with_parameters_annotation_info_pointers + }, + "handle-open-session-with-parameters", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_close_session_IN_ARG_cookie = +{ + { + -1, + (gchar *) "cookie", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_close_session_IN_ARG_pointers[] = +{ + &_console_kit_manager_method_info_close_session_IN_ARG_cookie, + NULL +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_close_session_OUT_ARG_result = +{ + { + -1, + (gchar *) "result", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_close_session_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_close_session_OUT_ARG_result, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_close_session_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_close_session_annotation_info_pointers[] = +{ + &_console_kit_manager_method_close_session_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_close_session = +{ + { + -1, + (gchar *) "CloseSession", + (GDBusArgInfo **) &_console_kit_manager_method_info_close_session_IN_ARG_pointers, + (GDBusArgInfo **) &_console_kit_manager_method_info_close_session_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_console_kit_manager_method_close_session_annotation_info_pointers + }, + "handle-close-session", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_seats_OUT_ARG_seats = +{ + { + -1, + (gchar *) "seats", + (gchar *) "ao", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_seats_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_seats_OUT_ARG_seats, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_seats = +{ + { + -1, + (gchar *) "GetSeats", + NULL, + (GDBusArgInfo **) &_console_kit_manager_method_info_get_seats_OUT_ARG_pointers, + NULL + }, + "handle-get-seats", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_sessions_OUT_ARG_sessions = +{ + { + -1, + (gchar *) "sessions", + (gchar *) "ao", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_sessions_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_sessions_OUT_ARG_sessions, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_sessions = +{ + { + -1, + (gchar *) "GetSessions", + NULL, + (GDBusArgInfo **) &_console_kit_manager_method_info_get_sessions_OUT_ARG_pointers, + NULL + }, + "handle-get-sessions", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_session_for_cookie_IN_ARG_cookie = +{ + { + -1, + (gchar *) "cookie", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_session_for_cookie_IN_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_session_for_cookie_IN_ARG_cookie, + NULL +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_session_for_cookie_OUT_ARG_ssid = +{ + { + -1, + (gchar *) "ssid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_session_for_cookie_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_session_for_cookie_OUT_ARG_ssid, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_get_session_for_cookie_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_get_session_for_cookie_annotation_info_pointers[] = +{ + &_console_kit_manager_method_get_session_for_cookie_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_session_for_cookie = +{ + { + -1, + (gchar *) "GetSessionForCookie", + (GDBusArgInfo **) &_console_kit_manager_method_info_get_session_for_cookie_IN_ARG_pointers, + (GDBusArgInfo **) &_console_kit_manager_method_info_get_session_for_cookie_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_console_kit_manager_method_get_session_for_cookie_annotation_info_pointers + }, + "handle-get-session-for-cookie", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_session_for_unix_process_IN_ARG_pid = +{ + { + -1, + (gchar *) "pid", + (gchar *) "u", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_session_for_unix_process_IN_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_session_for_unix_process_IN_ARG_pid, + NULL +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_session_for_unix_process_OUT_ARG_ssid = +{ + { + -1, + (gchar *) "ssid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_session_for_unix_process_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_session_for_unix_process_OUT_ARG_ssid, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_get_session_for_unix_process_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_get_session_for_unix_process_annotation_info_pointers[] = +{ + &_console_kit_manager_method_get_session_for_unix_process_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_session_for_unix_process = +{ + { + -1, + (gchar *) "GetSessionForUnixProcess", + (GDBusArgInfo **) &_console_kit_manager_method_info_get_session_for_unix_process_IN_ARG_pointers, + (GDBusArgInfo **) &_console_kit_manager_method_info_get_session_for_unix_process_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_console_kit_manager_method_get_session_for_unix_process_annotation_info_pointers + }, + "handle-get-session-for-unix-process", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_current_session_OUT_ARG_ssid = +{ + { + -1, + (gchar *) "ssid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_current_session_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_current_session_OUT_ARG_ssid, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_get_current_session_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_get_current_session_annotation_info_pointers[] = +{ + &_console_kit_manager_method_get_current_session_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_current_session = +{ + { + -1, + (gchar *) "GetCurrentSession", + NULL, + (GDBusArgInfo **) &_console_kit_manager_method_info_get_current_session_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_console_kit_manager_method_get_current_session_annotation_info_pointers + }, + "handle-get-current-session", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_sessions_for_unix_user_IN_ARG_uid = +{ + { + -1, + (gchar *) "uid", + (gchar *) "u", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_sessions_for_unix_user_IN_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_sessions_for_unix_user_IN_ARG_uid, + NULL +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_sessions_for_unix_user_OUT_ARG_sessions = +{ + { + -1, + (gchar *) "sessions", + (gchar *) "ao", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_sessions_for_unix_user_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_sessions_for_unix_user_OUT_ARG_sessions, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_get_sessions_for_unix_user_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_get_sessions_for_unix_user_annotation_info_pointers[] = +{ + &_console_kit_manager_method_get_sessions_for_unix_user_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_sessions_for_unix_user = +{ + { + -1, + (gchar *) "GetSessionsForUnixUser", + (GDBusArgInfo **) &_console_kit_manager_method_info_get_sessions_for_unix_user_IN_ARG_pointers, + (GDBusArgInfo **) &_console_kit_manager_method_info_get_sessions_for_unix_user_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_console_kit_manager_method_get_sessions_for_unix_user_annotation_info_pointers + }, + "handle-get-sessions-for-unix-user", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_sessions_for_user_IN_ARG_uid = +{ + { + -1, + (gchar *) "uid", + (gchar *) "u", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_sessions_for_user_IN_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_sessions_for_user_IN_ARG_uid, + NULL +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_sessions_for_user_OUT_ARG_sessions = +{ + { + -1, + (gchar *) "sessions", + (gchar *) "ao", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_sessions_for_user_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_sessions_for_user_OUT_ARG_sessions, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_manager_method_get_sessions_for_user_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_manager_method_get_sessions_for_user_annotation_info_pointers[] = +{ + &_console_kit_manager_method_get_sessions_for_user_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_sessions_for_user = +{ + { + -1, + (gchar *) "GetSessionsForUser", + (GDBusArgInfo **) &_console_kit_manager_method_info_get_sessions_for_user_IN_ARG_pointers, + (GDBusArgInfo **) &_console_kit_manager_method_info_get_sessions_for_user_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_console_kit_manager_method_get_sessions_for_user_annotation_info_pointers + }, + "handle-get-sessions-for-user", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_system_idle_hint_OUT_ARG_idle_hint = +{ + { + -1, + (gchar *) "idle_hint", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_system_idle_hint_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_system_idle_hint_OUT_ARG_idle_hint, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_system_idle_hint = +{ + { + -1, + (gchar *) "GetSystemIdleHint", + NULL, + (GDBusArgInfo **) &_console_kit_manager_method_info_get_system_idle_hint_OUT_ARG_pointers, + NULL + }, + "handle-get-system-idle-hint", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_system_idle_since_hint_OUT_ARG_iso8601_datetime = +{ + { + -1, + (gchar *) "iso8601_datetime", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_system_idle_since_hint_OUT_ARG_pointers[] = +{ + &_console_kit_manager_method_info_get_system_idle_since_hint_OUT_ARG_iso8601_datetime, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_system_idle_since_hint = +{ + { + -1, + (gchar *) "GetSystemIdleSinceHint", + NULL, + (GDBusArgInfo **) &_console_kit_manager_method_info_get_system_idle_since_hint_OUT_ARG_pointers, + NULL + }, + "handle-get-system-idle-since-hint", + FALSE +}; + +static const _ExtendedGDBusMethodInfo * const _console_kit_manager_method_info_pointers[] = +{ + &_console_kit_manager_method_info_restart, + &_console_kit_manager_method_info_can_restart, + &_console_kit_manager_method_info_stop, + &_console_kit_manager_method_info_can_stop, + &_console_kit_manager_method_info_open_session, + &_console_kit_manager_method_info_open_session_with_parameters, + &_console_kit_manager_method_info_close_session, + &_console_kit_manager_method_info_get_seats, + &_console_kit_manager_method_info_get_sessions, + &_console_kit_manager_method_info_get_session_for_cookie, + &_console_kit_manager_method_info_get_session_for_unix_process, + &_console_kit_manager_method_info_get_current_session, + &_console_kit_manager_method_info_get_sessions_for_unix_user, + &_console_kit_manager_method_info_get_sessions_for_user, + &_console_kit_manager_method_info_get_system_idle_hint, + &_console_kit_manager_method_info_get_system_idle_since_hint, + NULL +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_signal_info_seat_added_ARG_sid = +{ + { + -1, + (gchar *) "sid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_signal_info_seat_added_ARG_pointers[] = +{ + &_console_kit_manager_signal_info_seat_added_ARG_sid, + NULL +}; + +static const _ExtendedGDBusSignalInfo _console_kit_manager_signal_info_seat_added = +{ + { + -1, + (gchar *) "SeatAdded", + (GDBusArgInfo **) &_console_kit_manager_signal_info_seat_added_ARG_pointers, + NULL + }, + "seat-added" +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_signal_info_seat_removed_ARG_sid = +{ + { + -1, + (gchar *) "sid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_signal_info_seat_removed_ARG_pointers[] = +{ + &_console_kit_manager_signal_info_seat_removed_ARG_sid, + NULL +}; + +static const _ExtendedGDBusSignalInfo _console_kit_manager_signal_info_seat_removed = +{ + { + -1, + (gchar *) "SeatRemoved", + (GDBusArgInfo **) &_console_kit_manager_signal_info_seat_removed_ARG_pointers, + NULL + }, + "seat-removed" +}; + +static const _ExtendedGDBusArgInfo _console_kit_manager_signal_info_system_idle_hint_changed_ARG_hint = +{ + { + -1, + (gchar *) "hint", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_manager_signal_info_system_idle_hint_changed_ARG_pointers[] = +{ + &_console_kit_manager_signal_info_system_idle_hint_changed_ARG_hint, + NULL +}; + +static const _ExtendedGDBusSignalInfo _console_kit_manager_signal_info_system_idle_hint_changed = +{ + { + -1, + (gchar *) "SystemIdleHintChanged", + (GDBusArgInfo **) &_console_kit_manager_signal_info_system_idle_hint_changed_ARG_pointers, + NULL + }, + "system-idle-hint-changed" +}; + +static const _ExtendedGDBusSignalInfo * const _console_kit_manager_signal_info_pointers[] = +{ + &_console_kit_manager_signal_info_seat_added, + &_console_kit_manager_signal_info_seat_removed, + &_console_kit_manager_signal_info_system_idle_hint_changed, + NULL +}; + +static const _ExtendedGDBusInterfaceInfo _console_kit_manager_interface_info = +{ + { + -1, + (gchar *) "org.freedesktop.ConsoleKit.Manager", + (GDBusMethodInfo **) &_console_kit_manager_method_info_pointers, + (GDBusSignalInfo **) &_console_kit_manager_signal_info_pointers, + NULL, + NULL + }, + "console-kit-manager", +}; + + +/** + * console_kit_manager_interface_info: + * + * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.Manager</link> D-Bus interface. + * + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + */ +GDBusInterfaceInfo * +console_kit_manager_interface_info (void) +{ + return (GDBusInterfaceInfo *) &_console_kit_manager_interface_info.parent_struct; +} + +/** + * console_kit_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 #ConsoleKitManager interface for a concrete class. + * The properties are overridden in the order they are defined. + * + * Returns: The last property id. + */ +guint +console_kit_manager_override_properties (GObjectClass *klass, guint property_id_begin) +{ + return property_id_begin - 1; +} + + + +/** + * ConsoleKitManager: + * + * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.Manager</link>. + */ + +/** + * ConsoleKitManagerIface: + * @parent_iface: The parent interface. + * @handle_can_restart: Handler for the #ConsoleKitManager::handle-can-restart signal. + * @handle_can_stop: Handler for the #ConsoleKitManager::handle-can-stop signal. + * @handle_close_session: Handler for the #ConsoleKitManager::handle-close-session signal. + * @handle_get_current_session: Handler for the #ConsoleKitManager::handle-get-current-session signal. + * @handle_get_seats: Handler for the #ConsoleKitManager::handle-get-seats signal. + * @handle_get_session_for_cookie: Handler for the #ConsoleKitManager::handle-get-session-for-cookie signal. + * @handle_get_session_for_unix_process: Handler for the #ConsoleKitManager::handle-get-session-for-unix-process signal. + * @handle_get_sessions: Handler for the #ConsoleKitManager::handle-get-sessions signal. + * @handle_get_sessions_for_unix_user: Handler for the #ConsoleKitManager::handle-get-sessions-for-unix-user signal. + * @handle_get_sessions_for_user: Handler for the #ConsoleKitManager::handle-get-sessions-for-user signal. + * @handle_get_system_idle_hint: Handler for the #ConsoleKitManager::handle-get-system-idle-hint signal. + * @handle_get_system_idle_since_hint: Handler for the #ConsoleKitManager::handle-get-system-idle-since-hint signal. + * @handle_open_session: Handler for the #ConsoleKitManager::handle-open-session signal. + * @handle_open_session_with_parameters: Handler for the #ConsoleKitManager::handle-open-session-with-parameters signal. + * @handle_restart: Handler for the #ConsoleKitManager::handle-restart signal. + * @handle_stop: Handler for the #ConsoleKitManager::handle-stop signal. + * @seat_added: Handler for the #ConsoleKitManager::seat-added signal. + * @seat_removed: Handler for the #ConsoleKitManager::seat-removed signal. + * @system_idle_hint_changed: Handler for the #ConsoleKitManager::system-idle-hint-changed signal. + * + * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.Manager</link>. + */ + +static void +console_kit_manager_default_init (ConsoleKitManagerIface *iface) +{ + /* GObject signals for incoming D-Bus method calls: */ + /** + * ConsoleKitManager::handle-restart: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-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 console_kit_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 (ConsoleKitManagerIface, handle_restart), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitManager::handle-can-restart: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-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 console_kit_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 (ConsoleKitManagerIface, handle_can_restart), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitManager::handle-stop: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.Stop">Stop()</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 console_kit_manager_complete_stop() 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-stop", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_stop), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitManager::handle-can-stop: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.CanStop">CanStop()</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 console_kit_manager_complete_can_stop() 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-stop", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_can_stop), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitManager::handle-open-session: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.OpenSession">OpenSession()</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 console_kit_manager_complete_open_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-open-session", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_open_session), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitManager::handle-open-session-with-parameters: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * @arg_parameters: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.OpenSessionWithParameters">OpenSessionWithParameters()</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 console_kit_manager_complete_open_session_with_parameters() 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-open-session-with-parameters", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_open_session_with_parameters), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT); + + /** + * ConsoleKitManager::handle-close-session: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * @arg_cookie: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.CloseSession">CloseSession()</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 console_kit_manager_complete_close_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-close-session", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_close_session), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * ConsoleKitManager::handle-get-seats: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSeats">GetSeats()</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 console_kit_manager_complete_get_seats() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-seats", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_seats), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitManager::handle-get-sessions: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessions">GetSessions()</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 console_kit_manager_complete_get_sessions() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-sessions", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_sessions), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitManager::handle-get-session-for-cookie: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * @arg_cookie: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForCookie">GetSessionForCookie()</link> D-Bus method. + * + * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call console_kit_manager_complete_get_session_for_cookie() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-session-for-cookie", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_session_for_cookie), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * ConsoleKitManager::handle-get-session-for-unix-process: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * @arg_pid: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForUnixProcess">GetSessionForUnixProcess()</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 console_kit_manager_complete_get_session_for_unix_process() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-session-for-unix-process", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_session_for_unix_process), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); + + /** + * ConsoleKitManager::handle-get-current-session: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetCurrentSession">GetCurrentSession()</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 console_kit_manager_complete_get_current_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-current-session", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_current_session), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitManager::handle-get-sessions-for-unix-user: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * @arg_uid: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionsForUnixUser">GetSessionsForUnixUser()</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 console_kit_manager_complete_get_sessions_for_unix_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-sessions-for-unix-user", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_sessions_for_unix_user), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); + + /** + * ConsoleKitManager::handle-get-sessions-for-user: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * @arg_uid: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionsForUser">GetSessionsForUser()</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 console_kit_manager_complete_get_sessions_for_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-sessions-for-user", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_sessions_for_user), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT); + + /** + * ConsoleKitManager::handle-get-system-idle-hint: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSystemIdleHint">GetSystemIdleHint()</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 console_kit_manager_complete_get_system_idle_hint() 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-system-idle-hint", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_system_idle_hint), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitManager::handle-get-system-idle-since-hint: + * @object: A #ConsoleKitManager. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSystemIdleSinceHint">GetSystemIdleSinceHint()</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 console_kit_manager_complete_get_system_idle_since_hint() 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-system-idle-since-hint", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_system_idle_since_hint), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /* GObject signals for received D-Bus signals: */ + /** + * ConsoleKitManager::seat-added: + * @object: A #ConsoleKitManager. + * @arg_sid: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Manager.SeatAdded">"SeatAdded"</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 ("seat-added", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, seat_added), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /** + * ConsoleKitManager::seat-removed: + * @object: A #ConsoleKitManager. + * @arg_sid: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Manager.SeatRemoved">"SeatRemoved"</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 ("seat-removed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, seat_removed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /** + * ConsoleKitManager::system-idle-hint-changed: + * @object: A #ConsoleKitManager. + * @arg_hint: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Manager.SystemIdleHintChanged">"SystemIdleHintChanged"</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 ("system-idle-hint-changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitManagerIface, system_idle_hint_changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_BOOLEAN); + +} + +typedef ConsoleKitManagerIface ConsoleKitManagerInterface; +G_DEFINE_INTERFACE (ConsoleKitManager, console_kit_manager, G_TYPE_OBJECT); + +/** + * console_kit_manager_emit_seat_added: + * @object: A #ConsoleKitManager. + * @arg_sid: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Manager.SeatAdded">"SeatAdded"</link> D-Bus signal. + */ +void +console_kit_manager_emit_seat_added ( + ConsoleKitManager *object, + const gchar *arg_sid) +{ + g_signal_emit_by_name (object, "seat-added", arg_sid); +} + +/** + * console_kit_manager_emit_seat_removed: + * @object: A #ConsoleKitManager. + * @arg_sid: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Manager.SeatRemoved">"SeatRemoved"</link> D-Bus signal. + */ +void +console_kit_manager_emit_seat_removed ( + ConsoleKitManager *object, + const gchar *arg_sid) +{ + g_signal_emit_by_name (object, "seat-removed", arg_sid); +} + +/** + * console_kit_manager_emit_system_idle_hint_changed: + * @object: A #ConsoleKitManager. + * @arg_hint: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Manager.SystemIdleHintChanged">"SystemIdleHintChanged"</link> D-Bus signal. + */ +void +console_kit_manager_emit_system_idle_hint_changed ( + ConsoleKitManager *object, + gboolean arg_hint) +{ + g_signal_emit_by_name (object, "system-idle-hint-changed", arg_hint); +} + +/** + * console_kit_manager_call_restart: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-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 console_kit_manager_call_restart_finish() to get the result of the operation. + * + * See console_kit_manager_call_restart_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_restart ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "Restart", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_restart_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_restart(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_restart(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_restart_finish ( + ConsoleKitManager *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; +} + +/** + * console_kit_manager_call_restart_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.Restart">Restart()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_restart() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_restart_sync ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "Restart", + 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; +} + +/** + * console_kit_manager_call_can_restart: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-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 console_kit_manager_call_can_restart_finish() to get the result of the operation. + * + * See console_kit_manager_call_can_restart_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_can_restart ( + ConsoleKitManager *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); +} + +/** + * console_kit_manager_call_can_restart_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_can_restart: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_can_restart(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_can_restart(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_can_restart_finish ( + ConsoleKitManager *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; +} + +/** + * console_kit_manager_call_can_restart_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @out_can_restart: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.CanRestart">CanRestart()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_can_restart() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_can_restart_sync ( + ConsoleKitManager *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; +} + +/** + * console_kit_manager_call_stop: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.Stop">Stop()</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 console_kit_manager_call_stop_finish() to get the result of the operation. + * + * See console_kit_manager_call_stop_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_stop ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "Stop", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_stop_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_stop(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_stop(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_stop_finish ( + ConsoleKitManager *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; +} + +/** + * console_kit_manager_call_stop_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.Stop">Stop()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_stop() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_stop_sync ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "Stop", + 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; +} + +/** + * console_kit_manager_call_can_stop: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.CanStop">CanStop()</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 console_kit_manager_call_can_stop_finish() to get the result of the operation. + * + * See console_kit_manager_call_can_stop_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_can_stop ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "CanStop", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_can_stop_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_can_stop: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_can_stop(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_can_stop(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_can_stop_finish ( + ConsoleKitManager *proxy, + gboolean *out_can_stop, + 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_stop); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_can_stop_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @out_can_stop: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.CanStop">CanStop()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_can_stop() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_can_stop_sync ( + ConsoleKitManager *proxy, + gboolean *out_can_stop, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "CanStop", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(b)", + out_can_stop); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_open_session: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.OpenSession">OpenSession()</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 console_kit_manager_call_open_session_finish() to get the result of the operation. + * + * See console_kit_manager_call_open_session_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_open_session ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "OpenSession", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_open_session_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_cookie: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_open_session(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_open_session(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_open_session_finish ( + ConsoleKitManager *proxy, + gchar **out_cookie, + 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_cookie); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_open_session_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @out_cookie: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.OpenSession">OpenSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_open_session() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_open_session_sync ( + ConsoleKitManager *proxy, + gchar **out_cookie, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "OpenSession", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_cookie); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_open_session_with_parameters: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_parameters: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.OpenSessionWithParameters">OpenSessionWithParameters()</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 console_kit_manager_call_open_session_with_parameters_finish() to get the result of the operation. + * + * See console_kit_manager_call_open_session_with_parameters_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_open_session_with_parameters ( + ConsoleKitManager *proxy, + GVariant *arg_parameters, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "OpenSessionWithParameters", + g_variant_new ("(@a(sv))", + arg_parameters), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_open_session_with_parameters_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_cookie: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_open_session_with_parameters(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_open_session_with_parameters(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_open_session_with_parameters_finish ( + ConsoleKitManager *proxy, + gchar **out_cookie, + 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_cookie); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_open_session_with_parameters_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_parameters: Argument to pass with the method invocation. + * @out_cookie: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.OpenSessionWithParameters">OpenSessionWithParameters()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_open_session_with_parameters() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_open_session_with_parameters_sync ( + ConsoleKitManager *proxy, + GVariant *arg_parameters, + gchar **out_cookie, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "OpenSessionWithParameters", + g_variant_new ("(@a(sv))", + arg_parameters), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_cookie); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_close_session: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_cookie: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.CloseSession">CloseSession()</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 console_kit_manager_call_close_session_finish() to get the result of the operation. + * + * See console_kit_manager_call_close_session_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_close_session ( + ConsoleKitManager *proxy, + const gchar *arg_cookie, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "CloseSession", + g_variant_new ("(s)", + arg_cookie), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_close_session_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_close_session(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_close_session(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_close_session_finish ( + ConsoleKitManager *proxy, + gboolean *out_result, + 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_result); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_close_session_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_cookie: Argument to pass with the method invocation. + * @out_result: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.CloseSession">CloseSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_close_session() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_close_session_sync ( + ConsoleKitManager *proxy, + const gchar *arg_cookie, + gboolean *out_result, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "CloseSession", + g_variant_new ("(s)", + arg_cookie), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(b)", + out_result); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_seats: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSeats">GetSeats()</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 console_kit_manager_call_get_seats_finish() to get the result of the operation. + * + * See console_kit_manager_call_get_seats_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_get_seats ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSeats", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_get_seats_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_seats: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_get_seats(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_get_seats(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_seats_finish ( + ConsoleKitManager *proxy, + gchar ***out_seats, + 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_seats); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_seats_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @out_seats: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSeats">GetSeats()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_get_seats() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_seats_sync ( + ConsoleKitManager *proxy, + gchar ***out_seats, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSeats", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(^ao)", + out_seats); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_sessions: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessions">GetSessions()</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 console_kit_manager_call_get_sessions_finish() to get the result of the operation. + * + * See console_kit_manager_call_get_sessions_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_get_sessions ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSessions", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_get_sessions_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_sessions: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_get_sessions(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_get_sessions(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_sessions_finish ( + ConsoleKitManager *proxy, + gchar ***out_sessions, + 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_sessions); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_sessions_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @out_sessions: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessions">GetSessions()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_get_sessions() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_sessions_sync ( + ConsoleKitManager *proxy, + gchar ***out_sessions, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSessions", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(^ao)", + out_sessions); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_session_for_cookie: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_cookie: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForCookie">GetSessionForCookie()</link> D-Bus method on @proxy. + * When the operation is finished, @callback will be invoked in the <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 console_kit_manager_call_get_session_for_cookie_finish() to get the result of the operation. + * + * See console_kit_manager_call_get_session_for_cookie_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_get_session_for_cookie ( + ConsoleKitManager *proxy, + const gchar *arg_cookie, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSessionForCookie", + g_variant_new ("(s)", + arg_cookie), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_get_session_for_cookie_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_ssid: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_get_session_for_cookie(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_get_session_for_cookie(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_session_for_cookie_finish ( + ConsoleKitManager *proxy, + gchar **out_ssid, + 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_ssid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_session_for_cookie_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_cookie: Argument to pass with the method invocation. + * @out_ssid: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForCookie">GetSessionForCookie()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_get_session_for_cookie() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_session_for_cookie_sync ( + ConsoleKitManager *proxy, + const gchar *arg_cookie, + gchar **out_ssid, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSessionForCookie", + g_variant_new ("(s)", + arg_cookie), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(o)", + out_ssid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_session_for_unix_process: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_pid: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForUnixProcess">GetSessionForUnixProcess()</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 console_kit_manager_call_get_session_for_unix_process_finish() to get the result of the operation. + * + * See console_kit_manager_call_get_session_for_unix_process_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_get_session_for_unix_process ( + ConsoleKitManager *proxy, + guint arg_pid, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSessionForUnixProcess", + g_variant_new ("(u)", + arg_pid), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_get_session_for_unix_process_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_ssid: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_get_session_for_unix_process(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_get_session_for_unix_process(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_session_for_unix_process_finish ( + ConsoleKitManager *proxy, + gchar **out_ssid, + 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_ssid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_session_for_unix_process_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_pid: Argument to pass with the method invocation. + * @out_ssid: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForUnixProcess">GetSessionForUnixProcess()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_get_session_for_unix_process() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_session_for_unix_process_sync ( + ConsoleKitManager *proxy, + guint arg_pid, + gchar **out_ssid, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSessionForUnixProcess", + g_variant_new ("(u)", + arg_pid), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(o)", + out_ssid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_current_session: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetCurrentSession">GetCurrentSession()</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 console_kit_manager_call_get_current_session_finish() to get the result of the operation. + * + * See console_kit_manager_call_get_current_session_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_get_current_session ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetCurrentSession", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_get_current_session_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_ssid: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_get_current_session(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_get_current_session(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_current_session_finish ( + ConsoleKitManager *proxy, + gchar **out_ssid, + 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_ssid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_current_session_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @out_ssid: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetCurrentSession">GetCurrentSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_get_current_session() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_current_session_sync ( + ConsoleKitManager *proxy, + gchar **out_ssid, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetCurrentSession", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(o)", + out_ssid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_sessions_for_unix_user: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_uid: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionsForUnixUser">GetSessionsForUnixUser()</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 console_kit_manager_call_get_sessions_for_unix_user_finish() to get the result of the operation. + * + * See console_kit_manager_call_get_sessions_for_unix_user_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_get_sessions_for_unix_user ( + ConsoleKitManager *proxy, + guint arg_uid, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSessionsForUnixUser", + g_variant_new ("(u)", + arg_uid), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_get_sessions_for_unix_user_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_sessions: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_get_sessions_for_unix_user(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_get_sessions_for_unix_user(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_sessions_for_unix_user_finish ( + ConsoleKitManager *proxy, + gchar ***out_sessions, + 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_sessions); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_sessions_for_unix_user_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_uid: Argument to pass with the method invocation. + * @out_sessions: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionsForUnixUser">GetSessionsForUnixUser()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_get_sessions_for_unix_user() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_sessions_for_unix_user_sync ( + ConsoleKitManager *proxy, + guint arg_uid, + gchar ***out_sessions, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSessionsForUnixUser", + g_variant_new ("(u)", + arg_uid), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(^ao)", + out_sessions); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_sessions_for_user: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_uid: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionsForUser">GetSessionsForUser()</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 console_kit_manager_call_get_sessions_for_user_finish() to get the result of the operation. + * + * See console_kit_manager_call_get_sessions_for_user_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_get_sessions_for_user ( + ConsoleKitManager *proxy, + guint arg_uid, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSessionsForUser", + g_variant_new ("(u)", + arg_uid), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_get_sessions_for_user_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_sessions: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_get_sessions_for_user(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_get_sessions_for_user(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_sessions_for_user_finish ( + ConsoleKitManager *proxy, + gchar ***out_sessions, + 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_sessions); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_sessions_for_user_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @arg_uid: Argument to pass with the method invocation. + * @out_sessions: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionsForUser">GetSessionsForUser()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_get_sessions_for_user() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_sessions_for_user_sync ( + ConsoleKitManager *proxy, + guint arg_uid, + gchar ***out_sessions, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSessionsForUser", + g_variant_new ("(u)", + arg_uid), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(^ao)", + out_sessions); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_system_idle_hint: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSystemIdleHint">GetSystemIdleHint()</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 console_kit_manager_call_get_system_idle_hint_finish() to get the result of the operation. + * + * See console_kit_manager_call_get_system_idle_hint_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_get_system_idle_hint ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSystemIdleHint", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_get_system_idle_hint_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_idle_hint: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_get_system_idle_hint(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_get_system_idle_hint(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_system_idle_hint_finish ( + ConsoleKitManager *proxy, + gboolean *out_idle_hint, + 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_idle_hint); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_system_idle_hint_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @out_idle_hint: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSystemIdleHint">GetSystemIdleHint()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_get_system_idle_hint() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_system_idle_hint_sync ( + ConsoleKitManager *proxy, + gboolean *out_idle_hint, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSystemIdleHint", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(b)", + out_idle_hint); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_system_idle_since_hint: + * @proxy: A #ConsoleKitManagerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSystemIdleSinceHint">GetSystemIdleSinceHint()</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 console_kit_manager_call_get_system_idle_since_hint_finish() to get the result of the operation. + * + * See console_kit_manager_call_get_system_idle_since_hint_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_manager_call_get_system_idle_since_hint ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSystemIdleSinceHint", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_manager_call_get_system_idle_since_hint_finish: + * @proxy: A #ConsoleKitManagerProxy. + * @out_iso8601_datetime: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_call_get_system_idle_since_hint(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_manager_call_get_system_idle_since_hint(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_system_idle_since_hint_finish ( + ConsoleKitManager *proxy, + gchar **out_iso8601_datetime, + 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_iso8601_datetime); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_call_get_system_idle_since_hint_sync: + * @proxy: A #ConsoleKitManagerProxy. + * @out_iso8601_datetime: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSystemIdleSinceHint">GetSystemIdleSinceHint()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_manager_call_get_system_idle_since_hint() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_manager_call_get_system_idle_since_hint_sync ( + ConsoleKitManager *proxy, + gchar **out_iso8601_datetime, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSystemIdleSinceHint", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_iso8601_datetime); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_manager_complete_restart: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-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 +console_kit_manager_complete_restart ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * console_kit_manager_complete_can_restart: + * @object: A #ConsoleKitManager. + * @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-freedesktop-ConsoleKit-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 +console_kit_manager_complete_can_restart ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + gboolean can_restart) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", + can_restart)); +} + +/** + * console_kit_manager_complete_stop: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.Stop">Stop()</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 +console_kit_manager_complete_stop ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * console_kit_manager_complete_can_stop: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @can_stop: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.CanStop">CanStop()</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 +console_kit_manager_complete_can_stop ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + gboolean can_stop) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", + can_stop)); +} + +/** + * console_kit_manager_complete_open_session: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @cookie: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.OpenSession">OpenSession()</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 +console_kit_manager_complete_open_session ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *cookie) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + cookie)); +} + +/** + * console_kit_manager_complete_open_session_with_parameters: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @cookie: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.OpenSessionWithParameters">OpenSessionWithParameters()</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 +console_kit_manager_complete_open_session_with_parameters ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *cookie) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + cookie)); +} + +/** + * console_kit_manager_complete_close_session: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @result: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.CloseSession">CloseSession()</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 +console_kit_manager_complete_close_session ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + gboolean result) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", + result)); +} + +/** + * console_kit_manager_complete_get_seats: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @seats: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSeats">GetSeats()</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 +console_kit_manager_complete_get_seats ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *const *seats) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(^ao)", + seats)); +} + +/** + * console_kit_manager_complete_get_sessions: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @sessions: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessions">GetSessions()</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 +console_kit_manager_complete_get_sessions ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *const *sessions) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(^ao)", + sessions)); +} + +/** + * console_kit_manager_complete_get_session_for_cookie: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @ssid: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForCookie">GetSessionForCookie()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. + * + * This method will free @invocation, you cannot use it afterwards. + */ +void +console_kit_manager_complete_get_session_for_cookie ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *ssid) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", + ssid)); +} + +/** + * console_kit_manager_complete_get_session_for_unix_process: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @ssid: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionForUnixProcess">GetSessionForUnixProcess()</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 +console_kit_manager_complete_get_session_for_unix_process ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *ssid) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", + ssid)); +} + +/** + * console_kit_manager_complete_get_current_session: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @ssid: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetCurrentSession">GetCurrentSession()</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 +console_kit_manager_complete_get_current_session ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *ssid) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", + ssid)); +} + +/** + * console_kit_manager_complete_get_sessions_for_unix_user: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @sessions: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionsForUnixUser">GetSessionsForUnixUser()</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 +console_kit_manager_complete_get_sessions_for_unix_user ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *const *sessions) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(^ao)", + sessions)); +} + +/** + * console_kit_manager_complete_get_sessions_for_user: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @sessions: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSessionsForUser">GetSessionsForUser()</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 +console_kit_manager_complete_get_sessions_for_user ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *const *sessions) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(^ao)", + sessions)); +} + +/** + * console_kit_manager_complete_get_system_idle_hint: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @idle_hint: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSystemIdleHint">GetSystemIdleHint()</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 +console_kit_manager_complete_get_system_idle_hint ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + gboolean idle_hint) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", + idle_hint)); +} + +/** + * console_kit_manager_complete_get_system_idle_since_hint: + * @object: A #ConsoleKitManager. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @iso8601_datetime: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Manager.GetSystemIdleSinceHint">GetSystemIdleSinceHint()</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 +console_kit_manager_complete_get_system_idle_since_hint ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *iso8601_datetime) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + iso8601_datetime)); +} + +/* ------------------------------------------------------------------------ */ + +/** + * ConsoleKitManagerProxy: + * + * The #ConsoleKitManagerProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * ConsoleKitManagerProxyClass: + * @parent_class: The parent class. + * + * Class structure for #ConsoleKitManagerProxy. + */ + +struct _ConsoleKitManagerProxyPrivate +{ + GData *qdata; +}; + +static void console_kit_manager_proxy_iface_init (ConsoleKitManagerIface *iface); + +G_DEFINE_TYPE_WITH_CODE (ConsoleKitManagerProxy, console_kit_manager_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (TYPE_CONSOLE_KIT_MANAGER, console_kit_manager_proxy_iface_init)); + +static void +console_kit_manager_proxy_finalize (GObject *object) +{ + ConsoleKitManagerProxy *proxy = CONSOLE_KIT_MANAGER_PROXY (object); + g_datalist_clear (&proxy->priv->qdata); + G_OBJECT_CLASS (console_kit_manager_proxy_parent_class)->finalize (object); +} + +static void +console_kit_manager_proxy_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ +} + +static void +console_kit_manager_proxy_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ +} + +static void +console_kit_manager_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) +{ + _ExtendedGDBusSignalInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint n; + guint signal_id; + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_console_kit_manager_interface_info.parent_struct, signal_name); + if (info == NULL) + return; + num_params = g_variant_n_children (parameters); + paramv = g_new0 (GValue, num_params + 1); + g_value_init (¶mv[0], TYPE_CONSOLE_KIT_MANAGER); + g_value_set_object (¶mv[0], proxy); + g_variant_iter_init (&iter, parameters); + n = 1; + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_CONSOLE_KIT_MANAGER); + g_signal_emitv (paramv, signal_id, 0, NULL); + for (n = 0; n < num_params + 1; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static void +console_kit_manager_proxy_g_properties_changed (GDBusProxy *_proxy, + GVariant *changed_properties, + const gchar *const *invalidated_properties) +{ + ConsoleKitManagerProxy *proxy = CONSOLE_KIT_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 *) &_console_kit_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 *) &_console_kit_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 +console_kit_manager_proxy_init (ConsoleKitManagerProxy *proxy) +{ + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_CONSOLE_KIT_MANAGER_PROXY, ConsoleKitManagerProxyPrivate); + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), console_kit_manager_interface_info ()); +} + +static void +console_kit_manager_proxy_class_init (ConsoleKitManagerProxyClass *klass) +{ + GObjectClass *gobject_class; + GDBusProxyClass *proxy_class; + + g_type_class_add_private (klass, sizeof (ConsoleKitManagerProxyPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = console_kit_manager_proxy_finalize; + gobject_class->get_property = console_kit_manager_proxy_get_property; + gobject_class->set_property = console_kit_manager_proxy_set_property; + + proxy_class = G_DBUS_PROXY_CLASS (klass); + proxy_class->g_signal = console_kit_manager_proxy_g_signal; + proxy_class->g_properties_changed = console_kit_manager_proxy_g_properties_changed; + +} + +static void +console_kit_manager_proxy_iface_init (ConsoleKitManagerIface *iface) +{ +} + +/** + * console_kit_manager_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.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 console_kit_manager_proxy_new_finish() to get the result of the operation. + * + * See console_kit_manager_proxy_new_sync() for the synchronous, blocking version of this constructor. + */ +void +console_kit_manager_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_CONSOLE_KIT_MANAGER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Manager", NULL); +} + +/** + * console_kit_manager_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_proxy_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with console_kit_manager_proxy_new(). + * + * Returns: (transfer full) (type ConsoleKitManagerProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitManager * +console_kit_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 CONSOLE_KIT_MANAGER (ret); + else + return NULL; +} + +/** + * console_kit_manager_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.Manager</link>. See g_dbus_proxy_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See console_kit_manager_proxy_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type ConsoleKitManagerProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitManager * +console_kit_manager_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_CONSOLE_KIT_MANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Manager", NULL); + if (ret != NULL) + return CONSOLE_KIT_MANAGER (ret); + else + return NULL; +} + + +/** + * console_kit_manager_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like console_kit_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 console_kit_manager_proxy_new_for_bus_finish() to get the result of the operation. + * + * See console_kit_manager_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +console_kit_manager_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_CONSOLE_KIT_MANAGER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Manager", NULL); +} + +/** + * console_kit_manager_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_manager_proxy_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with console_kit_manager_proxy_new_for_bus(). + * + * Returns: (transfer full) (type ConsoleKitManagerProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitManager * +console_kit_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 CONSOLE_KIT_MANAGER (ret); + else + return NULL; +} + +/** + * console_kit_manager_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like console_kit_manager_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See console_kit_manager_proxy_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type ConsoleKitManagerProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitManager * +console_kit_manager_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_CONSOLE_KIT_MANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Manager", NULL); + if (ret != NULL) + return CONSOLE_KIT_MANAGER (ret); + else + return NULL; +} + + +/* ------------------------------------------------------------------------ */ + +/** + * ConsoleKitManagerSkeleton: + * + * The #ConsoleKitManagerSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * ConsoleKitManagerSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #ConsoleKitManagerSkeleton. + */ + +struct _ConsoleKitManagerSkeletonPrivate +{ + GValue *properties; + GList *changed_properties; + GSource *changed_properties_idle_source; + GMainContext *context; + GMutex lock; +}; + +static void +_console_kit_manager_skeleton_handle_method_call ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data) +{ + ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (user_data); + _ExtendedGDBusMethodInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint num_extra; + guint n; + guint signal_id; + GValue return_value = G_VALUE_INIT; + info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); + g_assert (info != NULL); + num_params = g_variant_n_children (parameters); + num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); + n = 0; + g_value_init (¶mv[n], TYPE_CONSOLE_KIT_MANAGER); + g_value_set_object (¶mv[n++], skeleton); + g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); + g_value_set_object (¶mv[n++], invocation); + if (info->pass_fdlist) + { +#ifdef G_OS_UNIX + g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); + g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); +#else + g_assert_not_reached (); +#endif + } + g_variant_iter_init (&iter, parameters); + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_CONSOLE_KIT_MANAGER); + g_value_init (&return_value, G_TYPE_BOOLEAN); + g_signal_emitv (paramv, signal_id, 0, &return_value); + if (!g_value_get_boolean (&return_value)) + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); + g_value_unset (&return_value); + for (n = 0; n < num_params + num_extra; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static GVariant * +_console_kit_manager_skeleton_handle_get_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + gpointer user_data) +{ + ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_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 *) &_console_kit_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 +_console_kit_manager_skeleton_handle_set_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *variant, + GError **error, + gpointer user_data) +{ + ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_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 *) &_console_kit_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 _console_kit_manager_skeleton_vtable = +{ + _console_kit_manager_skeleton_handle_method_call, + _console_kit_manager_skeleton_handle_get_property, + _console_kit_manager_skeleton_handle_set_property +}; + +static GDBusInterfaceInfo * +console_kit_manager_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton) +{ + return console_kit_manager_interface_info (); +} + +static GDBusInterfaceVTable * +console_kit_manager_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton) +{ + return (GDBusInterfaceVTable *) &_console_kit_manager_skeleton_vtable; +} + +static GVariant * +console_kit_manager_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +{ + ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (_skeleton); + + GVariantBuilder builder; + guint n; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + if (_console_kit_manager_interface_info.parent_struct.properties == NULL) + goto out; + for (n = 0; _console_kit_manager_interface_info.parent_struct.properties[n] != NULL; n++) + { + GDBusPropertyInfo *info = _console_kit_manager_interface_info.parent_struct.properties[n]; + if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) + { + GVariant *value; + value = _console_kit_manager_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.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 +console_kit_manager_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +{ +} + +static void +_console_kit_manager_on_signal_seat_added ( + ConsoleKitManager *object, + const gchar *arg_sid) +{ + ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_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_sid)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Manager", "SeatAdded", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_console_kit_manager_on_signal_seat_removed ( + ConsoleKitManager *object, + const gchar *arg_sid) +{ + ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_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_sid)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Manager", "SeatRemoved", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_console_kit_manager_on_signal_system_idle_hint_changed ( + ConsoleKitManager *object, + gboolean arg_hint) +{ + ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("(b)", + arg_hint)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Manager", "SystemIdleHintChanged", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void console_kit_manager_skeleton_iface_init (ConsoleKitManagerIface *iface); +G_DEFINE_TYPE_WITH_CODE (ConsoleKitManagerSkeleton, console_kit_manager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (TYPE_CONSOLE_KIT_MANAGER, console_kit_manager_skeleton_iface_init)); + +static void +console_kit_manager_skeleton_finalize (GObject *object) +{ + ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_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 (console_kit_manager_skeleton_parent_class)->finalize (object); +} + +static void +console_kit_manager_skeleton_init (ConsoleKitManagerSkeleton *skeleton) +{ + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_CONSOLE_KIT_MANAGER_SKELETON, ConsoleKitManagerSkeletonPrivate); + g_mutex_init (&skeleton->priv->lock); + skeleton->priv->context = g_main_context_ref_thread_default (); +} + +static void +console_kit_manager_skeleton_class_init (ConsoleKitManagerSkeletonClass *klass) +{ + GObjectClass *gobject_class; + GDBusInterfaceSkeletonClass *skeleton_class; + + g_type_class_add_private (klass, sizeof (ConsoleKitManagerSkeletonPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = console_kit_manager_skeleton_finalize; + + skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); + skeleton_class->get_info = console_kit_manager_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = console_kit_manager_skeleton_dbus_interface_get_properties; + skeleton_class->flush = console_kit_manager_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = console_kit_manager_skeleton_dbus_interface_get_vtable; +} + +static void +console_kit_manager_skeleton_iface_init (ConsoleKitManagerIface *iface) +{ + iface->seat_added = _console_kit_manager_on_signal_seat_added; + iface->seat_removed = _console_kit_manager_on_signal_seat_removed; + iface->system_idle_hint_changed = _console_kit_manager_on_signal_system_idle_hint_changed; +} + +/** + * console_kit_manager_skeleton_new: + * + * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Manager.top_of_page">org.freedesktop.ConsoleKit.Manager</link>. + * + * Returns: (transfer full) (type ConsoleKitManagerSkeleton): The skeleton object. + */ +ConsoleKitManager * +console_kit_manager_skeleton_new (void) +{ + return CONSOLE_KIT_MANAGER (g_object_new (TYPE_CONSOLE_KIT_MANAGER_SKELETON, NULL)); +} + diff --git a/src/dbus-consolekit-manager.h b/src/dbus-consolekit-manager.h new file mode 100644 index 0000000..eddc6f1 --- /dev/null +++ b/src/dbus-consolekit-manager.h @@ -0,0 +1,615 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifndef __DBUS_CONSOLEKIT_MANAGER_H__ +#define __DBUS_CONSOLEKIT_MANAGER_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + + +/* ------------------------------------------------------------------------ */ +/* Declarations for org.freedesktop.ConsoleKit.Manager */ + +#define TYPE_CONSOLE_KIT_MANAGER (console_kit_manager_get_type ()) +#define CONSOLE_KIT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CONSOLE_KIT_MANAGER, ConsoleKitManager)) +#define IS_CONSOLE_KIT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CONSOLE_KIT_MANAGER)) +#define CONSOLE_KIT_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_CONSOLE_KIT_MANAGER, ConsoleKitManagerIface)) + +struct _ConsoleKitManager; +typedef struct _ConsoleKitManager ConsoleKitManager; +typedef struct _ConsoleKitManagerIface ConsoleKitManagerIface; + +struct _ConsoleKitManagerIface +{ + GTypeInterface parent_iface; + + + gboolean (*handle_can_restart) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_can_stop) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_close_session) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *arg_cookie); + + gboolean (*handle_get_current_session) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_seats) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_session_for_cookie) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *arg_cookie); + + gboolean (*handle_get_session_for_unix_process) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + guint arg_pid); + + gboolean (*handle_get_sessions) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_sessions_for_unix_user) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + guint arg_uid); + + gboolean (*handle_get_sessions_for_user) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + guint arg_uid); + + gboolean (*handle_get_system_idle_hint) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_system_idle_since_hint) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_open_session) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_open_session_with_parameters) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + GVariant *arg_parameters); + + gboolean (*handle_restart) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_stop) ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + + void (*seat_added) ( + ConsoleKitManager *object, + const gchar *arg_sid); + + void (*seat_removed) ( + ConsoleKitManager *object, + const gchar *arg_sid); + + void (*system_idle_hint_changed) ( + ConsoleKitManager *object, + gboolean arg_hint); + +}; + +GType console_kit_manager_get_type (void) G_GNUC_CONST; + +GDBusInterfaceInfo *console_kit_manager_interface_info (void); +guint console_kit_manager_override_properties (GObjectClass *klass, guint property_id_begin); + + +/* D-Bus method call completion functions: */ +void console_kit_manager_complete_restart ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + +void console_kit_manager_complete_can_restart ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + gboolean can_restart); + +void console_kit_manager_complete_stop ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation); + +void console_kit_manager_complete_can_stop ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + gboolean can_stop); + +void console_kit_manager_complete_open_session ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *cookie); + +void console_kit_manager_complete_open_session_with_parameters ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *cookie); + +void console_kit_manager_complete_close_session ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + gboolean result); + +void console_kit_manager_complete_get_seats ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *const *seats); + +void console_kit_manager_complete_get_sessions ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *const *sessions); + +void console_kit_manager_complete_get_session_for_cookie ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *ssid); + +void console_kit_manager_complete_get_session_for_unix_process ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *ssid); + +void console_kit_manager_complete_get_current_session ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *ssid); + +void console_kit_manager_complete_get_sessions_for_unix_user ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *const *sessions); + +void console_kit_manager_complete_get_sessions_for_user ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *const *sessions); + +void console_kit_manager_complete_get_system_idle_hint ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + gboolean idle_hint); + +void console_kit_manager_complete_get_system_idle_since_hint ( + ConsoleKitManager *object, + GDBusMethodInvocation *invocation, + const gchar *iso8601_datetime); + + + +/* D-Bus signal emissions functions: */ +void console_kit_manager_emit_seat_added ( + ConsoleKitManager *object, + const gchar *arg_sid); + +void console_kit_manager_emit_seat_removed ( + ConsoleKitManager *object, + const gchar *arg_sid); + +void console_kit_manager_emit_system_idle_hint_changed ( + ConsoleKitManager *object, + gboolean arg_hint); + + + +/* D-Bus method calls: */ +void console_kit_manager_call_restart ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_restart_finish ( + ConsoleKitManager *proxy, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_restart_sync ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_can_restart ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_can_restart_finish ( + ConsoleKitManager *proxy, + gboolean *out_can_restart, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_can_restart_sync ( + ConsoleKitManager *proxy, + gboolean *out_can_restart, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_stop ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_stop_finish ( + ConsoleKitManager *proxy, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_stop_sync ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_can_stop ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_can_stop_finish ( + ConsoleKitManager *proxy, + gboolean *out_can_stop, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_can_stop_sync ( + ConsoleKitManager *proxy, + gboolean *out_can_stop, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_open_session ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_open_session_finish ( + ConsoleKitManager *proxy, + gchar **out_cookie, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_open_session_sync ( + ConsoleKitManager *proxy, + gchar **out_cookie, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_open_session_with_parameters ( + ConsoleKitManager *proxy, + GVariant *arg_parameters, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_open_session_with_parameters_finish ( + ConsoleKitManager *proxy, + gchar **out_cookie, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_open_session_with_parameters_sync ( + ConsoleKitManager *proxy, + GVariant *arg_parameters, + gchar **out_cookie, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_close_session ( + ConsoleKitManager *proxy, + const gchar *arg_cookie, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_close_session_finish ( + ConsoleKitManager *proxy, + gboolean *out_result, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_close_session_sync ( + ConsoleKitManager *proxy, + const gchar *arg_cookie, + gboolean *out_result, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_get_seats ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_get_seats_finish ( + ConsoleKitManager *proxy, + gchar ***out_seats, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_get_seats_sync ( + ConsoleKitManager *proxy, + gchar ***out_seats, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_get_sessions ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_get_sessions_finish ( + ConsoleKitManager *proxy, + gchar ***out_sessions, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_get_sessions_sync ( + ConsoleKitManager *proxy, + gchar ***out_sessions, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_get_session_for_cookie ( + ConsoleKitManager *proxy, + const gchar *arg_cookie, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_get_session_for_cookie_finish ( + ConsoleKitManager *proxy, + gchar **out_ssid, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_get_session_for_cookie_sync ( + ConsoleKitManager *proxy, + const gchar *arg_cookie, + gchar **out_ssid, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_get_session_for_unix_process ( + ConsoleKitManager *proxy, + guint arg_pid, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_get_session_for_unix_process_finish ( + ConsoleKitManager *proxy, + gchar **out_ssid, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_get_session_for_unix_process_sync ( + ConsoleKitManager *proxy, + guint arg_pid, + gchar **out_ssid, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_get_current_session ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_get_current_session_finish ( + ConsoleKitManager *proxy, + gchar **out_ssid, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_get_current_session_sync ( + ConsoleKitManager *proxy, + gchar **out_ssid, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_get_sessions_for_unix_user ( + ConsoleKitManager *proxy, + guint arg_uid, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_get_sessions_for_unix_user_finish ( + ConsoleKitManager *proxy, + gchar ***out_sessions, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_get_sessions_for_unix_user_sync ( + ConsoleKitManager *proxy, + guint arg_uid, + gchar ***out_sessions, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_get_sessions_for_user ( + ConsoleKitManager *proxy, + guint arg_uid, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_get_sessions_for_user_finish ( + ConsoleKitManager *proxy, + gchar ***out_sessions, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_get_sessions_for_user_sync ( + ConsoleKitManager *proxy, + guint arg_uid, + gchar ***out_sessions, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_get_system_idle_hint ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_get_system_idle_hint_finish ( + ConsoleKitManager *proxy, + gboolean *out_idle_hint, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_get_system_idle_hint_sync ( + ConsoleKitManager *proxy, + gboolean *out_idle_hint, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_call_get_system_idle_since_hint ( + ConsoleKitManager *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_manager_call_get_system_idle_since_hint_finish ( + ConsoleKitManager *proxy, + gchar **out_iso8601_datetime, + GAsyncResult *res, + GError **error); + +gboolean console_kit_manager_call_get_system_idle_since_hint_sync ( + ConsoleKitManager *proxy, + gchar **out_iso8601_datetime, + GCancellable *cancellable, + GError **error); + + + +/* ---- */ + +#define TYPE_CONSOLE_KIT_MANAGER_PROXY (console_kit_manager_proxy_get_type ()) +#define CONSOLE_KIT_MANAGER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CONSOLE_KIT_MANAGER_PROXY, ConsoleKitManagerProxy)) +#define CONSOLE_KIT_MANAGER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_CONSOLE_KIT_MANAGER_PROXY, ConsoleKitManagerProxyClass)) +#define CONSOLE_KIT_MANAGER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_CONSOLE_KIT_MANAGER_PROXY, ConsoleKitManagerProxyClass)) +#define IS_CONSOLE_KIT_MANAGER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CONSOLE_KIT_MANAGER_PROXY)) +#define IS_CONSOLE_KIT_MANAGER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_CONSOLE_KIT_MANAGER_PROXY)) + +typedef struct _ConsoleKitManagerProxy ConsoleKitManagerProxy; +typedef struct _ConsoleKitManagerProxyClass ConsoleKitManagerProxyClass; +typedef struct _ConsoleKitManagerProxyPrivate ConsoleKitManagerProxyPrivate; + +struct _ConsoleKitManagerProxy +{ + /*< private >*/ + GDBusProxy parent_instance; + ConsoleKitManagerProxyPrivate *priv; +}; + +struct _ConsoleKitManagerProxyClass +{ + GDBusProxyClass parent_class; +}; + +GType console_kit_manager_proxy_get_type (void) G_GNUC_CONST; + +void console_kit_manager_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +ConsoleKitManager *console_kit_manager_proxy_new_finish ( + GAsyncResult *res, + GError **error); +ConsoleKitManager *console_kit_manager_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void console_kit_manager_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +ConsoleKitManager *console_kit_manager_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +ConsoleKitManager *console_kit_manager_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +/* ---- */ + +#define TYPE_CONSOLE_KIT_MANAGER_SKELETON (console_kit_manager_skeleton_get_type ()) +#define CONSOLE_KIT_MANAGER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CONSOLE_KIT_MANAGER_SKELETON, ConsoleKitManagerSkeleton)) +#define CONSOLE_KIT_MANAGER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_CONSOLE_KIT_MANAGER_SKELETON, ConsoleKitManagerSkeletonClass)) +#define CONSOLE_KIT_MANAGER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_CONSOLE_KIT_MANAGER_SKELETON, ConsoleKitManagerSkeletonClass)) +#define IS_CONSOLE_KIT_MANAGER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CONSOLE_KIT_MANAGER_SKELETON)) +#define IS_CONSOLE_KIT_MANAGER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_CONSOLE_KIT_MANAGER_SKELETON)) + +typedef struct _ConsoleKitManagerSkeleton ConsoleKitManagerSkeleton; +typedef struct _ConsoleKitManagerSkeletonClass ConsoleKitManagerSkeletonClass; +typedef struct _ConsoleKitManagerSkeletonPrivate ConsoleKitManagerSkeletonPrivate; + +struct _ConsoleKitManagerSkeleton +{ + /*< private >*/ + GDBusInterfaceSkeleton parent_instance; + ConsoleKitManagerSkeletonPrivate *priv; +}; + +struct _ConsoleKitManagerSkeletonClass +{ + GDBusInterfaceSkeletonClass parent_class; +}; + +GType console_kit_manager_skeleton_get_type (void) G_GNUC_CONST; + +ConsoleKitManager *console_kit_manager_skeleton_new (void); + + +G_END_DECLS + +#endif /* __DBUS_CONSOLEKIT_MANAGER_H__ */ diff --git a/src/dbus-consolekit-seat.c b/src/dbus-consolekit-seat.c new file mode 100644 index 0000000..368cddf --- /dev/null +++ b/src/dbus-consolekit-seat.c @@ -0,0 +1,2339 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "dbus-consolekit-seat.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; + gboolean use_gvariant; +} _ExtendedGDBusPropertyInfo; + +typedef struct +{ + GDBusInterfaceInfo parent_struct; + const gchar *hyphen_name; +} _ExtendedGDBusInterfaceInfo; + +typedef struct +{ + const _ExtendedGDBusPropertyInfo *info; + guint prop_id; + GValue orig_value; /* the value before the change */ +} ChangedProperty; + +static void +_changed_property_free (ChangedProperty *data) +{ + g_value_unset (&data->orig_value); + g_free (data); +} + +static gboolean +_g_strv_equal0 (gchar **a, gchar **b) +{ + gboolean ret = FALSE; + guint n; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + if (g_strv_length (a) != g_strv_length (b)) + goto out; + for (n = 0; a[n] != NULL; n++) + if (g_strcmp0 (a[n], b[n]) != 0) + goto out; + ret = TRUE; +out: + return ret; +} + +static gboolean +_g_variant_equal0 (GVariant *a, GVariant *b) +{ + gboolean ret = FALSE; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + ret = g_variant_equal (a, b); +out: + return ret; +} + +G_GNUC_UNUSED static gboolean +_g_value_equal (const GValue *a, const GValue *b) +{ + gboolean ret = FALSE; + g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); + switch (G_VALUE_TYPE (a)) + { + case G_TYPE_BOOLEAN: + ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); + break; + case G_TYPE_UCHAR: + ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); + break; + case G_TYPE_INT: + ret = (g_value_get_int (a) == g_value_get_int (b)); + break; + case G_TYPE_UINT: + ret = (g_value_get_uint (a) == g_value_get_uint (b)); + break; + case G_TYPE_INT64: + ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); + break; + case G_TYPE_UINT64: + ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); + break; + case G_TYPE_DOUBLE: + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } + break; + case G_TYPE_STRING: + ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); + break; + case G_TYPE_VARIANT: + ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); + break; + default: + if (G_VALUE_TYPE (a) == G_TYPE_STRV) + ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); + else + g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); + break; + } + return ret; +} + +/* ------------------------------------------------------------------------ + * Code for interface org.freedesktop.ConsoleKit.Seat + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:ConsoleKitSeat + * @title: ConsoleKitSeat + * @short_description: Generated C code for the org.freedesktop.ConsoleKit.Seat D-Bus interface + * + * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Seat.top_of_page">org.freedesktop.ConsoleKit.Seat</link> D-Bus interface in C. + */ + +/* ---- Introspection data for org.freedesktop.ConsoleKit.Seat ---- */ + +static const _ExtendedGDBusArgInfo _console_kit_seat_method_info_get_id_OUT_ARG_sid = +{ + { + -1, + (gchar *) "sid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_method_info_get_id_OUT_ARG_pointers[] = +{ + &_console_kit_seat_method_info_get_id_OUT_ARG_sid, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_seat_method_info_get_id = +{ + { + -1, + (gchar *) "GetId", + NULL, + (GDBusArgInfo **) &_console_kit_seat_method_info_get_id_OUT_ARG_pointers, + NULL + }, + "handle-get-id", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_seat_method_info_get_sessions_OUT_ARG_sessions = +{ + { + -1, + (gchar *) "sessions", + (gchar *) "ao", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_method_info_get_sessions_OUT_ARG_pointers[] = +{ + &_console_kit_seat_method_info_get_sessions_OUT_ARG_sessions, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_seat_method_info_get_sessions = +{ + { + -1, + (gchar *) "GetSessions", + NULL, + (GDBusArgInfo **) &_console_kit_seat_method_info_get_sessions_OUT_ARG_pointers, + NULL + }, + "handle-get-sessions", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_seat_method_info_get_devices_OUT_ARG_devices = +{ + { + -1, + (gchar *) "devices", + (gchar *) "a(ss)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_method_info_get_devices_OUT_ARG_pointers[] = +{ + &_console_kit_seat_method_info_get_devices_OUT_ARG_devices, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_seat_method_info_get_devices = +{ + { + -1, + (gchar *) "GetDevices", + NULL, + (GDBusArgInfo **) &_console_kit_seat_method_info_get_devices_OUT_ARG_pointers, + NULL + }, + "handle-get-devices", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_seat_method_info_get_active_session_OUT_ARG_ssid = +{ + { + -1, + (gchar *) "ssid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_method_info_get_active_session_OUT_ARG_pointers[] = +{ + &_console_kit_seat_method_info_get_active_session_OUT_ARG_ssid, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_seat_method_info_get_active_session = +{ + { + -1, + (gchar *) "GetActiveSession", + NULL, + (GDBusArgInfo **) &_console_kit_seat_method_info_get_active_session_OUT_ARG_pointers, + NULL + }, + "handle-get-active-session", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_seat_method_info_can_activate_sessions_OUT_ARG_can_activate = +{ + { + -1, + (gchar *) "can_activate", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_method_info_can_activate_sessions_OUT_ARG_pointers[] = +{ + &_console_kit_seat_method_info_can_activate_sessions_OUT_ARG_can_activate, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_seat_method_info_can_activate_sessions = +{ + { + -1, + (gchar *) "CanActivateSessions", + NULL, + (GDBusArgInfo **) &_console_kit_seat_method_info_can_activate_sessions_OUT_ARG_pointers, + NULL + }, + "handle-can-activate-sessions", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_seat_method_info_activate_session_IN_ARG_ssid = +{ + { + -1, + (gchar *) "ssid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_method_info_activate_session_IN_ARG_pointers[] = +{ + &_console_kit_seat_method_info_activate_session_IN_ARG_ssid, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_seat_method_activate_session_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_seat_method_activate_session_annotation_info_pointers[] = +{ + &_console_kit_seat_method_activate_session_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_seat_method_info_activate_session = +{ + { + -1, + (gchar *) "ActivateSession", + (GDBusArgInfo **) &_console_kit_seat_method_info_activate_session_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_console_kit_seat_method_activate_session_annotation_info_pointers + }, + "handle-activate-session", + FALSE +}; + +static const _ExtendedGDBusMethodInfo * const _console_kit_seat_method_info_pointers[] = +{ + &_console_kit_seat_method_info_get_id, + &_console_kit_seat_method_info_get_sessions, + &_console_kit_seat_method_info_get_devices, + &_console_kit_seat_method_info_get_active_session, + &_console_kit_seat_method_info_can_activate_sessions, + &_console_kit_seat_method_info_activate_session, + NULL +}; + +static const _ExtendedGDBusArgInfo _console_kit_seat_signal_info_active_session_changed_ARG_ssid = +{ + { + -1, + (gchar *) "ssid", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_signal_info_active_session_changed_ARG_pointers[] = +{ + &_console_kit_seat_signal_info_active_session_changed_ARG_ssid, + NULL +}; + +static const _ExtendedGDBusSignalInfo _console_kit_seat_signal_info_active_session_changed = +{ + { + -1, + (gchar *) "ActiveSessionChanged", + (GDBusArgInfo **) &_console_kit_seat_signal_info_active_session_changed_ARG_pointers, + NULL + }, + "active-session-changed" +}; + +static const _ExtendedGDBusArgInfo _console_kit_seat_signal_info_session_added_ARG_ssid = +{ + { + -1, + (gchar *) "ssid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_signal_info_session_added_ARG_pointers[] = +{ + &_console_kit_seat_signal_info_session_added_ARG_ssid, + NULL +}; + +static const _ExtendedGDBusSignalInfo _console_kit_seat_signal_info_session_added = +{ + { + -1, + (gchar *) "SessionAdded", + (GDBusArgInfo **) &_console_kit_seat_signal_info_session_added_ARG_pointers, + NULL + }, + "session-added" +}; + +static const _ExtendedGDBusArgInfo _console_kit_seat_signal_info_session_removed_ARG_ssid = +{ + { + -1, + (gchar *) "ssid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_signal_info_session_removed_ARG_pointers[] = +{ + &_console_kit_seat_signal_info_session_removed_ARG_ssid, + NULL +}; + +static const _ExtendedGDBusSignalInfo _console_kit_seat_signal_info_session_removed = +{ + { + -1, + (gchar *) "SessionRemoved", + (GDBusArgInfo **) &_console_kit_seat_signal_info_session_removed_ARG_pointers, + NULL + }, + "session-removed" +}; + +static const _ExtendedGDBusArgInfo _console_kit_seat_signal_info_device_added_ARG_device = +{ + { + -1, + (gchar *) "device", + (gchar *) "(ss)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_signal_info_device_added_ARG_pointers[] = +{ + &_console_kit_seat_signal_info_device_added_ARG_device, + NULL +}; + +static const _ExtendedGDBusSignalInfo _console_kit_seat_signal_info_device_added = +{ + { + -1, + (gchar *) "DeviceAdded", + (GDBusArgInfo **) &_console_kit_seat_signal_info_device_added_ARG_pointers, + NULL + }, + "device-added" +}; + +static const _ExtendedGDBusArgInfo _console_kit_seat_signal_info_device_removed_ARG_device = +{ + { + -1, + (gchar *) "device", + (gchar *) "(ss)", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_seat_signal_info_device_removed_ARG_pointers[] = +{ + &_console_kit_seat_signal_info_device_removed_ARG_device, + NULL +}; + +static const _ExtendedGDBusSignalInfo _console_kit_seat_signal_info_device_removed = +{ + { + -1, + (gchar *) "DeviceRemoved", + (GDBusArgInfo **) &_console_kit_seat_signal_info_device_removed_ARG_pointers, + NULL + }, + "device-removed" +}; + +static const _ExtendedGDBusSignalInfo * const _console_kit_seat_signal_info_pointers[] = +{ + &_console_kit_seat_signal_info_active_session_changed, + &_console_kit_seat_signal_info_session_added, + &_console_kit_seat_signal_info_session_removed, + &_console_kit_seat_signal_info_device_added, + &_console_kit_seat_signal_info_device_removed, + NULL +}; + +static const _ExtendedGDBusInterfaceInfo _console_kit_seat_interface_info = +{ + { + -1, + (gchar *) "org.freedesktop.ConsoleKit.Seat", + (GDBusMethodInfo **) &_console_kit_seat_method_info_pointers, + (GDBusSignalInfo **) &_console_kit_seat_signal_info_pointers, + NULL, + NULL + }, + "console-kit-seat", +}; + + +/** + * console_kit_seat_interface_info: + * + * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Seat.top_of_page">org.freedesktop.ConsoleKit.Seat</link> D-Bus interface. + * + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + */ +GDBusInterfaceInfo * +console_kit_seat_interface_info (void) +{ + return (GDBusInterfaceInfo *) &_console_kit_seat_interface_info.parent_struct; +} + +/** + * console_kit_seat_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 #ConsoleKitSeat interface for a concrete class. + * The properties are overridden in the order they are defined. + * + * Returns: The last property id. + */ +guint +console_kit_seat_override_properties (GObjectClass *klass, guint property_id_begin) +{ + return property_id_begin - 1; +} + + + +/** + * ConsoleKitSeat: + * + * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Seat.top_of_page">org.freedesktop.ConsoleKit.Seat</link>. + */ + +/** + * ConsoleKitSeatIface: + * @parent_iface: The parent interface. + * @handle_activate_session: Handler for the #ConsoleKitSeat::handle-activate-session signal. + * @handle_can_activate_sessions: Handler for the #ConsoleKitSeat::handle-can-activate-sessions signal. + * @handle_get_active_session: Handler for the #ConsoleKitSeat::handle-get-active-session signal. + * @handle_get_devices: Handler for the #ConsoleKitSeat::handle-get-devices signal. + * @handle_get_id: Handler for the #ConsoleKitSeat::handle-get-id signal. + * @handle_get_sessions: Handler for the #ConsoleKitSeat::handle-get-sessions signal. + * @active_session_changed: Handler for the #ConsoleKitSeat::active-session-changed signal. + * @device_added: Handler for the #ConsoleKitSeat::device-added signal. + * @device_removed: Handler for the #ConsoleKitSeat::device-removed signal. + * @session_added: Handler for the #ConsoleKitSeat::session-added signal. + * @session_removed: Handler for the #ConsoleKitSeat::session-removed signal. + * + * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Seat.top_of_page">org.freedesktop.ConsoleKit.Seat</link>. + */ + +static void +console_kit_seat_default_init (ConsoleKitSeatIface *iface) +{ + /* GObject signals for incoming D-Bus method calls: */ + /** + * ConsoleKitSeat::handle-get-id: + * @object: A #ConsoleKitSeat. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.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 console_kit_seat_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 (ConsoleKitSeatIface, handle_get_id), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSeat::handle-get-sessions: + * @object: A #ConsoleKitSeat. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetSessions">GetSessions()</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 console_kit_seat_complete_get_sessions() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-sessions", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSeatIface, handle_get_sessions), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSeat::handle-get-devices: + * @object: A #ConsoleKitSeat. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetDevices">GetDevices()</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 console_kit_seat_complete_get_devices() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-devices", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSeatIface, handle_get_devices), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSeat::handle-get-active-session: + * @object: A #ConsoleKitSeat. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetActiveSession">GetActiveSession()</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 console_kit_seat_complete_get_active_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-active-session", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSeatIface, handle_get_active_session), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSeat::handle-can-activate-sessions: + * @object: A #ConsoleKitSeat. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.CanActivateSessions">CanActivateSessions()</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 console_kit_seat_complete_can_activate_sessions() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-can-activate-sessions", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSeatIface, handle_can_activate_sessions), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSeat::handle-activate-session: + * @object: A #ConsoleKitSeat. + * @invocation: A #GDBusMethodInvocation. + * @arg_ssid: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.ActivateSession">ActivateSession()</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 console_kit_seat_complete_activate_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-activate-session", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSeatIface, handle_activate_session), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /* GObject signals for received D-Bus signals: */ + /** + * ConsoleKitSeat::active-session-changed: + * @object: A #ConsoleKitSeat. + * @arg_ssid: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Seat.ActiveSessionChanged">"ActiveSessionChanged"</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 ("active-session-changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSeatIface, active_session_changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /** + * ConsoleKitSeat::session-added: + * @object: A #ConsoleKitSeat. + * @arg_ssid: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Seat.SessionAdded">"SessionAdded"</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 ("session-added", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSeatIface, session_added), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /** + * ConsoleKitSeat::session-removed: + * @object: A #ConsoleKitSeat. + * @arg_ssid: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Seat.SessionRemoved">"SessionRemoved"</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 ("session-removed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSeatIface, session_removed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /** + * ConsoleKitSeat::device-added: + * @object: A #ConsoleKitSeat. + * @arg_device: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Seat.DeviceAdded">"DeviceAdded"</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 ("device-added", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSeatIface, device_added), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_VARIANT); + + /** + * ConsoleKitSeat::device-removed: + * @object: A #ConsoleKitSeat. + * @arg_device: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Seat.DeviceRemoved">"DeviceRemoved"</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 ("device-removed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSeatIface, device_removed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_VARIANT); + +} + +typedef ConsoleKitSeatIface ConsoleKitSeatInterface; +G_DEFINE_INTERFACE (ConsoleKitSeat, console_kit_seat, G_TYPE_OBJECT); + +/** + * console_kit_seat_emit_active_session_changed: + * @object: A #ConsoleKitSeat. + * @arg_ssid: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Seat.ActiveSessionChanged">"ActiveSessionChanged"</link> D-Bus signal. + */ +void +console_kit_seat_emit_active_session_changed ( + ConsoleKitSeat *object, + const gchar *arg_ssid) +{ + g_signal_emit_by_name (object, "active-session-changed", arg_ssid); +} + +/** + * console_kit_seat_emit_session_added: + * @object: A #ConsoleKitSeat. + * @arg_ssid: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Seat.SessionAdded">"SessionAdded"</link> D-Bus signal. + */ +void +console_kit_seat_emit_session_added ( + ConsoleKitSeat *object, + const gchar *arg_ssid) +{ + g_signal_emit_by_name (object, "session-added", arg_ssid); +} + +/** + * console_kit_seat_emit_session_removed: + * @object: A #ConsoleKitSeat. + * @arg_ssid: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Seat.SessionRemoved">"SessionRemoved"</link> D-Bus signal. + */ +void +console_kit_seat_emit_session_removed ( + ConsoleKitSeat *object, + const gchar *arg_ssid) +{ + g_signal_emit_by_name (object, "session-removed", arg_ssid); +} + +/** + * console_kit_seat_emit_device_added: + * @object: A #ConsoleKitSeat. + * @arg_device: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Seat.DeviceAdded">"DeviceAdded"</link> D-Bus signal. + */ +void +console_kit_seat_emit_device_added ( + ConsoleKitSeat *object, + GVariant *arg_device) +{ + g_signal_emit_by_name (object, "device-added", arg_device); +} + +/** + * console_kit_seat_emit_device_removed: + * @object: A #ConsoleKitSeat. + * @arg_device: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Seat.DeviceRemoved">"DeviceRemoved"</link> D-Bus signal. + */ +void +console_kit_seat_emit_device_removed ( + ConsoleKitSeat *object, + GVariant *arg_device) +{ + g_signal_emit_by_name (object, "device-removed", arg_device); +} + +/** + * console_kit_seat_call_get_id: + * @proxy: A #ConsoleKitSeatProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.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 console_kit_seat_call_get_id_finish() to get the result of the operation. + * + * See console_kit_seat_call_get_id_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_seat_call_get_id ( + ConsoleKitSeat *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); +} + +/** + * console_kit_seat_call_get_id_finish: + * @proxy: A #ConsoleKitSeatProxy. + * @out_sid: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_seat_call_get_id(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_seat_call_get_id(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_get_id_finish ( + ConsoleKitSeat *proxy, + gchar **out_sid, + 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_sid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_seat_call_get_id_sync: + * @proxy: A #ConsoleKitSeatProxy. + * @out_sid: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetId">GetId()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_seat_call_get_id() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_get_id_sync ( + ConsoleKitSeat *proxy, + gchar **out_sid, + 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, + "(o)", + out_sid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_seat_call_get_sessions: + * @proxy: A #ConsoleKitSeatProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetSessions">GetSessions()</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 console_kit_seat_call_get_sessions_finish() to get the result of the operation. + * + * See console_kit_seat_call_get_sessions_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_seat_call_get_sessions ( + ConsoleKitSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSessions", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_seat_call_get_sessions_finish: + * @proxy: A #ConsoleKitSeatProxy. + * @out_sessions: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_seat_call_get_sessions(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_seat_call_get_sessions(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_get_sessions_finish ( + ConsoleKitSeat *proxy, + gchar ***out_sessions, + 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_sessions); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_seat_call_get_sessions_sync: + * @proxy: A #ConsoleKitSeatProxy. + * @out_sessions: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetSessions">GetSessions()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_seat_call_get_sessions() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_get_sessions_sync ( + ConsoleKitSeat *proxy, + gchar ***out_sessions, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSessions", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(^ao)", + out_sessions); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_seat_call_get_devices: + * @proxy: A #ConsoleKitSeatProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetDevices">GetDevices()</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 console_kit_seat_call_get_devices_finish() to get the result of the operation. + * + * See console_kit_seat_call_get_devices_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_seat_call_get_devices ( + ConsoleKitSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetDevices", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_seat_call_get_devices_finish: + * @proxy: A #ConsoleKitSeatProxy. + * @out_devices: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_seat_call_get_devices(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_seat_call_get_devices(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_get_devices_finish ( + ConsoleKitSeat *proxy, + GVariant **out_devices, + 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(ss))", + out_devices); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_seat_call_get_devices_sync: + * @proxy: A #ConsoleKitSeatProxy. + * @out_devices: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetDevices">GetDevices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_seat_call_get_devices() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_get_devices_sync ( + ConsoleKitSeat *proxy, + GVariant **out_devices, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetDevices", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(@a(ss))", + out_devices); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_seat_call_get_active_session: + * @proxy: A #ConsoleKitSeatProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetActiveSession">GetActiveSession()</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 console_kit_seat_call_get_active_session_finish() to get the result of the operation. + * + * See console_kit_seat_call_get_active_session_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_seat_call_get_active_session ( + ConsoleKitSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetActiveSession", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_seat_call_get_active_session_finish: + * @proxy: A #ConsoleKitSeatProxy. + * @out_ssid: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_seat_call_get_active_session(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_seat_call_get_active_session(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_get_active_session_finish ( + ConsoleKitSeat *proxy, + gchar **out_ssid, + 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_ssid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_seat_call_get_active_session_sync: + * @proxy: A #ConsoleKitSeatProxy. + * @out_ssid: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetActiveSession">GetActiveSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_seat_call_get_active_session() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_get_active_session_sync ( + ConsoleKitSeat *proxy, + gchar **out_ssid, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetActiveSession", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(o)", + out_ssid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_seat_call_can_activate_sessions: + * @proxy: A #ConsoleKitSeatProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.CanActivateSessions">CanActivateSessions()</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 console_kit_seat_call_can_activate_sessions_finish() to get the result of the operation. + * + * See console_kit_seat_call_can_activate_sessions_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_seat_call_can_activate_sessions ( + ConsoleKitSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "CanActivateSessions", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_seat_call_can_activate_sessions_finish: + * @proxy: A #ConsoleKitSeatProxy. + * @out_can_activate: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_seat_call_can_activate_sessions(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_seat_call_can_activate_sessions(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_can_activate_sessions_finish ( + ConsoleKitSeat *proxy, + gboolean *out_can_activate, + 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_activate); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_seat_call_can_activate_sessions_sync: + * @proxy: A #ConsoleKitSeatProxy. + * @out_can_activate: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.CanActivateSessions">CanActivateSessions()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_seat_call_can_activate_sessions() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_can_activate_sessions_sync ( + ConsoleKitSeat *proxy, + gboolean *out_can_activate, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "CanActivateSessions", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(b)", + out_can_activate); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_seat_call_activate_session: + * @proxy: A #ConsoleKitSeatProxy. + * @arg_ssid: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.ActivateSession">ActivateSession()</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 console_kit_seat_call_activate_session_finish() to get the result of the operation. + * + * See console_kit_seat_call_activate_session_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_seat_call_activate_session ( + ConsoleKitSeat *proxy, + const gchar *arg_ssid, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "ActivateSession", + g_variant_new ("(o)", + arg_ssid), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_seat_call_activate_session_finish: + * @proxy: A #ConsoleKitSeatProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_seat_call_activate_session(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_seat_call_activate_session(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_activate_session_finish ( + ConsoleKitSeat *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; +} + +/** + * console_kit_seat_call_activate_session_sync: + * @proxy: A #ConsoleKitSeatProxy. + * @arg_ssid: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.ActivateSession">ActivateSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_seat_call_activate_session() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_seat_call_activate_session_sync ( + ConsoleKitSeat *proxy, + const gchar *arg_ssid, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "ActivateSession", + g_variant_new ("(o)", + arg_ssid), + 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; +} + +/** + * console_kit_seat_complete_get_id: + * @object: A #ConsoleKitSeat. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @sid: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.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 +console_kit_seat_complete_get_id ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + const gchar *sid) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", + sid)); +} + +/** + * console_kit_seat_complete_get_sessions: + * @object: A #ConsoleKitSeat. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @sessions: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetSessions">GetSessions()</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 +console_kit_seat_complete_get_sessions ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + const gchar *const *sessions) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(^ao)", + sessions)); +} + +/** + * console_kit_seat_complete_get_devices: + * @object: A #ConsoleKitSeat. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @devices: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetDevices">GetDevices()</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 +console_kit_seat_complete_get_devices ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + GVariant *devices) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(@a(ss))", + devices)); +} + +/** + * console_kit_seat_complete_get_active_session: + * @object: A #ConsoleKitSeat. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @ssid: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.GetActiveSession">GetActiveSession()</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 +console_kit_seat_complete_get_active_session ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + const gchar *ssid) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", + ssid)); +} + +/** + * console_kit_seat_complete_can_activate_sessions: + * @object: A #ConsoleKitSeat. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @can_activate: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.CanActivateSessions">CanActivateSessions()</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 +console_kit_seat_complete_can_activate_sessions ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + gboolean can_activate) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", + can_activate)); +} + +/** + * console_kit_seat_complete_activate_session: + * @object: A #ConsoleKitSeat. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Seat.ActivateSession">ActivateSession()</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 +console_kit_seat_complete_activate_session ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/* ------------------------------------------------------------------------ */ + +/** + * ConsoleKitSeatProxy: + * + * The #ConsoleKitSeatProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * ConsoleKitSeatProxyClass: + * @parent_class: The parent class. + * + * Class structure for #ConsoleKitSeatProxy. + */ + +struct _ConsoleKitSeatProxyPrivate +{ + GData *qdata; +}; + +static void console_kit_seat_proxy_iface_init (ConsoleKitSeatIface *iface); + +G_DEFINE_TYPE_WITH_CODE (ConsoleKitSeatProxy, console_kit_seat_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (TYPE_CONSOLE_KIT_SEAT, console_kit_seat_proxy_iface_init)); + +static void +console_kit_seat_proxy_finalize (GObject *object) +{ + ConsoleKitSeatProxy *proxy = CONSOLE_KIT_SEAT_PROXY (object); + g_datalist_clear (&proxy->priv->qdata); + G_OBJECT_CLASS (console_kit_seat_proxy_parent_class)->finalize (object); +} + +static void +console_kit_seat_proxy_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ +} + +static void +console_kit_seat_proxy_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ +} + +static void +console_kit_seat_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) +{ + _ExtendedGDBusSignalInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint n; + guint signal_id; + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_console_kit_seat_interface_info.parent_struct, signal_name); + if (info == NULL) + return; + num_params = g_variant_n_children (parameters); + paramv = g_new0 (GValue, num_params + 1); + g_value_init (¶mv[0], TYPE_CONSOLE_KIT_SEAT); + g_value_set_object (¶mv[0], proxy); + g_variant_iter_init (&iter, parameters); + n = 1; + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_CONSOLE_KIT_SEAT); + g_signal_emitv (paramv, signal_id, 0, NULL); + for (n = 0; n < num_params + 1; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static void +console_kit_seat_proxy_g_properties_changed (GDBusProxy *_proxy, + GVariant *changed_properties, + const gchar *const *invalidated_properties) +{ + ConsoleKitSeatProxy *proxy = CONSOLE_KIT_SEAT_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 *) &_console_kit_seat_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 *) &_console_kit_seat_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 +console_kit_seat_proxy_init (ConsoleKitSeatProxy *proxy) +{ + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_CONSOLE_KIT_SEAT_PROXY, ConsoleKitSeatProxyPrivate); + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), console_kit_seat_interface_info ()); +} + +static void +console_kit_seat_proxy_class_init (ConsoleKitSeatProxyClass *klass) +{ + GObjectClass *gobject_class; + GDBusProxyClass *proxy_class; + + g_type_class_add_private (klass, sizeof (ConsoleKitSeatProxyPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = console_kit_seat_proxy_finalize; + gobject_class->get_property = console_kit_seat_proxy_get_property; + gobject_class->set_property = console_kit_seat_proxy_set_property; + + proxy_class = G_DBUS_PROXY_CLASS (klass); + proxy_class->g_signal = console_kit_seat_proxy_g_signal; + proxy_class->g_properties_changed = console_kit_seat_proxy_g_properties_changed; + +} + +static void +console_kit_seat_proxy_iface_init (ConsoleKitSeatIface *iface) +{ +} + +/** + * console_kit_seat_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Seat.top_of_page">org.freedesktop.ConsoleKit.Seat</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 console_kit_seat_proxy_new_finish() to get the result of the operation. + * + * See console_kit_seat_proxy_new_sync() for the synchronous, blocking version of this constructor. + */ +void +console_kit_seat_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_CONSOLE_KIT_SEAT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Seat", NULL); +} + +/** + * console_kit_seat_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_seat_proxy_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with console_kit_seat_proxy_new(). + * + * Returns: (transfer full) (type ConsoleKitSeatProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitSeat * +console_kit_seat_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 CONSOLE_KIT_SEAT (ret); + else + return NULL; +} + +/** + * console_kit_seat_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Seat.top_of_page">org.freedesktop.ConsoleKit.Seat</link>. See g_dbus_proxy_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See console_kit_seat_proxy_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type ConsoleKitSeatProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitSeat * +console_kit_seat_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_CONSOLE_KIT_SEAT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Seat", NULL); + if (ret != NULL) + return CONSOLE_KIT_SEAT (ret); + else + return NULL; +} + + +/** + * console_kit_seat_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like console_kit_seat_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 console_kit_seat_proxy_new_for_bus_finish() to get the result of the operation. + * + * See console_kit_seat_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +console_kit_seat_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_CONSOLE_KIT_SEAT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Seat", NULL); +} + +/** + * console_kit_seat_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_seat_proxy_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with console_kit_seat_proxy_new_for_bus(). + * + * Returns: (transfer full) (type ConsoleKitSeatProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitSeat * +console_kit_seat_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 CONSOLE_KIT_SEAT (ret); + else + return NULL; +} + +/** + * console_kit_seat_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like console_kit_seat_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See console_kit_seat_proxy_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type ConsoleKitSeatProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitSeat * +console_kit_seat_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_CONSOLE_KIT_SEAT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Seat", NULL); + if (ret != NULL) + return CONSOLE_KIT_SEAT (ret); + else + return NULL; +} + + +/* ------------------------------------------------------------------------ */ + +/** + * ConsoleKitSeatSkeleton: + * + * The #ConsoleKitSeatSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * ConsoleKitSeatSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #ConsoleKitSeatSkeleton. + */ + +struct _ConsoleKitSeatSkeletonPrivate +{ + GValue *properties; + GList *changed_properties; + GSource *changed_properties_idle_source; + GMainContext *context; + GMutex lock; +}; + +static void +_console_kit_seat_skeleton_handle_method_call ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data) +{ + ConsoleKitSeatSkeleton *skeleton = CONSOLE_KIT_SEAT_SKELETON (user_data); + _ExtendedGDBusMethodInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint num_extra; + guint n; + guint signal_id; + GValue return_value = G_VALUE_INIT; + info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); + g_assert (info != NULL); + num_params = g_variant_n_children (parameters); + num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); + n = 0; + g_value_init (¶mv[n], TYPE_CONSOLE_KIT_SEAT); + g_value_set_object (¶mv[n++], skeleton); + g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); + g_value_set_object (¶mv[n++], invocation); + if (info->pass_fdlist) + { +#ifdef G_OS_UNIX + g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); + g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); +#else + g_assert_not_reached (); +#endif + } + g_variant_iter_init (&iter, parameters); + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_CONSOLE_KIT_SEAT); + g_value_init (&return_value, G_TYPE_BOOLEAN); + g_signal_emitv (paramv, signal_id, 0, &return_value); + if (!g_value_get_boolean (&return_value)) + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); + g_value_unset (&return_value); + for (n = 0; n < num_params + num_extra; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static GVariant * +_console_kit_seat_skeleton_handle_get_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + gpointer user_data) +{ + ConsoleKitSeatSkeleton *skeleton = CONSOLE_KIT_SEAT_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 *) &_console_kit_seat_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 +_console_kit_seat_skeleton_handle_set_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *variant, + GError **error, + gpointer user_data) +{ + ConsoleKitSeatSkeleton *skeleton = CONSOLE_KIT_SEAT_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 *) &_console_kit_seat_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 _console_kit_seat_skeleton_vtable = +{ + _console_kit_seat_skeleton_handle_method_call, + _console_kit_seat_skeleton_handle_get_property, + _console_kit_seat_skeleton_handle_set_property +}; + +static GDBusInterfaceInfo * +console_kit_seat_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton) +{ + return console_kit_seat_interface_info (); +} + +static GDBusInterfaceVTable * +console_kit_seat_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton) +{ + return (GDBusInterfaceVTable *) &_console_kit_seat_skeleton_vtable; +} + +static GVariant * +console_kit_seat_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +{ + ConsoleKitSeatSkeleton *skeleton = CONSOLE_KIT_SEAT_SKELETON (_skeleton); + + GVariantBuilder builder; + guint n; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + if (_console_kit_seat_interface_info.parent_struct.properties == NULL) + goto out; + for (n = 0; _console_kit_seat_interface_info.parent_struct.properties[n] != NULL; n++) + { + GDBusPropertyInfo *info = _console_kit_seat_interface_info.parent_struct.properties[n]; + if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) + { + GVariant *value; + value = _console_kit_seat_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Seat", 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 +console_kit_seat_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +{ +} + +static void +_console_kit_seat_on_signal_active_session_changed ( + ConsoleKitSeat *object, + const gchar *arg_ssid) +{ + ConsoleKitSeatSkeleton *skeleton = CONSOLE_KIT_SEAT_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_ssid)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Seat", "ActiveSessionChanged", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_console_kit_seat_on_signal_session_added ( + ConsoleKitSeat *object, + const gchar *arg_ssid) +{ + ConsoleKitSeatSkeleton *skeleton = CONSOLE_KIT_SEAT_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_ssid)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Seat", "SessionAdded", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_console_kit_seat_on_signal_session_removed ( + ConsoleKitSeat *object, + const gchar *arg_ssid) +{ + ConsoleKitSeatSkeleton *skeleton = CONSOLE_KIT_SEAT_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_ssid)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Seat", "SessionRemoved", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_console_kit_seat_on_signal_device_added ( + ConsoleKitSeat *object, + GVariant *arg_device) +{ + ConsoleKitSeatSkeleton *skeleton = CONSOLE_KIT_SEAT_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 ("(@(ss))", + arg_device)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Seat", "DeviceAdded", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_console_kit_seat_on_signal_device_removed ( + ConsoleKitSeat *object, + GVariant *arg_device) +{ + ConsoleKitSeatSkeleton *skeleton = CONSOLE_KIT_SEAT_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 ("(@(ss))", + arg_device)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Seat", "DeviceRemoved", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void console_kit_seat_skeleton_iface_init (ConsoleKitSeatIface *iface); +G_DEFINE_TYPE_WITH_CODE (ConsoleKitSeatSkeleton, console_kit_seat_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (TYPE_CONSOLE_KIT_SEAT, console_kit_seat_skeleton_iface_init)); + +static void +console_kit_seat_skeleton_finalize (GObject *object) +{ + ConsoleKitSeatSkeleton *skeleton = CONSOLE_KIT_SEAT_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 (console_kit_seat_skeleton_parent_class)->finalize (object); +} + +static void +console_kit_seat_skeleton_init (ConsoleKitSeatSkeleton *skeleton) +{ + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_CONSOLE_KIT_SEAT_SKELETON, ConsoleKitSeatSkeletonPrivate); + g_mutex_init (&skeleton->priv->lock); + skeleton->priv->context = g_main_context_ref_thread_default (); +} + +static void +console_kit_seat_skeleton_class_init (ConsoleKitSeatSkeletonClass *klass) +{ + GObjectClass *gobject_class; + GDBusInterfaceSkeletonClass *skeleton_class; + + g_type_class_add_private (klass, sizeof (ConsoleKitSeatSkeletonPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = console_kit_seat_skeleton_finalize; + + skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); + skeleton_class->get_info = console_kit_seat_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = console_kit_seat_skeleton_dbus_interface_get_properties; + skeleton_class->flush = console_kit_seat_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = console_kit_seat_skeleton_dbus_interface_get_vtable; +} + +static void +console_kit_seat_skeleton_iface_init (ConsoleKitSeatIface *iface) +{ + iface->active_session_changed = _console_kit_seat_on_signal_active_session_changed; + iface->session_added = _console_kit_seat_on_signal_session_added; + iface->session_removed = _console_kit_seat_on_signal_session_removed; + iface->device_added = _console_kit_seat_on_signal_device_added; + iface->device_removed = _console_kit_seat_on_signal_device_removed; +} + +/** + * console_kit_seat_skeleton_new: + * + * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Seat.top_of_page">org.freedesktop.ConsoleKit.Seat</link>. + * + * Returns: (transfer full) (type ConsoleKitSeatSkeleton): The skeleton object. + */ +ConsoleKitSeat * +console_kit_seat_skeleton_new (void) +{ + return CONSOLE_KIT_SEAT (g_object_new (TYPE_CONSOLE_KIT_SEAT_SKELETON, NULL)); +} + diff --git a/src/dbus-consolekit-seat.h b/src/dbus-consolekit-seat.h new file mode 100644 index 0000000..fd80a4a --- /dev/null +++ b/src/dbus-consolekit-seat.h @@ -0,0 +1,349 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifndef __DBUS_CONSOLEKIT_SEAT_H__ +#define __DBUS_CONSOLEKIT_SEAT_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + + +/* ------------------------------------------------------------------------ */ +/* Declarations for org.freedesktop.ConsoleKit.Seat */ + +#define TYPE_CONSOLE_KIT_SEAT (console_kit_seat_get_type ()) +#define CONSOLE_KIT_SEAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CONSOLE_KIT_SEAT, ConsoleKitSeat)) +#define IS_CONSOLE_KIT_SEAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CONSOLE_KIT_SEAT)) +#define CONSOLE_KIT_SEAT_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_CONSOLE_KIT_SEAT, ConsoleKitSeatIface)) + +struct _ConsoleKitSeat; +typedef struct _ConsoleKitSeat ConsoleKitSeat; +typedef struct _ConsoleKitSeatIface ConsoleKitSeatIface; + +struct _ConsoleKitSeatIface +{ + GTypeInterface parent_iface; + + + gboolean (*handle_activate_session) ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + const gchar *arg_ssid); + + gboolean (*handle_can_activate_sessions) ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_active_session) ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_devices) ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_id) ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_sessions) ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation); + + void (*active_session_changed) ( + ConsoleKitSeat *object, + const gchar *arg_ssid); + + void (*device_added) ( + ConsoleKitSeat *object, + GVariant *arg_device); + + void (*device_removed) ( + ConsoleKitSeat *object, + GVariant *arg_device); + + void (*session_added) ( + ConsoleKitSeat *object, + const gchar *arg_ssid); + + void (*session_removed) ( + ConsoleKitSeat *object, + const gchar *arg_ssid); + +}; + +GType console_kit_seat_get_type (void) G_GNUC_CONST; + +GDBusInterfaceInfo *console_kit_seat_interface_info (void); +guint console_kit_seat_override_properties (GObjectClass *klass, guint property_id_begin); + + +/* D-Bus method call completion functions: */ +void console_kit_seat_complete_get_id ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + const gchar *sid); + +void console_kit_seat_complete_get_sessions ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + const gchar *const *sessions); + +void console_kit_seat_complete_get_devices ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + GVariant *devices); + +void console_kit_seat_complete_get_active_session ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + const gchar *ssid); + +void console_kit_seat_complete_can_activate_sessions ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation, + gboolean can_activate); + +void console_kit_seat_complete_activate_session ( + ConsoleKitSeat *object, + GDBusMethodInvocation *invocation); + + + +/* D-Bus signal emissions functions: */ +void console_kit_seat_emit_active_session_changed ( + ConsoleKitSeat *object, + const gchar *arg_ssid); + +void console_kit_seat_emit_session_added ( + ConsoleKitSeat *object, + const gchar *arg_ssid); + +void console_kit_seat_emit_session_removed ( + ConsoleKitSeat *object, + const gchar *arg_ssid); + +void console_kit_seat_emit_device_added ( + ConsoleKitSeat *object, + GVariant *arg_device); + +void console_kit_seat_emit_device_removed ( + ConsoleKitSeat *object, + GVariant *arg_device); + + + +/* D-Bus method calls: */ +void console_kit_seat_call_get_id ( + ConsoleKitSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_seat_call_get_id_finish ( + ConsoleKitSeat *proxy, + gchar **out_sid, + GAsyncResult *res, + GError **error); + +gboolean console_kit_seat_call_get_id_sync ( + ConsoleKitSeat *proxy, + gchar **out_sid, + GCancellable *cancellable, + GError **error); + +void console_kit_seat_call_get_sessions ( + ConsoleKitSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_seat_call_get_sessions_finish ( + ConsoleKitSeat *proxy, + gchar ***out_sessions, + GAsyncResult *res, + GError **error); + +gboolean console_kit_seat_call_get_sessions_sync ( + ConsoleKitSeat *proxy, + gchar ***out_sessions, + GCancellable *cancellable, + GError **error); + +void console_kit_seat_call_get_devices ( + ConsoleKitSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_seat_call_get_devices_finish ( + ConsoleKitSeat *proxy, + GVariant **out_devices, + GAsyncResult *res, + GError **error); + +gboolean console_kit_seat_call_get_devices_sync ( + ConsoleKitSeat *proxy, + GVariant **out_devices, + GCancellable *cancellable, + GError **error); + +void console_kit_seat_call_get_active_session ( + ConsoleKitSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_seat_call_get_active_session_finish ( + ConsoleKitSeat *proxy, + gchar **out_ssid, + GAsyncResult *res, + GError **error); + +gboolean console_kit_seat_call_get_active_session_sync ( + ConsoleKitSeat *proxy, + gchar **out_ssid, + GCancellable *cancellable, + GError **error); + +void console_kit_seat_call_can_activate_sessions ( + ConsoleKitSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_seat_call_can_activate_sessions_finish ( + ConsoleKitSeat *proxy, + gboolean *out_can_activate, + GAsyncResult *res, + GError **error); + +gboolean console_kit_seat_call_can_activate_sessions_sync ( + ConsoleKitSeat *proxy, + gboolean *out_can_activate, + GCancellable *cancellable, + GError **error); + +void console_kit_seat_call_activate_session ( + ConsoleKitSeat *proxy, + const gchar *arg_ssid, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_seat_call_activate_session_finish ( + ConsoleKitSeat *proxy, + GAsyncResult *res, + GError **error); + +gboolean console_kit_seat_call_activate_session_sync ( + ConsoleKitSeat *proxy, + const gchar *arg_ssid, + GCancellable *cancellable, + GError **error); + + + +/* ---- */ + +#define TYPE_CONSOLE_KIT_SEAT_PROXY (console_kit_seat_proxy_get_type ()) +#define CONSOLE_KIT_SEAT_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CONSOLE_KIT_SEAT_PROXY, ConsoleKitSeatProxy)) +#define CONSOLE_KIT_SEAT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_CONSOLE_KIT_SEAT_PROXY, ConsoleKitSeatProxyClass)) +#define CONSOLE_KIT_SEAT_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_CONSOLE_KIT_SEAT_PROXY, ConsoleKitSeatProxyClass)) +#define IS_CONSOLE_KIT_SEAT_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CONSOLE_KIT_SEAT_PROXY)) +#define IS_CONSOLE_KIT_SEAT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_CONSOLE_KIT_SEAT_PROXY)) + +typedef struct _ConsoleKitSeatProxy ConsoleKitSeatProxy; +typedef struct _ConsoleKitSeatProxyClass ConsoleKitSeatProxyClass; +typedef struct _ConsoleKitSeatProxyPrivate ConsoleKitSeatProxyPrivate; + +struct _ConsoleKitSeatProxy +{ + /*< private >*/ + GDBusProxy parent_instance; + ConsoleKitSeatProxyPrivate *priv; +}; + +struct _ConsoleKitSeatProxyClass +{ + GDBusProxyClass parent_class; +}; + +GType console_kit_seat_proxy_get_type (void) G_GNUC_CONST; + +void console_kit_seat_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +ConsoleKitSeat *console_kit_seat_proxy_new_finish ( + GAsyncResult *res, + GError **error); +ConsoleKitSeat *console_kit_seat_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void console_kit_seat_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +ConsoleKitSeat *console_kit_seat_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +ConsoleKitSeat *console_kit_seat_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +/* ---- */ + +#define TYPE_CONSOLE_KIT_SEAT_SKELETON (console_kit_seat_skeleton_get_type ()) +#define CONSOLE_KIT_SEAT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CONSOLE_KIT_SEAT_SKELETON, ConsoleKitSeatSkeleton)) +#define CONSOLE_KIT_SEAT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_CONSOLE_KIT_SEAT_SKELETON, ConsoleKitSeatSkeletonClass)) +#define CONSOLE_KIT_SEAT_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_CONSOLE_KIT_SEAT_SKELETON, ConsoleKitSeatSkeletonClass)) +#define IS_CONSOLE_KIT_SEAT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CONSOLE_KIT_SEAT_SKELETON)) +#define IS_CONSOLE_KIT_SEAT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_CONSOLE_KIT_SEAT_SKELETON)) + +typedef struct _ConsoleKitSeatSkeleton ConsoleKitSeatSkeleton; +typedef struct _ConsoleKitSeatSkeletonClass ConsoleKitSeatSkeletonClass; +typedef struct _ConsoleKitSeatSkeletonPrivate ConsoleKitSeatSkeletonPrivate; + +struct _ConsoleKitSeatSkeleton +{ + /*< private >*/ + GDBusInterfaceSkeleton parent_instance; + ConsoleKitSeatSkeletonPrivate *priv; +}; + +struct _ConsoleKitSeatSkeletonClass +{ + GDBusInterfaceSkeletonClass parent_class; +}; + +GType console_kit_seat_skeleton_get_type (void) G_GNUC_CONST; + +ConsoleKitSeat *console_kit_seat_skeleton_new (void); + + +G_END_DECLS + +#endif /* __DBUS_CONSOLEKIT_SEAT_H__ */ diff --git a/src/dbus-consolekit-session.c b/src/dbus-consolekit-session.c new file mode 100644 index 0000000..ecb5173 --- /dev/null +++ b/src/dbus-consolekit-session.c @@ -0,0 +1,5587 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "dbus-consolekit-session.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; + gboolean use_gvariant; +} _ExtendedGDBusPropertyInfo; + +typedef struct +{ + GDBusInterfaceInfo parent_struct; + const gchar *hyphen_name; +} _ExtendedGDBusInterfaceInfo; + +typedef struct +{ + const _ExtendedGDBusPropertyInfo *info; + guint prop_id; + GValue orig_value; /* the value before the change */ +} ChangedProperty; + +static void +_changed_property_free (ChangedProperty *data) +{ + g_value_unset (&data->orig_value); + g_free (data); +} + +static gboolean +_g_strv_equal0 (gchar **a, gchar **b) +{ + gboolean ret = FALSE; + guint n; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + if (g_strv_length (a) != g_strv_length (b)) + goto out; + for (n = 0; a[n] != NULL; n++) + if (g_strcmp0 (a[n], b[n]) != 0) + goto out; + ret = TRUE; +out: + return ret; +} + +static gboolean +_g_variant_equal0 (GVariant *a, GVariant *b) +{ + gboolean ret = FALSE; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + ret = g_variant_equal (a, b); +out: + return ret; +} + +G_GNUC_UNUSED static gboolean +_g_value_equal (const GValue *a, const GValue *b) +{ + gboolean ret = FALSE; + g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); + switch (G_VALUE_TYPE (a)) + { + case G_TYPE_BOOLEAN: + ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); + break; + case G_TYPE_UCHAR: + ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); + break; + case G_TYPE_INT: + ret = (g_value_get_int (a) == g_value_get_int (b)); + break; + case G_TYPE_UINT: + ret = (g_value_get_uint (a) == g_value_get_uint (b)); + break; + case G_TYPE_INT64: + ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); + break; + case G_TYPE_UINT64: + ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); + break; + case G_TYPE_DOUBLE: + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } + break; + case G_TYPE_STRING: + ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); + break; + case G_TYPE_VARIANT: + ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); + break; + default: + if (G_VALUE_TYPE (a) == G_TYPE_STRV) + ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); + else + g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); + break; + } + return ret; +} + +/* ------------------------------------------------------------------------ + * Code for interface org.freedesktop.ConsoleKit.Session + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:ConsoleKitSession + * @title: ConsoleKitSession + * @short_description: Generated C code for the org.freedesktop.ConsoleKit.Session D-Bus interface + * + * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Session.top_of_page">org.freedesktop.ConsoleKit.Session</link> D-Bus interface in C. + */ + +/* ---- Introspection data for org.freedesktop.ConsoleKit.Session ---- */ + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_id_OUT_ARG_ssid = +{ + { + -1, + (gchar *) "ssid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_id_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_id_OUT_ARG_ssid, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_id = +{ + { + -1, + (gchar *) "GetId", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_id_OUT_ARG_pointers, + NULL + }, + "handle-get-id", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_seat_id_OUT_ARG_sid = +{ + { + -1, + (gchar *) "sid", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_seat_id_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_seat_id_OUT_ARG_sid, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_seat_id = +{ + { + -1, + (gchar *) "GetSeatId", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_seat_id_OUT_ARG_pointers, + NULL + }, + "handle-get-seat-id", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_session_type_OUT_ARG_type = +{ + { + -1, + (gchar *) "type", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_session_type_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_session_type_OUT_ARG_type, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_session_type = +{ + { + -1, + (gchar *) "GetSessionType", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_session_type_OUT_ARG_pointers, + NULL + }, + "handle-get-session-type", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_user_OUT_ARG_uid = +{ + { + -1, + (gchar *) "uid", + (gchar *) "u", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_user_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_user_OUT_ARG_uid, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_user = +{ + { + -1, + (gchar *) "GetUser", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_user_OUT_ARG_pointers, + NULL + }, + "handle-get-user", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_unix_user_OUT_ARG_uid = +{ + { + -1, + (gchar *) "uid", + (gchar *) "u", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_unix_user_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_unix_user_OUT_ARG_uid, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_unix_user = +{ + { + -1, + (gchar *) "GetUnixUser", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_unix_user_OUT_ARG_pointers, + NULL + }, + "handle-get-unix-user", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_x11_display_OUT_ARG_display = +{ + { + -1, + (gchar *) "display", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_x11_display_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_x11_display_OUT_ARG_display, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_x11_display = +{ + { + -1, + (gchar *) "GetX11Display", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_x11_display_OUT_ARG_pointers, + NULL + }, + "handle-get-x11-display", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_x11_display_device_OUT_ARG_x11_display_device = +{ + { + -1, + (gchar *) "x11_display_device", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_x11_display_device_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_x11_display_device_OUT_ARG_x11_display_device, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_x11_display_device = +{ + { + -1, + (gchar *) "GetX11DisplayDevice", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_x11_display_device_OUT_ARG_pointers, + NULL + }, + "handle-get-x11-display-device", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_display_device_OUT_ARG_display_device = +{ + { + -1, + (gchar *) "display_device", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_display_device_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_display_device_OUT_ARG_display_device, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_display_device = +{ + { + -1, + (gchar *) "GetDisplayDevice", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_display_device_OUT_ARG_pointers, + NULL + }, + "handle-get-display-device", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_remote_host_name_OUT_ARG_remote_host_name = +{ + { + -1, + (gchar *) "remote_host_name", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_remote_host_name_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_remote_host_name_OUT_ARG_remote_host_name, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_remote_host_name = +{ + { + -1, + (gchar *) "GetRemoteHostName", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_remote_host_name_OUT_ARG_pointers, + NULL + }, + "handle-get-remote-host-name", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_login_session_id_OUT_ARG_login_session_id = +{ + { + -1, + (gchar *) "login_session_id", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_login_session_id_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_login_session_id_OUT_ARG_login_session_id, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_login_session_id = +{ + { + -1, + (gchar *) "GetLoginSessionId", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_login_session_id_OUT_ARG_pointers, + NULL + }, + "handle-get-login-session-id", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_is_active_OUT_ARG_active = +{ + { + -1, + (gchar *) "active", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_is_active_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_is_active_OUT_ARG_active, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_is_active = +{ + { + -1, + (gchar *) "IsActive", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_is_active_OUT_ARG_pointers, + NULL + }, + "handle-is-active", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_is_local_OUT_ARG_local = +{ + { + -1, + (gchar *) "local", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_is_local_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_is_local_OUT_ARG_local, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_is_local = +{ + { + -1, + (gchar *) "IsLocal", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_is_local_OUT_ARG_pointers, + NULL + }, + "handle-is-local", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_creation_time_OUT_ARG_iso8601_datetime = +{ + { + -1, + (gchar *) "iso8601_datetime", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_creation_time_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_creation_time_OUT_ARG_iso8601_datetime, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_creation_time = +{ + { + -1, + (gchar *) "GetCreationTime", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_creation_time_OUT_ARG_pointers, + NULL + }, + "handle-get-creation-time", + FALSE +}; + +static const GDBusAnnotationInfo _console_kit_session_method_activate_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_session_method_activate_annotation_info_pointers[] = +{ + &_console_kit_session_method_activate_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_activate = +{ + { + -1, + (gchar *) "Activate", + NULL, + NULL, + (GDBusAnnotationInfo **) &_console_kit_session_method_activate_annotation_info_pointers + }, + "handle-activate", + FALSE +}; + +static const GDBusAnnotationInfo _console_kit_session_method_lock_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_session_method_lock_annotation_info_pointers[] = +{ + &_console_kit_session_method_lock_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_lock = +{ + { + -1, + (gchar *) "Lock", + NULL, + NULL, + (GDBusAnnotationInfo **) &_console_kit_session_method_lock_annotation_info_pointers + }, + "handle-lock", + FALSE +}; + +static const GDBusAnnotationInfo _console_kit_session_method_unlock_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_session_method_unlock_annotation_info_pointers[] = +{ + &_console_kit_session_method_unlock_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_unlock = +{ + { + -1, + (gchar *) "Unlock", + NULL, + NULL, + (GDBusAnnotationInfo **) &_console_kit_session_method_unlock_annotation_info_pointers + }, + "handle-unlock", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_idle_hint_OUT_ARG_idle_hint = +{ + { + -1, + (gchar *) "idle_hint", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_idle_hint_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_idle_hint_OUT_ARG_idle_hint, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_idle_hint = +{ + { + -1, + (gchar *) "GetIdleHint", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_idle_hint_OUT_ARG_pointers, + NULL + }, + "handle-get-idle-hint", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_get_idle_since_hint_OUT_ARG_iso8601_datetime = +{ + { + -1, + (gchar *) "iso8601_datetime", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_get_idle_since_hint_OUT_ARG_pointers[] = +{ + &_console_kit_session_method_info_get_idle_since_hint_OUT_ARG_iso8601_datetime, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_get_idle_since_hint = +{ + { + -1, + (gchar *) "GetIdleSinceHint", + NULL, + (GDBusArgInfo **) &_console_kit_session_method_info_get_idle_since_hint_OUT_ARG_pointers, + NULL + }, + "handle-get-idle-since-hint", + FALSE +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_method_info_set_idle_hint_IN_ARG_idle_hint = +{ + { + -1, + (gchar *) "idle_hint", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_method_info_set_idle_hint_IN_ARG_pointers[] = +{ + &_console_kit_session_method_info_set_idle_hint_IN_ARG_idle_hint, + NULL +}; + +static const GDBusAnnotationInfo _console_kit_session_method_set_idle_hint_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _console_kit_session_method_set_idle_hint_annotation_info_pointers[] = +{ + &_console_kit_session_method_set_idle_hint_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _console_kit_session_method_info_set_idle_hint = +{ + { + -1, + (gchar *) "SetIdleHint", + (GDBusArgInfo **) &_console_kit_session_method_info_set_idle_hint_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_console_kit_session_method_set_idle_hint_annotation_info_pointers + }, + "handle-set-idle-hint", + FALSE +}; + +static const _ExtendedGDBusMethodInfo * const _console_kit_session_method_info_pointers[] = +{ + &_console_kit_session_method_info_get_id, + &_console_kit_session_method_info_get_seat_id, + &_console_kit_session_method_info_get_session_type, + &_console_kit_session_method_info_get_user, + &_console_kit_session_method_info_get_unix_user, + &_console_kit_session_method_info_get_x11_display, + &_console_kit_session_method_info_get_x11_display_device, + &_console_kit_session_method_info_get_display_device, + &_console_kit_session_method_info_get_remote_host_name, + &_console_kit_session_method_info_get_login_session_id, + &_console_kit_session_method_info_is_active, + &_console_kit_session_method_info_is_local, + &_console_kit_session_method_info_get_creation_time, + &_console_kit_session_method_info_activate, + &_console_kit_session_method_info_lock, + &_console_kit_session_method_info_unlock, + &_console_kit_session_method_info_get_idle_hint, + &_console_kit_session_method_info_get_idle_since_hint, + &_console_kit_session_method_info_set_idle_hint, + NULL +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_signal_info_active_changed_ARG_is_active = +{ + { + -1, + (gchar *) "is_active", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_signal_info_active_changed_ARG_pointers[] = +{ + &_console_kit_session_signal_info_active_changed_ARG_is_active, + NULL +}; + +static const _ExtendedGDBusSignalInfo _console_kit_session_signal_info_active_changed = +{ + { + -1, + (gchar *) "ActiveChanged", + (GDBusArgInfo **) &_console_kit_session_signal_info_active_changed_ARG_pointers, + NULL + }, + "active-changed" +}; + +static const _ExtendedGDBusArgInfo _console_kit_session_signal_info_idle_hint_changed_ARG_hint = +{ + { + -1, + (gchar *) "hint", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _console_kit_session_signal_info_idle_hint_changed_ARG_pointers[] = +{ + &_console_kit_session_signal_info_idle_hint_changed_ARG_hint, + NULL +}; + +static const _ExtendedGDBusSignalInfo _console_kit_session_signal_info_idle_hint_changed = +{ + { + -1, + (gchar *) "IdleHintChanged", + (GDBusArgInfo **) &_console_kit_session_signal_info_idle_hint_changed_ARG_pointers, + NULL + }, + "idle-hint-changed" +}; + +static const _ExtendedGDBusSignalInfo _console_kit_session_signal_info_lock = +{ + { + -1, + (gchar *) "Lock", + NULL, + NULL + }, + "lock" +}; + +static const _ExtendedGDBusSignalInfo _console_kit_session_signal_info_unlock = +{ + { + -1, + (gchar *) "Unlock", + NULL, + NULL + }, + "unlock" +}; + +static const _ExtendedGDBusSignalInfo * const _console_kit_session_signal_info_pointers[] = +{ + &_console_kit_session_signal_info_active_changed, + &_console_kit_session_signal_info_idle_hint_changed, + &_console_kit_session_signal_info_lock, + &_console_kit_session_signal_info_unlock, + NULL +}; + +static const _ExtendedGDBusPropertyInfo _console_kit_session_property_info_unix_user = +{ + { + -1, + (gchar *) "unix-user", + (gchar *) "u", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, + NULL + }, + "unix-user", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _console_kit_session_property_info_user = +{ + { + -1, + (gchar *) "user", + (gchar *) "u", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, + NULL + }, + "user", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _console_kit_session_property_info_session_type = +{ + { + -1, + (gchar *) "session-type", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, + NULL + }, + "session-type", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _console_kit_session_property_info_remote_host_name = +{ + { + -1, + (gchar *) "remote-host-name", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, + NULL + }, + "remote-host-name", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _console_kit_session_property_info_display_device = +{ + { + -1, + (gchar *) "display-device", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, + NULL + }, + "display-device", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _console_kit_session_property_info_x11_display = +{ + { + -1, + (gchar *) "x11-display", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, + NULL + }, + "x11-display", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _console_kit_session_property_info_x11_display_device = +{ + { + -1, + (gchar *) "x11-display-device", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, + NULL + }, + "x11-display-device", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _console_kit_session_property_info_active = +{ + { + -1, + (gchar *) "active", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, + NULL + }, + "active", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _console_kit_session_property_info_is_local = +{ + { + -1, + (gchar *) "is-local", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, + NULL + }, + "is-local", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _console_kit_session_property_info_idle_hint = +{ + { + -1, + (gchar *) "idle-hint", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, + NULL + }, + "idle-hint", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo * const _console_kit_session_property_info_pointers[] = +{ + &_console_kit_session_property_info_unix_user, + &_console_kit_session_property_info_user, + &_console_kit_session_property_info_session_type, + &_console_kit_session_property_info_remote_host_name, + &_console_kit_session_property_info_display_device, + &_console_kit_session_property_info_x11_display, + &_console_kit_session_property_info_x11_display_device, + &_console_kit_session_property_info_active, + &_console_kit_session_property_info_is_local, + &_console_kit_session_property_info_idle_hint, + NULL +}; + +static const _ExtendedGDBusInterfaceInfo _console_kit_session_interface_info = +{ + { + -1, + (gchar *) "org.freedesktop.ConsoleKit.Session", + (GDBusMethodInfo **) &_console_kit_session_method_info_pointers, + (GDBusSignalInfo **) &_console_kit_session_signal_info_pointers, + (GDBusPropertyInfo **) &_console_kit_session_property_info_pointers, + NULL + }, + "console-kit-session", +}; + + +/** + * console_kit_session_interface_info: + * + * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Session.top_of_page">org.freedesktop.ConsoleKit.Session</link> D-Bus interface. + * + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + */ +GDBusInterfaceInfo * +console_kit_session_interface_info (void) +{ + return (GDBusInterfaceInfo *) &_console_kit_session_interface_info.parent_struct; +} + +/** + * console_kit_session_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 #ConsoleKitSession interface for a concrete class. + * The properties are overridden in the order they are defined. + * + * Returns: The last property id. + */ +guint +console_kit_session_override_properties (GObjectClass *klass, guint property_id_begin) +{ + g_object_class_override_property (klass, property_id_begin++, "unix-user"); + g_object_class_override_property (klass, property_id_begin++, "user"); + g_object_class_override_property (klass, property_id_begin++, "session-type"); + g_object_class_override_property (klass, property_id_begin++, "remote-host-name"); + g_object_class_override_property (klass, property_id_begin++, "display-device"); + g_object_class_override_property (klass, property_id_begin++, "x11-display"); + g_object_class_override_property (klass, property_id_begin++, "x11-display-device"); + g_object_class_override_property (klass, property_id_begin++, "active"); + g_object_class_override_property (klass, property_id_begin++, "is-local"); + g_object_class_override_property (klass, property_id_begin++, "idle-hint"); + return property_id_begin - 1; +} + + + +/** + * ConsoleKitSession: + * + * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Session.top_of_page">org.freedesktop.ConsoleKit.Session</link>. + */ + +/** + * ConsoleKitSessionIface: + * @parent_iface: The parent interface. + * @handle_activate: Handler for the #ConsoleKitSession::handle-activate signal. + * @handle_get_creation_time: Handler for the #ConsoleKitSession::handle-get-creation-time signal. + * @handle_get_display_device: Handler for the #ConsoleKitSession::handle-get-display-device signal. + * @handle_get_id: Handler for the #ConsoleKitSession::handle-get-id signal. + * @handle_get_idle_hint: Handler for the #ConsoleKitSession::handle-get-idle-hint signal. + * @handle_get_idle_since_hint: Handler for the #ConsoleKitSession::handle-get-idle-since-hint signal. + * @handle_get_login_session_id: Handler for the #ConsoleKitSession::handle-get-login-session-id signal. + * @handle_get_remote_host_name: Handler for the #ConsoleKitSession::handle-get-remote-host-name signal. + * @handle_get_seat_id: Handler for the #ConsoleKitSession::handle-get-seat-id signal. + * @handle_get_session_type: Handler for the #ConsoleKitSession::handle-get-session-type signal. + * @handle_get_unix_user: Handler for the #ConsoleKitSession::handle-get-unix-user signal. + * @handle_get_user: Handler for the #ConsoleKitSession::handle-get-user signal. + * @handle_get_x11_display: Handler for the #ConsoleKitSession::handle-get-x11-display signal. + * @handle_get_x11_display_device: Handler for the #ConsoleKitSession::handle-get-x11-display-device signal. + * @handle_is_active: Handler for the #ConsoleKitSession::handle-is-active signal. + * @handle_is_local: Handler for the #ConsoleKitSession::handle-is-local signal. + * @handle_lock: Handler for the #ConsoleKitSession::handle-lock signal. + * @handle_set_idle_hint: Handler for the #ConsoleKitSession::handle-set-idle-hint signal. + * @handle_unlock: Handler for the #ConsoleKitSession::handle-unlock signal. + * @get_active: Getter for the #ConsoleKitSession:active property. + * @get_display_device: Getter for the #ConsoleKitSession:display-device property. + * @get_idle_hint: Getter for the #ConsoleKitSession:idle-hint property. + * @get_is_local: Getter for the #ConsoleKitSession:is-local property. + * @get_remote_host_name: Getter for the #ConsoleKitSession:remote-host-name property. + * @get_session_type: Getter for the #ConsoleKitSession:session-type property. + * @get_unix_user: Getter for the #ConsoleKitSession:unix-user property. + * @get_user: Getter for the #ConsoleKitSession:user property. + * @get_x11_display: Getter for the #ConsoleKitSession:x11-display property. + * @get_x11_display_device: Getter for the #ConsoleKitSession:x11-display-device property. + * @active_changed: Handler for the #ConsoleKitSession::active-changed signal. + * @idle_hint_changed: Handler for the #ConsoleKitSession::idle-hint-changed signal. + * @lock: Handler for the #ConsoleKitSession::lock signal. + * @unlock: Handler for the #ConsoleKitSession::unlock signal. + * + * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Session.top_of_page">org.freedesktop.ConsoleKit.Session</link>. + */ + +static void +console_kit_session_default_init (ConsoleKitSessionIface *iface) +{ + /* GObject signals for incoming D-Bus method calls: */ + /** + * ConsoleKitSession::handle-get-id: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.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 console_kit_session_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 (ConsoleKitSessionIface, handle_get_id), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-seat-id: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetSeatId">GetSeatId()</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 console_kit_session_complete_get_seat_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-seat-id", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_seat_id), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-session-type: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetSessionType">GetSessionType()</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 console_kit_session_complete_get_session_type() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-session-type", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_session_type), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-user: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetUser">GetUser()</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 console_kit_session_complete_get_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-user", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_user), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-unix-user: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetUnixUser">GetUnixUser()</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 console_kit_session_complete_get_unix_user() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-unix-user", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_unix_user), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-x11-display: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetX11Display">GetX11Display()</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 console_kit_session_complete_get_x11_display() 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-x11-display", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_x11_display), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-x11-display-device: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetX11DisplayDevice">GetX11DisplayDevice()</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 console_kit_session_complete_get_x11_display_device() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-x11-display-device", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_x11_display_device), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-display-device: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetDisplayDevice">GetDisplayDevice()</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 console_kit_session_complete_get_display_device() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-display-device", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_display_device), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-remote-host-name: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetRemoteHostName">GetRemoteHostName()</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 console_kit_session_complete_get_remote_host_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-remote-host-name", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_remote_host_name), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-login-session-id: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetLoginSessionId">GetLoginSessionId()</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 console_kit_session_complete_get_login_session_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-login-session-id", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_login_session_id), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-is-active: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.IsActive">IsActive()</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 console_kit_session_complete_is_active() 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-is-active", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_is_active), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-is-local: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.IsLocal">IsLocal()</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 console_kit_session_complete_is_local() 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-is-local", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_is_local), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-creation-time: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetCreationTime">GetCreationTime()</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 console_kit_session_complete_get_creation_time() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-get-creation-time", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_creation_time), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-activate: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Activate">Activate()</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 console_kit_session_complete_activate() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-activate", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_activate), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-lock: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Lock">Lock()</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 console_kit_session_complete_lock() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-lock", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_lock), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-unlock: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Unlock">Unlock()</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 console_kit_session_complete_unlock() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-unlock", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_unlock), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-idle-hint: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetIdleHint">GetIdleHint()</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 console_kit_session_complete_get_idle_hint() 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-idle-hint", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_idle_hint), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-get-idle-since-hint: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetIdleSinceHint">GetIdleSinceHint()</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 console_kit_session_complete_get_idle_since_hint() 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-idle-since-hint", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_get_idle_since_hint), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * ConsoleKitSession::handle-set-idle-hint: + * @object: A #ConsoleKitSession. + * @invocation: A #GDBusMethodInvocation. + * @arg_idle_hint: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.SetIdleHint">SetIdleHint()</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 console_kit_session_complete_set_idle_hint() 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-idle-hint", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, handle_set_idle_hint), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); + + /* GObject signals for received D-Bus signals: */ + /** + * ConsoleKitSession::active-changed: + * @object: A #ConsoleKitSession. + * @arg_is_active: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Session.ActiveChanged">"ActiveChanged"</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 ("active-changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, active_changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_BOOLEAN); + + /** + * ConsoleKitSession::idle-hint-changed: + * @object: A #ConsoleKitSession. + * @arg_hint: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Session.IdleHintChanged">"IdleHintChanged"</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 ("idle-hint-changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, idle_hint_changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_BOOLEAN); + + /** + * ConsoleKitSession::lock: + * @object: A #ConsoleKitSession. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Session.Lock">"Lock"</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 ("lock", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, lock), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 0); + + /** + * ConsoleKitSession::unlock: + * @object: A #ConsoleKitSession. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Session.Unlock">"Unlock"</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 ("unlock", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (ConsoleKitSessionIface, unlock), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 0); + + /* GObject properties for D-Bus properties: */ + /** + * ConsoleKitSession:unix-user: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.unix-user">"unix-user"</link>. + * + * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. + */ + g_object_interface_install_property (iface, + g_param_spec_uint ("unix-user", "unix-user", "unix-user", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * ConsoleKitSession:user: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.user">"user"</link>. + * + * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. + */ + g_object_interface_install_property (iface, + g_param_spec_uint ("user", "user", "user", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * ConsoleKitSession:session-type: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.session-type">"session-type"</link>. + * + * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("session-type", "session-type", "session-type", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * ConsoleKitSession:remote-host-name: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.remote-host-name">"remote-host-name"</link>. + * + * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("remote-host-name", "remote-host-name", "remote-host-name", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * ConsoleKitSession:display-device: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.display-device">"display-device"</link>. + * + * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("display-device", "display-device", "display-device", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * ConsoleKitSession:x11-display: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.x11-display">"x11-display"</link>. + * + * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("x11-display", "x11-display", "x11-display", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * ConsoleKitSession:x11-display-device: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.x11-display-device">"x11-display-device"</link>. + * + * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("x11-display-device", "x11-display-device", "x11-display-device", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * ConsoleKitSession:active: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.active">"active"</link>. + * + * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * ConsoleKitSession:is-local: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.is-local">"is-local"</link>. + * + * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("is-local", "is-local", "is-local", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * ConsoleKitSession:idle-hint: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.idle-hint">"idle-hint"</link>. + * + * Since the D-Bus property for this #GObject property is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("idle-hint", "idle-hint", "idle-hint", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); +} + +typedef ConsoleKitSessionIface ConsoleKitSessionInterface; +G_DEFINE_INTERFACE (ConsoleKitSession, console_kit_session, G_TYPE_OBJECT); + +/** + * console_kit_session_get_unix_user: (skip) + * @object: A #ConsoleKitSession. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.unix-user">"unix-user"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +guint +console_kit_session_get_unix_user (ConsoleKitSession *object) +{ + return CONSOLE_KIT_SESSION_GET_IFACE (object)->get_unix_user (object); +} + +/** + * console_kit_session_set_unix_user: (skip) + * @object: A #ConsoleKitSession. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.unix-user">"unix-user"</link> D-Bus property to @value. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + */ +void +console_kit_session_set_unix_user (ConsoleKitSession *object, guint value) +{ + g_object_set (G_OBJECT (object), "unix-user", value, NULL); +} + +/** + * console_kit_session_get_user: (skip) + * @object: A #ConsoleKitSession. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.user">"user"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +guint +console_kit_session_get_user (ConsoleKitSession *object) +{ + return CONSOLE_KIT_SESSION_GET_IFACE (object)->get_user (object); +} + +/** + * console_kit_session_set_user: (skip) + * @object: A #ConsoleKitSession. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.user">"user"</link> D-Bus property to @value. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + */ +void +console_kit_session_set_user (ConsoleKitSession *object, guint value) +{ + g_object_set (G_OBJECT (object), "user", value, NULL); +} + +/** + * console_kit_session_get_session_type: (skip) + * @object: A #ConsoleKitSession. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.session-type">"session-type"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use console_kit_session_dup_session_type() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +console_kit_session_get_session_type (ConsoleKitSession *object) +{ + return CONSOLE_KIT_SESSION_GET_IFACE (object)->get_session_type (object); +} + +/** + * console_kit_session_dup_session_type: (skip) + * @object: A #ConsoleKitSession. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.session-type">"session-type"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +console_kit_session_dup_session_type (ConsoleKitSession *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "session-type", &value, NULL); + return value; +} + +/** + * console_kit_session_set_session_type: (skip) + * @object: A #ConsoleKitSession. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.session-type">"session-type"</link> D-Bus property to @value. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + */ +void +console_kit_session_set_session_type (ConsoleKitSession *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "session-type", value, NULL); +} + +/** + * console_kit_session_get_remote_host_name: (skip) + * @object: A #ConsoleKitSession. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.remote-host-name">"remote-host-name"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use console_kit_session_dup_remote_host_name() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +console_kit_session_get_remote_host_name (ConsoleKitSession *object) +{ + return CONSOLE_KIT_SESSION_GET_IFACE (object)->get_remote_host_name (object); +} + +/** + * console_kit_session_dup_remote_host_name: (skip) + * @object: A #ConsoleKitSession. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.remote-host-name">"remote-host-name"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +console_kit_session_dup_remote_host_name (ConsoleKitSession *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "remote-host-name", &value, NULL); + return value; +} + +/** + * console_kit_session_set_remote_host_name: (skip) + * @object: A #ConsoleKitSession. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.remote-host-name">"remote-host-name"</link> D-Bus property to @value. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + */ +void +console_kit_session_set_remote_host_name (ConsoleKitSession *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "remote-host-name", value, NULL); +} + +/** + * console_kit_session_get_display_device: (skip) + * @object: A #ConsoleKitSession. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.display-device">"display-device"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use console_kit_session_dup_display_device() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +console_kit_session_get_display_device (ConsoleKitSession *object) +{ + return CONSOLE_KIT_SESSION_GET_IFACE (object)->get_display_device (object); +} + +/** + * console_kit_session_dup_display_device: (skip) + * @object: A #ConsoleKitSession. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.display-device">"display-device"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +console_kit_session_dup_display_device (ConsoleKitSession *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "display-device", &value, NULL); + return value; +} + +/** + * console_kit_session_set_display_device: (skip) + * @object: A #ConsoleKitSession. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.display-device">"display-device"</link> D-Bus property to @value. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + */ +void +console_kit_session_set_display_device (ConsoleKitSession *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "display-device", value, NULL); +} + +/** + * console_kit_session_get_x11_display: (skip) + * @object: A #ConsoleKitSession. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.x11-display">"x11-display"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use console_kit_session_dup_x11_display() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +console_kit_session_get_x11_display (ConsoleKitSession *object) +{ + return CONSOLE_KIT_SESSION_GET_IFACE (object)->get_x11_display (object); +} + +/** + * console_kit_session_dup_x11_display: (skip) + * @object: A #ConsoleKitSession. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.x11-display">"x11-display"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +console_kit_session_dup_x11_display (ConsoleKitSession *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "x11-display", &value, NULL); + return value; +} + +/** + * console_kit_session_set_x11_display: (skip) + * @object: A #ConsoleKitSession. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.x11-display">"x11-display"</link> D-Bus property to @value. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + */ +void +console_kit_session_set_x11_display (ConsoleKitSession *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "x11-display", value, NULL); +} + +/** + * console_kit_session_get_x11_display_device: (skip) + * @object: A #ConsoleKitSession. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.x11-display-device">"x11-display-device"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use console_kit_session_dup_x11_display_device() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +console_kit_session_get_x11_display_device (ConsoleKitSession *object) +{ + return CONSOLE_KIT_SESSION_GET_IFACE (object)->get_x11_display_device (object); +} + +/** + * console_kit_session_dup_x11_display_device: (skip) + * @object: A #ConsoleKitSession. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.x11-display-device">"x11-display-device"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +console_kit_session_dup_x11_display_device (ConsoleKitSession *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "x11-display-device", &value, NULL); + return value; +} + +/** + * console_kit_session_set_x11_display_device: (skip) + * @object: A #ConsoleKitSession. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.x11-display-device">"x11-display-device"</link> D-Bus property to @value. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + */ +void +console_kit_session_set_x11_display_device (ConsoleKitSession *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "x11-display-device", value, NULL); +} + +/** + * console_kit_session_get_active: (skip) + * @object: A #ConsoleKitSession. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.active">"active"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +console_kit_session_get_active (ConsoleKitSession *object) +{ + return CONSOLE_KIT_SESSION_GET_IFACE (object)->get_active (object); +} + +/** + * console_kit_session_set_active: (skip) + * @object: A #ConsoleKitSession. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.active">"active"</link> D-Bus property to @value. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + */ +void +console_kit_session_set_active (ConsoleKitSession *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "active", value, NULL); +} + +/** + * console_kit_session_get_is_local: (skip) + * @object: A #ConsoleKitSession. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.is-local">"is-local"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +console_kit_session_get_is_local (ConsoleKitSession *object) +{ + return CONSOLE_KIT_SESSION_GET_IFACE (object)->get_is_local (object); +} + +/** + * console_kit_session_set_is_local: (skip) + * @object: A #ConsoleKitSession. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.is-local">"is-local"</link> D-Bus property to @value. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + */ +void +console_kit_session_set_is_local (ConsoleKitSession *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "is-local", value, NULL); +} + +/** + * console_kit_session_get_idle_hint: (skip) + * @object: A #ConsoleKitSession. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.idle-hint">"idle-hint"</link> D-Bus property. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +console_kit_session_get_idle_hint (ConsoleKitSession *object) +{ + return CONSOLE_KIT_SESSION_GET_IFACE (object)->get_idle_hint (object); +} + +/** + * console_kit_session_set_idle_hint: (skip) + * @object: A #ConsoleKitSession. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-ConsoleKit-Session.idle-hint">"idle-hint"</link> D-Bus property to @value. + * + * Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. + */ +void +console_kit_session_set_idle_hint (ConsoleKitSession *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "idle-hint", value, NULL); +} + +/** + * console_kit_session_emit_active_changed: + * @object: A #ConsoleKitSession. + * @arg_is_active: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Session.ActiveChanged">"ActiveChanged"</link> D-Bus signal. + */ +void +console_kit_session_emit_active_changed ( + ConsoleKitSession *object, + gboolean arg_is_active) +{ + g_signal_emit_by_name (object, "active-changed", arg_is_active); +} + +/** + * console_kit_session_emit_idle_hint_changed: + * @object: A #ConsoleKitSession. + * @arg_hint: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Session.IdleHintChanged">"IdleHintChanged"</link> D-Bus signal. + */ +void +console_kit_session_emit_idle_hint_changed ( + ConsoleKitSession *object, + gboolean arg_hint) +{ + g_signal_emit_by_name (object, "idle-hint-changed", arg_hint); +} + +/** + * console_kit_session_emit_lock: + * @object: A #ConsoleKitSession. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Session.Lock">"Lock"</link> D-Bus signal. + */ +void +console_kit_session_emit_lock ( + ConsoleKitSession *object) +{ + g_signal_emit_by_name (object, "lock"); +} + +/** + * console_kit_session_emit_unlock: + * @object: A #ConsoleKitSession. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-ConsoleKit-Session.Unlock">"Unlock"</link> D-Bus signal. + */ +void +console_kit_session_emit_unlock ( + ConsoleKitSession *object) +{ + g_signal_emit_by_name (object, "unlock"); +} + +/** + * console_kit_session_call_get_id: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.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 console_kit_session_call_get_id_finish() to get the result of the operation. + * + * See console_kit_session_call_get_id_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_id ( + ConsoleKitSession *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); +} + +/** + * console_kit_session_call_get_id_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_ssid: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_id(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_id(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_id_finish ( + ConsoleKitSession *proxy, + gchar **out_ssid, + 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_ssid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_id_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_ssid: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetId">GetId()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_id() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_id_sync ( + ConsoleKitSession *proxy, + gchar **out_ssid, + 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, + "(o)", + out_ssid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_seat_id: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetSeatId">GetSeatId()</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 console_kit_session_call_get_seat_id_finish() to get the result of the operation. + * + * See console_kit_session_call_get_seat_id_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_seat_id ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSeatId", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_seat_id_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_sid: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_seat_id(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_seat_id(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_seat_id_finish ( + ConsoleKitSession *proxy, + gchar **out_sid, + 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_sid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_seat_id_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_sid: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetSeatId">GetSeatId()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_seat_id() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_seat_id_sync ( + ConsoleKitSession *proxy, + gchar **out_sid, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSeatId", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(o)", + out_sid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_session_type: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetSessionType">GetSessionType()</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 console_kit_session_call_get_session_type_finish() to get the result of the operation. + * + * See console_kit_session_call_get_session_type_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_session_type ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetSessionType", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_session_type_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_type: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_session_type(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_session_type(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_session_type_finish ( + ConsoleKitSession *proxy, + gchar **out_type, + 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_type); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_session_type_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_type: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetSessionType">GetSessionType()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_session_type() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_session_type_sync ( + ConsoleKitSession *proxy, + gchar **out_type, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetSessionType", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_type); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_user: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetUser">GetUser()</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 console_kit_session_call_get_user_finish() to get the result of the operation. + * + * See console_kit_session_call_get_user_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_user ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetUser", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_user_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_uid: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_user(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_user(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_user_finish ( + ConsoleKitSession *proxy, + guint *out_uid, + 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_uid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_user_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_uid: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetUser">GetUser()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_user() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_user_sync ( + ConsoleKitSession *proxy, + guint *out_uid, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetUser", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(u)", + out_uid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_unix_user: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetUnixUser">GetUnixUser()</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 console_kit_session_call_get_unix_user_finish() to get the result of the operation. + * + * See console_kit_session_call_get_unix_user_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_unix_user ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetUnixUser", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_unix_user_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_uid: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_unix_user(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_unix_user(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_unix_user_finish ( + ConsoleKitSession *proxy, + guint *out_uid, + 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_uid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_unix_user_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_uid: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetUnixUser">GetUnixUser()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_unix_user() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_unix_user_sync ( + ConsoleKitSession *proxy, + guint *out_uid, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetUnixUser", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(u)", + out_uid); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_x11_display: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetX11Display">GetX11Display()</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 console_kit_session_call_get_x11_display_finish() to get the result of the operation. + * + * See console_kit_session_call_get_x11_display_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_x11_display ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetX11Display", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_x11_display_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_display: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_x11_display(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_x11_display(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_x11_display_finish ( + ConsoleKitSession *proxy, + gchar **out_display, + 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_display); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_x11_display_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_display: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetX11Display">GetX11Display()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_x11_display() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_x11_display_sync ( + ConsoleKitSession *proxy, + gchar **out_display, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetX11Display", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_display); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_x11_display_device: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetX11DisplayDevice">GetX11DisplayDevice()</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 console_kit_session_call_get_x11_display_device_finish() to get the result of the operation. + * + * See console_kit_session_call_get_x11_display_device_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_x11_display_device ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetX11DisplayDevice", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_x11_display_device_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_x11_display_device: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_x11_display_device(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_x11_display_device(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_x11_display_device_finish ( + ConsoleKitSession *proxy, + gchar **out_x11_display_device, + 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_x11_display_device); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_x11_display_device_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_x11_display_device: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetX11DisplayDevice">GetX11DisplayDevice()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_x11_display_device() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_x11_display_device_sync ( + ConsoleKitSession *proxy, + gchar **out_x11_display_device, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetX11DisplayDevice", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_x11_display_device); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_display_device: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetDisplayDevice">GetDisplayDevice()</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 console_kit_session_call_get_display_device_finish() to get the result of the operation. + * + * See console_kit_session_call_get_display_device_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_display_device ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetDisplayDevice", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_display_device_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_display_device: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_display_device(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_display_device(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_display_device_finish ( + ConsoleKitSession *proxy, + gchar **out_display_device, + 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_display_device); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_display_device_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_display_device: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetDisplayDevice">GetDisplayDevice()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_display_device() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_display_device_sync ( + ConsoleKitSession *proxy, + gchar **out_display_device, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetDisplayDevice", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_display_device); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_remote_host_name: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetRemoteHostName">GetRemoteHostName()</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 console_kit_session_call_get_remote_host_name_finish() to get the result of the operation. + * + * See console_kit_session_call_get_remote_host_name_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_remote_host_name ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetRemoteHostName", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_remote_host_name_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_remote_host_name: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_remote_host_name(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_remote_host_name(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_remote_host_name_finish ( + ConsoleKitSession *proxy, + gchar **out_remote_host_name, + 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_remote_host_name); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_remote_host_name_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_remote_host_name: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetRemoteHostName">GetRemoteHostName()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_remote_host_name() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_remote_host_name_sync ( + ConsoleKitSession *proxy, + gchar **out_remote_host_name, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetRemoteHostName", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_remote_host_name); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_login_session_id: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetLoginSessionId">GetLoginSessionId()</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 console_kit_session_call_get_login_session_id_finish() to get the result of the operation. + * + * See console_kit_session_call_get_login_session_id_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_login_session_id ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetLoginSessionId", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_login_session_id_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_login_session_id: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_login_session_id(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_login_session_id(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_login_session_id_finish ( + ConsoleKitSession *proxy, + gchar **out_login_session_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_login_session_id); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_login_session_id_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_login_session_id: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetLoginSessionId">GetLoginSessionId()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_login_session_id() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_login_session_id_sync ( + ConsoleKitSession *proxy, + gchar **out_login_session_id, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetLoginSessionId", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_login_session_id); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_is_active: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.IsActive">IsActive()</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 console_kit_session_call_is_active_finish() to get the result of the operation. + * + * See console_kit_session_call_is_active_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_is_active ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "IsActive", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_is_active_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_active: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_is_active(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_is_active(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_is_active_finish ( + ConsoleKitSession *proxy, + gboolean *out_active, + 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_active); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_is_active_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_active: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.IsActive">IsActive()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_is_active() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_is_active_sync ( + ConsoleKitSession *proxy, + gboolean *out_active, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "IsActive", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(b)", + out_active); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_is_local: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.IsLocal">IsLocal()</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 console_kit_session_call_is_local_finish() to get the result of the operation. + * + * See console_kit_session_call_is_local_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_is_local ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "IsLocal", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_is_local_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_local: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_is_local(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_is_local(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_is_local_finish ( + ConsoleKitSession *proxy, + gboolean *out_local, + 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_local); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_is_local_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_local: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.IsLocal">IsLocal()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_is_local() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_is_local_sync ( + ConsoleKitSession *proxy, + gboolean *out_local, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "IsLocal", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(b)", + out_local); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_creation_time: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetCreationTime">GetCreationTime()</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 console_kit_session_call_get_creation_time_finish() to get the result of the operation. + * + * See console_kit_session_call_get_creation_time_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_creation_time ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetCreationTime", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_creation_time_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_iso8601_datetime: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_creation_time(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_creation_time(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_creation_time_finish ( + ConsoleKitSession *proxy, + gchar **out_iso8601_datetime, + 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_iso8601_datetime); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_creation_time_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_iso8601_datetime: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetCreationTime">GetCreationTime()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_creation_time() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_creation_time_sync ( + ConsoleKitSession *proxy, + gchar **out_iso8601_datetime, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetCreationTime", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_iso8601_datetime); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_activate: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Activate">Activate()</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 console_kit_session_call_activate_finish() to get the result of the operation. + * + * See console_kit_session_call_activate_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_activate ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "Activate", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_activate_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_activate(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_activate(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_activate_finish ( + ConsoleKitSession *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; +} + +/** + * console_kit_session_call_activate_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Activate">Activate()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_activate() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_activate_sync ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "Activate", + 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; +} + +/** + * console_kit_session_call_lock: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Lock">Lock()</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 console_kit_session_call_lock_finish() to get the result of the operation. + * + * See console_kit_session_call_lock_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_lock ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "Lock", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_lock_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_lock(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_lock(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_lock_finish ( + ConsoleKitSession *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; +} + +/** + * console_kit_session_call_lock_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Lock">Lock()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_lock() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_lock_sync ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "Lock", + 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; +} + +/** + * console_kit_session_call_unlock: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Unlock">Unlock()</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 console_kit_session_call_unlock_finish() to get the result of the operation. + * + * See console_kit_session_call_unlock_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_unlock ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "Unlock", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_unlock_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_unlock(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_unlock(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_unlock_finish ( + ConsoleKitSession *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; +} + +/** + * console_kit_session_call_unlock_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Unlock">Unlock()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_unlock() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_unlock_sync ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "Unlock", + 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; +} + +/** + * console_kit_session_call_get_idle_hint: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetIdleHint">GetIdleHint()</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 console_kit_session_call_get_idle_hint_finish() to get the result of the operation. + * + * See console_kit_session_call_get_idle_hint_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_idle_hint ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetIdleHint", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_idle_hint_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_idle_hint: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_idle_hint(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_idle_hint(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_idle_hint_finish ( + ConsoleKitSession *proxy, + gboolean *out_idle_hint, + 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_idle_hint); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_idle_hint_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_idle_hint: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetIdleHint">GetIdleHint()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_idle_hint() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_idle_hint_sync ( + ConsoleKitSession *proxy, + gboolean *out_idle_hint, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetIdleHint", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(b)", + out_idle_hint); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_idle_since_hint: + * @proxy: A #ConsoleKitSessionProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetIdleSinceHint">GetIdleSinceHint()</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 console_kit_session_call_get_idle_since_hint_finish() to get the result of the operation. + * + * See console_kit_session_call_get_idle_since_hint_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_get_idle_since_hint ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "GetIdleSinceHint", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_get_idle_since_hint_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @out_iso8601_datetime: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_get_idle_since_hint(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_get_idle_since_hint(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_idle_since_hint_finish ( + ConsoleKitSession *proxy, + gchar **out_iso8601_datetime, + 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_iso8601_datetime); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_get_idle_since_hint_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @out_iso8601_datetime: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetIdleSinceHint">GetIdleSinceHint()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_get_idle_since_hint() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_get_idle_since_hint_sync ( + ConsoleKitSession *proxy, + gchar **out_iso8601_datetime, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "GetIdleSinceHint", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(s)", + out_iso8601_datetime); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * console_kit_session_call_set_idle_hint: + * @proxy: A #ConsoleKitSessionProxy. + * @arg_idle_hint: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.SetIdleHint">SetIdleHint()</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 console_kit_session_call_set_idle_hint_finish() to get the result of the operation. + * + * See console_kit_session_call_set_idle_hint_sync() for the synchronous, blocking version of this method. + */ +void +console_kit_session_call_set_idle_hint ( + ConsoleKitSession *proxy, + gboolean arg_idle_hint, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetIdleHint", + g_variant_new ("(b)", + arg_idle_hint), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * console_kit_session_call_set_idle_hint_finish: + * @proxy: A #ConsoleKitSessionProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_call_set_idle_hint(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with console_kit_session_call_set_idle_hint(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_set_idle_hint_finish ( + ConsoleKitSession *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; +} + +/** + * console_kit_session_call_set_idle_hint_sync: + * @proxy: A #ConsoleKitSessionProxy. + * @arg_idle_hint: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.SetIdleHint">SetIdleHint()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See console_kit_session_call_set_idle_hint() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +console_kit_session_call_set_idle_hint_sync ( + ConsoleKitSession *proxy, + gboolean arg_idle_hint, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetIdleHint", + g_variant_new ("(b)", + arg_idle_hint), + 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; +} + +/** + * console_kit_session_complete_get_id: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @ssid: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.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 +console_kit_session_complete_get_id ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *ssid) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", + ssid)); +} + +/** + * console_kit_session_complete_get_seat_id: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @sid: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetSeatId">GetSeatId()</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 +console_kit_session_complete_get_seat_id ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *sid) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", + sid)); +} + +/** + * console_kit_session_complete_get_session_type: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @type: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetSessionType">GetSessionType()</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 +console_kit_session_complete_get_session_type ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *type) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + type)); +} + +/** + * console_kit_session_complete_get_user: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @uid: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetUser">GetUser()</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 +console_kit_session_complete_get_user ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + guint uid) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(u)", + uid)); +} + +/** + * console_kit_session_complete_get_unix_user: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @uid: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetUnixUser">GetUnixUser()</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 +console_kit_session_complete_get_unix_user ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + guint uid) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(u)", + uid)); +} + +/** + * console_kit_session_complete_get_x11_display: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @display: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetX11Display">GetX11Display()</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 +console_kit_session_complete_get_x11_display ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *display) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + display)); +} + +/** + * console_kit_session_complete_get_x11_display_device: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @x11_display_device: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetX11DisplayDevice">GetX11DisplayDevice()</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 +console_kit_session_complete_get_x11_display_device ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *x11_display_device) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + x11_display_device)); +} + +/** + * console_kit_session_complete_get_display_device: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @display_device: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetDisplayDevice">GetDisplayDevice()</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 +console_kit_session_complete_get_display_device ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *display_device) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + display_device)); +} + +/** + * console_kit_session_complete_get_remote_host_name: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @remote_host_name: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetRemoteHostName">GetRemoteHostName()</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 +console_kit_session_complete_get_remote_host_name ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *remote_host_name) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + remote_host_name)); +} + +/** + * console_kit_session_complete_get_login_session_id: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @login_session_id: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetLoginSessionId">GetLoginSessionId()</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 +console_kit_session_complete_get_login_session_id ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *login_session_id) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + login_session_id)); +} + +/** + * console_kit_session_complete_is_active: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @active: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.IsActive">IsActive()</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 +console_kit_session_complete_is_active ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + gboolean active) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", + active)); +} + +/** + * console_kit_session_complete_is_local: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @local: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.IsLocal">IsLocal()</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 +console_kit_session_complete_is_local ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + gboolean local) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", + local)); +} + +/** + * console_kit_session_complete_get_creation_time: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @iso8601_datetime: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetCreationTime">GetCreationTime()</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 +console_kit_session_complete_get_creation_time ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *iso8601_datetime) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + iso8601_datetime)); +} + +/** + * console_kit_session_complete_activate: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Activate">Activate()</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 +console_kit_session_complete_activate ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * console_kit_session_complete_lock: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Lock">Lock()</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 +console_kit_session_complete_lock ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * console_kit_session_complete_unlock: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.Unlock">Unlock()</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 +console_kit_session_complete_unlock ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * console_kit_session_complete_get_idle_hint: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @idle_hint: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetIdleHint">GetIdleHint()</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 +console_kit_session_complete_get_idle_hint ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + gboolean idle_hint) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", + idle_hint)); +} + +/** + * console_kit_session_complete_get_idle_since_hint: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @iso8601_datetime: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.GetIdleSinceHint">GetIdleSinceHint()</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 +console_kit_session_complete_get_idle_since_hint ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *iso8601_datetime) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", + iso8601_datetime)); +} + +/** + * console_kit_session_complete_set_idle_hint: + * @object: A #ConsoleKitSession. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-ConsoleKit-Session.SetIdleHint">SetIdleHint()</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 +console_kit_session_complete_set_idle_hint ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/* ------------------------------------------------------------------------ */ + +/** + * ConsoleKitSessionProxy: + * + * The #ConsoleKitSessionProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * ConsoleKitSessionProxyClass: + * @parent_class: The parent class. + * + * Class structure for #ConsoleKitSessionProxy. + */ + +struct _ConsoleKitSessionProxyPrivate +{ + GData *qdata; +}; + +static void console_kit_session_proxy_iface_init (ConsoleKitSessionIface *iface); + +G_DEFINE_TYPE_WITH_CODE (ConsoleKitSessionProxy, console_kit_session_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (TYPE_CONSOLE_KIT_SESSION, console_kit_session_proxy_iface_init)); + +static void +console_kit_session_proxy_finalize (GObject *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + g_datalist_clear (&proxy->priv->qdata); + G_OBJECT_CLASS (console_kit_session_proxy_parent_class)->finalize (object); +} + +static void +console_kit_session_proxy_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 10); + info = _console_kit_session_property_info_pointers[prop_id - 1]; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); + if (info->use_gvariant) + { + g_value_set_variant (value, variant); + } + else + { + if (variant != NULL) + g_dbus_gvariant_to_gvalue (variant, value); + } + if (variant != NULL) + g_variant_unref (variant); +} + +static void +console_kit_session_proxy_set_property_cb (GDBusProxy *proxy, + GAsyncResult *res, + gpointer user_data) +{ + const _ExtendedGDBusPropertyInfo *info = user_data; + GError *error; + error = NULL; + if (!g_dbus_proxy_call_finish (proxy, res, &error)) + { + g_warning ("Error setting property `%s' on interface org.freedesktop.ConsoleKit.Session: %s (%s, %d)", + info->parent_struct.name, + error->message, g_quark_to_string (error->domain), error->code); + g_error_free (error); + } +} + +static void +console_kit_session_proxy_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 10); + info = _console_kit_session_property_info_pointers[prop_id - 1]; + variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); + g_dbus_proxy_call (G_DBUS_PROXY (object), + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", "org.freedesktop.ConsoleKit.Session", info->parent_struct.name, variant), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, (GAsyncReadyCallback) console_kit_session_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); + g_variant_unref (variant); +} + +static void +console_kit_session_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) +{ + _ExtendedGDBusSignalInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint n; + guint signal_id; + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_console_kit_session_interface_info.parent_struct, signal_name); + if (info == NULL) + return; + num_params = g_variant_n_children (parameters); + paramv = g_new0 (GValue, num_params + 1); + g_value_init (¶mv[0], TYPE_CONSOLE_KIT_SESSION); + g_value_set_object (¶mv[0], proxy); + g_variant_iter_init (&iter, parameters); + n = 1; + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_CONSOLE_KIT_SESSION); + g_signal_emitv (paramv, signal_id, 0, NULL); + for (n = 0; n < num_params + 1; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static void +console_kit_session_proxy_g_properties_changed (GDBusProxy *_proxy, + GVariant *changed_properties, + const gchar *const *invalidated_properties) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_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 *) &_console_kit_session_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 *) &_console_kit_session_interface_info.parent_struct, invalidated_properties[n]); + g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); + if (info != NULL) + g_object_notify (G_OBJECT (proxy), info->hyphen_name); + } +} + +static guint +console_kit_session_proxy_get_unix_user (ConsoleKitSession *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + GVariant *variant; + guint value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "unix-user"); + if (variant != NULL) + { + value = g_variant_get_uint32 (variant); + g_variant_unref (variant); + } + return value; +} + +static guint +console_kit_session_proxy_get_user (ConsoleKitSession *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + GVariant *variant; + guint value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "user"); + if (variant != NULL) + { + value = g_variant_get_uint32 (variant); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +console_kit_session_proxy_get_session_type (ConsoleKitSession *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "session-type"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +console_kit_session_proxy_get_remote_host_name (ConsoleKitSession *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "remote-host-name"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +console_kit_session_proxy_get_display_device (ConsoleKitSession *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "display-device"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +console_kit_session_proxy_get_x11_display (ConsoleKitSession *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "x11-display"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +console_kit_session_proxy_get_x11_display_device (ConsoleKitSession *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "x11-display-device"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static gboolean +console_kit_session_proxy_get_active (ConsoleKitSession *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "active"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static gboolean +console_kit_session_proxy_get_is_local (ConsoleKitSession *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "is-local"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static gboolean +console_kit_session_proxy_get_idle_hint (ConsoleKitSession *object) +{ + ConsoleKitSessionProxy *proxy = CONSOLE_KIT_SESSION_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "idle-hint"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static void +console_kit_session_proxy_init (ConsoleKitSessionProxy *proxy) +{ + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_CONSOLE_KIT_SESSION_PROXY, ConsoleKitSessionProxyPrivate); + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), console_kit_session_interface_info ()); +} + +static void +console_kit_session_proxy_class_init (ConsoleKitSessionProxyClass *klass) +{ + GObjectClass *gobject_class; + GDBusProxyClass *proxy_class; + + g_type_class_add_private (klass, sizeof (ConsoleKitSessionProxyPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = console_kit_session_proxy_finalize; + gobject_class->get_property = console_kit_session_proxy_get_property; + gobject_class->set_property = console_kit_session_proxy_set_property; + + proxy_class = G_DBUS_PROXY_CLASS (klass); + proxy_class->g_signal = console_kit_session_proxy_g_signal; + proxy_class->g_properties_changed = console_kit_session_proxy_g_properties_changed; + + + console_kit_session_override_properties (gobject_class, 1); +} + +static void +console_kit_session_proxy_iface_init (ConsoleKitSessionIface *iface) +{ + iface->get_unix_user = console_kit_session_proxy_get_unix_user; + iface->get_user = console_kit_session_proxy_get_user; + iface->get_session_type = console_kit_session_proxy_get_session_type; + iface->get_remote_host_name = console_kit_session_proxy_get_remote_host_name; + iface->get_display_device = console_kit_session_proxy_get_display_device; + iface->get_x11_display = console_kit_session_proxy_get_x11_display; + iface->get_x11_display_device = console_kit_session_proxy_get_x11_display_device; + iface->get_active = console_kit_session_proxy_get_active; + iface->get_is_local = console_kit_session_proxy_get_is_local; + iface->get_idle_hint = console_kit_session_proxy_get_idle_hint; +} + +/** + * console_kit_session_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Session.top_of_page">org.freedesktop.ConsoleKit.Session</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 console_kit_session_proxy_new_finish() to get the result of the operation. + * + * See console_kit_session_proxy_new_sync() for the synchronous, blocking version of this constructor. + */ +void +console_kit_session_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_CONSOLE_KIT_SESSION_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Session", NULL); +} + +/** + * console_kit_session_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_proxy_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with console_kit_session_proxy_new(). + * + * Returns: (transfer full) (type ConsoleKitSessionProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitSession * +console_kit_session_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 CONSOLE_KIT_SESSION (ret); + else + return NULL; +} + +/** + * console_kit_session_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Session.top_of_page">org.freedesktop.ConsoleKit.Session</link>. See g_dbus_proxy_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See console_kit_session_proxy_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type ConsoleKitSessionProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitSession * +console_kit_session_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_CONSOLE_KIT_SESSION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Session", NULL); + if (ret != NULL) + return CONSOLE_KIT_SESSION (ret); + else + return NULL; +} + + +/** + * console_kit_session_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like console_kit_session_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 console_kit_session_proxy_new_for_bus_finish() to get the result of the operation. + * + * See console_kit_session_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +console_kit_session_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_CONSOLE_KIT_SESSION_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Session", NULL); +} + +/** + * console_kit_session_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to console_kit_session_proxy_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with console_kit_session_proxy_new_for_bus(). + * + * Returns: (transfer full) (type ConsoleKitSessionProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitSession * +console_kit_session_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 CONSOLE_KIT_SESSION (ret); + else + return NULL; +} + +/** + * console_kit_session_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like console_kit_session_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See console_kit_session_proxy_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type ConsoleKitSessionProxy): The constructed proxy object or %NULL if @error is set. + */ +ConsoleKitSession * +console_kit_session_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_CONSOLE_KIT_SESSION_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Session", NULL); + if (ret != NULL) + return CONSOLE_KIT_SESSION (ret); + else + return NULL; +} + + +/* ------------------------------------------------------------------------ */ + +/** + * ConsoleKitSessionSkeleton: + * + * The #ConsoleKitSessionSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * ConsoleKitSessionSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #ConsoleKitSessionSkeleton. + */ + +struct _ConsoleKitSessionSkeletonPrivate +{ + GValue *properties; + GList *changed_properties; + GSource *changed_properties_idle_source; + GMainContext *context; + GMutex lock; +}; + +static void +_console_kit_session_skeleton_handle_method_call ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (user_data); + _ExtendedGDBusMethodInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint num_extra; + guint n; + guint signal_id; + GValue return_value = G_VALUE_INIT; + info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); + g_assert (info != NULL); + num_params = g_variant_n_children (parameters); + num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); + n = 0; + g_value_init (¶mv[n], TYPE_CONSOLE_KIT_SESSION); + g_value_set_object (¶mv[n++], skeleton); + g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); + g_value_set_object (¶mv[n++], invocation); + if (info->pass_fdlist) + { +#ifdef G_OS_UNIX + g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); + g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); +#else + g_assert_not_reached (); +#endif + } + g_variant_iter_init (&iter, parameters); + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_CONSOLE_KIT_SESSION); + g_value_init (&return_value, G_TYPE_BOOLEAN); + g_signal_emitv (paramv, signal_id, 0, &return_value); + if (!g_value_get_boolean (&return_value)) + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); + g_value_unset (&return_value); + for (n = 0; n < num_params + num_extra; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static GVariant * +_console_kit_session_skeleton_handle_get_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + gpointer user_data) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_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 *) &_console_kit_session_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 +_console_kit_session_skeleton_handle_set_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *variant, + GError **error, + gpointer user_data) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_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 *) &_console_kit_session_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 _console_kit_session_skeleton_vtable = +{ + _console_kit_session_skeleton_handle_method_call, + _console_kit_session_skeleton_handle_get_property, + _console_kit_session_skeleton_handle_set_property +}; + +static GDBusInterfaceInfo * +console_kit_session_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton) +{ + return console_kit_session_interface_info (); +} + +static GDBusInterfaceVTable * +console_kit_session_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton) +{ + return (GDBusInterfaceVTable *) &_console_kit_session_skeleton_vtable; +} + +static GVariant * +console_kit_session_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (_skeleton); + + GVariantBuilder builder; + guint n; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + if (_console_kit_session_interface_info.parent_struct.properties == NULL) + goto out; + for (n = 0; _console_kit_session_interface_info.parent_struct.properties[n] != NULL; n++) + { + GDBusPropertyInfo *info = _console_kit_session_interface_info.parent_struct.properties[n]; + if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) + { + GVariant *value; + value = _console_kit_session_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Session", info->name, NULL, skeleton); + if (value != NULL) + { + g_variant_take_ref (value); + g_variant_builder_add (&builder, "{sv}", info->name, value); + g_variant_unref (value); + } + } + } +out: + return g_variant_builder_end (&builder); +} + +static gboolean _console_kit_session_emit_changed (gpointer user_data); + +static void +console_kit_session_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (_skeleton); + gboolean emit_changed = FALSE; + + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties_idle_source != NULL) + { + g_source_destroy (skeleton->priv->changed_properties_idle_source); + skeleton->priv->changed_properties_idle_source = NULL; + emit_changed = TRUE; + } + g_mutex_unlock (&skeleton->priv->lock); + + if (emit_changed) + _console_kit_session_emit_changed (skeleton); +} + +static void +_console_kit_session_on_signal_active_changed ( + ConsoleKitSession *object, + gboolean arg_is_active) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("(b)", + arg_is_active)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Session", "ActiveChanged", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_console_kit_session_on_signal_idle_hint_changed ( + ConsoleKitSession *object, + gboolean arg_hint) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + + GList *connections, *l; + GVariant *signal_variant; + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + + signal_variant = g_variant_ref_sink (g_variant_new ("(b)", + arg_hint)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Session", "IdleHintChanged", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_console_kit_session_on_signal_lock ( + ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_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.freedesktop.ConsoleKit.Session", "Lock", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_console_kit_session_on_signal_unlock ( + ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_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.freedesktop.ConsoleKit.Session", "Unlock", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void console_kit_session_skeleton_iface_init (ConsoleKitSessionIface *iface); +G_DEFINE_TYPE_WITH_CODE (ConsoleKitSessionSkeleton, console_kit_session_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (TYPE_CONSOLE_KIT_SESSION, console_kit_session_skeleton_iface_init)); + +static void +console_kit_session_skeleton_finalize (GObject *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + guint n; + for (n = 0; n < 10; n++) + g_value_unset (&skeleton->priv->properties[n]); + g_free (skeleton->priv->properties); + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + if (skeleton->priv->changed_properties_idle_source != NULL) + g_source_destroy (skeleton->priv->changed_properties_idle_source); + g_main_context_unref (skeleton->priv->context); + g_mutex_clear (&skeleton->priv->lock); + G_OBJECT_CLASS (console_kit_session_skeleton_parent_class)->finalize (object); +} + +static void +console_kit_session_skeleton_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 10); + g_mutex_lock (&skeleton->priv->lock); + g_value_copy (&skeleton->priv->properties[prop_id - 1], value); + g_mutex_unlock (&skeleton->priv->lock); +} + +static gboolean +_console_kit_session_emit_changed (gpointer user_data) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (user_data); + GList *l; + GVariantBuilder builder; + GVariantBuilder invalidated_builder; + guint num_changes; + + g_mutex_lock (&skeleton->priv->lock); + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); + for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) + { + ChangedProperty *cp = l->data; + GVariant *variant; + const GValue *cur_value; + + cur_value = &skeleton->priv->properties[cp->prop_id - 1]; + if (!_g_value_equal (cur_value, &cp->orig_value)) + { + variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); + g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); + g_variant_unref (variant); + num_changes++; + } + } + if (num_changes > 0) + { + GList *connections, *ll; + GVariant *signal_variant; + signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.ConsoleKit.Session", + &builder, &invalidated_builder)); + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + for (ll = connections; ll != NULL; ll = ll->next) + { + GDBusConnection *connection = ll->data; + + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), + "org.freedesktop.DBus.Properties", + "PropertiesChanged", + signal_variant, + NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); + } + else + { + g_variant_builder_clear (&builder); + g_variant_builder_clear (&invalidated_builder); + } + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + skeleton->priv->changed_properties = NULL; + skeleton->priv->changed_properties_idle_source = NULL; + g_mutex_unlock (&skeleton->priv->lock); + return FALSE; +} + +static void +_console_kit_session_schedule_emit_changed (ConsoleKitSessionSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) +{ + ChangedProperty *cp; + GList *l; + cp = NULL; + for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) + { + ChangedProperty *i_cp = l->data; + if (i_cp->info == info) + { + cp = i_cp; + break; + } + } + if (cp == NULL) + { + cp = g_new0 (ChangedProperty, 1); + cp->prop_id = prop_id; + cp->info = info; + skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); + g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); + g_value_copy (orig_value, &cp->orig_value); + } +} + +static void +console_kit_session_skeleton_notify (GObject *object, + GParamSpec *pspec) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties != NULL && + skeleton->priv->changed_properties_idle_source == NULL) + { + skeleton->priv->changed_properties_idle_source = g_idle_source_new (); + g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); + g_source_set_callback (skeleton->priv->changed_properties_idle_source, _console_kit_session_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); + g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); + g_source_unref (skeleton->priv->changed_properties_idle_source); + } + g_mutex_unlock (&skeleton->priv->lock); +} + +static void +console_kit_session_skeleton_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 10); + g_mutex_lock (&skeleton->priv->lock); + g_object_freeze_notify (object); + if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) + { + if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) + _console_kit_session_schedule_emit_changed (skeleton, _console_kit_session_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); + g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); + g_object_notify_by_pspec (object, pspec); + } + g_mutex_unlock (&skeleton->priv->lock); + g_object_thaw_notify (object); +} + +static void +console_kit_session_skeleton_init (ConsoleKitSessionSkeleton *skeleton) +{ + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_CONSOLE_KIT_SESSION_SKELETON, ConsoleKitSessionSkeletonPrivate); + g_mutex_init (&skeleton->priv->lock); + skeleton->priv->context = g_main_context_ref_thread_default (); + skeleton->priv->properties = g_new0 (GValue, 10); + g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT); + g_value_init (&skeleton->priv->properties[1], G_TYPE_UINT); + g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[3], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[4], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[5], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[6], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[7], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[8], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[9], G_TYPE_BOOLEAN); +} + +static guint +console_kit_session_skeleton_get_unix_user (ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + guint value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_uint (&(skeleton->priv->properties[0])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static guint +console_kit_session_skeleton_get_user (ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + guint value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_uint (&(skeleton->priv->properties[1])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +console_kit_session_skeleton_get_session_type (ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[2])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +console_kit_session_skeleton_get_remote_host_name (ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[3])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +console_kit_session_skeleton_get_display_device (ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[4])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +console_kit_session_skeleton_get_x11_display (ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[5])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +console_kit_session_skeleton_get_x11_display_device (ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[6])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +console_kit_session_skeleton_get_active (ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[7])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +console_kit_session_skeleton_get_is_local (ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[8])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +console_kit_session_skeleton_get_idle_hint (ConsoleKitSession *object) +{ + ConsoleKitSessionSkeleton *skeleton = CONSOLE_KIT_SESSION_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[9])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static void +console_kit_session_skeleton_class_init (ConsoleKitSessionSkeletonClass *klass) +{ + GObjectClass *gobject_class; + GDBusInterfaceSkeletonClass *skeleton_class; + + g_type_class_add_private (klass, sizeof (ConsoleKitSessionSkeletonPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = console_kit_session_skeleton_finalize; + gobject_class->get_property = console_kit_session_skeleton_get_property; + gobject_class->set_property = console_kit_session_skeleton_set_property; + gobject_class->notify = console_kit_session_skeleton_notify; + + + console_kit_session_override_properties (gobject_class, 1); + + skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); + skeleton_class->get_info = console_kit_session_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = console_kit_session_skeleton_dbus_interface_get_properties; + skeleton_class->flush = console_kit_session_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = console_kit_session_skeleton_dbus_interface_get_vtable; +} + +static void +console_kit_session_skeleton_iface_init (ConsoleKitSessionIface *iface) +{ + iface->active_changed = _console_kit_session_on_signal_active_changed; + iface->idle_hint_changed = _console_kit_session_on_signal_idle_hint_changed; + iface->lock = _console_kit_session_on_signal_lock; + iface->unlock = _console_kit_session_on_signal_unlock; + iface->get_unix_user = console_kit_session_skeleton_get_unix_user; + iface->get_user = console_kit_session_skeleton_get_user; + iface->get_session_type = console_kit_session_skeleton_get_session_type; + iface->get_remote_host_name = console_kit_session_skeleton_get_remote_host_name; + iface->get_display_device = console_kit_session_skeleton_get_display_device; + iface->get_x11_display = console_kit_session_skeleton_get_x11_display; + iface->get_x11_display_device = console_kit_session_skeleton_get_x11_display_device; + iface->get_active = console_kit_session_skeleton_get_active; + iface->get_is_local = console_kit_session_skeleton_get_is_local; + iface->get_idle_hint = console_kit_session_skeleton_get_idle_hint; +} + +/** + * console_kit_session_skeleton_new: + * + * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-ConsoleKit-Session.top_of_page">org.freedesktop.ConsoleKit.Session</link>. + * + * Returns: (transfer full) (type ConsoleKitSessionSkeleton): The skeleton object. + */ +ConsoleKitSession * +console_kit_session_skeleton_new (void) +{ + return CONSOLE_KIT_SESSION (g_object_new (TYPE_CONSOLE_KIT_SESSION_SKELETON, NULL)); +} + diff --git a/src/dbus-consolekit-session.h b/src/dbus-consolekit-session.h new file mode 100644 index 0000000..d827e77 --- /dev/null +++ b/src/dbus-consolekit-session.h @@ -0,0 +1,737 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifndef __DBUS_CONSOLEKIT_SESSION_H__ +#define __DBUS_CONSOLEKIT_SESSION_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + + +/* ------------------------------------------------------------------------ */ +/* Declarations for org.freedesktop.ConsoleKit.Session */ + +#define TYPE_CONSOLE_KIT_SESSION (console_kit_session_get_type ()) +#define CONSOLE_KIT_SESSION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CONSOLE_KIT_SESSION, ConsoleKitSession)) +#define IS_CONSOLE_KIT_SESSION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CONSOLE_KIT_SESSION)) +#define CONSOLE_KIT_SESSION_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_CONSOLE_KIT_SESSION, ConsoleKitSessionIface)) + +struct _ConsoleKitSession; +typedef struct _ConsoleKitSession ConsoleKitSession; +typedef struct _ConsoleKitSessionIface ConsoleKitSessionIface; + +struct _ConsoleKitSessionIface +{ + GTypeInterface parent_iface; + + + + gboolean (*handle_activate) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_creation_time) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_display_device) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_id) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_idle_hint) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_idle_since_hint) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_login_session_id) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_remote_host_name) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_seat_id) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_session_type) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_unix_user) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_user) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_x11_display) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_get_x11_display_device) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_is_active) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_is_local) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_lock) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_set_idle_hint) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + gboolean arg_idle_hint); + + gboolean (*handle_unlock) ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + gboolean (*get_active) (ConsoleKitSession *object); + + const gchar * (*get_display_device) (ConsoleKitSession *object); + + gboolean (*get_idle_hint) (ConsoleKitSession *object); + + gboolean (*get_is_local) (ConsoleKitSession *object); + + const gchar * (*get_remote_host_name) (ConsoleKitSession *object); + + const gchar * (*get_session_type) (ConsoleKitSession *object); + + guint (*get_unix_user) (ConsoleKitSession *object); + + guint (*get_user) (ConsoleKitSession *object); + + const gchar * (*get_x11_display) (ConsoleKitSession *object); + + const gchar * (*get_x11_display_device) (ConsoleKitSession *object); + + void (*active_changed) ( + ConsoleKitSession *object, + gboolean arg_is_active); + + void (*idle_hint_changed) ( + ConsoleKitSession *object, + gboolean arg_hint); + + void (*lock) ( + ConsoleKitSession *object); + + void (*unlock) ( + ConsoleKitSession *object); + +}; + +GType console_kit_session_get_type (void) G_GNUC_CONST; + +GDBusInterfaceInfo *console_kit_session_interface_info (void); +guint console_kit_session_override_properties (GObjectClass *klass, guint property_id_begin); + + +/* D-Bus method call completion functions: */ +void console_kit_session_complete_get_id ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *ssid); + +void console_kit_session_complete_get_seat_id ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *sid); + +void console_kit_session_complete_get_session_type ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *type); + +void console_kit_session_complete_get_user ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + guint uid); + +void console_kit_session_complete_get_unix_user ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + guint uid); + +void console_kit_session_complete_get_x11_display ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *display); + +void console_kit_session_complete_get_x11_display_device ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *x11_display_device); + +void console_kit_session_complete_get_display_device ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *display_device); + +void console_kit_session_complete_get_remote_host_name ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *remote_host_name); + +void console_kit_session_complete_get_login_session_id ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *login_session_id); + +void console_kit_session_complete_is_active ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + gboolean active); + +void console_kit_session_complete_is_local ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + gboolean local); + +void console_kit_session_complete_get_creation_time ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *iso8601_datetime); + +void console_kit_session_complete_activate ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + +void console_kit_session_complete_lock ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + +void console_kit_session_complete_unlock ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + +void console_kit_session_complete_get_idle_hint ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + gboolean idle_hint); + +void console_kit_session_complete_get_idle_since_hint ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation, + const gchar *iso8601_datetime); + +void console_kit_session_complete_set_idle_hint ( + ConsoleKitSession *object, + GDBusMethodInvocation *invocation); + + + +/* D-Bus signal emissions functions: */ +void console_kit_session_emit_active_changed ( + ConsoleKitSession *object, + gboolean arg_is_active); + +void console_kit_session_emit_idle_hint_changed ( + ConsoleKitSession *object, + gboolean arg_hint); + +void console_kit_session_emit_lock ( + ConsoleKitSession *object); + +void console_kit_session_emit_unlock ( + ConsoleKitSession *object); + + + +/* D-Bus method calls: */ +void console_kit_session_call_get_id ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_id_finish ( + ConsoleKitSession *proxy, + gchar **out_ssid, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_id_sync ( + ConsoleKitSession *proxy, + gchar **out_ssid, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_seat_id ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_seat_id_finish ( + ConsoleKitSession *proxy, + gchar **out_sid, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_seat_id_sync ( + ConsoleKitSession *proxy, + gchar **out_sid, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_session_type ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_session_type_finish ( + ConsoleKitSession *proxy, + gchar **out_type, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_session_type_sync ( + ConsoleKitSession *proxy, + gchar **out_type, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_user ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_user_finish ( + ConsoleKitSession *proxy, + guint *out_uid, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_user_sync ( + ConsoleKitSession *proxy, + guint *out_uid, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_unix_user ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_unix_user_finish ( + ConsoleKitSession *proxy, + guint *out_uid, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_unix_user_sync ( + ConsoleKitSession *proxy, + guint *out_uid, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_x11_display ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_x11_display_finish ( + ConsoleKitSession *proxy, + gchar **out_display, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_x11_display_sync ( + ConsoleKitSession *proxy, + gchar **out_display, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_x11_display_device ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_x11_display_device_finish ( + ConsoleKitSession *proxy, + gchar **out_x11_display_device, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_x11_display_device_sync ( + ConsoleKitSession *proxy, + gchar **out_x11_display_device, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_display_device ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_display_device_finish ( + ConsoleKitSession *proxy, + gchar **out_display_device, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_display_device_sync ( + ConsoleKitSession *proxy, + gchar **out_display_device, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_remote_host_name ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_remote_host_name_finish ( + ConsoleKitSession *proxy, + gchar **out_remote_host_name, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_remote_host_name_sync ( + ConsoleKitSession *proxy, + gchar **out_remote_host_name, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_login_session_id ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_login_session_id_finish ( + ConsoleKitSession *proxy, + gchar **out_login_session_id, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_login_session_id_sync ( + ConsoleKitSession *proxy, + gchar **out_login_session_id, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_is_active ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_is_active_finish ( + ConsoleKitSession *proxy, + gboolean *out_active, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_is_active_sync ( + ConsoleKitSession *proxy, + gboolean *out_active, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_is_local ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_is_local_finish ( + ConsoleKitSession *proxy, + gboolean *out_local, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_is_local_sync ( + ConsoleKitSession *proxy, + gboolean *out_local, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_creation_time ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_creation_time_finish ( + ConsoleKitSession *proxy, + gchar **out_iso8601_datetime, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_creation_time_sync ( + ConsoleKitSession *proxy, + gchar **out_iso8601_datetime, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_activate ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_activate_finish ( + ConsoleKitSession *proxy, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_activate_sync ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_lock ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_lock_finish ( + ConsoleKitSession *proxy, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_lock_sync ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_unlock ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_unlock_finish ( + ConsoleKitSession *proxy, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_unlock_sync ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_idle_hint ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_idle_hint_finish ( + ConsoleKitSession *proxy, + gboolean *out_idle_hint, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_idle_hint_sync ( + ConsoleKitSession *proxy, + gboolean *out_idle_hint, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_get_idle_since_hint ( + ConsoleKitSession *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_get_idle_since_hint_finish ( + ConsoleKitSession *proxy, + gchar **out_iso8601_datetime, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_get_idle_since_hint_sync ( + ConsoleKitSession *proxy, + gchar **out_iso8601_datetime, + GCancellable *cancellable, + GError **error); + +void console_kit_session_call_set_idle_hint ( + ConsoleKitSession *proxy, + gboolean arg_idle_hint, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean console_kit_session_call_set_idle_hint_finish ( + ConsoleKitSession *proxy, + GAsyncResult *res, + GError **error); + +gboolean console_kit_session_call_set_idle_hint_sync ( + ConsoleKitSession *proxy, + gboolean arg_idle_hint, + GCancellable *cancellable, + GError **error); + + + +/* D-Bus property accessors: */ +guint console_kit_session_get_unix_user (ConsoleKitSession *object); +void console_kit_session_set_unix_user (ConsoleKitSession *object, guint value); + +guint console_kit_session_get_user (ConsoleKitSession *object); +void console_kit_session_set_user (ConsoleKitSession *object, guint value); + +const gchar *console_kit_session_get_session_type (ConsoleKitSession *object); +gchar *console_kit_session_dup_session_type (ConsoleKitSession *object); +void console_kit_session_set_session_type (ConsoleKitSession *object, const gchar *value); + +const gchar *console_kit_session_get_remote_host_name (ConsoleKitSession *object); +gchar *console_kit_session_dup_remote_host_name (ConsoleKitSession *object); +void console_kit_session_set_remote_host_name (ConsoleKitSession *object, const gchar *value); + +const gchar *console_kit_session_get_display_device (ConsoleKitSession *object); +gchar *console_kit_session_dup_display_device (ConsoleKitSession *object); +void console_kit_session_set_display_device (ConsoleKitSession *object, const gchar *value); + +const gchar *console_kit_session_get_x11_display (ConsoleKitSession *object); +gchar *console_kit_session_dup_x11_display (ConsoleKitSession *object); +void console_kit_session_set_x11_display (ConsoleKitSession *object, const gchar *value); + +const gchar *console_kit_session_get_x11_display_device (ConsoleKitSession *object); +gchar *console_kit_session_dup_x11_display_device (ConsoleKitSession *object); +void console_kit_session_set_x11_display_device (ConsoleKitSession *object, const gchar *value); + +gboolean console_kit_session_get_active (ConsoleKitSession *object); +void console_kit_session_set_active (ConsoleKitSession *object, gboolean value); + +gboolean console_kit_session_get_is_local (ConsoleKitSession *object); +void console_kit_session_set_is_local (ConsoleKitSession *object, gboolean value); + +gboolean console_kit_session_get_idle_hint (ConsoleKitSession *object); +void console_kit_session_set_idle_hint (ConsoleKitSession *object, gboolean value); + + +/* ---- */ + +#define TYPE_CONSOLE_KIT_SESSION_PROXY (console_kit_session_proxy_get_type ()) +#define CONSOLE_KIT_SESSION_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CONSOLE_KIT_SESSION_PROXY, ConsoleKitSessionProxy)) +#define CONSOLE_KIT_SESSION_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_CONSOLE_KIT_SESSION_PROXY, ConsoleKitSessionProxyClass)) +#define CONSOLE_KIT_SESSION_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_CONSOLE_KIT_SESSION_PROXY, ConsoleKitSessionProxyClass)) +#define IS_CONSOLE_KIT_SESSION_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CONSOLE_KIT_SESSION_PROXY)) +#define IS_CONSOLE_KIT_SESSION_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_CONSOLE_KIT_SESSION_PROXY)) + +typedef struct _ConsoleKitSessionProxy ConsoleKitSessionProxy; +typedef struct _ConsoleKitSessionProxyClass ConsoleKitSessionProxyClass; +typedef struct _ConsoleKitSessionProxyPrivate ConsoleKitSessionProxyPrivate; + +struct _ConsoleKitSessionProxy +{ + /*< private >*/ + GDBusProxy parent_instance; + ConsoleKitSessionProxyPrivate *priv; +}; + +struct _ConsoleKitSessionProxyClass +{ + GDBusProxyClass parent_class; +}; + +GType console_kit_session_proxy_get_type (void) G_GNUC_CONST; + +void console_kit_session_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +ConsoleKitSession *console_kit_session_proxy_new_finish ( + GAsyncResult *res, + GError **error); +ConsoleKitSession *console_kit_session_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void console_kit_session_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +ConsoleKitSession *console_kit_session_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +ConsoleKitSession *console_kit_session_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +/* ---- */ + +#define TYPE_CONSOLE_KIT_SESSION_SKELETON (console_kit_session_skeleton_get_type ()) +#define CONSOLE_KIT_SESSION_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CONSOLE_KIT_SESSION_SKELETON, ConsoleKitSessionSkeleton)) +#define CONSOLE_KIT_SESSION_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_CONSOLE_KIT_SESSION_SKELETON, ConsoleKitSessionSkeletonClass)) +#define CONSOLE_KIT_SESSION_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_CONSOLE_KIT_SESSION_SKELETON, ConsoleKitSessionSkeletonClass)) +#define IS_CONSOLE_KIT_SESSION_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CONSOLE_KIT_SESSION_SKELETON)) +#define IS_CONSOLE_KIT_SESSION_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_CONSOLE_KIT_SESSION_SKELETON)) + +typedef struct _ConsoleKitSessionSkeleton ConsoleKitSessionSkeleton; +typedef struct _ConsoleKitSessionSkeletonClass ConsoleKitSessionSkeletonClass; +typedef struct _ConsoleKitSessionSkeletonPrivate ConsoleKitSessionSkeletonPrivate; + +struct _ConsoleKitSessionSkeleton +{ + /*< private >*/ + GDBusInterfaceSkeleton parent_instance; + ConsoleKitSessionSkeletonPrivate *priv; +}; + +struct _ConsoleKitSessionSkeletonClass +{ + GDBusInterfaceSkeletonClass parent_class; +}; + +GType console_kit_session_skeleton_get_type (void) G_GNUC_CONST; + +ConsoleKitSession *console_kit_session_skeleton_new (void); + + +G_END_DECLS + +#endif /* __DBUS_CONSOLEKIT_SESSION_H__ */ diff --git a/src/dbus-display-manager.c b/src/dbus-display-manager.c new file mode 100644 index 0000000..c2fc250 --- /dev/null +++ b/src/dbus-display-manager.c @@ -0,0 +1,1986 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "dbus-display-manager.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; + gboolean use_gvariant; +} _ExtendedGDBusPropertyInfo; + +typedef struct +{ + GDBusInterfaceInfo parent_struct; + const gchar *hyphen_name; +} _ExtendedGDBusInterfaceInfo; + +typedef struct +{ + const _ExtendedGDBusPropertyInfo *info; + guint prop_id; + GValue orig_value; /* the value before the change */ +} ChangedProperty; + +static void +_changed_property_free (ChangedProperty *data) +{ + g_value_unset (&data->orig_value); + g_free (data); +} + +static gboolean +_g_strv_equal0 (gchar **a, gchar **b) +{ + gboolean ret = FALSE; + guint n; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + if (g_strv_length (a) != g_strv_length (b)) + goto out; + for (n = 0; a[n] != NULL; n++) + if (g_strcmp0 (a[n], b[n]) != 0) + goto out; + ret = TRUE; +out: + return ret; +} + +static gboolean +_g_variant_equal0 (GVariant *a, GVariant *b) +{ + gboolean ret = FALSE; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + ret = g_variant_equal (a, b); +out: + return ret; +} + +G_GNUC_UNUSED static gboolean +_g_value_equal (const GValue *a, const GValue *b) +{ + gboolean ret = FALSE; + g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); + switch (G_VALUE_TYPE (a)) + { + case G_TYPE_BOOLEAN: + ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); + break; + case G_TYPE_UCHAR: + ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); + break; + case G_TYPE_INT: + ret = (g_value_get_int (a) == g_value_get_int (b)); + break; + case G_TYPE_UINT: + ret = (g_value_get_uint (a) == g_value_get_uint (b)); + break; + case G_TYPE_INT64: + ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); + break; + case G_TYPE_UINT64: + ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); + break; + case G_TYPE_DOUBLE: + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } + break; + case G_TYPE_STRING: + ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); + break; + case G_TYPE_VARIANT: + ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); + break; + default: + if (G_VALUE_TYPE (a) == G_TYPE_STRV) + ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); + else + g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); + break; + } + return ret; +} + +/* ------------------------------------------------------------------------ + * Code for interface org.freedesktop.DisplayManager.Seat + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:DisplayManagerSeat + * @title: DisplayManagerSeat + * @short_description: Generated C code for the org.freedesktop.DisplayManager.Seat D-Bus interface + * + * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-DisplayManager-Seat.top_of_page">org.freedesktop.DisplayManager.Seat</link> D-Bus interface in C. + */ + +/* ---- Introspection data for org.freedesktop.DisplayManager.Seat ---- */ + +static const _ExtendedGDBusMethodInfo _display_manager_seat_method_info_switch_to_greeter = +{ + { + -1, + (gchar *) "SwitchToGreeter", + NULL, + NULL, + NULL + }, + "handle-switch-to-greeter", + FALSE +}; + +static const _ExtendedGDBusArgInfo _display_manager_seat_method_info_switch_to_user_IN_ARG_username = +{ + { + -1, + (gchar *) "username", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _display_manager_seat_method_info_switch_to_user_IN_ARG_session_name = +{ + { + -1, + (gchar *) "session_name", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _display_manager_seat_method_info_switch_to_user_IN_ARG_pointers[] = +{ + &_display_manager_seat_method_info_switch_to_user_IN_ARG_username, + &_display_manager_seat_method_info_switch_to_user_IN_ARG_session_name, + NULL +}; + +static const _ExtendedGDBusMethodInfo _display_manager_seat_method_info_switch_to_user = +{ + { + -1, + (gchar *) "SwitchToUser", + (GDBusArgInfo **) &_display_manager_seat_method_info_switch_to_user_IN_ARG_pointers, + NULL, + NULL + }, + "handle-switch-to-user", + FALSE +}; + +static const _ExtendedGDBusArgInfo _display_manager_seat_method_info_switch_to_guest_IN_ARG_session_name = +{ + { + -1, + (gchar *) "session_name", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _display_manager_seat_method_info_switch_to_guest_IN_ARG_pointers[] = +{ + &_display_manager_seat_method_info_switch_to_guest_IN_ARG_session_name, + NULL +}; + +static const _ExtendedGDBusMethodInfo _display_manager_seat_method_info_switch_to_guest = +{ + { + -1, + (gchar *) "SwitchToGuest", + (GDBusArgInfo **) &_display_manager_seat_method_info_switch_to_guest_IN_ARG_pointers, + NULL, + NULL + }, + "handle-switch-to-guest", + FALSE +}; + +static const _ExtendedGDBusMethodInfo _display_manager_seat_method_info_lock = +{ + { + -1, + (gchar *) "Lock", + NULL, + NULL, + NULL + }, + "handle-lock", + FALSE +}; + +static const _ExtendedGDBusMethodInfo * const _display_manager_seat_method_info_pointers[] = +{ + &_display_manager_seat_method_info_switch_to_greeter, + &_display_manager_seat_method_info_switch_to_user, + &_display_manager_seat_method_info_switch_to_guest, + &_display_manager_seat_method_info_lock, + NULL +}; + +static const _ExtendedGDBusPropertyInfo _display_manager_seat_property_info_can_switch = +{ + { + -1, + (gchar *) "CanSwitch", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "can-switch", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _display_manager_seat_property_info_has_guest_account = +{ + { + -1, + (gchar *) "HasGuestAccount", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "has-guest-account", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _display_manager_seat_property_info_sessions = +{ + { + -1, + (gchar *) "Sessions", + (gchar *) "ao", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "sessions", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo * const _display_manager_seat_property_info_pointers[] = +{ + &_display_manager_seat_property_info_can_switch, + &_display_manager_seat_property_info_has_guest_account, + &_display_manager_seat_property_info_sessions, + NULL +}; + +static const _ExtendedGDBusInterfaceInfo _display_manager_seat_interface_info = +{ + { + -1, + (gchar *) "org.freedesktop.DisplayManager.Seat", + (GDBusMethodInfo **) &_display_manager_seat_method_info_pointers, + NULL, + (GDBusPropertyInfo **) &_display_manager_seat_property_info_pointers, + NULL + }, + "display-manager-seat", +}; + + +/** + * display_manager_seat_interface_info: + * + * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-DisplayManager-Seat.top_of_page">org.freedesktop.DisplayManager.Seat</link> D-Bus interface. + * + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + */ +GDBusInterfaceInfo * +display_manager_seat_interface_info (void) +{ + return (GDBusInterfaceInfo *) &_display_manager_seat_interface_info.parent_struct; +} + +/** + * display_manager_seat_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 #DisplayManagerSeat interface for a concrete class. + * The properties are overridden in the order they are defined. + * + * Returns: The last property id. + */ +guint +display_manager_seat_override_properties (GObjectClass *klass, guint property_id_begin) +{ + g_object_class_override_property (klass, property_id_begin++, "can-switch"); + g_object_class_override_property (klass, property_id_begin++, "has-guest-account"); + g_object_class_override_property (klass, property_id_begin++, "sessions"); + return property_id_begin - 1; +} + + + +/** + * DisplayManagerSeat: + * + * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-DisplayManager-Seat.top_of_page">org.freedesktop.DisplayManager.Seat</link>. + */ + +/** + * DisplayManagerSeatIface: + * @parent_iface: The parent interface. + * @handle_lock: Handler for the #DisplayManagerSeat::handle-lock signal. + * @handle_switch_to_greeter: Handler for the #DisplayManagerSeat::handle-switch-to-greeter signal. + * @handle_switch_to_guest: Handler for the #DisplayManagerSeat::handle-switch-to-guest signal. + * @handle_switch_to_user: Handler for the #DisplayManagerSeat::handle-switch-to-user signal. + * @get_can_switch: Getter for the #DisplayManagerSeat:can-switch property. + * @get_has_guest_account: Getter for the #DisplayManagerSeat:has-guest-account property. + * @get_sessions: Getter for the #DisplayManagerSeat:sessions property. + * + * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-DisplayManager-Seat.top_of_page">org.freedesktop.DisplayManager.Seat</link>. + */ + +static void +display_manager_seat_default_init (DisplayManagerSeatIface *iface) +{ + /* GObject signals for incoming D-Bus method calls: */ + /** + * DisplayManagerSeat::handle-switch-to-greeter: + * @object: A #DisplayManagerSeat. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToGreeter">SwitchToGreeter()</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 display_manager_seat_complete_switch_to_greeter() 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-to-greeter", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DisplayManagerSeatIface, handle_switch_to_greeter), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * DisplayManagerSeat::handle-switch-to-user: + * @object: A #DisplayManagerSeat. + * @invocation: A #GDBusMethodInvocation. + * @arg_username: Argument passed by remote caller. + * @arg_session_name: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToUser">SwitchToUser()</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 display_manager_seat_complete_switch_to_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-to-user", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DisplayManagerSeatIface, handle_switch_to_user), + 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); + + /** + * DisplayManagerSeat::handle-switch-to-guest: + * @object: A #DisplayManagerSeat. + * @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-freedesktop-DisplayManager-Seat.SwitchToGuest">SwitchToGuest()</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 display_manager_seat_complete_switch_to_guest() 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-to-guest", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DisplayManagerSeatIface, handle_switch_to_guest), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * DisplayManagerSeat::handle-lock: + * @object: A #DisplayManagerSeat. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.Lock">Lock()</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 display_manager_seat_complete_lock() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-lock", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DisplayManagerSeatIface, handle_lock), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /* GObject properties for D-Bus properties: */ + /** + * DisplayManagerSeat:can-switch: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-DisplayManager-Seat.CanSwitch">"CanSwitch"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("can-switch", "CanSwitch", "CanSwitch", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * DisplayManagerSeat:has-guest-account: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-DisplayManager-Seat.HasGuestAccount">"HasGuestAccount"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("has-guest-account", "HasGuestAccount", "HasGuestAccount", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * DisplayManagerSeat:sessions: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-DisplayManager-Seat.Sessions">"Sessions"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boxed ("sessions", "Sessions", "Sessions", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); +} + +typedef DisplayManagerSeatIface DisplayManagerSeatInterface; +G_DEFINE_INTERFACE (DisplayManagerSeat, display_manager_seat, G_TYPE_OBJECT); + +/** + * display_manager_seat_get_can_switch: (skip) + * @object: A #DisplayManagerSeat. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-DisplayManager-Seat.CanSwitch">"CanSwitch"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +display_manager_seat_get_can_switch (DisplayManagerSeat *object) +{ + return DISPLAY_MANAGER_SEAT_GET_IFACE (object)->get_can_switch (object); +} + +/** + * display_manager_seat_set_can_switch: (skip) + * @object: A #DisplayManagerSeat. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-DisplayManager-Seat.CanSwitch">"CanSwitch"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +display_manager_seat_set_can_switch (DisplayManagerSeat *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "can-switch", value, NULL); +} + +/** + * display_manager_seat_get_has_guest_account: (skip) + * @object: A #DisplayManagerSeat. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-DisplayManager-Seat.HasGuestAccount">"HasGuestAccount"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +display_manager_seat_get_has_guest_account (DisplayManagerSeat *object) +{ + return DISPLAY_MANAGER_SEAT_GET_IFACE (object)->get_has_guest_account (object); +} + +/** + * display_manager_seat_set_has_guest_account: (skip) + * @object: A #DisplayManagerSeat. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-DisplayManager-Seat.HasGuestAccount">"HasGuestAccount"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +display_manager_seat_set_has_guest_account (DisplayManagerSeat *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "has-guest-account", value, NULL); +} + +/** + * display_manager_seat_get_sessions: (skip) + * @object: A #DisplayManagerSeat. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-DisplayManager-Seat.Sessions">"Sessions"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use display_manager_seat_dup_sessions() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar *const * +display_manager_seat_get_sessions (DisplayManagerSeat *object) +{ + return DISPLAY_MANAGER_SEAT_GET_IFACE (object)->get_sessions (object); +} + +/** + * display_manager_seat_dup_sessions: (skip) + * @object: A #DisplayManagerSeat. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-DisplayManager-Seat.Sessions">"Sessions"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev(). + */ +gchar ** +display_manager_seat_dup_sessions (DisplayManagerSeat *object) +{ + gchar **value; + g_object_get (G_OBJECT (object), "sessions", &value, NULL); + return value; +} + +/** + * display_manager_seat_set_sessions: (skip) + * @object: A #DisplayManagerSeat. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-DisplayManager-Seat.Sessions">"Sessions"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +display_manager_seat_set_sessions (DisplayManagerSeat *object, const gchar *const *value) +{ + g_object_set (G_OBJECT (object), "sessions", value, NULL); +} + +/** + * display_manager_seat_call_switch_to_greeter: + * @proxy: A #DisplayManagerSeatProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToGreeter">SwitchToGreeter()</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 display_manager_seat_call_switch_to_greeter_finish() to get the result of the operation. + * + * See display_manager_seat_call_switch_to_greeter_sync() for the synchronous, blocking version of this method. + */ +void +display_manager_seat_call_switch_to_greeter ( + DisplayManagerSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SwitchToGreeter", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * display_manager_seat_call_switch_to_greeter_finish: + * @proxy: A #DisplayManagerSeatProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to display_manager_seat_call_switch_to_greeter(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with display_manager_seat_call_switch_to_greeter(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +display_manager_seat_call_switch_to_greeter_finish ( + DisplayManagerSeat *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; +} + +/** + * display_manager_seat_call_switch_to_greeter_sync: + * @proxy: A #DisplayManagerSeatProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToGreeter">SwitchToGreeter()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See display_manager_seat_call_switch_to_greeter() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +display_manager_seat_call_switch_to_greeter_sync ( + DisplayManagerSeat *proxy, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SwitchToGreeter", + 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; +} + +/** + * display_manager_seat_call_switch_to_user: + * @proxy: A #DisplayManagerSeatProxy. + * @arg_username: Argument to pass with the method invocation. + * @arg_session_name: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToUser">SwitchToUser()</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 display_manager_seat_call_switch_to_user_finish() to get the result of the operation. + * + * See display_manager_seat_call_switch_to_user_sync() for the synchronous, blocking version of this method. + */ +void +display_manager_seat_call_switch_to_user ( + DisplayManagerSeat *proxy, + const gchar *arg_username, + const gchar *arg_session_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SwitchToUser", + g_variant_new ("(ss)", + arg_username, + arg_session_name), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * display_manager_seat_call_switch_to_user_finish: + * @proxy: A #DisplayManagerSeatProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to display_manager_seat_call_switch_to_user(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with display_manager_seat_call_switch_to_user(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +display_manager_seat_call_switch_to_user_finish ( + DisplayManagerSeat *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; +} + +/** + * display_manager_seat_call_switch_to_user_sync: + * @proxy: A #DisplayManagerSeatProxy. + * @arg_username: Argument to pass with the method invocation. + * @arg_session_name: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToUser">SwitchToUser()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See display_manager_seat_call_switch_to_user() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +display_manager_seat_call_switch_to_user_sync ( + DisplayManagerSeat *proxy, + const gchar *arg_username, + const gchar *arg_session_name, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SwitchToUser", + g_variant_new ("(ss)", + arg_username, + 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; +} + +/** + * display_manager_seat_call_switch_to_guest: + * @proxy: A #DisplayManagerSeatProxy. + * @arg_session_name: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToGuest">SwitchToGuest()</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 display_manager_seat_call_switch_to_guest_finish() to get the result of the operation. + * + * See display_manager_seat_call_switch_to_guest_sync() for the synchronous, blocking version of this method. + */ +void +display_manager_seat_call_switch_to_guest ( + DisplayManagerSeat *proxy, + const gchar *arg_session_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SwitchToGuest", + g_variant_new ("(s)", + arg_session_name), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * display_manager_seat_call_switch_to_guest_finish: + * @proxy: A #DisplayManagerSeatProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to display_manager_seat_call_switch_to_guest(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with display_manager_seat_call_switch_to_guest(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +display_manager_seat_call_switch_to_guest_finish ( + DisplayManagerSeat *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; +} + +/** + * display_manager_seat_call_switch_to_guest_sync: + * @proxy: A #DisplayManagerSeatProxy. + * @arg_session_name: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToGuest">SwitchToGuest()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See display_manager_seat_call_switch_to_guest() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +display_manager_seat_call_switch_to_guest_sync ( + DisplayManagerSeat *proxy, + const gchar *arg_session_name, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SwitchToGuest", + 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; +} + +/** + * display_manager_seat_call_lock: + * @proxy: A #DisplayManagerSeatProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.Lock">Lock()</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 display_manager_seat_call_lock_finish() to get the result of the operation. + * + * See display_manager_seat_call_lock_sync() for the synchronous, blocking version of this method. + */ +void +display_manager_seat_call_lock ( + DisplayManagerSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "Lock", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * display_manager_seat_call_lock_finish: + * @proxy: A #DisplayManagerSeatProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to display_manager_seat_call_lock(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with display_manager_seat_call_lock(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +display_manager_seat_call_lock_finish ( + DisplayManagerSeat *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; +} + +/** + * display_manager_seat_call_lock_sync: + * @proxy: A #DisplayManagerSeatProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.Lock">Lock()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See display_manager_seat_call_lock() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +display_manager_seat_call_lock_sync ( + DisplayManagerSeat *proxy, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "Lock", + 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; +} + +/** + * display_manager_seat_complete_switch_to_greeter: + * @object: A #DisplayManagerSeat. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToGreeter">SwitchToGreeter()</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 +display_manager_seat_complete_switch_to_greeter ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * display_manager_seat_complete_switch_to_user: + * @object: A #DisplayManagerSeat. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToUser">SwitchToUser()</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 +display_manager_seat_complete_switch_to_user ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * display_manager_seat_complete_switch_to_guest: + * @object: A #DisplayManagerSeat. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.SwitchToGuest">SwitchToGuest()</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 +display_manager_seat_complete_switch_to_guest ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * display_manager_seat_complete_lock: + * @object: A #DisplayManagerSeat. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-DisplayManager-Seat.Lock">Lock()</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 +display_manager_seat_complete_lock ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/* ------------------------------------------------------------------------ */ + +/** + * DisplayManagerSeatProxy: + * + * The #DisplayManagerSeatProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * DisplayManagerSeatProxyClass: + * @parent_class: The parent class. + * + * Class structure for #DisplayManagerSeatProxy. + */ + +struct _DisplayManagerSeatProxyPrivate +{ + GData *qdata; +}; + +static void display_manager_seat_proxy_iface_init (DisplayManagerSeatIface *iface); + +G_DEFINE_TYPE_WITH_CODE (DisplayManagerSeatProxy, display_manager_seat_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (TYPE_DISPLAY_MANAGER_SEAT, display_manager_seat_proxy_iface_init)); + +static void +display_manager_seat_proxy_finalize (GObject *object) +{ + DisplayManagerSeatProxy *proxy = DISPLAY_MANAGER_SEAT_PROXY (object); + g_datalist_clear (&proxy->priv->qdata); + G_OBJECT_CLASS (display_manager_seat_proxy_parent_class)->finalize (object); +} + +static void +display_manager_seat_proxy_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 3); + info = _display_manager_seat_property_info_pointers[prop_id - 1]; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); + if (info->use_gvariant) + { + g_value_set_variant (value, variant); + } + else + { + if (variant != NULL) + g_dbus_gvariant_to_gvalue (variant, value); + } + if (variant != NULL) + g_variant_unref (variant); +} + +static void +display_manager_seat_proxy_set_property_cb (GDBusProxy *proxy, + GAsyncResult *res, + gpointer user_data) +{ + const _ExtendedGDBusPropertyInfo *info = user_data; + GError *error; + error = NULL; + if (!g_dbus_proxy_call_finish (proxy, res, &error)) + { + g_warning ("Error setting property `%s' on interface org.freedesktop.DisplayManager.Seat: %s (%s, %d)", + info->parent_struct.name, + error->message, g_quark_to_string (error->domain), error->code); + g_error_free (error); + } +} + +static void +display_manager_seat_proxy_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 3); + info = _display_manager_seat_property_info_pointers[prop_id - 1]; + variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); + g_dbus_proxy_call (G_DBUS_PROXY (object), + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", "org.freedesktop.DisplayManager.Seat", info->parent_struct.name, variant), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, (GAsyncReadyCallback) display_manager_seat_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); + g_variant_unref (variant); +} + +static void +display_manager_seat_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) +{ + _ExtendedGDBusSignalInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint n; + guint signal_id; + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_display_manager_seat_interface_info.parent_struct, signal_name); + if (info == NULL) + return; + num_params = g_variant_n_children (parameters); + paramv = g_new0 (GValue, num_params + 1); + g_value_init (¶mv[0], TYPE_DISPLAY_MANAGER_SEAT); + g_value_set_object (¶mv[0], proxy); + g_variant_iter_init (&iter, parameters); + n = 1; + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_DISPLAY_MANAGER_SEAT); + g_signal_emitv (paramv, signal_id, 0, NULL); + for (n = 0; n < num_params + 1; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static void +display_manager_seat_proxy_g_properties_changed (GDBusProxy *_proxy, + GVariant *changed_properties, + const gchar *const *invalidated_properties) +{ + DisplayManagerSeatProxy *proxy = DISPLAY_MANAGER_SEAT_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 *) &_display_manager_seat_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 *) &_display_manager_seat_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 gboolean +display_manager_seat_proxy_get_can_switch (DisplayManagerSeat *object) +{ + DisplayManagerSeatProxy *proxy = DISPLAY_MANAGER_SEAT_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "CanSwitch"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static gboolean +display_manager_seat_proxy_get_has_guest_account (DisplayManagerSeat *object) +{ + DisplayManagerSeatProxy *proxy = DISPLAY_MANAGER_SEAT_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "HasGuestAccount"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static const gchar *const * +display_manager_seat_proxy_get_sessions (DisplayManagerSeat *object) +{ + DisplayManagerSeatProxy *proxy = DISPLAY_MANAGER_SEAT_PROXY (object); + GVariant *variant; + const gchar *const *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Sessions"); + if (variant != NULL) + { + value = g_variant_get_objv (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static void +display_manager_seat_proxy_init (DisplayManagerSeatProxy *proxy) +{ + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_DISPLAY_MANAGER_SEAT_PROXY, DisplayManagerSeatProxyPrivate); + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), display_manager_seat_interface_info ()); +} + +static void +display_manager_seat_proxy_class_init (DisplayManagerSeatProxyClass *klass) +{ + GObjectClass *gobject_class; + GDBusProxyClass *proxy_class; + + g_type_class_add_private (klass, sizeof (DisplayManagerSeatProxyPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = display_manager_seat_proxy_finalize; + gobject_class->get_property = display_manager_seat_proxy_get_property; + gobject_class->set_property = display_manager_seat_proxy_set_property; + + proxy_class = G_DBUS_PROXY_CLASS (klass); + proxy_class->g_signal = display_manager_seat_proxy_g_signal; + proxy_class->g_properties_changed = display_manager_seat_proxy_g_properties_changed; + + + display_manager_seat_override_properties (gobject_class, 1); +} + +static void +display_manager_seat_proxy_iface_init (DisplayManagerSeatIface *iface) +{ + iface->get_can_switch = display_manager_seat_proxy_get_can_switch; + iface->get_has_guest_account = display_manager_seat_proxy_get_has_guest_account; + iface->get_sessions = display_manager_seat_proxy_get_sessions; +} + +/** + * display_manager_seat_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-DisplayManager-Seat.top_of_page">org.freedesktop.DisplayManager.Seat</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 display_manager_seat_proxy_new_finish() to get the result of the operation. + * + * See display_manager_seat_proxy_new_sync() for the synchronous, blocking version of this constructor. + */ +void +display_manager_seat_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_DISPLAY_MANAGER_SEAT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.DisplayManager.Seat", NULL); +} + +/** + * display_manager_seat_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to display_manager_seat_proxy_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with display_manager_seat_proxy_new(). + * + * Returns: (transfer full) (type DisplayManagerSeatProxy): The constructed proxy object or %NULL if @error is set. + */ +DisplayManagerSeat * +display_manager_seat_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 DISPLAY_MANAGER_SEAT (ret); + else + return NULL; +} + +/** + * display_manager_seat_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-DisplayManager-Seat.top_of_page">org.freedesktop.DisplayManager.Seat</link>. See g_dbus_proxy_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See display_manager_seat_proxy_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type DisplayManagerSeatProxy): The constructed proxy object or %NULL if @error is set. + */ +DisplayManagerSeat * +display_manager_seat_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_DISPLAY_MANAGER_SEAT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.DisplayManager.Seat", NULL); + if (ret != NULL) + return DISPLAY_MANAGER_SEAT (ret); + else + return NULL; +} + + +/** + * display_manager_seat_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like display_manager_seat_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 display_manager_seat_proxy_new_for_bus_finish() to get the result of the operation. + * + * See display_manager_seat_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +display_manager_seat_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_DISPLAY_MANAGER_SEAT_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.DisplayManager.Seat", NULL); +} + +/** + * display_manager_seat_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to display_manager_seat_proxy_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with display_manager_seat_proxy_new_for_bus(). + * + * Returns: (transfer full) (type DisplayManagerSeatProxy): The constructed proxy object or %NULL if @error is set. + */ +DisplayManagerSeat * +display_manager_seat_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 DISPLAY_MANAGER_SEAT (ret); + else + return NULL; +} + +/** + * display_manager_seat_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like display_manager_seat_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See display_manager_seat_proxy_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type DisplayManagerSeatProxy): The constructed proxy object or %NULL if @error is set. + */ +DisplayManagerSeat * +display_manager_seat_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_DISPLAY_MANAGER_SEAT_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.DisplayManager.Seat", NULL); + if (ret != NULL) + return DISPLAY_MANAGER_SEAT (ret); + else + return NULL; +} + + +/* ------------------------------------------------------------------------ */ + +/** + * DisplayManagerSeatSkeleton: + * + * The #DisplayManagerSeatSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * DisplayManagerSeatSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #DisplayManagerSeatSkeleton. + */ + +struct _DisplayManagerSeatSkeletonPrivate +{ + GValue *properties; + GList *changed_properties; + GSource *changed_properties_idle_source; + GMainContext *context; + GMutex lock; +}; + +static void +_display_manager_seat_skeleton_handle_method_call ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (user_data); + _ExtendedGDBusMethodInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint num_extra; + guint n; + guint signal_id; + GValue return_value = G_VALUE_INIT; + info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); + g_assert (info != NULL); + num_params = g_variant_n_children (parameters); + num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); + n = 0; + g_value_init (¶mv[n], TYPE_DISPLAY_MANAGER_SEAT); + g_value_set_object (¶mv[n++], skeleton); + g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); + g_value_set_object (¶mv[n++], invocation); + if (info->pass_fdlist) + { +#ifdef G_OS_UNIX + g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); + g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); +#else + g_assert_not_reached (); +#endif + } + g_variant_iter_init (&iter, parameters); + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_DISPLAY_MANAGER_SEAT); + g_value_init (&return_value, G_TYPE_BOOLEAN); + g_signal_emitv (paramv, signal_id, 0, &return_value); + if (!g_value_get_boolean (&return_value)) + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); + g_value_unset (&return_value); + for (n = 0; n < num_params + num_extra; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static GVariant * +_display_manager_seat_skeleton_handle_get_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + gpointer user_data) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_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 *) &_display_manager_seat_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 +_display_manager_seat_skeleton_handle_set_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *variant, + GError **error, + gpointer user_data) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_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 *) &_display_manager_seat_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 _display_manager_seat_skeleton_vtable = +{ + _display_manager_seat_skeleton_handle_method_call, + _display_manager_seat_skeleton_handle_get_property, + _display_manager_seat_skeleton_handle_set_property +}; + +static GDBusInterfaceInfo * +display_manager_seat_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton) +{ + return display_manager_seat_interface_info (); +} + +static GDBusInterfaceVTable * +display_manager_seat_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton) +{ + return (GDBusInterfaceVTable *) &_display_manager_seat_skeleton_vtable; +} + +static GVariant * +display_manager_seat_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (_skeleton); + + GVariantBuilder builder; + guint n; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + if (_display_manager_seat_interface_info.parent_struct.properties == NULL) + goto out; + for (n = 0; _display_manager_seat_interface_info.parent_struct.properties[n] != NULL; n++) + { + GDBusPropertyInfo *info = _display_manager_seat_interface_info.parent_struct.properties[n]; + if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) + { + GVariant *value; + value = _display_manager_seat_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.DisplayManager.Seat", info->name, NULL, skeleton); + if (value != NULL) + { + g_variant_take_ref (value); + g_variant_builder_add (&builder, "{sv}", info->name, value); + g_variant_unref (value); + } + } + } +out: + return g_variant_builder_end (&builder); +} + +static gboolean _display_manager_seat_emit_changed (gpointer user_data); + +static void +display_manager_seat_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (_skeleton); + gboolean emit_changed = FALSE; + + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties_idle_source != NULL) + { + g_source_destroy (skeleton->priv->changed_properties_idle_source); + skeleton->priv->changed_properties_idle_source = NULL; + emit_changed = TRUE; + } + g_mutex_unlock (&skeleton->priv->lock); + + if (emit_changed) + _display_manager_seat_emit_changed (skeleton); +} + +static void display_manager_seat_skeleton_iface_init (DisplayManagerSeatIface *iface); +G_DEFINE_TYPE_WITH_CODE (DisplayManagerSeatSkeleton, display_manager_seat_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (TYPE_DISPLAY_MANAGER_SEAT, display_manager_seat_skeleton_iface_init)); + +static void +display_manager_seat_skeleton_finalize (GObject *object) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (object); + guint n; + for (n = 0; n < 3; n++) + g_value_unset (&skeleton->priv->properties[n]); + g_free (skeleton->priv->properties); + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + if (skeleton->priv->changed_properties_idle_source != NULL) + g_source_destroy (skeleton->priv->changed_properties_idle_source); + g_main_context_unref (skeleton->priv->context); + g_mutex_clear (&skeleton->priv->lock); + G_OBJECT_CLASS (display_manager_seat_skeleton_parent_class)->finalize (object); +} + +static void +display_manager_seat_skeleton_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 3); + g_mutex_lock (&skeleton->priv->lock); + g_value_copy (&skeleton->priv->properties[prop_id - 1], value); + g_mutex_unlock (&skeleton->priv->lock); +} + +static gboolean +_display_manager_seat_emit_changed (gpointer user_data) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (user_data); + GList *l; + GVariantBuilder builder; + GVariantBuilder invalidated_builder; + guint num_changes; + + g_mutex_lock (&skeleton->priv->lock); + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); + for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) + { + ChangedProperty *cp = l->data; + GVariant *variant; + const GValue *cur_value; + + cur_value = &skeleton->priv->properties[cp->prop_id - 1]; + if (!_g_value_equal (cur_value, &cp->orig_value)) + { + variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); + g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); + g_variant_unref (variant); + num_changes++; + } + } + if (num_changes > 0) + { + GList *connections, *ll; + GVariant *signal_variant; + signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.DisplayManager.Seat", + &builder, &invalidated_builder)); + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + for (ll = connections; ll != NULL; ll = ll->next) + { + GDBusConnection *connection = ll->data; + + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), + "org.freedesktop.DBus.Properties", + "PropertiesChanged", + signal_variant, + NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); + } + else + { + g_variant_builder_clear (&builder); + g_variant_builder_clear (&invalidated_builder); + } + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + skeleton->priv->changed_properties = NULL; + skeleton->priv->changed_properties_idle_source = NULL; + g_mutex_unlock (&skeleton->priv->lock); + return FALSE; +} + +static void +_display_manager_seat_schedule_emit_changed (DisplayManagerSeatSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) +{ + ChangedProperty *cp; + GList *l; + cp = NULL; + for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) + { + ChangedProperty *i_cp = l->data; + if (i_cp->info == info) + { + cp = i_cp; + break; + } + } + if (cp == NULL) + { + cp = g_new0 (ChangedProperty, 1); + cp->prop_id = prop_id; + cp->info = info; + skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); + g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); + g_value_copy (orig_value, &cp->orig_value); + } +} + +static void +display_manager_seat_skeleton_notify (GObject *object, + GParamSpec *pspec) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (object); + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties != NULL && + skeleton->priv->changed_properties_idle_source == NULL) + { + skeleton->priv->changed_properties_idle_source = g_idle_source_new (); + g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); + g_source_set_callback (skeleton->priv->changed_properties_idle_source, _display_manager_seat_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); + g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); + g_source_unref (skeleton->priv->changed_properties_idle_source); + } + g_mutex_unlock (&skeleton->priv->lock); +} + +static void +display_manager_seat_skeleton_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 3); + g_mutex_lock (&skeleton->priv->lock); + g_object_freeze_notify (object); + if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) + { + if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) + _display_manager_seat_schedule_emit_changed (skeleton, _display_manager_seat_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); + g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); + g_object_notify_by_pspec (object, pspec); + } + g_mutex_unlock (&skeleton->priv->lock); + g_object_thaw_notify (object); +} + +static void +display_manager_seat_skeleton_init (DisplayManagerSeatSkeleton *skeleton) +{ + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_DISPLAY_MANAGER_SEAT_SKELETON, DisplayManagerSeatSkeletonPrivate); + g_mutex_init (&skeleton->priv->lock); + skeleton->priv->context = g_main_context_ref_thread_default (); + skeleton->priv->properties = g_new0 (GValue, 3); + g_value_init (&skeleton->priv->properties[0], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[1], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[2], G_TYPE_STRV); +} + +static gboolean +display_manager_seat_skeleton_get_can_switch (DisplayManagerSeat *object) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[0])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +display_manager_seat_skeleton_get_has_guest_account (DisplayManagerSeat *object) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[1])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar *const * +display_manager_seat_skeleton_get_sessions (DisplayManagerSeat *object) +{ + DisplayManagerSeatSkeleton *skeleton = DISPLAY_MANAGER_SEAT_SKELETON (object); + const gchar *const *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boxed (&(skeleton->priv->properties[2])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static void +display_manager_seat_skeleton_class_init (DisplayManagerSeatSkeletonClass *klass) +{ + GObjectClass *gobject_class; + GDBusInterfaceSkeletonClass *skeleton_class; + + g_type_class_add_private (klass, sizeof (DisplayManagerSeatSkeletonPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = display_manager_seat_skeleton_finalize; + gobject_class->get_property = display_manager_seat_skeleton_get_property; + gobject_class->set_property = display_manager_seat_skeleton_set_property; + gobject_class->notify = display_manager_seat_skeleton_notify; + + + display_manager_seat_override_properties (gobject_class, 1); + + skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); + skeleton_class->get_info = display_manager_seat_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = display_manager_seat_skeleton_dbus_interface_get_properties; + skeleton_class->flush = display_manager_seat_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = display_manager_seat_skeleton_dbus_interface_get_vtable; +} + +static void +display_manager_seat_skeleton_iface_init (DisplayManagerSeatIface *iface) +{ + iface->get_can_switch = display_manager_seat_skeleton_get_can_switch; + iface->get_has_guest_account = display_manager_seat_skeleton_get_has_guest_account; + iface->get_sessions = display_manager_seat_skeleton_get_sessions; +} + +/** + * display_manager_seat_skeleton_new: + * + * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-DisplayManager-Seat.top_of_page">org.freedesktop.DisplayManager.Seat</link>. + * + * Returns: (transfer full) (type DisplayManagerSeatSkeleton): The skeleton object. + */ +DisplayManagerSeat * +display_manager_seat_skeleton_new (void) +{ + return DISPLAY_MANAGER_SEAT (g_object_new (TYPE_DISPLAY_MANAGER_SEAT_SKELETON, NULL)); +} + diff --git a/src/dbus-display-manager.h b/src/dbus-display-manager.h new file mode 100644 index 0000000..b0fffc8 --- /dev/null +++ b/src/dbus-display-manager.h @@ -0,0 +1,267 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifndef __DBUS_DISPLAY_MANAGER_H__ +#define __DBUS_DISPLAY_MANAGER_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + + +/* ------------------------------------------------------------------------ */ +/* Declarations for org.freedesktop.DisplayManager.Seat */ + +#define TYPE_DISPLAY_MANAGER_SEAT (display_manager_seat_get_type ()) +#define DISPLAY_MANAGER_SEAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_DISPLAY_MANAGER_SEAT, DisplayManagerSeat)) +#define IS_DISPLAY_MANAGER_SEAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_DISPLAY_MANAGER_SEAT)) +#define DISPLAY_MANAGER_SEAT_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_DISPLAY_MANAGER_SEAT, DisplayManagerSeatIface)) + +struct _DisplayManagerSeat; +typedef struct _DisplayManagerSeat DisplayManagerSeat; +typedef struct _DisplayManagerSeatIface DisplayManagerSeatIface; + +struct _DisplayManagerSeatIface +{ + GTypeInterface parent_iface; + + + gboolean (*handle_lock) ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_switch_to_greeter) ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_switch_to_guest) ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation, + const gchar *arg_session_name); + + gboolean (*handle_switch_to_user) ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation, + const gchar *arg_username, + const gchar *arg_session_name); + + gboolean (*get_can_switch) (DisplayManagerSeat *object); + + gboolean (*get_has_guest_account) (DisplayManagerSeat *object); + + const gchar *const * (*get_sessions) (DisplayManagerSeat *object); + +}; + +GType display_manager_seat_get_type (void) G_GNUC_CONST; + +GDBusInterfaceInfo *display_manager_seat_interface_info (void); +guint display_manager_seat_override_properties (GObjectClass *klass, guint property_id_begin); + + +/* D-Bus method call completion functions: */ +void display_manager_seat_complete_switch_to_greeter ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation); + +void display_manager_seat_complete_switch_to_user ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation); + +void display_manager_seat_complete_switch_to_guest ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation); + +void display_manager_seat_complete_lock ( + DisplayManagerSeat *object, + GDBusMethodInvocation *invocation); + + + +/* D-Bus method calls: */ +void display_manager_seat_call_switch_to_greeter ( + DisplayManagerSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean display_manager_seat_call_switch_to_greeter_finish ( + DisplayManagerSeat *proxy, + GAsyncResult *res, + GError **error); + +gboolean display_manager_seat_call_switch_to_greeter_sync ( + DisplayManagerSeat *proxy, + GCancellable *cancellable, + GError **error); + +void display_manager_seat_call_switch_to_user ( + DisplayManagerSeat *proxy, + const gchar *arg_username, + const gchar *arg_session_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean display_manager_seat_call_switch_to_user_finish ( + DisplayManagerSeat *proxy, + GAsyncResult *res, + GError **error); + +gboolean display_manager_seat_call_switch_to_user_sync ( + DisplayManagerSeat *proxy, + const gchar *arg_username, + const gchar *arg_session_name, + GCancellable *cancellable, + GError **error); + +void display_manager_seat_call_switch_to_guest ( + DisplayManagerSeat *proxy, + const gchar *arg_session_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean display_manager_seat_call_switch_to_guest_finish ( + DisplayManagerSeat *proxy, + GAsyncResult *res, + GError **error); + +gboolean display_manager_seat_call_switch_to_guest_sync ( + DisplayManagerSeat *proxy, + const gchar *arg_session_name, + GCancellable *cancellable, + GError **error); + +void display_manager_seat_call_lock ( + DisplayManagerSeat *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean display_manager_seat_call_lock_finish ( + DisplayManagerSeat *proxy, + GAsyncResult *res, + GError **error); + +gboolean display_manager_seat_call_lock_sync ( + DisplayManagerSeat *proxy, + GCancellable *cancellable, + GError **error); + + + +/* D-Bus property accessors: */ +gboolean display_manager_seat_get_can_switch (DisplayManagerSeat *object); +void display_manager_seat_set_can_switch (DisplayManagerSeat *object, gboolean value); + +gboolean display_manager_seat_get_has_guest_account (DisplayManagerSeat *object); +void display_manager_seat_set_has_guest_account (DisplayManagerSeat *object, gboolean value); + +const gchar *const *display_manager_seat_get_sessions (DisplayManagerSeat *object); +gchar **display_manager_seat_dup_sessions (DisplayManagerSeat *object); +void display_manager_seat_set_sessions (DisplayManagerSeat *object, const gchar *const *value); + + +/* ---- */ + +#define TYPE_DISPLAY_MANAGER_SEAT_PROXY (display_manager_seat_proxy_get_type ()) +#define DISPLAY_MANAGER_SEAT_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_DISPLAY_MANAGER_SEAT_PROXY, DisplayManagerSeatProxy)) +#define DISPLAY_MANAGER_SEAT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_DISPLAY_MANAGER_SEAT_PROXY, DisplayManagerSeatProxyClass)) +#define DISPLAY_MANAGER_SEAT_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_DISPLAY_MANAGER_SEAT_PROXY, DisplayManagerSeatProxyClass)) +#define IS_DISPLAY_MANAGER_SEAT_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_DISPLAY_MANAGER_SEAT_PROXY)) +#define IS_DISPLAY_MANAGER_SEAT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_DISPLAY_MANAGER_SEAT_PROXY)) + +typedef struct _DisplayManagerSeatProxy DisplayManagerSeatProxy; +typedef struct _DisplayManagerSeatProxyClass DisplayManagerSeatProxyClass; +typedef struct _DisplayManagerSeatProxyPrivate DisplayManagerSeatProxyPrivate; + +struct _DisplayManagerSeatProxy +{ + /*< private >*/ + GDBusProxy parent_instance; + DisplayManagerSeatProxyPrivate *priv; +}; + +struct _DisplayManagerSeatProxyClass +{ + GDBusProxyClass parent_class; +}; + +GType display_manager_seat_proxy_get_type (void) G_GNUC_CONST; + +void display_manager_seat_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +DisplayManagerSeat *display_manager_seat_proxy_new_finish ( + GAsyncResult *res, + GError **error); +DisplayManagerSeat *display_manager_seat_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void display_manager_seat_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +DisplayManagerSeat *display_manager_seat_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +DisplayManagerSeat *display_manager_seat_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +/* ---- */ + +#define TYPE_DISPLAY_MANAGER_SEAT_SKELETON (display_manager_seat_skeleton_get_type ()) +#define DISPLAY_MANAGER_SEAT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_DISPLAY_MANAGER_SEAT_SKELETON, DisplayManagerSeatSkeleton)) +#define DISPLAY_MANAGER_SEAT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_DISPLAY_MANAGER_SEAT_SKELETON, DisplayManagerSeatSkeletonClass)) +#define DISPLAY_MANAGER_SEAT_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_DISPLAY_MANAGER_SEAT_SKELETON, DisplayManagerSeatSkeletonClass)) +#define IS_DISPLAY_MANAGER_SEAT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_DISPLAY_MANAGER_SEAT_SKELETON)) +#define IS_DISPLAY_MANAGER_SEAT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_DISPLAY_MANAGER_SEAT_SKELETON)) + +typedef struct _DisplayManagerSeatSkeleton DisplayManagerSeatSkeleton; +typedef struct _DisplayManagerSeatSkeletonClass DisplayManagerSeatSkeletonClass; +typedef struct _DisplayManagerSeatSkeletonPrivate DisplayManagerSeatSkeletonPrivate; + +struct _DisplayManagerSeatSkeleton +{ + /*< private >*/ + GDBusInterfaceSkeleton parent_instance; + DisplayManagerSeatSkeletonPrivate *priv; +}; + +struct _DisplayManagerSeatSkeletonClass +{ + GDBusInterfaceSkeletonClass parent_class; +}; + +GType display_manager_seat_skeleton_get_type (void) G_GNUC_CONST; + +DisplayManagerSeat *display_manager_seat_skeleton_new (void); + + +G_END_DECLS + +#endif /* __DBUS_DISPLAY_MANAGER_H__ */ diff --git a/src/dbus-upower.c b/src/dbus-upower.c new file mode 100644 index 0000000..1cdcc88 --- /dev/null +++ b/src/dbus-upower.c @@ -0,0 +1,3189 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "dbus-upower.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; + gboolean use_gvariant; +} _ExtendedGDBusPropertyInfo; + +typedef struct +{ + GDBusInterfaceInfo parent_struct; + const gchar *hyphen_name; +} _ExtendedGDBusInterfaceInfo; + +typedef struct +{ + const _ExtendedGDBusPropertyInfo *info; + guint prop_id; + GValue orig_value; /* the value before the change */ +} ChangedProperty; + +static void +_changed_property_free (ChangedProperty *data) +{ + g_value_unset (&data->orig_value); + g_free (data); +} + +static gboolean +_g_strv_equal0 (gchar **a, gchar **b) +{ + gboolean ret = FALSE; + guint n; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + if (g_strv_length (a) != g_strv_length (b)) + goto out; + for (n = 0; a[n] != NULL; n++) + if (g_strcmp0 (a[n], b[n]) != 0) + goto out; + ret = TRUE; +out: + return ret; +} + +static gboolean +_g_variant_equal0 (GVariant *a, GVariant *b) +{ + gboolean ret = FALSE; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + ret = g_variant_equal (a, b); +out: + return ret; +} + +G_GNUC_UNUSED static gboolean +_g_value_equal (const GValue *a, const GValue *b) +{ + gboolean ret = FALSE; + g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); + switch (G_VALUE_TYPE (a)) + { + case G_TYPE_BOOLEAN: + ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); + break; + case G_TYPE_UCHAR: + ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); + break; + case G_TYPE_INT: + ret = (g_value_get_int (a) == g_value_get_int (b)); + break; + case G_TYPE_UINT: + ret = (g_value_get_uint (a) == g_value_get_uint (b)); + break; + case G_TYPE_INT64: + ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); + break; + case G_TYPE_UINT64: + ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); + break; + case G_TYPE_DOUBLE: + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } + break; + case G_TYPE_STRING: + ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); + break; + case G_TYPE_VARIANT: + ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); + break; + default: + if (G_VALUE_TYPE (a) == G_TYPE_STRV) + ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); + else + g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); + break; + } + return ret; +} + +/* ------------------------------------------------------------------------ + * Code for interface org.freedesktop.UPower + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:DBusUPower + * @title: DBusUPower + * @short_description: Generated C code for the org.freedesktop.UPower D-Bus interface + * + * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-UPower.top_of_page">org.freedesktop.UPower</link> D-Bus interface in C. + */ + +/* ---- Introspection data for org.freedesktop.UPower ---- */ + +static const _ExtendedGDBusArgInfo _dbus_upower_method_info_enumerate_devices_OUT_ARG_devices = +{ + { + -1, + (gchar *) "devices", + (gchar *) "ao", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _dbus_upower_method_info_enumerate_devices_OUT_ARG_pointers[] = +{ + &_dbus_upower_method_info_enumerate_devices_OUT_ARG_devices, + NULL +}; + +static const GDBusAnnotationInfo _dbus_upower_method_enumerate_devices_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _dbus_upower_method_enumerate_devices_annotation_info_pointers[] = +{ + &_dbus_upower_method_enumerate_devices_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _dbus_upower_method_info_enumerate_devices = +{ + { + -1, + (gchar *) "EnumerateDevices", + NULL, + (GDBusArgInfo **) &_dbus_upower_method_info_enumerate_devices_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_dbus_upower_method_enumerate_devices_annotation_info_pointers + }, + "handle-enumerate-devices", + FALSE +}; + +static const GDBusAnnotationInfo _dbus_upower_method_about_to_sleep_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _dbus_upower_method_about_to_sleep_annotation_info_pointers[] = +{ + &_dbus_upower_method_about_to_sleep_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _dbus_upower_method_info_about_to_sleep = +{ + { + -1, + (gchar *) "AboutToSleep", + NULL, + NULL, + (GDBusAnnotationInfo **) &_dbus_upower_method_about_to_sleep_annotation_info_pointers + }, + "handle-about-to-sleep", + FALSE +}; + +static const GDBusAnnotationInfo _dbus_upower_method_suspend_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _dbus_upower_method_suspend_annotation_info_pointers[] = +{ + &_dbus_upower_method_suspend_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _dbus_upower_method_info_suspend = +{ + { + -1, + (gchar *) "Suspend", + NULL, + NULL, + (GDBusAnnotationInfo **) &_dbus_upower_method_suspend_annotation_info_pointers + }, + "handle-suspend", + FALSE +}; + +static const _ExtendedGDBusArgInfo _dbus_upower_method_info_suspend_allowed_OUT_ARG_allowed = +{ + { + -1, + (gchar *) "allowed", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _dbus_upower_method_info_suspend_allowed_OUT_ARG_pointers[] = +{ + &_dbus_upower_method_info_suspend_allowed_OUT_ARG_allowed, + NULL +}; + +static const GDBusAnnotationInfo _dbus_upower_method_suspend_allowed_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _dbus_upower_method_suspend_allowed_annotation_info_pointers[] = +{ + &_dbus_upower_method_suspend_allowed_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _dbus_upower_method_info_suspend_allowed = +{ + { + -1, + (gchar *) "SuspendAllowed", + NULL, + (GDBusArgInfo **) &_dbus_upower_method_info_suspend_allowed_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_dbus_upower_method_suspend_allowed_annotation_info_pointers + }, + "handle-suspend-allowed", + FALSE +}; + +static const GDBusAnnotationInfo _dbus_upower_method_hibernate_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _dbus_upower_method_hibernate_annotation_info_pointers[] = +{ + &_dbus_upower_method_hibernate_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _dbus_upower_method_info_hibernate = +{ + { + -1, + (gchar *) "Hibernate", + NULL, + NULL, + (GDBusAnnotationInfo **) &_dbus_upower_method_hibernate_annotation_info_pointers + }, + "handle-hibernate", + FALSE +}; + +static const _ExtendedGDBusArgInfo _dbus_upower_method_info_hibernate_allowed_OUT_ARG_allowed = +{ + { + -1, + (gchar *) "allowed", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _dbus_upower_method_info_hibernate_allowed_OUT_ARG_pointers[] = +{ + &_dbus_upower_method_info_hibernate_allowed_OUT_ARG_allowed, + NULL +}; + +static const GDBusAnnotationInfo _dbus_upower_method_hibernate_allowed_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _dbus_upower_method_hibernate_allowed_annotation_info_pointers[] = +{ + &_dbus_upower_method_hibernate_allowed_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _dbus_upower_method_info_hibernate_allowed = +{ + { + -1, + (gchar *) "HibernateAllowed", + NULL, + (GDBusArgInfo **) &_dbus_upower_method_info_hibernate_allowed_OUT_ARG_pointers, + (GDBusAnnotationInfo **) &_dbus_upower_method_hibernate_allowed_annotation_info_pointers + }, + "handle-hibernate-allowed", + FALSE +}; + +static const _ExtendedGDBusMethodInfo * const _dbus_upower_method_info_pointers[] = +{ + &_dbus_upower_method_info_enumerate_devices, + &_dbus_upower_method_info_about_to_sleep, + &_dbus_upower_method_info_suspend, + &_dbus_upower_method_info_suspend_allowed, + &_dbus_upower_method_info_hibernate, + &_dbus_upower_method_info_hibernate_allowed, + NULL +}; + +static const _ExtendedGDBusArgInfo _dbus_upower_signal_info_device_added_ARG_device = +{ + { + -1, + (gchar *) "device", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _dbus_upower_signal_info_device_added_ARG_pointers[] = +{ + &_dbus_upower_signal_info_device_added_ARG_device, + NULL +}; + +static const _ExtendedGDBusSignalInfo _dbus_upower_signal_info_device_added = +{ + { + -1, + (gchar *) "DeviceAdded", + (GDBusArgInfo **) &_dbus_upower_signal_info_device_added_ARG_pointers, + NULL + }, + "device-added" +}; + +static const _ExtendedGDBusArgInfo _dbus_upower_signal_info_device_removed_ARG_device = +{ + { + -1, + (gchar *) "device", + (gchar *) "o", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _dbus_upower_signal_info_device_removed_ARG_pointers[] = +{ + &_dbus_upower_signal_info_device_removed_ARG_device, + NULL +}; + +static const _ExtendedGDBusSignalInfo _dbus_upower_signal_info_device_removed = +{ + { + -1, + (gchar *) "DeviceRemoved", + (GDBusArgInfo **) &_dbus_upower_signal_info_device_removed_ARG_pointers, + NULL + }, + "device-removed" +}; + +static const _ExtendedGDBusArgInfo _dbus_upower_signal_info_device_changed_ARG_device = +{ + { + -1, + (gchar *) "device", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _dbus_upower_signal_info_device_changed_ARG_pointers[] = +{ + &_dbus_upower_signal_info_device_changed_ARG_device, + NULL +}; + +static const _ExtendedGDBusSignalInfo _dbus_upower_signal_info_device_changed = +{ + { + -1, + (gchar *) "DeviceChanged", + (GDBusArgInfo **) &_dbus_upower_signal_info_device_changed_ARG_pointers, + NULL + }, + "device-changed" +}; + +static const _ExtendedGDBusSignalInfo _dbus_upower_signal_info_changed = +{ + { + -1, + (gchar *) "Changed", + NULL, + NULL + }, + "changed" +}; + +static const _ExtendedGDBusSignalInfo _dbus_upower_signal_info_sleeping = +{ + { + -1, + (gchar *) "Sleeping", + NULL, + NULL + }, + "sleeping" +}; + +static const _ExtendedGDBusSignalInfo _dbus_upower_signal_info_resuming = +{ + { + -1, + (gchar *) "Resuming", + NULL, + NULL + }, + "resuming" +}; + +static const _ExtendedGDBusSignalInfo * const _dbus_upower_signal_info_pointers[] = +{ + &_dbus_upower_signal_info_device_added, + &_dbus_upower_signal_info_device_removed, + &_dbus_upower_signal_info_device_changed, + &_dbus_upower_signal_info_changed, + &_dbus_upower_signal_info_sleeping, + &_dbus_upower_signal_info_resuming, + NULL +}; + +static const _ExtendedGDBusPropertyInfo _dbus_upower_property_info_daemon_version = +{ + { + -1, + (gchar *) "DaemonVersion", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "daemon-version", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _dbus_upower_property_info_can_suspend = +{ + { + -1, + (gchar *) "CanSuspend", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "can-suspend", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _dbus_upower_property_info_can_hibernate = +{ + { + -1, + (gchar *) "CanHibernate", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "can-hibernate", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _dbus_upower_property_info_on_battery = +{ + { + -1, + (gchar *) "OnBattery", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "on-battery", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _dbus_upower_property_info_on_low_battery = +{ + { + -1, + (gchar *) "OnLowBattery", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "on-low-battery", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _dbus_upower_property_info_lid_is_closed = +{ + { + -1, + (gchar *) "LidIsClosed", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "lid-is-closed", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _dbus_upower_property_info_lid_is_present = +{ + { + -1, + (gchar *) "LidIsPresent", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "lid-is-present", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo * const _dbus_upower_property_info_pointers[] = +{ + &_dbus_upower_property_info_daemon_version, + &_dbus_upower_property_info_can_suspend, + &_dbus_upower_property_info_can_hibernate, + &_dbus_upower_property_info_on_battery, + &_dbus_upower_property_info_on_low_battery, + &_dbus_upower_property_info_lid_is_closed, + &_dbus_upower_property_info_lid_is_present, + NULL +}; + +static const _ExtendedGDBusInterfaceInfo _dbus_upower_interface_info = +{ + { + -1, + (gchar *) "org.freedesktop.UPower", + (GDBusMethodInfo **) &_dbus_upower_method_info_pointers, + (GDBusSignalInfo **) &_dbus_upower_signal_info_pointers, + (GDBusPropertyInfo **) &_dbus_upower_property_info_pointers, + NULL + }, + "upower", +}; + + +/** + * dbus_upower_interface_info: + * + * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-UPower.top_of_page">org.freedesktop.UPower</link> D-Bus interface. + * + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + */ +GDBusInterfaceInfo * +dbus_upower_interface_info (void) +{ + return (GDBusInterfaceInfo *) &_dbus_upower_interface_info.parent_struct; +} + +/** + * dbus_upower_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 #DBusUPower interface for a concrete class. + * The properties are overridden in the order they are defined. + * + * Returns: The last property id. + */ +guint +dbus_upower_override_properties (GObjectClass *klass, guint property_id_begin) +{ + g_object_class_override_property (klass, property_id_begin++, "daemon-version"); + g_object_class_override_property (klass, property_id_begin++, "can-suspend"); + g_object_class_override_property (klass, property_id_begin++, "can-hibernate"); + g_object_class_override_property (klass, property_id_begin++, "on-battery"); + g_object_class_override_property (klass, property_id_begin++, "on-low-battery"); + g_object_class_override_property (klass, property_id_begin++, "lid-is-closed"); + g_object_class_override_property (klass, property_id_begin++, "lid-is-present"); + return property_id_begin - 1; +} + + + +/** + * DBusUPower: + * + * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-UPower.top_of_page">org.freedesktop.UPower</link>. + */ + +/** + * DBusUPowerIface: + * @parent_iface: The parent interface. + * @handle_about_to_sleep: Handler for the #DBusUPower::handle-about-to-sleep signal. + * @handle_enumerate_devices: Handler for the #DBusUPower::handle-enumerate-devices signal. + * @handle_hibernate: Handler for the #DBusUPower::handle-hibernate signal. + * @handle_hibernate_allowed: Handler for the #DBusUPower::handle-hibernate-allowed signal. + * @handle_suspend: Handler for the #DBusUPower::handle-suspend signal. + * @handle_suspend_allowed: Handler for the #DBusUPower::handle-suspend-allowed signal. + * @get_can_hibernate: Getter for the #DBusUPower:can-hibernate property. + * @get_can_suspend: Getter for the #DBusUPower:can-suspend property. + * @get_daemon_version: Getter for the #DBusUPower:daemon-version property. + * @get_lid_is_closed: Getter for the #DBusUPower:lid-is-closed property. + * @get_lid_is_present: Getter for the #DBusUPower:lid-is-present property. + * @get_on_battery: Getter for the #DBusUPower:on-battery property. + * @get_on_low_battery: Getter for the #DBusUPower:on-low-battery property. + * @changed: Handler for the #DBusUPower::changed signal. + * @device_added: Handler for the #DBusUPower::device-added signal. + * @device_changed: Handler for the #DBusUPower::device-changed signal. + * @device_removed: Handler for the #DBusUPower::device-removed signal. + * @resuming: Handler for the #DBusUPower::resuming signal. + * @sleeping: Handler for the #DBusUPower::sleeping signal. + * + * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-UPower.top_of_page">org.freedesktop.UPower</link>. + */ + +static void +dbus_upower_default_init (DBusUPowerIface *iface) +{ + /* GObject signals for incoming D-Bus method calls: */ + /** + * DBusUPower::handle-enumerate-devices: + * @object: A #DBusUPower. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-UPower.EnumerateDevices">EnumerateDevices()</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 dbus_upower_complete_enumerate_devices() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-enumerate-devices", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DBusUPowerIface, handle_enumerate_devices), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * DBusUPower::handle-about-to-sleep: + * @object: A #DBusUPower. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-UPower.AboutToSleep">AboutToSleep()</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 dbus_upower_complete_about_to_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-about-to-sleep", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DBusUPowerIface, handle_about_to_sleep), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * DBusUPower::handle-suspend: + * @object: A #DBusUPower. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-UPower.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 dbus_upower_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 (DBusUPowerIface, handle_suspend), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * DBusUPower::handle-suspend-allowed: + * @object: A #DBusUPower. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-UPower.SuspendAllowed">SuspendAllowed()</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 dbus_upower_complete_suspend_allowed() 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-allowed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DBusUPowerIface, handle_suspend_allowed), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * DBusUPower::handle-hibernate: + * @object: A #DBusUPower. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-UPower.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 dbus_upower_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 (DBusUPowerIface, handle_hibernate), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /** + * DBusUPower::handle-hibernate-allowed: + * @object: A #DBusUPower. + * @invocation: A #GDBusMethodInvocation. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-UPower.HibernateAllowed">HibernateAllowed()</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 dbus_upower_complete_hibernate_allowed() 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-allowed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DBusUPowerIface, handle_hibernate_allowed), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 1, + G_TYPE_DBUS_METHOD_INVOCATION); + + /* GObject signals for received D-Bus signals: */ + /** + * DBusUPower::device-added: + * @object: A #DBusUPower. + * @arg_device: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-UPower.DeviceAdded">"DeviceAdded"</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 ("device-added", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DBusUPowerIface, device_added), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /** + * DBusUPower::device-removed: + * @object: A #DBusUPower. + * @arg_device: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-UPower.DeviceRemoved">"DeviceRemoved"</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 ("device-removed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DBusUPowerIface, device_removed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /** + * DBusUPower::device-changed: + * @object: A #DBusUPower. + * @arg_device: Argument. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-UPower.DeviceChanged">"DeviceChanged"</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 ("device-changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DBusUPowerIface, device_changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + /** + * DBusUPower::changed: + * @object: A #DBusUPower. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-UPower.Changed">"Changed"</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 ("changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DBusUPowerIface, changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 0); + + /** + * DBusUPower::sleeping: + * @object: A #DBusUPower. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-UPower.Sleeping">"Sleeping"</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 ("sleeping", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DBusUPowerIface, sleeping), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 0); + + /** + * DBusUPower::resuming: + * @object: A #DBusUPower. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-UPower.Resuming">"Resuming"</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 ("resuming", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DBusUPowerIface, resuming), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 0); + + /* GObject properties for D-Bus properties: */ + /** + * DBusUPower:daemon-version: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-UPower.DaemonVersion">"DaemonVersion"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("daemon-version", "DaemonVersion", "DaemonVersion", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * DBusUPower:can-suspend: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-UPower.CanSuspend">"CanSuspend"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("can-suspend", "CanSuspend", "CanSuspend", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * DBusUPower:can-hibernate: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-UPower.CanHibernate">"CanHibernate"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("can-hibernate", "CanHibernate", "CanHibernate", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * DBusUPower:on-battery: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-UPower.OnBattery">"OnBattery"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("on-battery", "OnBattery", "OnBattery", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * DBusUPower:on-low-battery: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-UPower.OnLowBattery">"OnLowBattery"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("on-low-battery", "OnLowBattery", "OnLowBattery", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * DBusUPower:lid-is-closed: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-UPower.LidIsClosed">"LidIsClosed"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("lid-is-closed", "LidIsClosed", "LidIsClosed", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * DBusUPower:lid-is-present: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-UPower.LidIsPresent">"LidIsPresent"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("lid-is-present", "LidIsPresent", "LidIsPresent", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); +} + +typedef DBusUPowerIface DBusUPowerInterface; +G_DEFINE_INTERFACE (DBusUPower, dbus_upower, G_TYPE_OBJECT); + +/** + * dbus_upower_get_daemon_version: (skip) + * @object: A #DBusUPower. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-UPower.DaemonVersion">"DaemonVersion"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use dbus_upower_dup_daemon_version() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +dbus_upower_get_daemon_version (DBusUPower *object) +{ + return DBUS_UPOWER_GET_IFACE (object)->get_daemon_version (object); +} + +/** + * dbus_upower_dup_daemon_version: (skip) + * @object: A #DBusUPower. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-UPower.DaemonVersion">"DaemonVersion"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +dbus_upower_dup_daemon_version (DBusUPower *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "daemon-version", &value, NULL); + return value; +} + +/** + * dbus_upower_set_daemon_version: (skip) + * @object: A #DBusUPower. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-UPower.DaemonVersion">"DaemonVersion"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +dbus_upower_set_daemon_version (DBusUPower *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "daemon-version", value, NULL); +} + +/** + * dbus_upower_get_can_suspend: (skip) + * @object: A #DBusUPower. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-UPower.CanSuspend">"CanSuspend"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +dbus_upower_get_can_suspend (DBusUPower *object) +{ + return DBUS_UPOWER_GET_IFACE (object)->get_can_suspend (object); +} + +/** + * dbus_upower_set_can_suspend: (skip) + * @object: A #DBusUPower. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-UPower.CanSuspend">"CanSuspend"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +dbus_upower_set_can_suspend (DBusUPower *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "can-suspend", value, NULL); +} + +/** + * dbus_upower_get_can_hibernate: (skip) + * @object: A #DBusUPower. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-UPower.CanHibernate">"CanHibernate"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +dbus_upower_get_can_hibernate (DBusUPower *object) +{ + return DBUS_UPOWER_GET_IFACE (object)->get_can_hibernate (object); +} + +/** + * dbus_upower_set_can_hibernate: (skip) + * @object: A #DBusUPower. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-UPower.CanHibernate">"CanHibernate"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +dbus_upower_set_can_hibernate (DBusUPower *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "can-hibernate", value, NULL); +} + +/** + * dbus_upower_get_on_battery: (skip) + * @object: A #DBusUPower. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-UPower.OnBattery">"OnBattery"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +dbus_upower_get_on_battery (DBusUPower *object) +{ + return DBUS_UPOWER_GET_IFACE (object)->get_on_battery (object); +} + +/** + * dbus_upower_set_on_battery: (skip) + * @object: A #DBusUPower. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-UPower.OnBattery">"OnBattery"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +dbus_upower_set_on_battery (DBusUPower *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "on-battery", value, NULL); +} + +/** + * dbus_upower_get_on_low_battery: (skip) + * @object: A #DBusUPower. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-UPower.OnLowBattery">"OnLowBattery"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +dbus_upower_get_on_low_battery (DBusUPower *object) +{ + return DBUS_UPOWER_GET_IFACE (object)->get_on_low_battery (object); +} + +/** + * dbus_upower_set_on_low_battery: (skip) + * @object: A #DBusUPower. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-UPower.OnLowBattery">"OnLowBattery"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +dbus_upower_set_on_low_battery (DBusUPower *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "on-low-battery", value, NULL); +} + +/** + * dbus_upower_get_lid_is_closed: (skip) + * @object: A #DBusUPower. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-UPower.LidIsClosed">"LidIsClosed"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +dbus_upower_get_lid_is_closed (DBusUPower *object) +{ + return DBUS_UPOWER_GET_IFACE (object)->get_lid_is_closed (object); +} + +/** + * dbus_upower_set_lid_is_closed: (skip) + * @object: A #DBusUPower. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-UPower.LidIsClosed">"LidIsClosed"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +dbus_upower_set_lid_is_closed (DBusUPower *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "lid-is-closed", value, NULL); +} + +/** + * dbus_upower_get_lid_is_present: (skip) + * @object: A #DBusUPower. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-UPower.LidIsPresent">"LidIsPresent"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +dbus_upower_get_lid_is_present (DBusUPower *object) +{ + return DBUS_UPOWER_GET_IFACE (object)->get_lid_is_present (object); +} + +/** + * dbus_upower_set_lid_is_present: (skip) + * @object: A #DBusUPower. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-UPower.LidIsPresent">"LidIsPresent"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +dbus_upower_set_lid_is_present (DBusUPower *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "lid-is-present", value, NULL); +} + +/** + * dbus_upower_emit_device_added: + * @object: A #DBusUPower. + * @arg_device: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-UPower.DeviceAdded">"DeviceAdded"</link> D-Bus signal. + */ +void +dbus_upower_emit_device_added ( + DBusUPower *object, + const gchar *arg_device) +{ + g_signal_emit_by_name (object, "device-added", arg_device); +} + +/** + * dbus_upower_emit_device_removed: + * @object: A #DBusUPower. + * @arg_device: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-UPower.DeviceRemoved">"DeviceRemoved"</link> D-Bus signal. + */ +void +dbus_upower_emit_device_removed ( + DBusUPower *object, + const gchar *arg_device) +{ + g_signal_emit_by_name (object, "device-removed", arg_device); +} + +/** + * dbus_upower_emit_device_changed: + * @object: A #DBusUPower. + * @arg_device: Argument to pass with the signal. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-UPower.DeviceChanged">"DeviceChanged"</link> D-Bus signal. + */ +void +dbus_upower_emit_device_changed ( + DBusUPower *object, + const gchar *arg_device) +{ + g_signal_emit_by_name (object, "device-changed", arg_device); +} + +/** + * dbus_upower_emit_changed: + * @object: A #DBusUPower. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-UPower.Changed">"Changed"</link> D-Bus signal. + */ +void +dbus_upower_emit_changed ( + DBusUPower *object) +{ + g_signal_emit_by_name (object, "changed"); +} + +/** + * dbus_upower_emit_sleeping: + * @object: A #DBusUPower. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-UPower.Sleeping">"Sleeping"</link> D-Bus signal. + */ +void +dbus_upower_emit_sleeping ( + DBusUPower *object) +{ + g_signal_emit_by_name (object, "sleeping"); +} + +/** + * dbus_upower_emit_resuming: + * @object: A #DBusUPower. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-UPower.Resuming">"Resuming"</link> D-Bus signal. + */ +void +dbus_upower_emit_resuming ( + DBusUPower *object) +{ + g_signal_emit_by_name (object, "resuming"); +} + +/** + * dbus_upower_call_enumerate_devices: + * @proxy: A #DBusUPowerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.EnumerateDevices">EnumerateDevices()</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 dbus_upower_call_enumerate_devices_finish() to get the result of the operation. + * + * See dbus_upower_call_enumerate_devices_sync() for the synchronous, blocking version of this method. + */ +void +dbus_upower_call_enumerate_devices ( + DBusUPower *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "EnumerateDevices", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * dbus_upower_call_enumerate_devices_finish: + * @proxy: A #DBusUPowerProxy. + * @out_devices: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to dbus_upower_call_enumerate_devices(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with dbus_upower_call_enumerate_devices(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_enumerate_devices_finish ( + DBusUPower *proxy, + gchar ***out_devices, + 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_devices); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * dbus_upower_call_enumerate_devices_sync: + * @proxy: A #DBusUPowerProxy. + * @out_devices: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.EnumerateDevices">EnumerateDevices()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See dbus_upower_call_enumerate_devices() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_enumerate_devices_sync ( + DBusUPower *proxy, + gchar ***out_devices, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "EnumerateDevices", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(^ao)", + out_devices); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * dbus_upower_call_about_to_sleep: + * @proxy: A #DBusUPowerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.AboutToSleep">AboutToSleep()</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 dbus_upower_call_about_to_sleep_finish() to get the result of the operation. + * + * See dbus_upower_call_about_to_sleep_sync() for the synchronous, blocking version of this method. + */ +void +dbus_upower_call_about_to_sleep ( + DBusUPower *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "AboutToSleep", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * dbus_upower_call_about_to_sleep_finish: + * @proxy: A #DBusUPowerProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to dbus_upower_call_about_to_sleep(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with dbus_upower_call_about_to_sleep(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_about_to_sleep_finish ( + DBusUPower *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; +} + +/** + * dbus_upower_call_about_to_sleep_sync: + * @proxy: A #DBusUPowerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.AboutToSleep">AboutToSleep()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See dbus_upower_call_about_to_sleep() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_about_to_sleep_sync ( + DBusUPower *proxy, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "AboutToSleep", + 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; +} + +/** + * dbus_upower_call_suspend: + * @proxy: A #DBusUPowerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.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 dbus_upower_call_suspend_finish() to get the result of the operation. + * + * See dbus_upower_call_suspend_sync() for the synchronous, blocking version of this method. + */ +void +dbus_upower_call_suspend ( + DBusUPower *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); +} + +/** + * dbus_upower_call_suspend_finish: + * @proxy: A #DBusUPowerProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to dbus_upower_call_suspend(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with dbus_upower_call_suspend(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_suspend_finish ( + DBusUPower *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; +} + +/** + * dbus_upower_call_suspend_sync: + * @proxy: A #DBusUPowerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.Suspend">Suspend()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See dbus_upower_call_suspend() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_suspend_sync ( + DBusUPower *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; +} + +/** + * dbus_upower_call_suspend_allowed: + * @proxy: A #DBusUPowerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.SuspendAllowed">SuspendAllowed()</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 dbus_upower_call_suspend_allowed_finish() to get the result of the operation. + * + * See dbus_upower_call_suspend_allowed_sync() for the synchronous, blocking version of this method. + */ +void +dbus_upower_call_suspend_allowed ( + DBusUPower *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SuspendAllowed", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * dbus_upower_call_suspend_allowed_finish: + * @proxy: A #DBusUPowerProxy. + * @out_allowed: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to dbus_upower_call_suspend_allowed(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with dbus_upower_call_suspend_allowed(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_suspend_allowed_finish ( + DBusUPower *proxy, + gboolean *out_allowed, + 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_allowed); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * dbus_upower_call_suspend_allowed_sync: + * @proxy: A #DBusUPowerProxy. + * @out_allowed: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.SuspendAllowed">SuspendAllowed()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See dbus_upower_call_suspend_allowed() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_suspend_allowed_sync ( + DBusUPower *proxy, + gboolean *out_allowed, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SuspendAllowed", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(b)", + out_allowed); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * dbus_upower_call_hibernate: + * @proxy: A #DBusUPowerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.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 dbus_upower_call_hibernate_finish() to get the result of the operation. + * + * See dbus_upower_call_hibernate_sync() for the synchronous, blocking version of this method. + */ +void +dbus_upower_call_hibernate ( + DBusUPower *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); +} + +/** + * dbus_upower_call_hibernate_finish: + * @proxy: A #DBusUPowerProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to dbus_upower_call_hibernate(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with dbus_upower_call_hibernate(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_hibernate_finish ( + DBusUPower *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; +} + +/** + * dbus_upower_call_hibernate_sync: + * @proxy: A #DBusUPowerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.Hibernate">Hibernate()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See dbus_upower_call_hibernate() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_hibernate_sync ( + DBusUPower *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; +} + +/** + * dbus_upower_call_hibernate_allowed: + * @proxy: A #DBusUPowerProxy. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.HibernateAllowed">HibernateAllowed()</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 dbus_upower_call_hibernate_allowed_finish() to get the result of the operation. + * + * See dbus_upower_call_hibernate_allowed_sync() for the synchronous, blocking version of this method. + */ +void +dbus_upower_call_hibernate_allowed ( + DBusUPower *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "HibernateAllowed", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * dbus_upower_call_hibernate_allowed_finish: + * @proxy: A #DBusUPowerProxy. + * @out_allowed: (out): Return location for return parameter or %NULL to ignore. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to dbus_upower_call_hibernate_allowed(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with dbus_upower_call_hibernate_allowed(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_hibernate_allowed_finish ( + DBusUPower *proxy, + gboolean *out_allowed, + 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_allowed); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * dbus_upower_call_hibernate_allowed_sync: + * @proxy: A #DBusUPowerProxy. + * @out_allowed: (out): Return location for return parameter or %NULL to ignore. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-UPower.HibernateAllowed">HibernateAllowed()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See dbus_upower_call_hibernate_allowed() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +dbus_upower_call_hibernate_allowed_sync ( + DBusUPower *proxy, + gboolean *out_allowed, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "HibernateAllowed", + g_variant_new ("()"), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + error); + if (_ret == NULL) + goto _out; + g_variant_get (_ret, + "(b)", + out_allowed); + g_variant_unref (_ret); +_out: + return _ret != NULL; +} + +/** + * dbus_upower_complete_enumerate_devices: + * @object: A #DBusUPower. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @devices: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-UPower.EnumerateDevices">EnumerateDevices()</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 +dbus_upower_complete_enumerate_devices ( + DBusUPower *object, + GDBusMethodInvocation *invocation, + const gchar *const *devices) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(^ao)", + devices)); +} + +/** + * dbus_upower_complete_about_to_sleep: + * @object: A #DBusUPower. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-UPower.AboutToSleep">AboutToSleep()</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 +dbus_upower_complete_about_to_sleep ( + DBusUPower *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * dbus_upower_complete_suspend: + * @object: A #DBusUPower. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-UPower.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 +dbus_upower_complete_suspend ( + DBusUPower *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * dbus_upower_complete_suspend_allowed: + * @object: A #DBusUPower. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @allowed: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-UPower.SuspendAllowed">SuspendAllowed()</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 +dbus_upower_complete_suspend_allowed ( + DBusUPower *object, + GDBusMethodInvocation *invocation, + gboolean allowed) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", + allowed)); +} + +/** + * dbus_upower_complete_hibernate: + * @object: A #DBusUPower. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-UPower.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 +dbus_upower_complete_hibernate ( + DBusUPower *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * dbus_upower_complete_hibernate_allowed: + * @object: A #DBusUPower. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * @allowed: Parameter to return. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-UPower.HibernateAllowed">HibernateAllowed()</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 +dbus_upower_complete_hibernate_allowed ( + DBusUPower *object, + GDBusMethodInvocation *invocation, + gboolean allowed) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", + allowed)); +} + +/* ------------------------------------------------------------------------ */ + +/** + * DBusUPowerProxy: + * + * The #DBusUPowerProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * DBusUPowerProxyClass: + * @parent_class: The parent class. + * + * Class structure for #DBusUPowerProxy. + */ + +struct _DBusUPowerProxyPrivate +{ + GData *qdata; +}; + +static void dbus_upower_proxy_iface_init (DBusUPowerIface *iface); + +G_DEFINE_TYPE_WITH_CODE (DBusUPowerProxy, dbus_upower_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (DBUS_TYPE_UPOWER, dbus_upower_proxy_iface_init)); + +static void +dbus_upower_proxy_finalize (GObject *object) +{ + DBusUPowerProxy *proxy = DBUS_UPOWER_PROXY (object); + g_datalist_clear (&proxy->priv->qdata); + G_OBJECT_CLASS (dbus_upower_proxy_parent_class)->finalize (object); +} + +static void +dbus_upower_proxy_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 7); + info = _dbus_upower_property_info_pointers[prop_id - 1]; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); + if (info->use_gvariant) + { + g_value_set_variant (value, variant); + } + else + { + if (variant != NULL) + g_dbus_gvariant_to_gvalue (variant, value); + } + if (variant != NULL) + g_variant_unref (variant); +} + +static void +dbus_upower_proxy_set_property_cb (GDBusProxy *proxy, + GAsyncResult *res, + gpointer user_data) +{ + const _ExtendedGDBusPropertyInfo *info = user_data; + GError *error; + error = NULL; + if (!g_dbus_proxy_call_finish (proxy, res, &error)) + { + g_warning ("Error setting property `%s' on interface org.freedesktop.UPower: %s (%s, %d)", + info->parent_struct.name, + error->message, g_quark_to_string (error->domain), error->code); + g_error_free (error); + } +} + +static void +dbus_upower_proxy_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 7); + info = _dbus_upower_property_info_pointers[prop_id - 1]; + variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); + g_dbus_proxy_call (G_DBUS_PROXY (object), + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", "org.freedesktop.UPower", info->parent_struct.name, variant), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, (GAsyncReadyCallback) dbus_upower_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); + g_variant_unref (variant); +} + +static void +dbus_upower_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) +{ + _ExtendedGDBusSignalInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint n; + guint signal_id; + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_dbus_upower_interface_info.parent_struct, signal_name); + if (info == NULL) + return; + num_params = g_variant_n_children (parameters); + paramv = g_new0 (GValue, num_params + 1); + g_value_init (¶mv[0], DBUS_TYPE_UPOWER); + g_value_set_object (¶mv[0], proxy); + g_variant_iter_init (&iter, parameters); + n = 1; + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, DBUS_TYPE_UPOWER); + g_signal_emitv (paramv, signal_id, 0, NULL); + for (n = 0; n < num_params + 1; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static void +dbus_upower_proxy_g_properties_changed (GDBusProxy *_proxy, + GVariant *changed_properties, + const gchar *const *invalidated_properties) +{ + DBusUPowerProxy *proxy = DBUS_UPOWER_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 *) &_dbus_upower_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 *) &_dbus_upower_interface_info.parent_struct, invalidated_properties[n]); + g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); + if (info != NULL) + g_object_notify (G_OBJECT (proxy), info->hyphen_name); + } +} + +static const gchar * +dbus_upower_proxy_get_daemon_version (DBusUPower *object) +{ + DBusUPowerProxy *proxy = DBUS_UPOWER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "DaemonVersion"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static gboolean +dbus_upower_proxy_get_can_suspend (DBusUPower *object) +{ + DBusUPowerProxy *proxy = DBUS_UPOWER_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "CanSuspend"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static gboolean +dbus_upower_proxy_get_can_hibernate (DBusUPower *object) +{ + DBusUPowerProxy *proxy = DBUS_UPOWER_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "CanHibernate"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static gboolean +dbus_upower_proxy_get_on_battery (DBusUPower *object) +{ + DBusUPowerProxy *proxy = DBUS_UPOWER_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "OnBattery"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static gboolean +dbus_upower_proxy_get_on_low_battery (DBusUPower *object) +{ + DBusUPowerProxy *proxy = DBUS_UPOWER_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "OnLowBattery"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static gboolean +dbus_upower_proxy_get_lid_is_closed (DBusUPower *object) +{ + DBusUPowerProxy *proxy = DBUS_UPOWER_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LidIsClosed"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static gboolean +dbus_upower_proxy_get_lid_is_present (DBusUPower *object) +{ + DBusUPowerProxy *proxy = DBUS_UPOWER_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LidIsPresent"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static void +dbus_upower_proxy_init (DBusUPowerProxy *proxy) +{ + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, DBUS_TYPE_UPOWER_PROXY, DBusUPowerProxyPrivate); + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), dbus_upower_interface_info ()); +} + +static void +dbus_upower_proxy_class_init (DBusUPowerProxyClass *klass) +{ + GObjectClass *gobject_class; + GDBusProxyClass *proxy_class; + + g_type_class_add_private (klass, sizeof (DBusUPowerProxyPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = dbus_upower_proxy_finalize; + gobject_class->get_property = dbus_upower_proxy_get_property; + gobject_class->set_property = dbus_upower_proxy_set_property; + + proxy_class = G_DBUS_PROXY_CLASS (klass); + proxy_class->g_signal = dbus_upower_proxy_g_signal; + proxy_class->g_properties_changed = dbus_upower_proxy_g_properties_changed; + + + dbus_upower_override_properties (gobject_class, 1); +} + +static void +dbus_upower_proxy_iface_init (DBusUPowerIface *iface) +{ + iface->get_daemon_version = dbus_upower_proxy_get_daemon_version; + iface->get_can_suspend = dbus_upower_proxy_get_can_suspend; + iface->get_can_hibernate = dbus_upower_proxy_get_can_hibernate; + iface->get_on_battery = dbus_upower_proxy_get_on_battery; + iface->get_on_low_battery = dbus_upower_proxy_get_on_low_battery; + iface->get_lid_is_closed = dbus_upower_proxy_get_lid_is_closed; + iface->get_lid_is_present = dbus_upower_proxy_get_lid_is_present; +} + +/** + * dbus_upower_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-UPower.top_of_page">org.freedesktop.UPower</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 dbus_upower_proxy_new_finish() to get the result of the operation. + * + * See dbus_upower_proxy_new_sync() for the synchronous, blocking version of this constructor. + */ +void +dbus_upower_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 (DBUS_TYPE_UPOWER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.UPower", NULL); +} + +/** + * dbus_upower_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to dbus_upower_proxy_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with dbus_upower_proxy_new(). + * + * Returns: (transfer full) (type DBusUPowerProxy): The constructed proxy object or %NULL if @error is set. + */ +DBusUPower * +dbus_upower_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 DBUS_UPOWER (ret); + else + return NULL; +} + +/** + * dbus_upower_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-UPower.top_of_page">org.freedesktop.UPower</link>. See g_dbus_proxy_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See dbus_upower_proxy_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type DBusUPowerProxy): The constructed proxy object or %NULL if @error is set. + */ +DBusUPower * +dbus_upower_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (DBUS_TYPE_UPOWER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.UPower", NULL); + if (ret != NULL) + return DBUS_UPOWER (ret); + else + return NULL; +} + + +/** + * dbus_upower_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like dbus_upower_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 dbus_upower_proxy_new_for_bus_finish() to get the result of the operation. + * + * See dbus_upower_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +dbus_upower_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 (DBUS_TYPE_UPOWER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.UPower", NULL); +} + +/** + * dbus_upower_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to dbus_upower_proxy_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with dbus_upower_proxy_new_for_bus(). + * + * Returns: (transfer full) (type DBusUPowerProxy): The constructed proxy object or %NULL if @error is set. + */ +DBusUPower * +dbus_upower_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 DBUS_UPOWER (ret); + else + return NULL; +} + +/** + * dbus_upower_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like dbus_upower_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See dbus_upower_proxy_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type DBusUPowerProxy): The constructed proxy object or %NULL if @error is set. + */ +DBusUPower * +dbus_upower_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 (DBUS_TYPE_UPOWER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.UPower", NULL); + if (ret != NULL) + return DBUS_UPOWER (ret); + else + return NULL; +} + + +/* ------------------------------------------------------------------------ */ + +/** + * DBusUPowerSkeleton: + * + * The #DBusUPowerSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * DBusUPowerSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #DBusUPowerSkeleton. + */ + +struct _DBusUPowerSkeletonPrivate +{ + GValue *properties; + GList *changed_properties; + GSource *changed_properties_idle_source; + GMainContext *context; + GMutex lock; +}; + +static void +_dbus_upower_skeleton_handle_method_call ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (user_data); + _ExtendedGDBusMethodInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint num_extra; + guint n; + guint signal_id; + GValue return_value = G_VALUE_INIT; + info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); + g_assert (info != NULL); + num_params = g_variant_n_children (parameters); + num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); + n = 0; + g_value_init (¶mv[n], DBUS_TYPE_UPOWER); + g_value_set_object (¶mv[n++], skeleton); + g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); + g_value_set_object (¶mv[n++], invocation); + if (info->pass_fdlist) + { +#ifdef G_OS_UNIX + g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); + g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); +#else + g_assert_not_reached (); +#endif + } + g_variant_iter_init (&iter, parameters); + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, DBUS_TYPE_UPOWER); + g_value_init (&return_value, G_TYPE_BOOLEAN); + g_signal_emitv (paramv, signal_id, 0, &return_value); + if (!g_value_get_boolean (&return_value)) + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); + g_value_unset (&return_value); + for (n = 0; n < num_params + num_extra; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static GVariant * +_dbus_upower_skeleton_handle_get_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + gpointer user_data) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_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 *) &_dbus_upower_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 +_dbus_upower_skeleton_handle_set_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *variant, + GError **error, + gpointer user_data) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_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 *) &_dbus_upower_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 _dbus_upower_skeleton_vtable = +{ + _dbus_upower_skeleton_handle_method_call, + _dbus_upower_skeleton_handle_get_property, + _dbus_upower_skeleton_handle_set_property +}; + +static GDBusInterfaceInfo * +dbus_upower_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton) +{ + return dbus_upower_interface_info (); +} + +static GDBusInterfaceVTable * +dbus_upower_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton) +{ + return (GDBusInterfaceVTable *) &_dbus_upower_skeleton_vtable; +} + +static GVariant * +dbus_upower_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (_skeleton); + + GVariantBuilder builder; + guint n; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + if (_dbus_upower_interface_info.parent_struct.properties == NULL) + goto out; + for (n = 0; _dbus_upower_interface_info.parent_struct.properties[n] != NULL; n++) + { + GDBusPropertyInfo *info = _dbus_upower_interface_info.parent_struct.properties[n]; + if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) + { + GVariant *value; + value = _dbus_upower_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.UPower", info->name, NULL, skeleton); + if (value != NULL) + { + g_variant_take_ref (value); + g_variant_builder_add (&builder, "{sv}", info->name, value); + g_variant_unref (value); + } + } + } +out: + return g_variant_builder_end (&builder); +} + +static gboolean _dbus_upower_emit_changed (gpointer user_data); + +static void +dbus_upower_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (_skeleton); + gboolean emit_changed = FALSE; + + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties_idle_source != NULL) + { + g_source_destroy (skeleton->priv->changed_properties_idle_source); + skeleton->priv->changed_properties_idle_source = NULL; + emit_changed = TRUE; + } + g_mutex_unlock (&skeleton->priv->lock); + + if (emit_changed) + _dbus_upower_emit_changed (skeleton); +} + +static void +_dbus_upower_on_signal_device_added ( + DBusUPower *object, + const gchar *arg_device) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_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_device)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.UPower", "DeviceAdded", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_dbus_upower_on_signal_device_removed ( + DBusUPower *object, + const gchar *arg_device) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_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_device)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.UPower", "DeviceRemoved", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_dbus_upower_on_signal_device_changed ( + DBusUPower *object, + const gchar *arg_device) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_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_device)); + for (l = connections; l != NULL; l = l->next) + { + GDBusConnection *connection = l->data; + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.UPower", "DeviceChanged", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_dbus_upower_on_signal_changed ( + DBusUPower *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_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.freedesktop.UPower", "Changed", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_dbus_upower_on_signal_sleeping ( + DBusUPower *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_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.freedesktop.UPower", "Sleeping", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void +_dbus_upower_on_signal_resuming ( + DBusUPower *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_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.freedesktop.UPower", "Resuming", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void dbus_upower_skeleton_iface_init (DBusUPowerIface *iface); +G_DEFINE_TYPE_WITH_CODE (DBusUPowerSkeleton, dbus_upower_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (DBUS_TYPE_UPOWER, dbus_upower_skeleton_iface_init)); + +static void +dbus_upower_skeleton_finalize (GObject *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + guint n; + for (n = 0; n < 7; n++) + g_value_unset (&skeleton->priv->properties[n]); + g_free (skeleton->priv->properties); + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + if (skeleton->priv->changed_properties_idle_source != NULL) + g_source_destroy (skeleton->priv->changed_properties_idle_source); + g_main_context_unref (skeleton->priv->context); + g_mutex_clear (&skeleton->priv->lock); + G_OBJECT_CLASS (dbus_upower_skeleton_parent_class)->finalize (object); +} + +static void +dbus_upower_skeleton_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 7); + g_mutex_lock (&skeleton->priv->lock); + g_value_copy (&skeleton->priv->properties[prop_id - 1], value); + g_mutex_unlock (&skeleton->priv->lock); +} + +static gboolean +_dbus_upower_emit_changed (gpointer user_data) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (user_data); + GList *l; + GVariantBuilder builder; + GVariantBuilder invalidated_builder; + guint num_changes; + + g_mutex_lock (&skeleton->priv->lock); + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); + for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) + { + ChangedProperty *cp = l->data; + GVariant *variant; + const GValue *cur_value; + + cur_value = &skeleton->priv->properties[cp->prop_id - 1]; + if (!_g_value_equal (cur_value, &cp->orig_value)) + { + variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); + g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); + g_variant_unref (variant); + num_changes++; + } + } + if (num_changes > 0) + { + GList *connections, *ll; + GVariant *signal_variant; + signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.UPower", + &builder, &invalidated_builder)); + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + for (ll = connections; ll != NULL; ll = ll->next) + { + GDBusConnection *connection = ll->data; + + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), + "org.freedesktop.DBus.Properties", + "PropertiesChanged", + signal_variant, + NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); + } + else + { + g_variant_builder_clear (&builder); + g_variant_builder_clear (&invalidated_builder); + } + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + skeleton->priv->changed_properties = NULL; + skeleton->priv->changed_properties_idle_source = NULL; + g_mutex_unlock (&skeleton->priv->lock); + return FALSE; +} + +static void +_dbus_upower_schedule_emit_changed (DBusUPowerSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) +{ + ChangedProperty *cp; + GList *l; + cp = NULL; + for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) + { + ChangedProperty *i_cp = l->data; + if (i_cp->info == info) + { + cp = i_cp; + break; + } + } + if (cp == NULL) + { + cp = g_new0 (ChangedProperty, 1); + cp->prop_id = prop_id; + cp->info = info; + skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); + g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); + g_value_copy (orig_value, &cp->orig_value); + } +} + +static void +dbus_upower_skeleton_notify (GObject *object, + GParamSpec *pspec) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties != NULL && + skeleton->priv->changed_properties_idle_source == NULL) + { + skeleton->priv->changed_properties_idle_source = g_idle_source_new (); + g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); + g_source_set_callback (skeleton->priv->changed_properties_idle_source, _dbus_upower_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); + g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); + g_source_unref (skeleton->priv->changed_properties_idle_source); + } + g_mutex_unlock (&skeleton->priv->lock); +} + +static void +dbus_upower_skeleton_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 7); + g_mutex_lock (&skeleton->priv->lock); + g_object_freeze_notify (object); + if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) + { + if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) + _dbus_upower_schedule_emit_changed (skeleton, _dbus_upower_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); + g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); + g_object_notify_by_pspec (object, pspec); + } + g_mutex_unlock (&skeleton->priv->lock); + g_object_thaw_notify (object); +} + +static void +dbus_upower_skeleton_init (DBusUPowerSkeleton *skeleton) +{ + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, DBUS_TYPE_UPOWER_SKELETON, DBusUPowerSkeletonPrivate); + g_mutex_init (&skeleton->priv->lock); + skeleton->priv->context = g_main_context_ref_thread_default (); + skeleton->priv->properties = g_new0 (GValue, 7); + g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[1], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[2], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[3], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[4], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[5], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[6], G_TYPE_BOOLEAN); +} + +static const gchar * +dbus_upower_skeleton_get_daemon_version (DBusUPower *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[0])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +dbus_upower_skeleton_get_can_suspend (DBusUPower *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[1])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +dbus_upower_skeleton_get_can_hibernate (DBusUPower *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[2])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +dbus_upower_skeleton_get_on_battery (DBusUPower *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[3])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +dbus_upower_skeleton_get_on_low_battery (DBusUPower *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[4])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +dbus_upower_skeleton_get_lid_is_closed (DBusUPower *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[5])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +dbus_upower_skeleton_get_lid_is_present (DBusUPower *object) +{ + DBusUPowerSkeleton *skeleton = DBUS_UPOWER_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[6])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static void +dbus_upower_skeleton_class_init (DBusUPowerSkeletonClass *klass) +{ + GObjectClass *gobject_class; + GDBusInterfaceSkeletonClass *skeleton_class; + + g_type_class_add_private (klass, sizeof (DBusUPowerSkeletonPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = dbus_upower_skeleton_finalize; + gobject_class->get_property = dbus_upower_skeleton_get_property; + gobject_class->set_property = dbus_upower_skeleton_set_property; + gobject_class->notify = dbus_upower_skeleton_notify; + + + dbus_upower_override_properties (gobject_class, 1); + + skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); + skeleton_class->get_info = dbus_upower_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = dbus_upower_skeleton_dbus_interface_get_properties; + skeleton_class->flush = dbus_upower_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = dbus_upower_skeleton_dbus_interface_get_vtable; +} + +static void +dbus_upower_skeleton_iface_init (DBusUPowerIface *iface) +{ + iface->device_added = _dbus_upower_on_signal_device_added; + iface->device_removed = _dbus_upower_on_signal_device_removed; + iface->device_changed = _dbus_upower_on_signal_device_changed; + iface->changed = _dbus_upower_on_signal_changed; + iface->sleeping = _dbus_upower_on_signal_sleeping; + iface->resuming = _dbus_upower_on_signal_resuming; + iface->get_daemon_version = dbus_upower_skeleton_get_daemon_version; + iface->get_can_suspend = dbus_upower_skeleton_get_can_suspend; + iface->get_can_hibernate = dbus_upower_skeleton_get_can_hibernate; + iface->get_on_battery = dbus_upower_skeleton_get_on_battery; + iface->get_on_low_battery = dbus_upower_skeleton_get_on_low_battery; + iface->get_lid_is_closed = dbus_upower_skeleton_get_lid_is_closed; + iface->get_lid_is_present = dbus_upower_skeleton_get_lid_is_present; +} + +/** + * dbus_upower_skeleton_new: + * + * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-UPower.top_of_page">org.freedesktop.UPower</link>. + * + * Returns: (transfer full) (type DBusUPowerSkeleton): The skeleton object. + */ +DBusUPower * +dbus_upower_skeleton_new (void) +{ + return DBUS_UPOWER (g_object_new (DBUS_TYPE_UPOWER_SKELETON, NULL)); +} + diff --git a/src/dbus-upower.h b/src/dbus-upower.h new file mode 100644 index 0000000..65ea926 --- /dev/null +++ b/src/dbus-upower.h @@ -0,0 +1,381 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifndef __DBUS_UPOWER_H__ +#define __DBUS_UPOWER_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + + +/* ------------------------------------------------------------------------ */ +/* Declarations for org.freedesktop.UPower */ + +#define DBUS_TYPE_UPOWER (dbus_upower_get_type ()) +#define DBUS_UPOWER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DBUS_TYPE_UPOWER, DBusUPower)) +#define DBUS_IS_UPOWER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DBUS_TYPE_UPOWER)) +#define DBUS_UPOWER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), DBUS_TYPE_UPOWER, DBusUPowerIface)) + +struct _DBusUPower; +typedef struct _DBusUPower DBusUPower; +typedef struct _DBusUPowerIface DBusUPowerIface; + +struct _DBusUPowerIface +{ + GTypeInterface parent_iface; + + + + gboolean (*handle_about_to_sleep) ( + DBusUPower *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_enumerate_devices) ( + DBusUPower *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_hibernate) ( + DBusUPower *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_hibernate_allowed) ( + DBusUPower *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_suspend) ( + DBusUPower *object, + GDBusMethodInvocation *invocation); + + gboolean (*handle_suspend_allowed) ( + DBusUPower *object, + GDBusMethodInvocation *invocation); + + gboolean (*get_can_hibernate) (DBusUPower *object); + + gboolean (*get_can_suspend) (DBusUPower *object); + + const gchar * (*get_daemon_version) (DBusUPower *object); + + gboolean (*get_lid_is_closed) (DBusUPower *object); + + gboolean (*get_lid_is_present) (DBusUPower *object); + + gboolean (*get_on_battery) (DBusUPower *object); + + gboolean (*get_on_low_battery) (DBusUPower *object); + + void (*changed) ( + DBusUPower *object); + + void (*device_added) ( + DBusUPower *object, + const gchar *arg_device); + + void (*device_changed) ( + DBusUPower *object, + const gchar *arg_device); + + void (*device_removed) ( + DBusUPower *object, + const gchar *arg_device); + + void (*resuming) ( + DBusUPower *object); + + void (*sleeping) ( + DBusUPower *object); + +}; + +GType dbus_upower_get_type (void) G_GNUC_CONST; + +GDBusInterfaceInfo *dbus_upower_interface_info (void); +guint dbus_upower_override_properties (GObjectClass *klass, guint property_id_begin); + + +/* D-Bus method call completion functions: */ +void dbus_upower_complete_enumerate_devices ( + DBusUPower *object, + GDBusMethodInvocation *invocation, + const gchar *const *devices); + +void dbus_upower_complete_about_to_sleep ( + DBusUPower *object, + GDBusMethodInvocation *invocation); + +void dbus_upower_complete_suspend ( + DBusUPower *object, + GDBusMethodInvocation *invocation); + +void dbus_upower_complete_suspend_allowed ( + DBusUPower *object, + GDBusMethodInvocation *invocation, + gboolean allowed); + +void dbus_upower_complete_hibernate ( + DBusUPower *object, + GDBusMethodInvocation *invocation); + +void dbus_upower_complete_hibernate_allowed ( + DBusUPower *object, + GDBusMethodInvocation *invocation, + gboolean allowed); + + + +/* D-Bus signal emissions functions: */ +void dbus_upower_emit_device_added ( + DBusUPower *object, + const gchar *arg_device); + +void dbus_upower_emit_device_removed ( + DBusUPower *object, + const gchar *arg_device); + +void dbus_upower_emit_device_changed ( + DBusUPower *object, + const gchar *arg_device); + +void dbus_upower_emit_changed ( + DBusUPower *object); + +void dbus_upower_emit_sleeping ( + DBusUPower *object); + +void dbus_upower_emit_resuming ( + DBusUPower *object); + + + +/* D-Bus method calls: */ +void dbus_upower_call_enumerate_devices ( + DBusUPower *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean dbus_upower_call_enumerate_devices_finish ( + DBusUPower *proxy, + gchar ***out_devices, + GAsyncResult *res, + GError **error); + +gboolean dbus_upower_call_enumerate_devices_sync ( + DBusUPower *proxy, + gchar ***out_devices, + GCancellable *cancellable, + GError **error); + +void dbus_upower_call_about_to_sleep ( + DBusUPower *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean dbus_upower_call_about_to_sleep_finish ( + DBusUPower *proxy, + GAsyncResult *res, + GError **error); + +gboolean dbus_upower_call_about_to_sleep_sync ( + DBusUPower *proxy, + GCancellable *cancellable, + GError **error); + +void dbus_upower_call_suspend ( + DBusUPower *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean dbus_upower_call_suspend_finish ( + DBusUPower *proxy, + GAsyncResult *res, + GError **error); + +gboolean dbus_upower_call_suspend_sync ( + DBusUPower *proxy, + GCancellable *cancellable, + GError **error); + +void dbus_upower_call_suspend_allowed ( + DBusUPower *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean dbus_upower_call_suspend_allowed_finish ( + DBusUPower *proxy, + gboolean *out_allowed, + GAsyncResult *res, + GError **error); + +gboolean dbus_upower_call_suspend_allowed_sync ( + DBusUPower *proxy, + gboolean *out_allowed, + GCancellable *cancellable, + GError **error); + +void dbus_upower_call_hibernate ( + DBusUPower *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean dbus_upower_call_hibernate_finish ( + DBusUPower *proxy, + GAsyncResult *res, + GError **error); + +gboolean dbus_upower_call_hibernate_sync ( + DBusUPower *proxy, + GCancellable *cancellable, + GError **error); + +void dbus_upower_call_hibernate_allowed ( + DBusUPower *proxy, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean dbus_upower_call_hibernate_allowed_finish ( + DBusUPower *proxy, + gboolean *out_allowed, + GAsyncResult *res, + GError **error); + +gboolean dbus_upower_call_hibernate_allowed_sync ( + DBusUPower *proxy, + gboolean *out_allowed, + GCancellable *cancellable, + GError **error); + + + +/* D-Bus property accessors: */ +const gchar *dbus_upower_get_daemon_version (DBusUPower *object); +gchar *dbus_upower_dup_daemon_version (DBusUPower *object); +void dbus_upower_set_daemon_version (DBusUPower *object, const gchar *value); + +gboolean dbus_upower_get_can_suspend (DBusUPower *object); +void dbus_upower_set_can_suspend (DBusUPower *object, gboolean value); + +gboolean dbus_upower_get_can_hibernate (DBusUPower *object); +void dbus_upower_set_can_hibernate (DBusUPower *object, gboolean value); + +gboolean dbus_upower_get_on_battery (DBusUPower *object); +void dbus_upower_set_on_battery (DBusUPower *object, gboolean value); + +gboolean dbus_upower_get_on_low_battery (DBusUPower *object); +void dbus_upower_set_on_low_battery (DBusUPower *object, gboolean value); + +gboolean dbus_upower_get_lid_is_closed (DBusUPower *object); +void dbus_upower_set_lid_is_closed (DBusUPower *object, gboolean value); + +gboolean dbus_upower_get_lid_is_present (DBusUPower *object); +void dbus_upower_set_lid_is_present (DBusUPower *object, gboolean value); + + +/* ---- */ + +#define DBUS_TYPE_UPOWER_PROXY (dbus_upower_proxy_get_type ()) +#define DBUS_UPOWER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DBUS_TYPE_UPOWER_PROXY, DBusUPowerProxy)) +#define DBUS_UPOWER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), DBUS_TYPE_UPOWER_PROXY, DBusUPowerProxyClass)) +#define DBUS_UPOWER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DBUS_TYPE_UPOWER_PROXY, DBusUPowerProxyClass)) +#define DBUS_IS_UPOWER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DBUS_TYPE_UPOWER_PROXY)) +#define DBUS_IS_UPOWER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DBUS_TYPE_UPOWER_PROXY)) + +typedef struct _DBusUPowerProxy DBusUPowerProxy; +typedef struct _DBusUPowerProxyClass DBusUPowerProxyClass; +typedef struct _DBusUPowerProxyPrivate DBusUPowerProxyPrivate; + +struct _DBusUPowerProxy +{ + /*< private >*/ + GDBusProxy parent_instance; + DBusUPowerProxyPrivate *priv; +}; + +struct _DBusUPowerProxyClass +{ + GDBusProxyClass parent_class; +}; + +GType dbus_upower_proxy_get_type (void) G_GNUC_CONST; + +void dbus_upower_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +DBusUPower *dbus_upower_proxy_new_finish ( + GAsyncResult *res, + GError **error); +DBusUPower *dbus_upower_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void dbus_upower_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +DBusUPower *dbus_upower_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +DBusUPower *dbus_upower_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +/* ---- */ + +#define DBUS_TYPE_UPOWER_SKELETON (dbus_upower_skeleton_get_type ()) +#define DBUS_UPOWER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DBUS_TYPE_UPOWER_SKELETON, DBusUPowerSkeleton)) +#define DBUS_UPOWER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), DBUS_TYPE_UPOWER_SKELETON, DBusUPowerSkeletonClass)) +#define DBUS_UPOWER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DBUS_TYPE_UPOWER_SKELETON, DBusUPowerSkeletonClass)) +#define DBUS_IS_UPOWER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DBUS_TYPE_UPOWER_SKELETON)) +#define DBUS_IS_UPOWER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DBUS_TYPE_UPOWER_SKELETON)) + +typedef struct _DBusUPowerSkeleton DBusUPowerSkeleton; +typedef struct _DBusUPowerSkeletonClass DBusUPowerSkeletonClass; +typedef struct _DBusUPowerSkeletonPrivate DBusUPowerSkeletonPrivate; + +struct _DBusUPowerSkeleton +{ + /*< private >*/ + GDBusInterfaceSkeleton parent_instance; + DBusUPowerSkeletonPrivate *priv; +}; + +struct _DBusUPowerSkeletonClass +{ + GDBusInterfaceSkeletonClass parent_class; +}; + +GType dbus_upower_skeleton_get_type (void) G_GNUC_CONST; + +DBusUPower *dbus_upower_skeleton_new (void); + + +G_END_DECLS + +#endif /* __DBUS_UPOWER_H__ */ diff --git a/src/dbus-user.c b/src/dbus-user.c new file mode 100644 index 0000000..027715c --- /dev/null +++ b/src/dbus-user.c @@ -0,0 +1,5392 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "dbus-user.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; + gboolean use_gvariant; +} _ExtendedGDBusPropertyInfo; + +typedef struct +{ + GDBusInterfaceInfo parent_struct; + const gchar *hyphen_name; +} _ExtendedGDBusInterfaceInfo; + +typedef struct +{ + const _ExtendedGDBusPropertyInfo *info; + guint prop_id; + GValue orig_value; /* the value before the change */ +} ChangedProperty; + +static void +_changed_property_free (ChangedProperty *data) +{ + g_value_unset (&data->orig_value); + g_free (data); +} + +static gboolean +_g_strv_equal0 (gchar **a, gchar **b) +{ + gboolean ret = FALSE; + guint n; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + if (g_strv_length (a) != g_strv_length (b)) + goto out; + for (n = 0; a[n] != NULL; n++) + if (g_strcmp0 (a[n], b[n]) != 0) + goto out; + ret = TRUE; +out: + return ret; +} + +static gboolean +_g_variant_equal0 (GVariant *a, GVariant *b) +{ + gboolean ret = FALSE; + if (a == NULL && b == NULL) + { + ret = TRUE; + goto out; + } + if (a == NULL || b == NULL) + goto out; + ret = g_variant_equal (a, b); +out: + return ret; +} + +G_GNUC_UNUSED static gboolean +_g_value_equal (const GValue *a, const GValue *b) +{ + gboolean ret = FALSE; + g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); + switch (G_VALUE_TYPE (a)) + { + case G_TYPE_BOOLEAN: + ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); + break; + case G_TYPE_UCHAR: + ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); + break; + case G_TYPE_INT: + ret = (g_value_get_int (a) == g_value_get_int (b)); + break; + case G_TYPE_UINT: + ret = (g_value_get_uint (a) == g_value_get_uint (b)); + break; + case G_TYPE_INT64: + ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); + break; + case G_TYPE_UINT64: + ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); + break; + case G_TYPE_DOUBLE: + { + /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ + gdouble da = g_value_get_double (a); + gdouble db = g_value_get_double (b); + ret = memcmp (&da, &db, sizeof (gdouble)) == 0; + } + break; + case G_TYPE_STRING: + ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); + break; + case G_TYPE_VARIANT: + ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); + break; + default: + if (G_VALUE_TYPE (a) == G_TYPE_STRV) + ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); + else + g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); + break; + } + return ret; +} + +/* ------------------------------------------------------------------------ + * Code for interface org.freedesktop.Accounts.User + * ------------------------------------------------------------------------ + */ + +/** + * SECTION:AccountsUser + * @title: AccountsUser + * @short_description: Generated C code for the org.freedesktop.Accounts.User D-Bus interface + * + * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-Accounts-User.top_of_page">org.freedesktop.Accounts.User</link> D-Bus interface in C. + */ + +/* ---- Introspection data for org.freedesktop.Accounts.User ---- */ + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_user_name_IN_ARG_name = +{ + { + -1, + (gchar *) "name", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_user_name_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_user_name_IN_ARG_name, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_user_name_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_user_name_annotation_info_pointers[] = +{ + &_accounts_user_method_set_user_name_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_user_name = +{ + { + -1, + (gchar *) "SetUserName", + (GDBusArgInfo **) &_accounts_user_method_info_set_user_name_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_user_name_annotation_info_pointers + }, + "handle-set-user-name", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_real_name_IN_ARG_name = +{ + { + -1, + (gchar *) "name", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_real_name_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_real_name_IN_ARG_name, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_real_name_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_real_name_annotation_info_pointers[] = +{ + &_accounts_user_method_set_real_name_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_real_name = +{ + { + -1, + (gchar *) "SetRealName", + (GDBusArgInfo **) &_accounts_user_method_info_set_real_name_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_real_name_annotation_info_pointers + }, + "handle-set-real-name", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_email_IN_ARG_email = +{ + { + -1, + (gchar *) "email", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_email_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_email_IN_ARG_email, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_email_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_email_annotation_info_pointers[] = +{ + &_accounts_user_method_set_email_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_email = +{ + { + -1, + (gchar *) "SetEmail", + (GDBusArgInfo **) &_accounts_user_method_info_set_email_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_email_annotation_info_pointers + }, + "handle-set-email", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_language_IN_ARG_language = +{ + { + -1, + (gchar *) "language", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_language_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_language_IN_ARG_language, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_language_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_language_annotation_info_pointers[] = +{ + &_accounts_user_method_set_language_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_language = +{ + { + -1, + (gchar *) "SetLanguage", + (GDBusArgInfo **) &_accounts_user_method_info_set_language_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_language_annotation_info_pointers + }, + "handle-set-language", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_xsession_IN_ARG_x_session = +{ + { + -1, + (gchar *) "x_session", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_xsession_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_xsession_IN_ARG_x_session, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_xsession_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_xsession_annotation_info_1 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.CSymbol", + (gchar *) "user_set_x_session", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_xsession_annotation_info_pointers[] = +{ + &_accounts_user_method_set_xsession_annotation_info_0, + &_accounts_user_method_set_xsession_annotation_info_1, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_xsession = +{ + { + -1, + (gchar *) "SetXSession", + (GDBusArgInfo **) &_accounts_user_method_info_set_xsession_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_xsession_annotation_info_pointers + }, + "handle-set-xsession", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_location_IN_ARG_location = +{ + { + -1, + (gchar *) "location", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_location_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_location_IN_ARG_location, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_location_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_location_annotation_info_pointers[] = +{ + &_accounts_user_method_set_location_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_location = +{ + { + -1, + (gchar *) "SetLocation", + (GDBusArgInfo **) &_accounts_user_method_info_set_location_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_location_annotation_info_pointers + }, + "handle-set-location", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_home_directory_IN_ARG_homedir = +{ + { + -1, + (gchar *) "homedir", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_home_directory_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_home_directory_IN_ARG_homedir, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_home_directory_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_home_directory_annotation_info_pointers[] = +{ + &_accounts_user_method_set_home_directory_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_home_directory = +{ + { + -1, + (gchar *) "SetHomeDirectory", + (GDBusArgInfo **) &_accounts_user_method_info_set_home_directory_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_home_directory_annotation_info_pointers + }, + "handle-set-home-directory", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_shell_IN_ARG_shell = +{ + { + -1, + (gchar *) "shell", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_shell_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_shell_IN_ARG_shell, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_shell_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_shell_annotation_info_pointers[] = +{ + &_accounts_user_method_set_shell_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_shell = +{ + { + -1, + (gchar *) "SetShell", + (GDBusArgInfo **) &_accounts_user_method_info_set_shell_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_shell_annotation_info_pointers + }, + "handle-set-shell", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_icon_file_IN_ARG_filename = +{ + { + -1, + (gchar *) "filename", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_icon_file_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_icon_file_IN_ARG_filename, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_icon_file_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_icon_file_annotation_info_pointers[] = +{ + &_accounts_user_method_set_icon_file_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_icon_file = +{ + { + -1, + (gchar *) "SetIconFile", + (GDBusArgInfo **) &_accounts_user_method_info_set_icon_file_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_icon_file_annotation_info_pointers + }, + "handle-set-icon-file", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_locked_IN_ARG_locked = +{ + { + -1, + (gchar *) "locked", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_locked_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_locked_IN_ARG_locked, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_locked_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_locked_annotation_info_pointers[] = +{ + &_accounts_user_method_set_locked_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_locked = +{ + { + -1, + (gchar *) "SetLocked", + (GDBusArgInfo **) &_accounts_user_method_info_set_locked_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_locked_annotation_info_pointers + }, + "handle-set-locked", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_account_type_IN_ARG_accountType = +{ + { + -1, + (gchar *) "accountType", + (gchar *) "i", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_account_type_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_account_type_IN_ARG_accountType, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_account_type_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_account_type_annotation_info_pointers[] = +{ + &_accounts_user_method_set_account_type_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_account_type = +{ + { + -1, + (gchar *) "SetAccountType", + (GDBusArgInfo **) &_accounts_user_method_info_set_account_type_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_account_type_annotation_info_pointers + }, + "handle-set-account-type", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_password_mode_IN_ARG_mode = +{ + { + -1, + (gchar *) "mode", + (gchar *) "i", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_password_mode_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_password_mode_IN_ARG_mode, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_password_mode_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_password_mode_annotation_info_pointers[] = +{ + &_accounts_user_method_set_password_mode_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_password_mode = +{ + { + -1, + (gchar *) "SetPasswordMode", + (GDBusArgInfo **) &_accounts_user_method_info_set_password_mode_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_password_mode_annotation_info_pointers + }, + "handle-set-password-mode", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_password_IN_ARG_password = +{ + { + -1, + (gchar *) "password", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_password_IN_ARG_hint = +{ + { + -1, + (gchar *) "hint", + (gchar *) "s", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_password_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_password_IN_ARG_password, + &_accounts_user_method_info_set_password_IN_ARG_hint, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_password_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_password_annotation_info_pointers[] = +{ + &_accounts_user_method_set_password_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_password = +{ + { + -1, + (gchar *) "SetPassword", + (GDBusArgInfo **) &_accounts_user_method_info_set_password_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_password_annotation_info_pointers + }, + "handle-set-password", + FALSE +}; + +static const _ExtendedGDBusArgInfo _accounts_user_method_info_set_automatic_login_IN_ARG_enabled = +{ + { + -1, + (gchar *) "enabled", + (gchar *) "b", + NULL + }, + FALSE +}; + +static const _ExtendedGDBusArgInfo * const _accounts_user_method_info_set_automatic_login_IN_ARG_pointers[] = +{ + &_accounts_user_method_info_set_automatic_login_IN_ARG_enabled, + NULL +}; + +static const GDBusAnnotationInfo _accounts_user_method_set_automatic_login_annotation_info_0 = +{ + -1, + (gchar *) "org.freedesktop.DBus.GLib.Async", + (gchar *) "", + NULL +}; + +static const GDBusAnnotationInfo * const _accounts_user_method_set_automatic_login_annotation_info_pointers[] = +{ + &_accounts_user_method_set_automatic_login_annotation_info_0, + NULL +}; + +static const _ExtendedGDBusMethodInfo _accounts_user_method_info_set_automatic_login = +{ + { + -1, + (gchar *) "SetAutomaticLogin", + (GDBusArgInfo **) &_accounts_user_method_info_set_automatic_login_IN_ARG_pointers, + NULL, + (GDBusAnnotationInfo **) &_accounts_user_method_set_automatic_login_annotation_info_pointers + }, + "handle-set-automatic-login", + FALSE +}; + +static const _ExtendedGDBusMethodInfo * const _accounts_user_method_info_pointers[] = +{ + &_accounts_user_method_info_set_user_name, + &_accounts_user_method_info_set_real_name, + &_accounts_user_method_info_set_email, + &_accounts_user_method_info_set_language, + &_accounts_user_method_info_set_xsession, + &_accounts_user_method_info_set_location, + &_accounts_user_method_info_set_home_directory, + &_accounts_user_method_info_set_shell, + &_accounts_user_method_info_set_icon_file, + &_accounts_user_method_info_set_locked, + &_accounts_user_method_info_set_account_type, + &_accounts_user_method_info_set_password_mode, + &_accounts_user_method_info_set_password, + &_accounts_user_method_info_set_automatic_login, + NULL +}; + +static const _ExtendedGDBusSignalInfo _accounts_user_signal_info_changed = +{ + { + -1, + (gchar *) "Changed", + NULL, + NULL + }, + "changed" +}; + +static const _ExtendedGDBusSignalInfo * const _accounts_user_signal_info_pointers[] = +{ + &_accounts_user_signal_info_changed, + NULL +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_uid = +{ + { + -1, + (gchar *) "Uid", + (gchar *) "t", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "uid", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_user_name = +{ + { + -1, + (gchar *) "UserName", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "user-name", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_real_name = +{ + { + -1, + (gchar *) "RealName", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "real-name", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_account_type = +{ + { + -1, + (gchar *) "AccountType", + (gchar *) "i", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "account-type", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_home_directory = +{ + { + -1, + (gchar *) "HomeDirectory", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "home-directory", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_shell = +{ + { + -1, + (gchar *) "Shell", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "shell", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_email = +{ + { + -1, + (gchar *) "Email", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "email", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_language = +{ + { + -1, + (gchar *) "Language", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "language", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_xsession = +{ + { + -1, + (gchar *) "XSession", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "xsession", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_location = +{ + { + -1, + (gchar *) "Location", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "location", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_login_frequency = +{ + { + -1, + (gchar *) "LoginFrequency", + (gchar *) "t", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "login-frequency", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_icon_file = +{ + { + -1, + (gchar *) "IconFile", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "icon-file", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_locked = +{ + { + -1, + (gchar *) "Locked", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "locked", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_password_mode = +{ + { + -1, + (gchar *) "PasswordMode", + (gchar *) "i", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "password-mode", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_password_hint = +{ + { + -1, + (gchar *) "PasswordHint", + (gchar *) "s", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "password-hint", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_automatic_login = +{ + { + -1, + (gchar *) "AutomaticLogin", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "automatic-login", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo _accounts_user_property_info_system_account = +{ + { + -1, + (gchar *) "SystemAccount", + (gchar *) "b", + G_DBUS_PROPERTY_INFO_FLAGS_READABLE, + NULL + }, + "system-account", + FALSE +}; + +static const _ExtendedGDBusPropertyInfo * const _accounts_user_property_info_pointers[] = +{ + &_accounts_user_property_info_uid, + &_accounts_user_property_info_user_name, + &_accounts_user_property_info_real_name, + &_accounts_user_property_info_account_type, + &_accounts_user_property_info_home_directory, + &_accounts_user_property_info_shell, + &_accounts_user_property_info_email, + &_accounts_user_property_info_language, + &_accounts_user_property_info_xsession, + &_accounts_user_property_info_location, + &_accounts_user_property_info_login_frequency, + &_accounts_user_property_info_icon_file, + &_accounts_user_property_info_locked, + &_accounts_user_property_info_password_mode, + &_accounts_user_property_info_password_hint, + &_accounts_user_property_info_automatic_login, + &_accounts_user_property_info_system_account, + NULL +}; + +static const _ExtendedGDBusInterfaceInfo _accounts_user_interface_info = +{ + { + -1, + (gchar *) "org.freedesktop.Accounts.User", + (GDBusMethodInfo **) &_accounts_user_method_info_pointers, + (GDBusSignalInfo **) &_accounts_user_signal_info_pointers, + (GDBusPropertyInfo **) &_accounts_user_property_info_pointers, + NULL + }, + "accounts-user", +}; + + +/** + * accounts_user_interface_info: + * + * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-Accounts-User.top_of_page">org.freedesktop.Accounts.User</link> D-Bus interface. + * + * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. + */ +GDBusInterfaceInfo * +accounts_user_interface_info (void) +{ + return (GDBusInterfaceInfo *) &_accounts_user_interface_info.parent_struct; +} + +/** + * accounts_user_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 #AccountsUser interface for a concrete class. + * The properties are overridden in the order they are defined. + * + * Returns: The last property id. + */ +guint +accounts_user_override_properties (GObjectClass *klass, guint property_id_begin) +{ + g_object_class_override_property (klass, property_id_begin++, "uid"); + g_object_class_override_property (klass, property_id_begin++, "user-name"); + g_object_class_override_property (klass, property_id_begin++, "real-name"); + g_object_class_override_property (klass, property_id_begin++, "account-type"); + g_object_class_override_property (klass, property_id_begin++, "home-directory"); + g_object_class_override_property (klass, property_id_begin++, "shell"); + g_object_class_override_property (klass, property_id_begin++, "email"); + g_object_class_override_property (klass, property_id_begin++, "language"); + g_object_class_override_property (klass, property_id_begin++, "xsession"); + g_object_class_override_property (klass, property_id_begin++, "location"); + g_object_class_override_property (klass, property_id_begin++, "login-frequency"); + g_object_class_override_property (klass, property_id_begin++, "icon-file"); + g_object_class_override_property (klass, property_id_begin++, "locked"); + g_object_class_override_property (klass, property_id_begin++, "password-mode"); + g_object_class_override_property (klass, property_id_begin++, "password-hint"); + g_object_class_override_property (klass, property_id_begin++, "automatic-login"); + g_object_class_override_property (klass, property_id_begin++, "system-account"); + return property_id_begin - 1; +} + + + +/** + * AccountsUser: + * + * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Accounts-User.top_of_page">org.freedesktop.Accounts.User</link>. + */ + +/** + * AccountsUserIface: + * @parent_iface: The parent interface. + * @handle_set_account_type: Handler for the #AccountsUser::handle-set-account-type signal. + * @handle_set_automatic_login: Handler for the #AccountsUser::handle-set-automatic-login signal. + * @handle_set_email: Handler for the #AccountsUser::handle-set-email signal. + * @handle_set_home_directory: Handler for the #AccountsUser::handle-set-home-directory signal. + * @handle_set_icon_file: Handler for the #AccountsUser::handle-set-icon-file signal. + * @handle_set_language: Handler for the #AccountsUser::handle-set-language signal. + * @handle_set_location: Handler for the #AccountsUser::handle-set-location signal. + * @handle_set_locked: Handler for the #AccountsUser::handle-set-locked signal. + * @handle_set_password: Handler for the #AccountsUser::handle-set-password signal. + * @handle_set_password_mode: Handler for the #AccountsUser::handle-set-password-mode signal. + * @handle_set_real_name: Handler for the #AccountsUser::handle-set-real-name signal. + * @handle_set_shell: Handler for the #AccountsUser::handle-set-shell signal. + * @handle_set_user_name: Handler for the #AccountsUser::handle-set-user-name signal. + * @handle_set_xsession: Handler for the #AccountsUser::handle-set-xsession signal. + * @get_account_type: Getter for the #AccountsUser:account-type property. + * @get_automatic_login: Getter for the #AccountsUser:automatic-login property. + * @get_email: Getter for the #AccountsUser:email property. + * @get_home_directory: Getter for the #AccountsUser:home-directory property. + * @get_icon_file: Getter for the #AccountsUser:icon-file property. + * @get_language: Getter for the #AccountsUser:language property. + * @get_location: Getter for the #AccountsUser:location property. + * @get_locked: Getter for the #AccountsUser:locked property. + * @get_login_frequency: Getter for the #AccountsUser:login-frequency property. + * @get_password_hint: Getter for the #AccountsUser:password-hint property. + * @get_password_mode: Getter for the #AccountsUser:password-mode property. + * @get_real_name: Getter for the #AccountsUser:real-name property. + * @get_shell: Getter for the #AccountsUser:shell property. + * @get_system_account: Getter for the #AccountsUser:system-account property. + * @get_uid: Getter for the #AccountsUser:uid property. + * @get_user_name: Getter for the #AccountsUser:user-name property. + * @get_xsession: Getter for the #AccountsUser:xsession property. + * @changed: Handler for the #AccountsUser::changed signal. + * + * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Accounts-User.top_of_page">org.freedesktop.Accounts.User</link>. + */ + +static void +accounts_user_default_init (AccountsUserIface *iface) +{ + /* GObject signals for incoming D-Bus method calls: */ + /** + * AccountsUser::handle-set-user-name: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_name: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetUserName">SetUserName()</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 accounts_user_complete_set_user_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-set-user-name", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_user_name), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * AccountsUser::handle-set-real-name: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_name: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetRealName">SetRealName()</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 accounts_user_complete_set_real_name() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-set-real-name", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_real_name), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * AccountsUser::handle-set-email: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_email: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetEmail">SetEmail()</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 accounts_user_complete_set_email() 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-email", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_email), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * AccountsUser::handle-set-language: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_language: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLanguage">SetLanguage()</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 accounts_user_complete_set_language() 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-language", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_language), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * AccountsUser::handle-set-xsession: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_x_session: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetXSession">SetXSession()</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 accounts_user_complete_set_xsession() 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-xsession", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_xsession), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * AccountsUser::handle-set-location: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_location: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLocation">SetLocation()</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 accounts_user_complete_set_location() 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-location", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_location), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * AccountsUser::handle-set-home-directory: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_homedir: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetHomeDirectory">SetHomeDirectory()</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 accounts_user_complete_set_home_directory() 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-home-directory", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_home_directory), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * AccountsUser::handle-set-shell: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_shell: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetShell">SetShell()</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 accounts_user_complete_set_shell() 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-shell", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_shell), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * AccountsUser::handle-set-icon-file: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_filename: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetIconFile">SetIconFile()</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 accounts_user_complete_set_icon_file() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. + * + * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. + */ + g_signal_new ("handle-set-icon-file", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_icon_file), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING); + + /** + * AccountsUser::handle-set-locked: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_locked: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLocked">SetLocked()</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 accounts_user_complete_set_locked() 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-locked", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_locked), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); + + /** + * AccountsUser::handle-set-account-type: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_accountType: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetAccountType">SetAccountType()</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 accounts_user_complete_set_account_type() 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-account-type", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_account_type), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT); + + /** + * AccountsUser::handle-set-password-mode: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_mode: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetPasswordMode">SetPasswordMode()</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 accounts_user_complete_set_password_mode() 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-password-mode", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_password_mode), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT); + + /** + * AccountsUser::handle-set-password: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_password: Argument passed by remote caller. + * @arg_hint: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetPassword">SetPassword()</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 accounts_user_complete_set_password() 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-password", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_password), + 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); + + /** + * AccountsUser::handle-set-automatic-login: + * @object: A #AccountsUser. + * @invocation: A #GDBusMethodInvocation. + * @arg_enabled: Argument passed by remote caller. + * + * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetAutomaticLogin">SetAutomaticLogin()</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 accounts_user_complete_set_automatic_login() 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-automatic-login", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, handle_set_automatic_login), + g_signal_accumulator_true_handled, + NULL, + g_cclosure_marshal_generic, + G_TYPE_BOOLEAN, + 2, + G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); + + /* GObject signals for received D-Bus signals: */ + /** + * AccountsUser::changed: + * @object: A #AccountsUser. + * + * On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-Accounts-User.Changed">"Changed"</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 ("changed", + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AccountsUserIface, changed), + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 0); + + /* GObject properties for D-Bus properties: */ + /** + * AccountsUser:uid: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.Uid">"Uid"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_uint64 ("uid", "Uid", "Uid", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:user-name: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.UserName">"UserName"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("user-name", "UserName", "UserName", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:real-name: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.RealName">"RealName"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("real-name", "RealName", "RealName", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:account-type: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.AccountType">"AccountType"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_int ("account-type", "AccountType", "AccountType", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:home-directory: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.HomeDirectory">"HomeDirectory"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("home-directory", "HomeDirectory", "HomeDirectory", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:shell: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.Shell">"Shell"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("shell", "Shell", "Shell", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:email: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.Email">"Email"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("email", "Email", "Email", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:language: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.Language">"Language"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("language", "Language", "Language", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:xsession: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.XSession">"XSession"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("xsession", "XSession", "XSession", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:location: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.Location">"Location"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("location", "Location", "Location", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:login-frequency: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.LoginFrequency">"LoginFrequency"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_uint64 ("login-frequency", "LoginFrequency", "LoginFrequency", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:icon-file: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.IconFile">"IconFile"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("icon-file", "IconFile", "IconFile", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:locked: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.Locked">"Locked"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("locked", "Locked", "Locked", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:password-mode: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.PasswordMode">"PasswordMode"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_int ("password-mode", "PasswordMode", "PasswordMode", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:password-hint: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.PasswordHint">"PasswordHint"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_string ("password-hint", "PasswordHint", "PasswordHint", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:automatic-login: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.AutomaticLogin">"AutomaticLogin"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("automatic-login", "AutomaticLogin", "AutomaticLogin", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * AccountsUser:system-account: + * + * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-Accounts-User.SystemAccount">"SystemAccount"</link>. + * + * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. + */ + g_object_interface_install_property (iface, + g_param_spec_boolean ("system-account", "SystemAccount", "SystemAccount", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); +} + +typedef AccountsUserIface AccountsUserInterface; +G_DEFINE_INTERFACE (AccountsUser, accounts_user, G_TYPE_OBJECT); + +/** + * accounts_user_get_uid: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Uid">"Uid"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +guint64 +accounts_user_get_uid (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_uid (object); +} + +/** + * accounts_user_set_uid: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Uid">"Uid"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_uid (AccountsUser *object, guint64 value) +{ + g_object_set (G_OBJECT (object), "uid", value, NULL); +} + +/** + * accounts_user_get_user_name: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.UserName">"UserName"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_user_dup_user_name() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_user_get_user_name (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_user_name (object); +} + +/** + * accounts_user_dup_user_name: (skip) + * @object: A #AccountsUser. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.UserName">"UserName"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_user_dup_user_name (AccountsUser *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "user-name", &value, NULL); + return value; +} + +/** + * accounts_user_set_user_name: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.UserName">"UserName"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_user_name (AccountsUser *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "user-name", value, NULL); +} + +/** + * accounts_user_get_real_name: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.RealName">"RealName"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_user_dup_real_name() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_user_get_real_name (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_real_name (object); +} + +/** + * accounts_user_dup_real_name: (skip) + * @object: A #AccountsUser. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.RealName">"RealName"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_user_dup_real_name (AccountsUser *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "real-name", &value, NULL); + return value; +} + +/** + * accounts_user_set_real_name: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.RealName">"RealName"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_real_name (AccountsUser *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "real-name", value, NULL); +} + +/** + * accounts_user_get_account_type: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.AccountType">"AccountType"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gint +accounts_user_get_account_type (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_account_type (object); +} + +/** + * accounts_user_set_account_type: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.AccountType">"AccountType"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_account_type (AccountsUser *object, gint value) +{ + g_object_set (G_OBJECT (object), "account-type", value, NULL); +} + +/** + * accounts_user_get_home_directory: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.HomeDirectory">"HomeDirectory"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_user_dup_home_directory() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_user_get_home_directory (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_home_directory (object); +} + +/** + * accounts_user_dup_home_directory: (skip) + * @object: A #AccountsUser. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.HomeDirectory">"HomeDirectory"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_user_dup_home_directory (AccountsUser *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "home-directory", &value, NULL); + return value; +} + +/** + * accounts_user_set_home_directory: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.HomeDirectory">"HomeDirectory"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_home_directory (AccountsUser *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "home-directory", value, NULL); +} + +/** + * accounts_user_get_shell: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Shell">"Shell"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_user_dup_shell() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_user_get_shell (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_shell (object); +} + +/** + * accounts_user_dup_shell: (skip) + * @object: A #AccountsUser. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Shell">"Shell"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_user_dup_shell (AccountsUser *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "shell", &value, NULL); + return value; +} + +/** + * accounts_user_set_shell: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Shell">"Shell"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_shell (AccountsUser *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "shell", value, NULL); +} + +/** + * accounts_user_get_email: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Email">"Email"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_user_dup_email() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_user_get_email (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_email (object); +} + +/** + * accounts_user_dup_email: (skip) + * @object: A #AccountsUser. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Email">"Email"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_user_dup_email (AccountsUser *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "email", &value, NULL); + return value; +} + +/** + * accounts_user_set_email: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Email">"Email"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_email (AccountsUser *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "email", value, NULL); +} + +/** + * accounts_user_get_language: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Language">"Language"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_user_dup_language() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_user_get_language (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_language (object); +} + +/** + * accounts_user_dup_language: (skip) + * @object: A #AccountsUser. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Language">"Language"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_user_dup_language (AccountsUser *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "language", &value, NULL); + return value; +} + +/** + * accounts_user_set_language: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Language">"Language"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_language (AccountsUser *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "language", value, NULL); +} + +/** + * accounts_user_get_xsession: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.XSession">"XSession"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_user_dup_xsession() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_user_get_xsession (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_xsession (object); +} + +/** + * accounts_user_dup_xsession: (skip) + * @object: A #AccountsUser. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.XSession">"XSession"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_user_dup_xsession (AccountsUser *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "xsession", &value, NULL); + return value; +} + +/** + * accounts_user_set_xsession: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.XSession">"XSession"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_xsession (AccountsUser *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "xsession", value, NULL); +} + +/** + * accounts_user_get_location: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Location">"Location"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_user_dup_location() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_user_get_location (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_location (object); +} + +/** + * accounts_user_dup_location: (skip) + * @object: A #AccountsUser. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Location">"Location"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_user_dup_location (AccountsUser *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "location", &value, NULL); + return value; +} + +/** + * accounts_user_set_location: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Location">"Location"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_location (AccountsUser *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "location", value, NULL); +} + +/** + * accounts_user_get_login_frequency: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.LoginFrequency">"LoginFrequency"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +guint64 +accounts_user_get_login_frequency (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_login_frequency (object); +} + +/** + * accounts_user_set_login_frequency: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.LoginFrequency">"LoginFrequency"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_login_frequency (AccountsUser *object, guint64 value) +{ + g_object_set (G_OBJECT (object), "login-frequency", value, NULL); +} + +/** + * accounts_user_get_icon_file: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.IconFile">"IconFile"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_user_dup_icon_file() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_user_get_icon_file (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_icon_file (object); +} + +/** + * accounts_user_dup_icon_file: (skip) + * @object: A #AccountsUser. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.IconFile">"IconFile"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_user_dup_icon_file (AccountsUser *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "icon-file", &value, NULL); + return value; +} + +/** + * accounts_user_set_icon_file: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.IconFile">"IconFile"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_icon_file (AccountsUser *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "icon-file", value, NULL); +} + +/** + * accounts_user_get_locked: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Locked">"Locked"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +accounts_user_get_locked (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_locked (object); +} + +/** + * accounts_user_set_locked: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.Locked">"Locked"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_locked (AccountsUser *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "locked", value, NULL); +} + +/** + * accounts_user_get_password_mode: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.PasswordMode">"PasswordMode"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gint +accounts_user_get_password_mode (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_password_mode (object); +} + +/** + * accounts_user_set_password_mode: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.PasswordMode">"PasswordMode"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_password_mode (AccountsUser *object, gint value) +{ + g_object_set (G_OBJECT (object), "password-mode", value, NULL); +} + +/** + * accounts_user_get_password_hint: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.PasswordHint">"PasswordHint"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use accounts_user_dup_password_hint() if on another thread.</warning> + * + * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object. + */ +const gchar * +accounts_user_get_password_hint (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_password_hint (object); +} + +/** + * accounts_user_dup_password_hint: (skip) + * @object: A #AccountsUser. + * + * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.PasswordHint">"PasswordHint"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free(). + */ +gchar * +accounts_user_dup_password_hint (AccountsUser *object) +{ + gchar *value; + g_object_get (G_OBJECT (object), "password-hint", &value, NULL); + return value; +} + +/** + * accounts_user_set_password_hint: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.PasswordHint">"PasswordHint"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_password_hint (AccountsUser *object, const gchar *value) +{ + g_object_set (G_OBJECT (object), "password-hint", value, NULL); +} + +/** + * accounts_user_get_automatic_login: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.AutomaticLogin">"AutomaticLogin"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +accounts_user_get_automatic_login (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_automatic_login (object); +} + +/** + * accounts_user_set_automatic_login: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.AutomaticLogin">"AutomaticLogin"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_automatic_login (AccountsUser *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "automatic-login", value, NULL); +} + +/** + * accounts_user_get_system_account: (skip) + * @object: A #AccountsUser. + * + * Gets the value of the <link linkend="gdbus-property-org-freedesktop-Accounts-User.SystemAccount">"SystemAccount"</link> D-Bus property. + * + * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. + * + * Returns: The property value. + */ +gboolean +accounts_user_get_system_account (AccountsUser *object) +{ + return ACCOUNTS_USER_GET_IFACE (object)->get_system_account (object); +} + +/** + * accounts_user_set_system_account: (skip) + * @object: A #AccountsUser. + * @value: The value to set. + * + * Sets the <link linkend="gdbus-property-org-freedesktop-Accounts-User.SystemAccount">"SystemAccount"</link> D-Bus property to @value. + * + * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. + */ +void +accounts_user_set_system_account (AccountsUser *object, gboolean value) +{ + g_object_set (G_OBJECT (object), "system-account", value, NULL); +} + +/** + * accounts_user_emit_changed: + * @object: A #AccountsUser. + * + * Emits the <link linkend="gdbus-signal-org-freedesktop-Accounts-User.Changed">"Changed"</link> D-Bus signal. + */ +void +accounts_user_emit_changed ( + AccountsUser *object) +{ + g_signal_emit_by_name (object, "changed"); +} + +/** + * accounts_user_call_set_user_name: + * @proxy: A #AccountsUserProxy. + * @arg_name: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetUserName">SetUserName()</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 accounts_user_call_set_user_name_finish() to get the result of the operation. + * + * See accounts_user_call_set_user_name_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_user_name ( + AccountsUser *proxy, + const gchar *arg_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetUserName", + g_variant_new ("(s)", + arg_name), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_user_name_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_user_name(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_user_name(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_user_name_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_user_name_sync: + * @proxy: A #AccountsUserProxy. + * @arg_name: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetUserName">SetUserName()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_user_name() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_user_name_sync ( + AccountsUser *proxy, + const gchar *arg_name, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetUserName", + g_variant_new ("(s)", + arg_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; +} + +/** + * accounts_user_call_set_real_name: + * @proxy: A #AccountsUserProxy. + * @arg_name: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetRealName">SetRealName()</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 accounts_user_call_set_real_name_finish() to get the result of the operation. + * + * See accounts_user_call_set_real_name_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_real_name ( + AccountsUser *proxy, + const gchar *arg_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetRealName", + g_variant_new ("(s)", + arg_name), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_real_name_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_real_name(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_real_name(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_real_name_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_real_name_sync: + * @proxy: A #AccountsUserProxy. + * @arg_name: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetRealName">SetRealName()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_real_name() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_real_name_sync ( + AccountsUser *proxy, + const gchar *arg_name, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetRealName", + g_variant_new ("(s)", + arg_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; +} + +/** + * accounts_user_call_set_email: + * @proxy: A #AccountsUserProxy. + * @arg_email: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetEmail">SetEmail()</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 accounts_user_call_set_email_finish() to get the result of the operation. + * + * See accounts_user_call_set_email_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_email ( + AccountsUser *proxy, + const gchar *arg_email, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetEmail", + g_variant_new ("(s)", + arg_email), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_email_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_email(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_email(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_email_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_email_sync: + * @proxy: A #AccountsUserProxy. + * @arg_email: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetEmail">SetEmail()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_email() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_email_sync ( + AccountsUser *proxy, + const gchar *arg_email, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetEmail", + g_variant_new ("(s)", + arg_email), + 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; +} + +/** + * accounts_user_call_set_language: + * @proxy: A #AccountsUserProxy. + * @arg_language: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLanguage">SetLanguage()</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 accounts_user_call_set_language_finish() to get the result of the operation. + * + * See accounts_user_call_set_language_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_language ( + AccountsUser *proxy, + const gchar *arg_language, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetLanguage", + g_variant_new ("(s)", + arg_language), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_language_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_language(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_language(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_language_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_language_sync: + * @proxy: A #AccountsUserProxy. + * @arg_language: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLanguage">SetLanguage()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_language() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_language_sync ( + AccountsUser *proxy, + const gchar *arg_language, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetLanguage", + g_variant_new ("(s)", + arg_language), + 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; +} + +/** + * accounts_user_call_set_xsession: + * @proxy: A #AccountsUserProxy. + * @arg_x_session: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetXSession">SetXSession()</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 accounts_user_call_set_xsession_finish() to get the result of the operation. + * + * See accounts_user_call_set_xsession_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_xsession ( + AccountsUser *proxy, + const gchar *arg_x_session, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetXSession", + g_variant_new ("(s)", + arg_x_session), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_xsession_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_xsession(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_xsession(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_xsession_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_xsession_sync: + * @proxy: A #AccountsUserProxy. + * @arg_x_session: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetXSession">SetXSession()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_xsession() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_xsession_sync ( + AccountsUser *proxy, + const gchar *arg_x_session, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetXSession", + g_variant_new ("(s)", + arg_x_session), + 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; +} + +/** + * accounts_user_call_set_location: + * @proxy: A #AccountsUserProxy. + * @arg_location: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLocation">SetLocation()</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 accounts_user_call_set_location_finish() to get the result of the operation. + * + * See accounts_user_call_set_location_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_location ( + AccountsUser *proxy, + const gchar *arg_location, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetLocation", + g_variant_new ("(s)", + arg_location), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_location_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_location(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_location(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_location_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_location_sync: + * @proxy: A #AccountsUserProxy. + * @arg_location: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLocation">SetLocation()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_location() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_location_sync ( + AccountsUser *proxy, + const gchar *arg_location, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetLocation", + g_variant_new ("(s)", + arg_location), + 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; +} + +/** + * accounts_user_call_set_home_directory: + * @proxy: A #AccountsUserProxy. + * @arg_homedir: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetHomeDirectory">SetHomeDirectory()</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 accounts_user_call_set_home_directory_finish() to get the result of the operation. + * + * See accounts_user_call_set_home_directory_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_home_directory ( + AccountsUser *proxy, + const gchar *arg_homedir, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetHomeDirectory", + g_variant_new ("(s)", + arg_homedir), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_home_directory_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_home_directory(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_home_directory(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_home_directory_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_home_directory_sync: + * @proxy: A #AccountsUserProxy. + * @arg_homedir: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetHomeDirectory">SetHomeDirectory()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_home_directory() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_home_directory_sync ( + AccountsUser *proxy, + const gchar *arg_homedir, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetHomeDirectory", + g_variant_new ("(s)", + arg_homedir), + 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; +} + +/** + * accounts_user_call_set_shell: + * @proxy: A #AccountsUserProxy. + * @arg_shell: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetShell">SetShell()</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 accounts_user_call_set_shell_finish() to get the result of the operation. + * + * See accounts_user_call_set_shell_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_shell ( + AccountsUser *proxy, + const gchar *arg_shell, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetShell", + g_variant_new ("(s)", + arg_shell), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_shell_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_shell(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_shell(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_shell_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_shell_sync: + * @proxy: A #AccountsUserProxy. + * @arg_shell: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetShell">SetShell()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_shell() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_shell_sync ( + AccountsUser *proxy, + const gchar *arg_shell, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetShell", + g_variant_new ("(s)", + arg_shell), + 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; +} + +/** + * accounts_user_call_set_icon_file: + * @proxy: A #AccountsUserProxy. + * @arg_filename: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetIconFile">SetIconFile()</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 accounts_user_call_set_icon_file_finish() to get the result of the operation. + * + * See accounts_user_call_set_icon_file_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_icon_file ( + AccountsUser *proxy, + const gchar *arg_filename, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetIconFile", + g_variant_new ("(s)", + arg_filename), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_icon_file_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_icon_file(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_icon_file(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_icon_file_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_icon_file_sync: + * @proxy: A #AccountsUserProxy. + * @arg_filename: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetIconFile">SetIconFile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_icon_file() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_icon_file_sync ( + AccountsUser *proxy, + const gchar *arg_filename, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetIconFile", + g_variant_new ("(s)", + arg_filename), + 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; +} + +/** + * accounts_user_call_set_locked: + * @proxy: A #AccountsUserProxy. + * @arg_locked: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLocked">SetLocked()</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 accounts_user_call_set_locked_finish() to get the result of the operation. + * + * See accounts_user_call_set_locked_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_locked ( + AccountsUser *proxy, + gboolean arg_locked, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetLocked", + g_variant_new ("(b)", + arg_locked), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_locked_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_locked(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_locked(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_locked_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_locked_sync: + * @proxy: A #AccountsUserProxy. + * @arg_locked: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLocked">SetLocked()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_locked() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_locked_sync ( + AccountsUser *proxy, + gboolean arg_locked, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetLocked", + g_variant_new ("(b)", + arg_locked), + 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; +} + +/** + * accounts_user_call_set_account_type: + * @proxy: A #AccountsUserProxy. + * @arg_accountType: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetAccountType">SetAccountType()</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 accounts_user_call_set_account_type_finish() to get the result of the operation. + * + * See accounts_user_call_set_account_type_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_account_type ( + AccountsUser *proxy, + gint arg_accountType, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetAccountType", + g_variant_new ("(i)", + arg_accountType), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_account_type_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_account_type(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_account_type(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_account_type_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_account_type_sync: + * @proxy: A #AccountsUserProxy. + * @arg_accountType: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetAccountType">SetAccountType()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_account_type() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_account_type_sync ( + AccountsUser *proxy, + gint arg_accountType, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetAccountType", + g_variant_new ("(i)", + arg_accountType), + 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; +} + +/** + * accounts_user_call_set_password_mode: + * @proxy: A #AccountsUserProxy. + * @arg_mode: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetPasswordMode">SetPasswordMode()</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 accounts_user_call_set_password_mode_finish() to get the result of the operation. + * + * See accounts_user_call_set_password_mode_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_password_mode ( + AccountsUser *proxy, + gint arg_mode, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetPasswordMode", + g_variant_new ("(i)", + arg_mode), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_password_mode_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_password_mode(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_password_mode(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_password_mode_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_password_mode_sync: + * @proxy: A #AccountsUserProxy. + * @arg_mode: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetPasswordMode">SetPasswordMode()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_password_mode() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_password_mode_sync ( + AccountsUser *proxy, + gint arg_mode, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetPasswordMode", + g_variant_new ("(i)", + arg_mode), + 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; +} + +/** + * accounts_user_call_set_password: + * @proxy: A #AccountsUserProxy. + * @arg_password: Argument to pass with the method invocation. + * @arg_hint: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetPassword">SetPassword()</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 accounts_user_call_set_password_finish() to get the result of the operation. + * + * See accounts_user_call_set_password_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_password ( + AccountsUser *proxy, + const gchar *arg_password, + const gchar *arg_hint, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetPassword", + g_variant_new ("(ss)", + arg_password, + arg_hint), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_password_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_password(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_password(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_password_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_password_sync: + * @proxy: A #AccountsUserProxy. + * @arg_password: Argument to pass with the method invocation. + * @arg_hint: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetPassword">SetPassword()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_password() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_password_sync ( + AccountsUser *proxy, + const gchar *arg_password, + const gchar *arg_hint, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetPassword", + g_variant_new ("(ss)", + arg_password, + arg_hint), + 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; +} + +/** + * accounts_user_call_set_automatic_login: + * @proxy: A #AccountsUserProxy. + * @arg_enabled: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. + * @user_data: User data to pass to @callback. + * + * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetAutomaticLogin">SetAutomaticLogin()</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 accounts_user_call_set_automatic_login_finish() to get the result of the operation. + * + * See accounts_user_call_set_automatic_login_sync() for the synchronous, blocking version of this method. + */ +void +accounts_user_call_set_automatic_login ( + AccountsUser *proxy, + gboolean arg_enabled, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_dbus_proxy_call (G_DBUS_PROXY (proxy), + "SetAutomaticLogin", + g_variant_new ("(b)", + arg_enabled), + G_DBUS_CALL_FLAGS_NONE, + -1, + cancellable, + callback, + user_data); +} + +/** + * accounts_user_call_set_automatic_login_finish: + * @proxy: A #AccountsUserProxy. + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_call_set_automatic_login(). + * @error: Return location for error or %NULL. + * + * Finishes an operation started with accounts_user_call_set_automatic_login(). + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_automatic_login_finish ( + AccountsUser *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; +} + +/** + * accounts_user_call_set_automatic_login_sync: + * @proxy: A #AccountsUserProxy. + * @arg_enabled: Argument to pass with the method invocation. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * + * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetAutomaticLogin">SetAutomaticLogin()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received. + * + * See accounts_user_call_set_automatic_login() for the asynchronous version of this method. + * + * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. + */ +gboolean +accounts_user_call_set_automatic_login_sync ( + AccountsUser *proxy, + gboolean arg_enabled, + GCancellable *cancellable, + GError **error) +{ + GVariant *_ret; + _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), + "SetAutomaticLogin", + g_variant_new ("(b)", + arg_enabled), + 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; +} + +/** + * accounts_user_complete_set_user_name: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetUserName">SetUserName()</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 +accounts_user_complete_set_user_name ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_real_name: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetRealName">SetRealName()</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 +accounts_user_complete_set_real_name ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_email: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetEmail">SetEmail()</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 +accounts_user_complete_set_email ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_language: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLanguage">SetLanguage()</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 +accounts_user_complete_set_language ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_xsession: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetXSession">SetXSession()</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 +accounts_user_complete_set_xsession ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_location: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLocation">SetLocation()</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 +accounts_user_complete_set_location ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_home_directory: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetHomeDirectory">SetHomeDirectory()</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 +accounts_user_complete_set_home_directory ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_shell: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetShell">SetShell()</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 +accounts_user_complete_set_shell ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_icon_file: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetIconFile">SetIconFile()</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 +accounts_user_complete_set_icon_file ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_locked: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetLocked">SetLocked()</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 +accounts_user_complete_set_locked ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_account_type: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetAccountType">SetAccountType()</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 +accounts_user_complete_set_account_type ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_password_mode: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetPasswordMode">SetPasswordMode()</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 +accounts_user_complete_set_password_mode ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_password: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetPassword">SetPassword()</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 +accounts_user_complete_set_password ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/** + * accounts_user_complete_set_automatic_login: + * @object: A #AccountsUser. + * @invocation: (transfer full): A #GDBusMethodInvocation. + * + * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-Accounts-User.SetAutomaticLogin">SetAutomaticLogin()</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 +accounts_user_complete_set_automatic_login ( + AccountsUser *object, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("()")); +} + +/* ------------------------------------------------------------------------ */ + +/** + * AccountsUserProxy: + * + * The #AccountsUserProxy structure contains only private data and should only be accessed using the provided API. + */ + +/** + * AccountsUserProxyClass: + * @parent_class: The parent class. + * + * Class structure for #AccountsUserProxy. + */ + +struct _AccountsUserProxyPrivate +{ + GData *qdata; +}; + +static void accounts_user_proxy_iface_init (AccountsUserIface *iface); + +G_DEFINE_TYPE_WITH_CODE (AccountsUserProxy, accounts_user_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (TYPE_ACCOUNTS_USER, accounts_user_proxy_iface_init)); + +static void +accounts_user_proxy_finalize (GObject *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + g_datalist_clear (&proxy->priv->qdata); + G_OBJECT_CLASS (accounts_user_proxy_parent_class)->finalize (object); +} + +static void +accounts_user_proxy_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 17); + info = _accounts_user_property_info_pointers[prop_id - 1]; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); + if (info->use_gvariant) + { + g_value_set_variant (value, variant); + } + else + { + if (variant != NULL) + g_dbus_gvariant_to_gvalue (variant, value); + } + if (variant != NULL) + g_variant_unref (variant); +} + +static void +accounts_user_proxy_set_property_cb (GDBusProxy *proxy, + GAsyncResult *res, + gpointer user_data) +{ + const _ExtendedGDBusPropertyInfo *info = user_data; + GError *error; + error = NULL; + if (!g_dbus_proxy_call_finish (proxy, res, &error)) + { + g_warning ("Error setting property `%s' on interface org.freedesktop.Accounts.User: %s (%s, %d)", + info->parent_struct.name, + error->message, g_quark_to_string (error->domain), error->code); + g_error_free (error); + } +} + +static void +accounts_user_proxy_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + const _ExtendedGDBusPropertyInfo *info; + GVariant *variant; + g_assert (prop_id != 0 && prop_id - 1 < 17); + info = _accounts_user_property_info_pointers[prop_id - 1]; + variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); + g_dbus_proxy_call (G_DBUS_PROXY (object), + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", "org.freedesktop.Accounts.User", info->parent_struct.name, variant), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, (GAsyncReadyCallback) accounts_user_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); + g_variant_unref (variant); +} + +static void +accounts_user_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) +{ + _ExtendedGDBusSignalInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint n; + guint signal_id; + info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_accounts_user_interface_info.parent_struct, signal_name); + if (info == NULL) + return; + num_params = g_variant_n_children (parameters); + paramv = g_new0 (GValue, num_params + 1); + g_value_init (¶mv[0], TYPE_ACCOUNTS_USER); + g_value_set_object (¶mv[0], proxy); + g_variant_iter_init (&iter, parameters); + n = 1; + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_ACCOUNTS_USER); + g_signal_emitv (paramv, signal_id, 0, NULL); + for (n = 0; n < num_params + 1; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static void +accounts_user_proxy_g_properties_changed (GDBusProxy *_proxy, + GVariant *changed_properties, + const gchar *const *invalidated_properties) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_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 *) &_accounts_user_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 *) &_accounts_user_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 guint64 +accounts_user_proxy_get_uid (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + guint64 value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Uid"); + if (variant != NULL) + { + value = g_variant_get_uint64 (variant); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +accounts_user_proxy_get_user_name (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "UserName"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +accounts_user_proxy_get_real_name (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "RealName"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static gint +accounts_user_proxy_get_account_type (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + gint value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AccountType"); + if (variant != NULL) + { + value = g_variant_get_int32 (variant); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +accounts_user_proxy_get_home_directory (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "HomeDirectory"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +accounts_user_proxy_get_shell (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Shell"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +accounts_user_proxy_get_email (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Email"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +accounts_user_proxy_get_language (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Language"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +accounts_user_proxy_get_xsession (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "XSession"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +accounts_user_proxy_get_location (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Location"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static guint64 +accounts_user_proxy_get_login_frequency (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + guint64 value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LoginFrequency"); + if (variant != NULL) + { + value = g_variant_get_uint64 (variant); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +accounts_user_proxy_get_icon_file (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "IconFile"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static gboolean +accounts_user_proxy_get_locked (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Locked"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static gint +accounts_user_proxy_get_password_mode (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + gint value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "PasswordMode"); + if (variant != NULL) + { + value = g_variant_get_int32 (variant); + g_variant_unref (variant); + } + return value; +} + +static const gchar * +accounts_user_proxy_get_password_hint (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + const gchar *value = NULL; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "PasswordHint"); + if (variant != NULL) + { + value = g_variant_get_string (variant, NULL); + g_variant_unref (variant); + } + return value; +} + +static gboolean +accounts_user_proxy_get_automatic_login (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "AutomaticLogin"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static gboolean +accounts_user_proxy_get_system_account (AccountsUser *object) +{ + AccountsUserProxy *proxy = ACCOUNTS_USER_PROXY (object); + GVariant *variant; + gboolean value = 0; + variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "SystemAccount"); + if (variant != NULL) + { + value = g_variant_get_boolean (variant); + g_variant_unref (variant); + } + return value; +} + +static void +accounts_user_proxy_init (AccountsUserProxy *proxy) +{ + proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_ACCOUNTS_USER_PROXY, AccountsUserProxyPrivate); + g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), accounts_user_interface_info ()); +} + +static void +accounts_user_proxy_class_init (AccountsUserProxyClass *klass) +{ + GObjectClass *gobject_class; + GDBusProxyClass *proxy_class; + + g_type_class_add_private (klass, sizeof (AccountsUserProxyPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = accounts_user_proxy_finalize; + gobject_class->get_property = accounts_user_proxy_get_property; + gobject_class->set_property = accounts_user_proxy_set_property; + + proxy_class = G_DBUS_PROXY_CLASS (klass); + proxy_class->g_signal = accounts_user_proxy_g_signal; + proxy_class->g_properties_changed = accounts_user_proxy_g_properties_changed; + + + accounts_user_override_properties (gobject_class, 1); +} + +static void +accounts_user_proxy_iface_init (AccountsUserIface *iface) +{ + iface->get_uid = accounts_user_proxy_get_uid; + iface->get_user_name = accounts_user_proxy_get_user_name; + iface->get_real_name = accounts_user_proxy_get_real_name; + iface->get_account_type = accounts_user_proxy_get_account_type; + iface->get_home_directory = accounts_user_proxy_get_home_directory; + iface->get_shell = accounts_user_proxy_get_shell; + iface->get_email = accounts_user_proxy_get_email; + iface->get_language = accounts_user_proxy_get_language; + iface->get_xsession = accounts_user_proxy_get_xsession; + iface->get_location = accounts_user_proxy_get_location; + iface->get_login_frequency = accounts_user_proxy_get_login_frequency; + iface->get_icon_file = accounts_user_proxy_get_icon_file; + iface->get_locked = accounts_user_proxy_get_locked; + iface->get_password_mode = accounts_user_proxy_get_password_mode; + iface->get_password_hint = accounts_user_proxy_get_password_hint; + iface->get_automatic_login = accounts_user_proxy_get_automatic_login; + iface->get_system_account = accounts_user_proxy_get_system_account; +} + +/** + * accounts_user_proxy_new: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Accounts-User.top_of_page">org.freedesktop.Accounts.User</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 accounts_user_proxy_new_finish() to get the result of the operation. + * + * See accounts_user_proxy_new_sync() for the synchronous, blocking version of this constructor. + */ +void +accounts_user_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_ACCOUNTS_USER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts.User", NULL); +} + +/** + * accounts_user_proxy_new_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_proxy_new(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with accounts_user_proxy_new(). + * + * Returns: (transfer full) (type AccountsUserProxy): The constructed proxy object or %NULL if @error is set. + */ +AccountsUser * +accounts_user_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 ACCOUNTS_USER (ret); + else + return NULL; +} + +/** + * accounts_user_proxy_new_sync: + * @connection: A #GDBusConnection. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Accounts-User.top_of_page">org.freedesktop.Accounts.User</link>. See g_dbus_proxy_new_sync() for more details. + * + * The calling thread is blocked until a reply is received. + * + * See accounts_user_proxy_new() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type AccountsUserProxy): The constructed proxy object or %NULL if @error is set. + */ +AccountsUser * +accounts_user_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_ACCOUNTS_USER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts.User", NULL); + if (ret != NULL) + return ACCOUNTS_USER (ret); + else + return NULL; +} + + +/** + * accounts_user_proxy_new_for_bus: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * @user_data: User data to pass to @callback. + * + * Like accounts_user_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 accounts_user_proxy_new_for_bus_finish() to get the result of the operation. + * + * See accounts_user_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. + */ +void +accounts_user_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_async_initable_new_async (TYPE_ACCOUNTS_USER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts.User", NULL); +} + +/** + * accounts_user_proxy_new_for_bus_finish: + * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to accounts_user_proxy_new_for_bus(). + * @error: Return location for error or %NULL + * + * Finishes an operation started with accounts_user_proxy_new_for_bus(). + * + * Returns: (transfer full) (type AccountsUserProxy): The constructed proxy object or %NULL if @error is set. + */ +AccountsUser * +accounts_user_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 ACCOUNTS_USER (ret); + else + return NULL; +} + +/** + * accounts_user_proxy_new_for_bus_sync: + * @bus_type: A #GBusType. + * @flags: Flags from the #GDBusProxyFlags enumeration. + * @name: A bus name (well-known or unique). + * @object_path: An object path. + * @cancellable: (allow-none): A #GCancellable or %NULL. + * @error: Return location for error or %NULL + * + * Like accounts_user_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. + * + * The calling thread is blocked until a reply is received. + * + * See accounts_user_proxy_new_for_bus() for the asynchronous version of this constructor. + * + * Returns: (transfer full) (type AccountsUserProxy): The constructed proxy object or %NULL if @error is set. + */ +AccountsUser * +accounts_user_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error) +{ + GInitable *ret; + ret = g_initable_new (TYPE_ACCOUNTS_USER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.Accounts.User", NULL); + if (ret != NULL) + return ACCOUNTS_USER (ret); + else + return NULL; +} + + +/* ------------------------------------------------------------------------ */ + +/** + * AccountsUserSkeleton: + * + * The #AccountsUserSkeleton structure contains only private data and should only be accessed using the provided API. + */ + +/** + * AccountsUserSkeletonClass: + * @parent_class: The parent class. + * + * Class structure for #AccountsUserSkeleton. + */ + +struct _AccountsUserSkeletonPrivate +{ + GValue *properties; + GList *changed_properties; + GSource *changed_properties_idle_source; + GMainContext *context; + GMutex lock; +}; + +static void +_accounts_user_skeleton_handle_method_call ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + gpointer user_data) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (user_data); + _ExtendedGDBusMethodInfo *info; + GVariantIter iter; + GVariant *child; + GValue *paramv; + guint num_params; + guint num_extra; + guint n; + guint signal_id; + GValue return_value = G_VALUE_INIT; + info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); + g_assert (info != NULL); + num_params = g_variant_n_children (parameters); + num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); + n = 0; + g_value_init (¶mv[n], TYPE_ACCOUNTS_USER); + g_value_set_object (¶mv[n++], skeleton); + g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); + g_value_set_object (¶mv[n++], invocation); + if (info->pass_fdlist) + { +#ifdef G_OS_UNIX + g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); + g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); +#else + g_assert_not_reached (); +#endif + } + g_variant_iter_init (&iter, parameters); + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; + if (arg_info->use_gvariant) + { + g_value_init (¶mv[n], G_TYPE_VARIANT); + g_value_set_variant (¶mv[n], child); + n++; + } + else + g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); + g_variant_unref (child); + } + signal_id = g_signal_lookup (info->signal_name, TYPE_ACCOUNTS_USER); + g_value_init (&return_value, G_TYPE_BOOLEAN); + g_signal_emitv (paramv, signal_id, 0, &return_value); + if (!g_value_get_boolean (&return_value)) + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); + g_value_unset (&return_value); + for (n = 0; n < num_params + num_extra; n++) + g_value_unset (¶mv[n]); + g_free (paramv); +} + +static GVariant * +_accounts_user_skeleton_handle_get_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + gpointer user_data) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_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 *) &_accounts_user_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 +_accounts_user_skeleton_handle_set_property ( + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *variant, + GError **error, + gpointer user_data) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_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 *) &_accounts_user_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 _accounts_user_skeleton_vtable = +{ + _accounts_user_skeleton_handle_method_call, + _accounts_user_skeleton_handle_get_property, + _accounts_user_skeleton_handle_set_property +}; + +static GDBusInterfaceInfo * +accounts_user_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton) +{ + return accounts_user_interface_info (); +} + +static GDBusInterfaceVTable * +accounts_user_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton) +{ + return (GDBusInterfaceVTable *) &_accounts_user_skeleton_vtable; +} + +static GVariant * +accounts_user_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (_skeleton); + + GVariantBuilder builder; + guint n; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + if (_accounts_user_interface_info.parent_struct.properties == NULL) + goto out; + for (n = 0; _accounts_user_interface_info.parent_struct.properties[n] != NULL; n++) + { + GDBusPropertyInfo *info = _accounts_user_interface_info.parent_struct.properties[n]; + if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) + { + GVariant *value; + value = _accounts_user_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.Accounts.User", info->name, NULL, skeleton); + if (value != NULL) + { + g_variant_take_ref (value); + g_variant_builder_add (&builder, "{sv}", info->name, value); + g_variant_unref (value); + } + } + } +out: + return g_variant_builder_end (&builder); +} + +static gboolean _accounts_user_emit_changed (gpointer user_data); + +static void +accounts_user_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (_skeleton); + gboolean emit_changed = FALSE; + + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties_idle_source != NULL) + { + g_source_destroy (skeleton->priv->changed_properties_idle_source); + skeleton->priv->changed_properties_idle_source = NULL; + emit_changed = TRUE; + } + g_mutex_unlock (&skeleton->priv->lock); + + if (emit_changed) + _accounts_user_emit_changed (skeleton); +} + +static void +_accounts_user_on_signal_changed ( + AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_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.freedesktop.Accounts.User", "Changed", + signal_variant, NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); +} + +static void accounts_user_skeleton_iface_init (AccountsUserIface *iface); +G_DEFINE_TYPE_WITH_CODE (AccountsUserSkeleton, accounts_user_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, + G_IMPLEMENT_INTERFACE (TYPE_ACCOUNTS_USER, accounts_user_skeleton_iface_init)); + +static void +accounts_user_skeleton_finalize (GObject *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + guint n; + for (n = 0; n < 17; n++) + g_value_unset (&skeleton->priv->properties[n]); + g_free (skeleton->priv->properties); + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + if (skeleton->priv->changed_properties_idle_source != NULL) + g_source_destroy (skeleton->priv->changed_properties_idle_source); + g_main_context_unref (skeleton->priv->context); + g_mutex_clear (&skeleton->priv->lock); + G_OBJECT_CLASS (accounts_user_skeleton_parent_class)->finalize (object); +} + +static void +accounts_user_skeleton_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 17); + g_mutex_lock (&skeleton->priv->lock); + g_value_copy (&skeleton->priv->properties[prop_id - 1], value); + g_mutex_unlock (&skeleton->priv->lock); +} + +static gboolean +_accounts_user_emit_changed (gpointer user_data) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (user_data); + GList *l; + GVariantBuilder builder; + GVariantBuilder invalidated_builder; + guint num_changes; + + g_mutex_lock (&skeleton->priv->lock); + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); + for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) + { + ChangedProperty *cp = l->data; + GVariant *variant; + const GValue *cur_value; + + cur_value = &skeleton->priv->properties[cp->prop_id - 1]; + if (!_g_value_equal (cur_value, &cp->orig_value)) + { + variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); + g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); + g_variant_unref (variant); + num_changes++; + } + } + if (num_changes > 0) + { + GList *connections, *ll; + GVariant *signal_variant; + signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.Accounts.User", + &builder, &invalidated_builder)); + connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); + for (ll = connections; ll != NULL; ll = ll->next) + { + GDBusConnection *connection = ll->data; + + g_dbus_connection_emit_signal (connection, + NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), + "org.freedesktop.DBus.Properties", + "PropertiesChanged", + signal_variant, + NULL); + } + g_variant_unref (signal_variant); + g_list_free_full (connections, g_object_unref); + } + else + { + g_variant_builder_clear (&builder); + g_variant_builder_clear (&invalidated_builder); + } + g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); + skeleton->priv->changed_properties = NULL; + skeleton->priv->changed_properties_idle_source = NULL; + g_mutex_unlock (&skeleton->priv->lock); + return FALSE; +} + +static void +_accounts_user_schedule_emit_changed (AccountsUserSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) +{ + ChangedProperty *cp; + GList *l; + cp = NULL; + for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) + { + ChangedProperty *i_cp = l->data; + if (i_cp->info == info) + { + cp = i_cp; + break; + } + } + if (cp == NULL) + { + cp = g_new0 (ChangedProperty, 1); + cp->prop_id = prop_id; + cp->info = info; + skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); + g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); + g_value_copy (orig_value, &cp->orig_value); + } +} + +static void +accounts_user_skeleton_notify (GObject *object, + GParamSpec *pspec) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + g_mutex_lock (&skeleton->priv->lock); + if (skeleton->priv->changed_properties != NULL && + skeleton->priv->changed_properties_idle_source == NULL) + { + skeleton->priv->changed_properties_idle_source = g_idle_source_new (); + g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); + g_source_set_callback (skeleton->priv->changed_properties_idle_source, _accounts_user_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); + g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); + g_source_unref (skeleton->priv->changed_properties_idle_source); + } + g_mutex_unlock (&skeleton->priv->lock); +} + +static void +accounts_user_skeleton_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + g_assert (prop_id != 0 && prop_id - 1 < 17); + g_mutex_lock (&skeleton->priv->lock); + g_object_freeze_notify (object); + if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) + { + if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) + _accounts_user_schedule_emit_changed (skeleton, _accounts_user_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); + g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); + g_object_notify_by_pspec (object, pspec); + } + g_mutex_unlock (&skeleton->priv->lock); + g_object_thaw_notify (object); +} + +static void +accounts_user_skeleton_init (AccountsUserSkeleton *skeleton) +{ + skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_ACCOUNTS_USER_SKELETON, AccountsUserSkeletonPrivate); + g_mutex_init (&skeleton->priv->lock); + skeleton->priv->context = g_main_context_ref_thread_default (); + skeleton->priv->properties = g_new0 (GValue, 17); + g_value_init (&skeleton->priv->properties[0], G_TYPE_UINT64); + g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[3], G_TYPE_INT); + g_value_init (&skeleton->priv->properties[4], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[5], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[6], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[7], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[8], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[9], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[10], G_TYPE_UINT64); + g_value_init (&skeleton->priv->properties[11], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[12], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[13], G_TYPE_INT); + g_value_init (&skeleton->priv->properties[14], G_TYPE_STRING); + g_value_init (&skeleton->priv->properties[15], G_TYPE_BOOLEAN); + g_value_init (&skeleton->priv->properties[16], G_TYPE_BOOLEAN); +} + +static guint64 +accounts_user_skeleton_get_uid (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + guint64 value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_uint64 (&(skeleton->priv->properties[0])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +accounts_user_skeleton_get_user_name (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[1])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +accounts_user_skeleton_get_real_name (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[2])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gint +accounts_user_skeleton_get_account_type (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + gint value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_int (&(skeleton->priv->properties[3])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +accounts_user_skeleton_get_home_directory (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[4])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +accounts_user_skeleton_get_shell (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[5])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +accounts_user_skeleton_get_email (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[6])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +accounts_user_skeleton_get_language (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[7])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +accounts_user_skeleton_get_xsession (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[8])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +accounts_user_skeleton_get_location (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[9])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static guint64 +accounts_user_skeleton_get_login_frequency (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + guint64 value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_uint64 (&(skeleton->priv->properties[10])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +accounts_user_skeleton_get_icon_file (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[11])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +accounts_user_skeleton_get_locked (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[12])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gint +accounts_user_skeleton_get_password_mode (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + gint value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_int (&(skeleton->priv->properties[13])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static const gchar * +accounts_user_skeleton_get_password_hint (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + const gchar *value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_string (&(skeleton->priv->properties[14])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +accounts_user_skeleton_get_automatic_login (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[15])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static gboolean +accounts_user_skeleton_get_system_account (AccountsUser *object) +{ + AccountsUserSkeleton *skeleton = ACCOUNTS_USER_SKELETON (object); + gboolean value; + g_mutex_lock (&skeleton->priv->lock); + value = g_value_get_boolean (&(skeleton->priv->properties[16])); + g_mutex_unlock (&skeleton->priv->lock); + return value; +} + +static void +accounts_user_skeleton_class_init (AccountsUserSkeletonClass *klass) +{ + GObjectClass *gobject_class; + GDBusInterfaceSkeletonClass *skeleton_class; + + g_type_class_add_private (klass, sizeof (AccountsUserSkeletonPrivate)); + + gobject_class = G_OBJECT_CLASS (klass); + gobject_class->finalize = accounts_user_skeleton_finalize; + gobject_class->get_property = accounts_user_skeleton_get_property; + gobject_class->set_property = accounts_user_skeleton_set_property; + gobject_class->notify = accounts_user_skeleton_notify; + + + accounts_user_override_properties (gobject_class, 1); + + skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); + skeleton_class->get_info = accounts_user_skeleton_dbus_interface_get_info; + skeleton_class->get_properties = accounts_user_skeleton_dbus_interface_get_properties; + skeleton_class->flush = accounts_user_skeleton_dbus_interface_flush; + skeleton_class->get_vtable = accounts_user_skeleton_dbus_interface_get_vtable; +} + +static void +accounts_user_skeleton_iface_init (AccountsUserIface *iface) +{ + iface->changed = _accounts_user_on_signal_changed; + iface->get_uid = accounts_user_skeleton_get_uid; + iface->get_user_name = accounts_user_skeleton_get_user_name; + iface->get_real_name = accounts_user_skeleton_get_real_name; + iface->get_account_type = accounts_user_skeleton_get_account_type; + iface->get_home_directory = accounts_user_skeleton_get_home_directory; + iface->get_shell = accounts_user_skeleton_get_shell; + iface->get_email = accounts_user_skeleton_get_email; + iface->get_language = accounts_user_skeleton_get_language; + iface->get_xsession = accounts_user_skeleton_get_xsession; + iface->get_location = accounts_user_skeleton_get_location; + iface->get_login_frequency = accounts_user_skeleton_get_login_frequency; + iface->get_icon_file = accounts_user_skeleton_get_icon_file; + iface->get_locked = accounts_user_skeleton_get_locked; + iface->get_password_mode = accounts_user_skeleton_get_password_mode; + iface->get_password_hint = accounts_user_skeleton_get_password_hint; + iface->get_automatic_login = accounts_user_skeleton_get_automatic_login; + iface->get_system_account = accounts_user_skeleton_get_system_account; +} + +/** + * accounts_user_skeleton_new: + * + * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-Accounts-User.top_of_page">org.freedesktop.Accounts.User</link>. + * + * Returns: (transfer full) (type AccountsUserSkeleton): The skeleton object. + */ +AccountsUser * +accounts_user_skeleton_new (void) +{ + return ACCOUNTS_USER (g_object_new (TYPE_ACCOUNTS_USER_SKELETON, NULL)); +} + diff --git a/src/dbus-user.h b/src/dbus-user.h new file mode 100644 index 0000000..87eb9ce --- /dev/null +++ b/src/dbus-user.h @@ -0,0 +1,632 @@ +/* + * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * + * The license of this code is the same as for the source it was derived from. + */ + +#ifndef __DBUS_USER_H__ +#define __DBUS_USER_H__ + +#include <gio/gio.h> + +G_BEGIN_DECLS + + +/* ------------------------------------------------------------------------ */ +/* Declarations for org.freedesktop.Accounts.User */ + +#define TYPE_ACCOUNTS_USER (accounts_user_get_type ()) +#define ACCOUNTS_USER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_ACCOUNTS_USER, AccountsUser)) +#define IS_ACCOUNTS_USER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_ACCOUNTS_USER)) +#define ACCOUNTS_USER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_ACCOUNTS_USER, AccountsUserIface)) + +struct _AccountsUser; +typedef struct _AccountsUser AccountsUser; +typedef struct _AccountsUserIface AccountsUserIface; + +struct _AccountsUserIface +{ + GTypeInterface parent_iface; + + + + gboolean (*handle_set_account_type) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + gint arg_accountType); + + gboolean (*handle_set_automatic_login) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + gboolean arg_enabled); + + gboolean (*handle_set_email) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + const gchar *arg_email); + + gboolean (*handle_set_home_directory) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + const gchar *arg_homedir); + + gboolean (*handle_set_icon_file) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + const gchar *arg_filename); + + gboolean (*handle_set_language) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + const gchar *arg_language); + + gboolean (*handle_set_location) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + const gchar *arg_location); + + gboolean (*handle_set_locked) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + gboolean arg_locked); + + gboolean (*handle_set_password) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + const gchar *arg_password, + const gchar *arg_hint); + + gboolean (*handle_set_password_mode) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + gint arg_mode); + + gboolean (*handle_set_real_name) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + const gchar *arg_name); + + gboolean (*handle_set_shell) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + const gchar *arg_shell); + + gboolean (*handle_set_user_name) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + const gchar *arg_name); + + gboolean (*handle_set_xsession) ( + AccountsUser *object, + GDBusMethodInvocation *invocation, + const gchar *arg_x_session); + + gint (*get_account_type) (AccountsUser *object); + + gboolean (*get_automatic_login) (AccountsUser *object); + + const gchar * (*get_email) (AccountsUser *object); + + const gchar * (*get_home_directory) (AccountsUser *object); + + const gchar * (*get_icon_file) (AccountsUser *object); + + const gchar * (*get_language) (AccountsUser *object); + + const gchar * (*get_location) (AccountsUser *object); + + gboolean (*get_locked) (AccountsUser *object); + + guint64 (*get_login_frequency) (AccountsUser *object); + + const gchar * (*get_password_hint) (AccountsUser *object); + + gint (*get_password_mode) (AccountsUser *object); + + const gchar * (*get_real_name) (AccountsUser *object); + + const gchar * (*get_shell) (AccountsUser *object); + + gboolean (*get_system_account) (AccountsUser *object); + + guint64 (*get_uid) (AccountsUser *object); + + const gchar * (*get_user_name) (AccountsUser *object); + + const gchar * (*get_xsession) (AccountsUser *object); + + void (*changed) ( + AccountsUser *object); + +}; + +GType accounts_user_get_type (void) G_GNUC_CONST; + +GDBusInterfaceInfo *accounts_user_interface_info (void); +guint accounts_user_override_properties (GObjectClass *klass, guint property_id_begin); + + +/* D-Bus method call completion functions: */ +void accounts_user_complete_set_user_name ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_real_name ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_email ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_language ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_xsession ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_location ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_home_directory ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_shell ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_icon_file ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_locked ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_account_type ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_password_mode ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_password ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + +void accounts_user_complete_set_automatic_login ( + AccountsUser *object, + GDBusMethodInvocation *invocation); + + + +/* D-Bus signal emissions functions: */ +void accounts_user_emit_changed ( + AccountsUser *object); + + + +/* D-Bus method calls: */ +void accounts_user_call_set_user_name ( + AccountsUser *proxy, + const gchar *arg_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_user_name_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_user_name_sync ( + AccountsUser *proxy, + const gchar *arg_name, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_real_name ( + AccountsUser *proxy, + const gchar *arg_name, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_real_name_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_real_name_sync ( + AccountsUser *proxy, + const gchar *arg_name, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_email ( + AccountsUser *proxy, + const gchar *arg_email, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_email_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_email_sync ( + AccountsUser *proxy, + const gchar *arg_email, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_language ( + AccountsUser *proxy, + const gchar *arg_language, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_language_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_language_sync ( + AccountsUser *proxy, + const gchar *arg_language, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_xsession ( + AccountsUser *proxy, + const gchar *arg_x_session, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_xsession_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_xsession_sync ( + AccountsUser *proxy, + const gchar *arg_x_session, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_location ( + AccountsUser *proxy, + const gchar *arg_location, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_location_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_location_sync ( + AccountsUser *proxy, + const gchar *arg_location, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_home_directory ( + AccountsUser *proxy, + const gchar *arg_homedir, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_home_directory_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_home_directory_sync ( + AccountsUser *proxy, + const gchar *arg_homedir, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_shell ( + AccountsUser *proxy, + const gchar *arg_shell, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_shell_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_shell_sync ( + AccountsUser *proxy, + const gchar *arg_shell, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_icon_file ( + AccountsUser *proxy, + const gchar *arg_filename, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_icon_file_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_icon_file_sync ( + AccountsUser *proxy, + const gchar *arg_filename, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_locked ( + AccountsUser *proxy, + gboolean arg_locked, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_locked_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_locked_sync ( + AccountsUser *proxy, + gboolean arg_locked, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_account_type ( + AccountsUser *proxy, + gint arg_accountType, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_account_type_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_account_type_sync ( + AccountsUser *proxy, + gint arg_accountType, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_password_mode ( + AccountsUser *proxy, + gint arg_mode, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_password_mode_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_password_mode_sync ( + AccountsUser *proxy, + gint arg_mode, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_password ( + AccountsUser *proxy, + const gchar *arg_password, + const gchar *arg_hint, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_password_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_password_sync ( + AccountsUser *proxy, + const gchar *arg_password, + const gchar *arg_hint, + GCancellable *cancellable, + GError **error); + +void accounts_user_call_set_automatic_login ( + AccountsUser *proxy, + gboolean arg_enabled, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean accounts_user_call_set_automatic_login_finish ( + AccountsUser *proxy, + GAsyncResult *res, + GError **error); + +gboolean accounts_user_call_set_automatic_login_sync ( + AccountsUser *proxy, + gboolean arg_enabled, + GCancellable *cancellable, + GError **error); + + + +/* D-Bus property accessors: */ +guint64 accounts_user_get_uid (AccountsUser *object); +void accounts_user_set_uid (AccountsUser *object, guint64 value); + +const gchar *accounts_user_get_user_name (AccountsUser *object); +gchar *accounts_user_dup_user_name (AccountsUser *object); +void accounts_user_set_user_name (AccountsUser *object, const gchar *value); + +const gchar *accounts_user_get_real_name (AccountsUser *object); +gchar *accounts_user_dup_real_name (AccountsUser *object); +void accounts_user_set_real_name (AccountsUser *object, const gchar *value); + +gint accounts_user_get_account_type (AccountsUser *object); +void accounts_user_set_account_type (AccountsUser *object, gint value); + +const gchar *accounts_user_get_home_directory (AccountsUser *object); +gchar *accounts_user_dup_home_directory (AccountsUser *object); +void accounts_user_set_home_directory (AccountsUser *object, const gchar *value); + +const gchar *accounts_user_get_shell (AccountsUser *object); +gchar *accounts_user_dup_shell (AccountsUser *object); +void accounts_user_set_shell (AccountsUser *object, const gchar *value); + +const gchar *accounts_user_get_email (AccountsUser *object); +gchar *accounts_user_dup_email (AccountsUser *object); +void accounts_user_set_email (AccountsUser *object, const gchar *value); + +const gchar *accounts_user_get_language (AccountsUser *object); +gchar *accounts_user_dup_language (AccountsUser *object); +void accounts_user_set_language (AccountsUser *object, const gchar *value); + +const gchar *accounts_user_get_xsession (AccountsUser *object); +gchar *accounts_user_dup_xsession (AccountsUser *object); +void accounts_user_set_xsession (AccountsUser *object, const gchar *value); + +const gchar *accounts_user_get_location (AccountsUser *object); +gchar *accounts_user_dup_location (AccountsUser *object); +void accounts_user_set_location (AccountsUser *object, const gchar *value); + +guint64 accounts_user_get_login_frequency (AccountsUser *object); +void accounts_user_set_login_frequency (AccountsUser *object, guint64 value); + +const gchar *accounts_user_get_icon_file (AccountsUser *object); +gchar *accounts_user_dup_icon_file (AccountsUser *object); +void accounts_user_set_icon_file (AccountsUser *object, const gchar *value); + +gboolean accounts_user_get_locked (AccountsUser *object); +void accounts_user_set_locked (AccountsUser *object, gboolean value); + +gint accounts_user_get_password_mode (AccountsUser *object); +void accounts_user_set_password_mode (AccountsUser *object, gint value); + +const gchar *accounts_user_get_password_hint (AccountsUser *object); +gchar *accounts_user_dup_password_hint (AccountsUser *object); +void accounts_user_set_password_hint (AccountsUser *object, const gchar *value); + +gboolean accounts_user_get_automatic_login (AccountsUser *object); +void accounts_user_set_automatic_login (AccountsUser *object, gboolean value); + +gboolean accounts_user_get_system_account (AccountsUser *object); +void accounts_user_set_system_account (AccountsUser *object, gboolean value); + + +/* ---- */ + +#define TYPE_ACCOUNTS_USER_PROXY (accounts_user_proxy_get_type ()) +#define ACCOUNTS_USER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_ACCOUNTS_USER_PROXY, AccountsUserProxy)) +#define ACCOUNTS_USER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_ACCOUNTS_USER_PROXY, AccountsUserProxyClass)) +#define ACCOUNTS_USER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_ACCOUNTS_USER_PROXY, AccountsUserProxyClass)) +#define IS_ACCOUNTS_USER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_ACCOUNTS_USER_PROXY)) +#define IS_ACCOUNTS_USER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_ACCOUNTS_USER_PROXY)) + +typedef struct _AccountsUserProxy AccountsUserProxy; +typedef struct _AccountsUserProxyClass AccountsUserProxyClass; +typedef struct _AccountsUserProxyPrivate AccountsUserProxyPrivate; + +struct _AccountsUserProxy +{ + /*< private >*/ + GDBusProxy parent_instance; + AccountsUserProxyPrivate *priv; +}; + +struct _AccountsUserProxyClass +{ + GDBusProxyClass parent_class; +}; + +GType accounts_user_proxy_get_type (void) G_GNUC_CONST; + +void accounts_user_proxy_new ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +AccountsUser *accounts_user_proxy_new_finish ( + GAsyncResult *res, + GError **error); +AccountsUser *accounts_user_proxy_new_sync ( + GDBusConnection *connection, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + +void accounts_user_proxy_new_for_bus ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +AccountsUser *accounts_user_proxy_new_for_bus_finish ( + GAsyncResult *res, + GError **error); +AccountsUser *accounts_user_proxy_new_for_bus_sync ( + GBusType bus_type, + GDBusProxyFlags flags, + const gchar *name, + const gchar *object_path, + GCancellable *cancellable, + GError **error); + + +/* ---- */ + +#define TYPE_ACCOUNTS_USER_SKELETON (accounts_user_skeleton_get_type ()) +#define ACCOUNTS_USER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_ACCOUNTS_USER_SKELETON, AccountsUserSkeleton)) +#define ACCOUNTS_USER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_ACCOUNTS_USER_SKELETON, AccountsUserSkeletonClass)) +#define ACCOUNTS_USER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_ACCOUNTS_USER_SKELETON, AccountsUserSkeletonClass)) +#define IS_ACCOUNTS_USER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_ACCOUNTS_USER_SKELETON)) +#define IS_ACCOUNTS_USER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_ACCOUNTS_USER_SKELETON)) + +typedef struct _AccountsUserSkeleton AccountsUserSkeleton; +typedef struct _AccountsUserSkeletonClass AccountsUserSkeletonClass; +typedef struct _AccountsUserSkeletonPrivate AccountsUserSkeletonPrivate; + +struct _AccountsUserSkeleton +{ + /*< private >*/ + GDBusInterfaceSkeleton parent_instance; + AccountsUserSkeletonPrivate *priv; +}; + +struct _AccountsUserSkeletonClass +{ + GDBusInterfaceSkeletonClass parent_class; +}; + +GType accounts_user_skeleton_get_type (void) G_GNUC_CONST; + +AccountsUser *accounts_user_skeleton_new (void); + + +G_END_DECLS + +#endif /* __DBUS_USER_H__ */ diff --git a/src/gen-session-dbus.xml.c b/src/gen-session-dbus.xml.c new file mode 100644 index 0000000..11bf4b1 --- /dev/null +++ b/src/gen-session-dbus.xml.c @@ -0,0 +1,22 @@ +const char * _session_dbus = +"<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\" \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n" +"<node name=\"/com/canonical/indicator/session/service\">\n" +" <interface name=\"com.canonical.indicator.session.service\">\n" +"\n" +" <method name=\"GetUserRealName\">\n" +" <arg name=\"name\" direction=\"out\" type=\"s\"/>\n" +" </method>\n" +" <method name=\"GetUserMenuVisibility\">\n" +" <arg name=\"update\" direction=\"out\" type=\"b\"/>\n" +" </method>\n" +" <signal name=\"UserRealNameUpdated\">\n" +" <arg name=\"name\" type=\"s\"/>\n" +" </signal>\n" +" <signal name=\"UserMenuIsVisible\">\n" +" <arg name=\"update\" type=\"b\"/>\n" +" </signal>\n" +" <signal name=\"RestartRequired\">\n" +" </signal>\n" +" </interface>\n" +"</node>\n" +; diff --git a/src/gen-session-dbus.xml.h b/src/gen-session-dbus.xml.h new file mode 100644 index 0000000..5e3c794 --- /dev/null +++ b/src/gen-session-dbus.xml.h @@ -0,0 +1 @@ +extern const char * _session_dbus; |