diff options
84 files changed, 45854 insertions, 7444 deletions
@@ -1,5 +1,407 @@ # Generated by Makefile. Do not edit. +2012-07-11 Charles Kerr <charles.kerr@canonical.com> + + bumping version to 12.10.0 + +2012-07-11 Charles Kerr <charles.kerr@canonical.com> + + fix #include in test-service + +2012-07-06 Charles Kerr <charles.kerr@canonical.com> + + only fire change events when a user property that we care about changes. + +2012-07-06 Charles Kerr <charles.kerr@canonical.com> + + if tests aren't explicitly requested, don't fail the build if dbus-test-runner isn't installed + +2012-07-06 Charles Kerr <charles.kerr@canonical.com> + + update POTFILE list + +2012-07-06 Charles Kerr <charles.kerr@canonical.com> + + Don't trigger unnecessary change events in the user proxy. + +2012-07-05 Charles Kerr <charles.kerr@canonical.com> + + copyediting + +2012-07-05 Charles Kerr <charles.kerr@canonical.com> + + copyediting + +2012-07-05 Charles Kerr <charles.kerr@canonical.com> + + Remove the etched border effect for user icons. + + They looked good before, but look cluttered with the new reduced icon size, and lessening clutter was the reason for shrinking the icons in the first place. + +2012-07-05 Charles Kerr <charles.kerr@canonical.com> + + reduce the user icon size from 32 to 24 pixels as per mpt's request. + +2012-07-04 Charles Kerr <charles.kerr@canonical.com> + + don't cache the DisplayManager seat proxy. + +2012-07-04 Charles Kerr <charles.kerr@canonical.com> + + in gtk-logout-helper, rename 'Shut Down' to 'Switch Off' to match the session indicator's text + +2012-07-04 Charles Kerr <charles.kerr@canonical.com> + + add a g_debug message to say which command is being invoked by g_spawn_command_line_async() + +2012-06-28 Charles Kerr <charles.kerr@canonical.com> + + Restore the ellipsis to the 'System Settings' label as per mpt's suggestion. + + Further reading: <https://bugzilla.gnome.org/show_bug.cgi?id=169447> + +2012-06-20 Charles Kerr <charles.kerr@canonical.com> + + copyediting + +2012-06-19 Charles Kerr <charles.kerr@canonical.com> + + copyediting + +2012-06-19 Charles Kerr <charles.kerr@canonical.com> + + the default value for show-real-name-on-panel should be 'false' + +2012-06-19 Charles Kerr <charles.kerr@canonical.com> + + Use "g_str_has_prefix(str,foo)" instead of "strlen(str)>N && !memcmp(str,foo,N)" + +2012-06-19 Charles Kerr <charles.kerr@canonical.com> + + action_func_spawn_async() doesn't need a varargs argument anymore. + +2012-06-19 Charles Kerr <charles.kerr@canonical.com> + + in build_user_menuitems(), don't leak the users GList even if user switching isn't allowed + +2012-06-19 Charles Kerr <charles.kerr@canonical.com> + + SessionMenuMgr shouldn't leak its user_menuitems GSList + +2012-06-19 Charles Kerr <charles.kerr@canonical.com> + + take a ref on the session_dbus passed into SessionMenuMgr's constructor. + +2012-06-19 Charles Kerr <charles.kerr@canonical.com> + + SessionMenuMgr should own its toplevel menuitem. + +2012-06-18 Charles Kerr <charles.kerr@canonical.com> + + clearing house: the remainder of bugfixes & readability changes + +2012-06-18 Charles Kerr <charles.kerr@canonical.com> + + copyediting: remove a lot of trailing spaces + +2012-06-18 Charles Kerr <charles.kerr@canonical.com> + + copyediting: remove trailing spaces; fix tab damage + +2012-06-18 Charles Kerr <charles.kerr@canonical.com> + + handle fringe case where GetRealUserName is called before the username's been set -- send an empty string rather than NULL s.t. the client doens't get an '[Invalid UTF-8]' string + +2012-06-17 Charles Kerr <charles.kerr@canonical.com> + + a step in merging the two menus: consolidate & clean up the code in session-menu-mgr + +2012-06-15 Charles Kerr <charles.kerr@canonical.com> + + a step in merging the two menus: merge the DeviceMenuMgr and UserMenuMgr classes into a single SessionMenuMgr class + +2012-06-14 Charles Kerr <charles.kerr@canonical.com> + + right-align the 'currently logged in' checkmark as per mpt's 12.10 spec + +2012-06-14 Charles Kerr <charles.kerr@canonical.com> + + a step in merging the two menus: initial merge of the two menus + +2012-06-14 Charles Kerr <charles.kerr@canonical.com> + + bind the IndicatorObjectEntry's label's visibility to the the setting in show-real-name-on-panel + +2012-06-14 Charles Kerr <charles.kerr@canonical.com> + + remove the use-username-in-switch-item property; it's no longer spec'ed + +2012-06-14 Charles Kerr <charles.kerr@canonical.com> + + a step in merging the two menus: in indicator-session, use one IndicatorObjectEntry instead of two + +2012-06-14 Charles Kerr <charles.kerr@canonical.com> + + a step in merging the two menus: remove the 'should show user menu' flag + +2012-06-14 Charles Kerr <charles.kerr@canonical.com> + + in copy_proxy_properties(), ensure that the 'changed-properties' variant that we emit isn't NULL + +2012-06-14 Charles Kerr <charles.kerr@canonical.com> + + use g_clear_object() + +2012-06-14 Charles Kerr <charles.kerr@canonical.com> + + in user_widget_property_update(), remove a g_message() that shouldn't've been committed + +2012-06-13 Charles Kerr <charles.kerr@canonical.com> + + in user_widget_init(), remove unused variable 'padding' + +2012-06-13 Charles Kerr <charles.kerr@canonical.com> + + in user-widget.c, remove unused function user_widget_button_release_event() + +2012-06-13 Charles Kerr <charles.kerr@canonical.com> + + Don't use all the new users that we get told about. + + The issue is fringe cases where we get notified about a user we don't want to show, such as lightdm showing up after we've switched to the greeter. Instead, let's ask org.freedesktop.Accounts for a fresh list of users so that it can apply its internal filters to the user list. + +2012-06-13 Charles Kerr <charles.kerr@canonical.com> + + fix a spurious call to g_error_free() in indicator_session_init() + +2012-06-13 Charles Kerr <charles.kerr@canonical.com> + + Have the menuitem respond to changes in the AccountsUser's ICON property + +2012-06-13 Charles Kerr <charles.kerr@canonical.com> + + Have the user widget respond to changes in the LOGGED_IN and ICON properties + +2012-06-12 Charles Kerr <charles.kerr@canonical.com> + + use GDBus in users-service-dbus.c... major rewrite here. + +2012-06-12 Charles Kerr <charles.kerr@canonical.com> + + properly respond to changes in the menuitem's USER_ITEM_PROP_LOGGED_IN property + +2012-06-09 Charles Kerr <charles.kerr@canonical.com> + + use gdbus-codegen for the UPower dbus interaction + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + start grouping Admin, Account-Switching, and Session items as per the 12.10 spec + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + Add the 'About This Computer' and 'Ubuntu Help' menuitems as per the 12.10 spec + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + remove the attached devices menuitem; it's no longer in the spec + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + fix tab damage in device-menu-mgr.c + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + remove unnecessary prototypes + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + extract methods to reduce duplicate code in handling dbus notifications that can_suspend, allow_suspend, can_hibernate, or allow_hibernate flags have changed + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + bugfix: in machine_sleep_with_context(), don't call the proxy method if we don't have a proxy + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + constify the machine_sleep_with_context() API + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + make lock_menuitem an instance variable rather than a global one so that its pointer values won't persist between test sessions. Woot, last global\! + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + make suspend_call and hibernate_call instance variables rather than global ones so that their pointer values won't persist between test sessions + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + make can_hibernate, allow_hibernate, can_suspend, and allow_suspend instance variables rather than global ones so that their pointer values won't persist between test sessions + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + reduce the scope of another formerly global variable: system_settings_menuitem + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + make up_main_proxy and up_prop_proxy instance variables rather than global ones so that their pointer values won't persist between test sessions + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + make logout_mi and shutdown_mi local variables rather than global ones so that their pointer values won't persist between test sessions + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + make hibernate_mi and suspend_mi instance variables rather than global ones so that their pointer values won't persist between test sessions + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + make keybindings_settings an instance variasble rather than a global one, so that it will get disposed properly and not persist between test sessions + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + make lockdown_settings an instance variable rather than a global one, so that it will get disposed properly and not persist between test sessions + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + bugfix: we were listening to screensaver shortcut settings changes from the wrong GSettings. + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + In device-menu-mgr.c, lockdown_changed() only exists as a pass-thru for having LOCKDOWN_KEY_USER and LOCKDOWN_KEY_SCREENSAVER changes force a menu rebuild, so eliminate the middleman and connect those property changes directly to the menu rebuild + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + remove duplicate code when updating the lock menuitem's keybindings + +2012-06-05 Charles Kerr <charles.kerr@canonical.com> + + In device-menu-mgr, remove unused context from show_system_settings_with_context() + +2012-06-04 Charles Kerr <charles.kerr@canonical.com> + + remove now-unused file accounts-service-user.xml + +2012-06-04 Charles Kerr <charles.kerr@canonical.com> + + remove our udev dependency now that we no longer use it to look at devices + +2012-06-04 Charles Kerr <charles.kerr@canonical.com> + + remove the software updates menuitem; it's no longer in the spec + +2012-06-04 Charles Kerr <charles.kerr@canonical.com> + + remove the startup applications menuitem; it's no longer in the spec + +2012-06-04 Charles Kerr <charles.kerr@canonical.com> + + remove the display menuitem; it's no longer in the spec + +2012-06-04 Charles Kerr <charles.kerr@canonical.com> + + remove the webcam menuitem; it's no longer in the spec + +2012-06-04 Charles Kerr <charles.kerr@canonical.com> + + remove the scanner menuitem; it's no longer in the spec + +2012-06-04 Charles Kerr <charles.kerr@canonical.com> + + remove the printer settings menuitem; it's no longer in the spec + +2012-06-04 Charles Kerr <charles.kerr@canonical.com> + + In user_menu_mgr_rebuild_items(), simplify the logic behind the visiblity rules + +2012-06-03 Charles Kerr <charles.kerr@canonical.com> + + bugfix: even if a UserMenuMgr was in greeter mode, it would rebuild itself in "full" mode after users on the system were added or removed. + +2012-06-03 Charles Kerr <charles.kerr@canonical.com> + + user_count is a one-time use variable, so reduce its scope from being a UserMenuMgr field to a temporary var in user_menu_mgr_rebuild_items() + +2012-06-03 Charles Kerr <charles.kerr@canonical.com> + + fix signature for compare_users_by_username() + +2012-06-03 Charles Kerr <charles.kerr@canonical.com> + + simplify is_this_guest_session() + +2012-06-03 Charles Kerr <charles.kerr@canonical.com> + + extract method: create_user_menuitem() + +2012-06-03 Charles Kerr <charles.kerr@canonical.com> + + Remove the seemingly-pointless MINIMUM_USERS constant + +2012-06-03 Charles Kerr <charles.kerr@canonical.com> + + In user-menu-mgr.c, make the static variable 'settings' a field of UserMenuMgr so that it doesn't persist between test sessions + +2012-06-03 Charles Kerr <charles.kerr@canonical.com> + + In user-menu-mgr.c, make the static variable 'switch_menuitem' a local s.t. it's not preserved between test sessions + +2012-06-03 Charles Kerr <charles.kerr@canonical.com> + + Remove unused function check_new_session() from user-menu-mgr.c + +2012-06-02 Charles Kerr <charles.kerr@canonical.com> + + In user_menu_mgr_rebuild_items(), reduce the scope of some temporary variables + +2012-06-02 Charles Kerr <charles.kerr@canonical.com> + + In user-widget.c, remove the GTK2-specific code. + +2012-06-02 Charles Kerr <charles.kerr@canonical.com> + + Add gcda/gcno to CLEANFILES s.t. 'make clean' will cover them + +2012-05-08 Charles Kerr <charles.kerr@canonical.com> + + merge lp:~charlesk/indicator-session/nogtk2 to raise the minimum gtk version to 3 + +2012-05-07 Charles Kerr <charles.kerr@canonical.com> + + remove gtk2 support + +2012-05-02 Charles Kerr <charles.kerr@canonical.com> + + merge lp:~charlesk/indicator-session/gtest to add Google Test + libdbustest + +2012-04-27 Charles Kerr <charles.kerr@canonical.com> + + use ted's suggestions for using xorg-gtest and to remove the service-test-runner.sh script + +2012-04-27 Ted Gould <ted@gould.cx> + + Switch to using the xorg-gtest main so that we're running under a dummy Xserver + +2012-04-27 Ted Gould <ted@gould.cx> + + Change the service path to be a define instead of passed on the command line + +2012-04-26 Charles Kerr <charles.kerr@canonical.com> + + sync with the other indicatorsGTest automake rules + +2012-04-26 Charles Kerr <charles.kerr@canonical.com> + + fix tyop + +2012-04-26 Charles Kerr <charles.kerr@canonical.com> + + only require GTest and libdbustest if we're building the unit tests + +2012-04-26 Charles Kerr <charles.kerr@canonical.com> + + add scaffolding for indicator-session-service Google Testing with libdbustest + 2012-04-05 Charles Kerr <charles.kerr@canonical.com> 0.3.96 diff --git a/Makefile.am b/Makefile.am index bb27c84..ad42d8e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,12 @@ SUBDIRS = \ data \ po +if BUILD_TESTS +SUBDIRS += tests +# build src first +tests: src +endif + EXTRA_DIST = autogen.sh DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall diff --git a/Makefile.in b/Makefile.in index 2d8ccef..2af9418 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,6 +17,23 @@ # Coverage targets 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@ @@ -35,6 +52,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@BUILD_TESTS_TRUE@am__append_1 = tests DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/Makefile.am.coverage $(top_srcdir)/configure \ @@ -45,8 +63,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -70,6 +88,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -79,7 +102,7 @@ ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = src data po tests DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -131,6 +154,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -140,6 +164,11 @@ 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@ @@ -152,6 +181,8 @@ 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@ @@ -163,6 +194,8 @@ 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@ @@ -231,16 +264,25 @@ 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@ @@ -290,11 +332,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = \ - src \ - data \ - po - +SUBDIRS = src data po $(am__append_1) EXTRA_DIST = autogen.sh DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall TESTS = \ @@ -629,13 +667,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -915,6 +950,8 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am +# build src first +@BUILD_TESTS_TRUE@tests: src dist-hook: @if test -d "$(top_srcdir)/.bzr"; \ @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11.3 -*- Autoconf -*- +# generated automatically by aclocal 1.11.5 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, @@ -14,8 +14,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -734,6 +734,1970 @@ else fi[]dnl ])# PKG_CHECK_MODULES +# serial 2 + +# Copyright (C) 2012 Canonical, Ltd. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# Checks whether the gtest source is available on the system. Allows for +# adjusting the include and source path. Sets have_gtest=yes if the source is +# present. Sets GTEST_CPPFLAGS and GTEST_SOURCE to the preprocessor flags and +# source location respectively. +AC_DEFUN([_CHECK_GTEST], +[ + AC_ARG_WITH([gtest-source-path], + [AS_HELP_STRING([--with-gtest-source-path], + [location of the Google test sources, defaults to /usr/src/gtest])], + [GTEST_SOURCE="$withval"; GTEST_CPPFLAGS="-I$withval/include"], + [GTEST_SOURCE="/usr/src/gtest"]) + + AC_ARG_WITH([gtest-include-path], + [AS_HELP_STRING([--with-gtest-include-path], + [location of the Google test headers])], + [GTEST_CPPFLAGS="-I$withval"]) + + GTEST_CPPFLAGS="$GTEST_CPPFLAGS -I$GTEST_SOURCE" + + AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc] + [$GTEST_SOURCE/src/gtest_main.cc], + [have_gtest=yes], + [have_gtest=no]) + + AS_IF([test "x$have_gtest_source" = xyes], + [AC_SUBST(GTEST_CPPFLAGS)] + [AC_SUBST(GTEST_SOURCE)]) +]) # _CHECK_GTEST + +# CHECK_XORG_GTEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Checks whether the xorg-gtest source is available on the system. Allows for +# adjusting the include and source path. Sets have_xorg_gtest=yes if the source +# is present. Sets XORG_GTEST_CPPFLAGS and XORG_GTEST_SOURCE to the preprocessor +# flags and source location respectively. Sets XORG_GTEST_LIBS to all the +# libraries needed to link against a built xorg-gtest library. +# +# Both default actions are no-ops. +AC_DEFUN([CHECK_XORG_GTEST], +[ + AC_REQUIRE([_CHECK_GTEST]) + + PKG_CHECK_EXISTS([xorg-gtest], + [have_xorg_gtest=yes], + [have_xorg_gtest=no]) + + XORG_GTEST_SOURCE=`$PKG_CONFIG --variable=sourcedir --print-errors xorg-gtest` + XORG_GTEST_CPPFLAGS=`$PKG_CONFIG --variable=CPPflags --print-errors xorg-gtest` + XORG_GTEST_CPPFLAGS="$GTEST_CPPFLAGS $XORG_GTEST_CPPFLAGS" + XORG_GTEST_CPPFLAGS="$XORG_GTEST_CPPFLAGS -I$XORG_GTEST_SOURCE" + + PKG_CHECK_MODULES(X11, [x11], [have_x11=yes], [have_x11=no]) + + # Check if we should include support for utouch-evemu + AC_ARG_WITH([evemu], + [AS_HELP_STRING([--with-evemu], + [support Linux input device recording playback + (default: enabled if available)])], + [], + [with_evemu=check]) + + AS_IF([test "x$with_evemu" = xyes], + [PKG_CHECK_MODULES(EVEMU, [utouch-evemu], [have_xorg_gtest_evemu=yes])], + [test "x$with_evemu" = xcheck], + [PKG_CHECK_MODULES(EVEMU, + [utouch-evemu], + [have_xorg_gtest_evemu=yes], + [have_xorg_gtest_evemu=no])]) + AS_IF([test "x$have_xorg_gtest_evemu" = xyes], + [XORG_GTEST_CPPFLAGS="$XORG_GTEST_CPPFLAGS -DHAVE_EVEMU"]) + + AS_IF([test "x$have_gtest" != xyes -o "x$have_x11" != xyes], + [have_xorg_gtest=no]) + + AS_IF([test "x$have_xorg_gtest" = xyes], + [AC_SUBST(XORG_GTEST_SOURCE)] + [AC_SUBST(XORG_GTEST_CPPFLAGS)] + + # Get BASE_CXXFLAGS and STRICT_CXXFLAGS + [XORG_MACROS_VERSION(1.17)] + [AC_LANG_PUSH([C++])] + [XORG_STRICT_OPTION] + [AC_LANG_POP] + [$1], + [$2]) + +]) # CHECK_XORG_GTEST + +dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. +dnl +dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the "Software"), +dnl to deal in the Software without restriction, including without limitation +dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, +dnl and/or sell copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice (including the next +dnl paragraph) shall be included in all copies or substantial portions of the +dnl Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +dnl DEALINGS IN THE SOFTWARE. + +# XORG_MACROS_VERSION(required-version) +# ------------------------------------- +# Minimum version: 1.1.0 +# +# If you're using a macro added in Version 1.1 or newer, include this in +# your configure.ac with the minimum required version, such as: +# XORG_MACROS_VERSION(1.1) +# +# To ensure that this macro is defined, also add: +# m4_ifndef([XORG_MACROS_VERSION], +# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +# +# +# See the "minimum version" comment for each macro you use to see what +# version you require. +m4_defun([XORG_MACROS_VERSION],[ +m4_define([vers_have], [1.17]) +m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) +m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) +m4_if(m4_cmp(maj_have, maj_needed), 0,, + [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) +m4_if(m4_version_compare(vers_have, [$1]), -1, + [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) +m4_undefine([vers_have]) +m4_undefine([maj_have]) +m4_undefine([maj_needed]) +]) # XORG_MACROS_VERSION + +# XORG_PROG_RAWCPP() +# ------------------ +# Minimum version: 1.0.0 +# +# Find cpp program and necessary flags for use in pre-processing text files +# such as man pages and config files +AC_DEFUN([XORG_PROG_RAWCPP],[ +AC_REQUIRE([AC_PROG_CPP]) +AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], + [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) + +# Check for flag to avoid builtin definitions - assumes unix is predefined, +# which is not the best choice for supporting other OS'es, but covers most +# of the ones we need for now. +AC_MSG_CHECKING([if $RAWCPP requires -undef]) +AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + AC_MSG_RESULT([no]) +else + if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS=-undef + AC_MSG_RESULT([yes]) + # under Cygwin unix is still defined even with -undef + elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS="-undef -ansi" + AC_MSG_RESULT([yes, with -ansi]) + else + AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) + fi +fi +rm -f conftest.$ac_ext + +AC_MSG_CHECKING([if $RAWCPP requires -traditional]) +AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + AC_MSG_RESULT([no]) +else + if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) + fi +fi +rm -f conftest.$ac_ext +AC_SUBST(RAWCPPFLAGS) +]) # XORG_PROG_RAWCPP + +# XORG_MANPAGE_SECTIONS() +# ----------------------- +# Minimum version: 1.0.0 +# +# Determine which sections man pages go in for the different man page types +# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. +# Not sure if there's any better way than just hardcoding by OS name. +# Override default settings by setting environment variables +# Added MAN_SUBSTS in version 1.8 +# Added AC_PROG_SED in version 1.8 + +AC_DEFUN([XORG_MANPAGE_SECTIONS],[ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_SED]) + +if test x$APP_MAN_SUFFIX = x ; then + APP_MAN_SUFFIX=1 +fi +if test x$APP_MAN_DIR = x ; then + APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' +fi + +if test x$LIB_MAN_SUFFIX = x ; then + LIB_MAN_SUFFIX=3 +fi +if test x$LIB_MAN_DIR = x ; then + LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' +fi + +if test x$FILE_MAN_SUFFIX = x ; then + case $host_os in + solaris*) FILE_MAN_SUFFIX=4 ;; + *) FILE_MAN_SUFFIX=5 ;; + esac +fi +if test x$FILE_MAN_DIR = x ; then + FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' +fi + +if test x$MISC_MAN_SUFFIX = x ; then + case $host_os in + solaris*) MISC_MAN_SUFFIX=5 ;; + *) MISC_MAN_SUFFIX=7 ;; + esac +fi +if test x$MISC_MAN_DIR = x ; then + MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' +fi + +if test x$DRIVER_MAN_SUFFIX = x ; then + case $host_os in + solaris*) DRIVER_MAN_SUFFIX=7 ;; + *) DRIVER_MAN_SUFFIX=4 ;; + esac +fi +if test x$DRIVER_MAN_DIR = x ; then + DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +fi + +if test x$ADMIN_MAN_SUFFIX = x ; then + case $host_os in + solaris*) ADMIN_MAN_SUFFIX=1m ;; + *) ADMIN_MAN_SUFFIX=8 ;; + esac +fi +if test x$ADMIN_MAN_DIR = x ; then + ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' +fi + + +AC_SUBST([APP_MAN_SUFFIX]) +AC_SUBST([LIB_MAN_SUFFIX]) +AC_SUBST([FILE_MAN_SUFFIX]) +AC_SUBST([MISC_MAN_SUFFIX]) +AC_SUBST([DRIVER_MAN_SUFFIX]) +AC_SUBST([ADMIN_MAN_SUFFIX]) +AC_SUBST([APP_MAN_DIR]) +AC_SUBST([LIB_MAN_DIR]) +AC_SUBST([FILE_MAN_DIR]) +AC_SUBST([MISC_MAN_DIR]) +AC_SUBST([DRIVER_MAN_DIR]) +AC_SUBST([ADMIN_MAN_DIR]) + +XORG_MAN_PAGE="X Version 11" +AC_SUBST([XORG_MAN_PAGE]) +MAN_SUBSTS="\ + -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ + -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ + -e 's|__xservername__|Xorg|g' \ + -e 's|__xconfigfile__|xorg.conf|g' \ + -e 's|__projectroot__|\$(prefix)|g' \ + -e 's|__apploaddir__|\$(appdefaultdir)|g' \ + -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ + -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ + -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ + -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ + -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ + -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" +AC_SUBST([MAN_SUBSTS]) + +]) # XORG_MANPAGE_SECTIONS + +# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) +# ------------------------ +# Minimum version: 1.7.0 +# +# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent +# provided by xorg-sgml-doctools, if installed. +AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ +AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) +XORG_SGML_PATH= +PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], + [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], + [m4_ifval([$1],[:], + [if test x"$cross_compiling" != x"yes" ; then + AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], + [XORG_SGML_PATH=$prefix/share/sgml]) + fi]) + ]) + +# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing +# the path and the name of the doc stylesheet +if test "x$XORG_SGML_PATH" != "x" ; then + AC_MSG_RESULT([$XORG_SGML_PATH]) + STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 + XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl +else + AC_MSG_RESULT([no]) +fi + +AC_SUBST(XORG_SGML_PATH) +AC_SUBST(STYLESHEET_SRCDIR) +AC_SUBST(XSL_STYLESHEET) +AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) +]) # XORG_CHECK_SGML_DOCTOOLS + +# XORG_CHECK_LINUXDOC +# ------------------- +# Minimum version: 1.0.0 +# +# Defines the variable MAKE_TEXT if the necessary tools and +# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. +# Whether or not the necessary tools and files are found can be checked +# with the AM_CONDITIONAL "BUILD_LINUXDOC" +AC_DEFUN([XORG_CHECK_LINUXDOC],[ +AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) +AC_REQUIRE([XORG_WITH_PS2PDF]) + +AC_PATH_PROG(LINUXDOC, linuxdoc) + +AC_MSG_CHECKING([whether to build documentation]) + +if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then + BUILDDOC=yes +else + BUILDDOC=no +fi + +AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) + +AC_MSG_RESULT([$BUILDDOC]) + +AC_MSG_CHECKING([whether to build pdf documentation]) + +if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +else + BUILDPDFDOC=no +fi + +AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) + +AC_MSG_RESULT([$BUILDPDFDOC]) + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" +MAKE_PDF="$PS2PDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" + +AC_SUBST(MAKE_TEXT) +AC_SUBST(MAKE_PS) +AC_SUBST(MAKE_PDF) +AC_SUBST(MAKE_HTML) +]) # XORG_CHECK_LINUXDOC + +# XORG_CHECK_DOCBOOK +# ------------------- +# Minimum version: 1.0.0 +# +# Checks for the ability to build output formats from SGML DocBook source. +# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" +# indicates whether the necessary tools and files are found and, if set, +# $(MAKE_XXX) blah.sgml will produce blah.xxx. +AC_DEFUN([XORG_CHECK_DOCBOOK],[ +AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) + +BUILDTXTDOC=no +BUILDPDFDOC=no +BUILDPSDOC=no +BUILDHTMLDOC=no + +AC_PATH_PROG(DOCBOOKPS, docbook2ps) +AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) +AC_PATH_PROG(DOCBOOKHTML, docbook2html) +AC_PATH_PROG(DOCBOOKTXT, docbook2txt) + +AC_MSG_CHECKING([whether to build text documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && + test x$BUILD_TXTDOC != xno; then + BUILDTXTDOC=yes +fi +AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) +AC_MSG_RESULT([$BUILDTXTDOC]) + +AC_MSG_CHECKING([whether to build PDF documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && + test x$BUILD_PDFDOC != xno; then + BUILDPDFDOC=yes +fi +AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) +AC_MSG_RESULT([$BUILDPDFDOC]) + +AC_MSG_CHECKING([whether to build PostScript documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && + test x$BUILD_PSDOC != xno; then + BUILDPSDOC=yes +fi +AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) +AC_MSG_RESULT([$BUILDPSDOC]) + +AC_MSG_CHECKING([whether to build HTML documentation]) +if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && + test x$BUILD_HTMLDOC != xno; then + BUILDHTMLDOC=yes +fi +AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) +AC_MSG_RESULT([$BUILDHTMLDOC]) + +MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" +MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" +MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" +MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" + +AC_SUBST(MAKE_TEXT) +AC_SUBST(MAKE_PS) +AC_SUBST(MAKE_PDF) +AC_SUBST(MAKE_HTML) +]) # XORG_CHECK_DOCBOOK + +# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) +# ---------------- +# Minimum version: 1.5.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-xmlto option, it allows maximum flexibilty in making decisions +# as whether or not to use the xmlto package. When DEFAULT is not specified, +# --with-xmlto assumes 'auto'. +# +# Interface to module: +# HAVE_XMLTO: used in makefiles to conditionally generate documentation +# XMLTO: returns the path of the xmlto program found +# returns the path set by the user in the environment +# --with-xmlto: 'yes' user instructs the module to use xmlto +# 'no' user instructs the module not to use xmlto +# +# Added in version 1.10.0 +# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation +# xmlto for text output requires either lynx, links, or w3m browsers +# +# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_XMLTO],[ +AC_ARG_VAR([XMLTO], [Path to xmlto command]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(xmlto, + AS_HELP_STRING([--with-xmlto], + [Use xmlto to regenerate documentation (default: ]_defopt[)]), + [use_xmlto=$withval], [use_xmlto=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_xmlto" = x"auto"; then + AC_PATH_PROG([XMLTO], [xmlto]) + if test "x$XMLTO" = "x"; then + AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) + have_xmlto=no + else + have_xmlto=yes + fi +elif test "x$use_xmlto" = x"yes" ; then + AC_PATH_PROG([XMLTO], [xmlto]) + if test "x$XMLTO" = "x"; then + AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) + fi + have_xmlto=yes +elif test "x$use_xmlto" = x"no" ; then + if test "x$XMLTO" != "x"; then + AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) + fi + have_xmlto=no +else + AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) +fi + +# Test for a minimum version of xmlto, if provided. +m4_ifval([$1], +[if test "$have_xmlto" = yes; then + # scrape the xmlto version + AC_MSG_CHECKING([the xmlto version]) + xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` + AC_MSG_RESULT([$xmlto_version]) + AS_VERSION_COMPARE([$xmlto_version], [$1], + [if test "x$use_xmlto" = xauto; then + AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) + have_xmlto=no + else + AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) + fi]) +fi]) + +# Test for the ability of xmlto to generate a text target +have_xmlto_text=no +cat > conftest.xml << "EOF" +EOF +AS_IF([test "$have_xmlto" = yes], + [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], + [have_xmlto_text=yes], + [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) +rm -f conftest.xml +AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) +AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) +]) # XORG_WITH_XMLTO + +# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) +# -------------------------------------------- +# Minimum version: 1.12.0 +# Minimum version for optional DEFAULT argument: 1.12.0 +# +# XSLT (Extensible Stylesheet Language Transformations) is a declarative, +# XML-based language used for the transformation of XML documents. +# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. +# It is used under the cover by xmlto to generate html files from DocBook/XML. +# The XSLT processor is often used as a standalone tool for transformations. +# It should not be assumed that this tool is used only to work with documnetation. +# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. +# +# Interface to module: +# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation +# XSLTPROC: returns the path of the xsltproc program found +# returns the path set by the user in the environment +# --with-xsltproc: 'yes' user instructs the module to use xsltproc +# 'no' user instructs the module not to use xsltproc +# have_xsltproc: returns yes if xsltproc found in PATH or no +# +# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_XSLTPROC],[ +AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) +# Preserves the interface, should it be implemented later +m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(xsltproc, + AS_HELP_STRING([--with-xsltproc], + [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), + [use_xsltproc=$withval], [use_xsltproc=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_xsltproc" = x"auto"; then + AC_PATH_PROG([XSLTPROC], [xsltproc]) + if test "x$XSLTPROC" = "x"; then + AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) + have_xsltproc=no + else + have_xsltproc=yes + fi +elif test "x$use_xsltproc" = x"yes" ; then + AC_PATH_PROG([XSLTPROC], [xsltproc]) + if test "x$XSLTPROC" = "x"; then + AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) + fi + have_xsltproc=yes +elif test "x$use_xsltproc" = x"no" ; then + if test "x$XSLTPROC" != "x"; then + AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) + fi + have_xsltproc=no +else + AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) +fi + +AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) +]) # XORG_WITH_XSLTPROC + +# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) +# ---------------------------------------- +# Minimum version: 1.15.0 +# +# PERL (Practical Extraction and Report Language) is a language optimized for +# scanning arbitrary text files, extracting information from those text files, +# and printing reports based on that information. +# +# When DEFAULT is not specified, --with-perl assumes 'auto'. +# +# Interface to module: +# HAVE_PERL: used in makefiles to conditionally scan text files +# PERL: returns the path of the perl program found +# returns the path set by the user in the environment +# --with-perl: 'yes' user instructs the module to use perl +# 'no' user instructs the module not to use perl +# have_perl: returns yes if perl found in PATH or no +# +# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_PERL],[ +AC_ARG_VAR([PERL], [Path to perl command]) +# Preserves the interface, should it be implemented later +m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(perl, + AS_HELP_STRING([--with-perl], + [Use perl for extracting information from files (default: ]_defopt[)]), + [use_perl=$withval], [use_perl=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_perl" = x"auto"; then + AC_PATH_PROG([PERL], [perl]) + if test "x$PERL" = "x"; then + AC_MSG_WARN([perl not found - cannot extract information and report]) + have_perl=no + else + have_perl=yes + fi +elif test "x$use_perl" = x"yes" ; then + AC_PATH_PROG([PERL], [perl]) + if test "x$PERL" = "x"; then + AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) + fi + have_perl=yes +elif test "x$use_perl" = x"no" ; then + if test "x$PERL" != "x"; then + AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) + fi + have_perl=no +else + AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) +fi + +AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) +]) # XORG_WITH_PERL + +# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) +# ---------------- +# Minimum version: 1.5.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-asciidoc option, it allows maximum flexibilty in making decisions +# as whether or not to use the asciidoc package. When DEFAULT is not specified, +# --with-asciidoc assumes 'auto'. +# +# Interface to module: +# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation +# ASCIIDOC: returns the path of the asciidoc program found +# returns the path set by the user in the environment +# --with-asciidoc: 'yes' user instructs the module to use asciidoc +# 'no' user instructs the module not to use asciidoc +# +# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_ASCIIDOC],[ +AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(asciidoc, + AS_HELP_STRING([--with-asciidoc], + [Use asciidoc to regenerate documentation (default: ]_defopt[)]), + [use_asciidoc=$withval], [use_asciidoc=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_asciidoc" = x"auto"; then + AC_PATH_PROG([ASCIIDOC], [asciidoc]) + if test "x$ASCIIDOC" = "x"; then + AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) + have_asciidoc=no + else + have_asciidoc=yes + fi +elif test "x$use_asciidoc" = x"yes" ; then + AC_PATH_PROG([ASCIIDOC], [asciidoc]) + if test "x$ASCIIDOC" = "x"; then + AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) + fi + have_asciidoc=yes +elif test "x$use_asciidoc" = x"no" ; then + if test "x$ASCIIDOC" != "x"; then + AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) + fi + have_asciidoc=no +else + AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) +fi +m4_ifval([$1], +[if test "$have_asciidoc" = yes; then + # scrape the asciidoc version + AC_MSG_CHECKING([the asciidoc version]) + asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` + AC_MSG_RESULT([$asciidoc_version]) + AS_VERSION_COMPARE([$asciidoc_version], [$1], + [if test "x$use_asciidoc" = xauto; then + AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) + have_asciidoc=no + else + AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) + fi]) +fi]) +AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) +]) # XORG_WITH_ASCIIDOC + +# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) +# -------------------------------- +# Minimum version: 1.5.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-doxygen option, it allows maximum flexibilty in making decisions +# as whether or not to use the doxygen package. When DEFAULT is not specified, +# --with-doxygen assumes 'auto'. +# +# Interface to module: +# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation +# DOXYGEN: returns the path of the doxygen program found +# returns the path set by the user in the environment +# --with-doxygen: 'yes' user instructs the module to use doxygen +# 'no' user instructs the module not to use doxygen +# +# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_DOXYGEN],[ +AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(doxygen, + AS_HELP_STRING([--with-doxygen], + [Use doxygen to regenerate documentation (default: ]_defopt[)]), + [use_doxygen=$withval], [use_doxygen=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_doxygen" = x"auto"; then + AC_PATH_PROG([DOXYGEN], [doxygen]) + if test "x$DOXYGEN" = "x"; then + AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) + have_doxygen=no + else + have_doxygen=yes + fi +elif test "x$use_doxygen" = x"yes" ; then + AC_PATH_PROG([DOXYGEN], [doxygen]) + if test "x$DOXYGEN" = "x"; then + AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) + fi + have_doxygen=yes +elif test "x$use_doxygen" = x"no" ; then + if test "x$DOXYGEN" != "x"; then + AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) + fi + have_doxygen=no +else + AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) +fi +m4_ifval([$1], +[if test "$have_doxygen" = yes; then + # scrape the doxygen version + AC_MSG_CHECKING([the doxygen version]) + doxygen_version=`$DOXYGEN --version 2>/dev/null` + AC_MSG_RESULT([$doxygen_version]) + AS_VERSION_COMPARE([$doxygen_version], [$1], + [if test "x$use_doxygen" = xauto; then + AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) + have_doxygen=no + else + AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) + fi]) +fi]) +AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) +]) # XORG_WITH_DOXYGEN + +# XORG_WITH_GROFF([DEFAULT]) +# ---------------- +# Minimum version: 1.6.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-groff option, it allows maximum flexibilty in making decisions +# as whether or not to use the groff package. When DEFAULT is not specified, +# --with-groff assumes 'auto'. +# +# Interface to module: +# HAVE_GROFF: used in makefiles to conditionally generate documentation +# HAVE_GROFF_MM: the memorandum macros (-mm) package +# HAVE_GROFF_MS: the -ms macros package +# GROFF: returns the path of the groff program found +# returns the path set by the user in the environment +# --with-groff: 'yes' user instructs the module to use groff +# 'no' user instructs the module not to use groff +# +# Added in version 1.9.0: +# HAVE_GROFF_HTML: groff has dependencies to output HTML format: +# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. +# psselect from the psutils package. +# the ghostcript package. Refer to the grohtml man pages +# +# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. +# +# OS and distros often splits groff in a basic and full package, the former +# having the groff program and the later having devices, fonts and macros +# Checking for the groff executable is not enough. +# +# If macros are missing, we cannot assume that groff is useless, so we don't +# unset HAVE_GROFF or GROFF env variables. +# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. +# +AC_DEFUN([XORG_WITH_GROFF],[ +AC_ARG_VAR([GROFF], [Path to groff command]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_WITH(groff, + AS_HELP_STRING([--with-groff], + [Use groff to regenerate documentation (default: ]_defopt[)]), + [use_groff=$withval], [use_groff=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_groff" = x"auto"; then + AC_PATH_PROG([GROFF], [groff]) + if test "x$GROFF" = "x"; then + AC_MSG_WARN([groff not found - documentation targets will be skipped]) + have_groff=no + else + have_groff=yes + fi +elif test "x$use_groff" = x"yes" ; then + AC_PATH_PROG([GROFF], [groff]) + if test "x$GROFF" = "x"; then + AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) + fi + have_groff=yes +elif test "x$use_groff" = x"no" ; then + if test "x$GROFF" != "x"; then + AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) + fi + have_groff=no +else + AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) +fi + +# We have groff, test for the presence of the macro packages +if test "x$have_groff" = x"yes"; then + AC_MSG_CHECKING([for ${GROFF} -ms macros]) + if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then + groff_ms_works=yes + else + groff_ms_works=no + fi + AC_MSG_RESULT([$groff_ms_works]) + AC_MSG_CHECKING([for ${GROFF} -mm macros]) + if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then + groff_mm_works=yes + else + groff_mm_works=no + fi + AC_MSG_RESULT([$groff_mm_works]) +fi + +# We have groff, test for HTML dependencies, one command per package +if test "x$have_groff" = x"yes"; then + AC_PATH_PROGS(GS_PATH, [gs gswin32c]) + AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) + AC_PATH_PROG(PSSELECT_PATH, [psselect]) + if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then + have_groff_html=yes + else + have_groff_html=no + AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) + fi +fi + +# Set Automake conditionals for Makefiles +AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) +AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) +AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) +AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) +]) # XORG_WITH_GROFF + +# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) +# --------------------------------------- +# Minimum version: 1.6.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# Minimum version for optional MIN-VERSION argument: 1.15.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-fop option, it allows maximum flexibilty in making decisions +# as whether or not to use the fop package. When DEFAULT is not specified, +# --with-fop assumes 'auto'. +# +# Interface to module: +# HAVE_FOP: used in makefiles to conditionally generate documentation +# FOP: returns the path of the fop program found +# returns the path set by the user in the environment +# --with-fop: 'yes' user instructs the module to use fop +# 'no' user instructs the module not to use fop +# +# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_FOP],[ +AC_ARG_VAR([FOP], [Path to fop command]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(fop, + AS_HELP_STRING([--with-fop], + [Use fop to regenerate documentation (default: ]_defopt[)]), + [use_fop=$withval], [use_fop=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_fop" = x"auto"; then + AC_PATH_PROG([FOP], [fop]) + if test "x$FOP" = "x"; then + AC_MSG_WARN([fop not found - documentation targets will be skipped]) + have_fop=no + else + have_fop=yes + fi +elif test "x$use_fop" = x"yes" ; then + AC_PATH_PROG([FOP], [fop]) + if test "x$FOP" = "x"; then + AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) + fi + have_fop=yes +elif test "x$use_fop" = x"no" ; then + if test "x$FOP" != "x"; then + AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) + fi + have_fop=no +else + AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) +fi + +# Test for a minimum version of fop, if provided. +m4_ifval([$1], +[if test "$have_fop" = yes; then + # scrape the fop version + AC_MSG_CHECKING([for fop minimum version]) + fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` + AC_MSG_RESULT([$fop_version]) + AS_VERSION_COMPARE([$fop_version], [$1], + [if test "x$use_fop" = xauto; then + AC_MSG_WARN([fop version $fop_version found, but $1 needed]) + have_fop=no + else + AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) + fi]) +fi]) +AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) +]) # XORG_WITH_FOP + +# XORG_WITH_PS2PDF([DEFAULT]) +# ---------------- +# Minimum version: 1.6.0 +# Minimum version for optional DEFAULT argument: 1.11.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a module to test for the +# presence of the tool and obtain it's path in separate variables. Coupled with +# the --with-ps2pdf option, it allows maximum flexibilty in making decisions +# as whether or not to use the ps2pdf package. When DEFAULT is not specified, +# --with-ps2pdf assumes 'auto'. +# +# Interface to module: +# HAVE_PS2PDF: used in makefiles to conditionally generate documentation +# PS2PDF: returns the path of the ps2pdf program found +# returns the path set by the user in the environment +# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf +# 'no' user instructs the module not to use ps2pdf +# +# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. +# +AC_DEFUN([XORG_WITH_PS2PDF],[ +AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_WITH(ps2pdf, + AS_HELP_STRING([--with-ps2pdf], + [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), + [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) +m4_undefine([_defopt]) + +if test "x$use_ps2pdf" = x"auto"; then + AC_PATH_PROG([PS2PDF], [ps2pdf]) + if test "x$PS2PDF" = "x"; then + AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) + have_ps2pdf=no + else + have_ps2pdf=yes + fi +elif test "x$use_ps2pdf" = x"yes" ; then + AC_PATH_PROG([PS2PDF], [ps2pdf]) + if test "x$PS2PDF" = "x"; then + AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) + fi + have_ps2pdf=yes +elif test "x$use_ps2pdf" = x"no" ; then + if test "x$PS2PDF" != "x"; then + AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) + fi + have_ps2pdf=no +else + AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) +fi +AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) +]) # XORG_WITH_PS2PDF + +# XORG_ENABLE_DOCS (enable_docs=yes) +# ---------------- +# Minimum version: 1.6.0 +# +# Documentation tools are not always available on all platforms and sometimes +# not at the appropriate level. This macro enables a builder to skip all +# documentation targets except traditional man pages. +# Combined with the specific tool checking macros XORG_WITH_*, it provides +# maximum flexibilty in controlling documentation building. +# Refer to: +# XORG_WITH_XMLTO --with-xmlto +# XORG_WITH_ASCIIDOC --with-asciidoc +# XORG_WITH_DOXYGEN --with-doxygen +# XORG_WITH_FOP --with-fop +# XORG_WITH_GROFF --with-groff +# XORG_WITH_PS2PDF --with-ps2pdf +# +# Interface to module: +# ENABLE_DOCS: used in makefiles to conditionally generate documentation +# --enable-docs: 'yes' user instructs the module to generate docs +# 'no' user instructs the module not to generate docs +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_DOCS],[ +m4_define([docs_default], m4_default([$1], [yes])) +AC_ARG_ENABLE(docs, + AS_HELP_STRING([--enable-docs], + [Enable building the documentation (default: ]docs_default[)]), + [build_docs=$enableval], [build_docs=]docs_default) +m4_undefine([docs_default]) +AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) +AC_MSG_CHECKING([whether to build documentation]) +AC_MSG_RESULT([$build_docs]) +]) # XORG_ENABLE_DOCS + +# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) +# ---------------- +# Minimum version: 1.6.0 +# +# This macro enables a builder to skip all developer documentation. +# Combined with the specific tool checking macros XORG_WITH_*, it provides +# maximum flexibilty in controlling documentation building. +# Refer to: +# XORG_WITH_XMLTO --with-xmlto +# XORG_WITH_ASCIIDOC --with-asciidoc +# XORG_WITH_DOXYGEN --with-doxygen +# XORG_WITH_FOP --with-fop +# XORG_WITH_GROFF --with-groff +# XORG_WITH_PS2PDF --with-ps2pdf +# +# Interface to module: +# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs +# --enable-devel-docs: 'yes' user instructs the module to generate developer docs +# 'no' user instructs the module not to generate developer docs +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ +m4_define([devel_default], m4_default([$1], [yes])) +AC_ARG_ENABLE(devel-docs, + AS_HELP_STRING([--enable-devel-docs], + [Enable building the developer documentation (default: ]devel_default[)]), + [build_devel_docs=$enableval], [build_devel_docs=]devel_default) +m4_undefine([devel_default]) +AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) +AC_MSG_CHECKING([whether to build developer documentation]) +AC_MSG_RESULT([$build_devel_docs]) +]) # XORG_ENABLE_DEVEL_DOCS + +# XORG_ENABLE_SPECS (enable_specs=yes) +# ---------------- +# Minimum version: 1.6.0 +# +# This macro enables a builder to skip all functional specification targets. +# Combined with the specific tool checking macros XORG_WITH_*, it provides +# maximum flexibilty in controlling documentation building. +# Refer to: +# XORG_WITH_XMLTO --with-xmlto +# XORG_WITH_ASCIIDOC --with-asciidoc +# XORG_WITH_DOXYGEN --with-doxygen +# XORG_WITH_FOP --with-fop +# XORG_WITH_GROFF --with-groff +# XORG_WITH_PS2PDF --with-ps2pdf +# +# Interface to module: +# ENABLE_SPECS: used in makefiles to conditionally generate specs +# --enable-specs: 'yes' user instructs the module to generate specs +# 'no' user instructs the module not to generate specs +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_SPECS],[ +m4_define([spec_default], m4_default([$1], [yes])) +AC_ARG_ENABLE(specs, + AS_HELP_STRING([--enable-specs], + [Enable building the specs (default: ]spec_default[)]), + [build_specs=$enableval], [build_specs=]spec_default) +m4_undefine([spec_default]) +AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) +AC_MSG_CHECKING([whether to build functional specifications]) +AC_MSG_RESULT([$build_specs]) +]) # XORG_ENABLE_SPECS + +# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) +# ---------------------------------------------- +# Minimum version: 1.13.0 +# +# This macro enables a builder to enable/disable unit testing +# It makes no assumption about the test cases implementation +# Test cases may or may not use Automake "Support for test suites" +# They may or may not use the software utility library GLib +# +# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL +# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. +# The variable enable_unit_tests is used by other macros in this file. +# +# Interface to module: +# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests +# enable_unit_tests: used in configure.ac for additional configuration +# --enable-unit-tests: 'yes' user instructs the module to build tests +# 'no' user instructs the module not to build tests +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ +AC_BEFORE([$0], [XORG_WITH_GLIB]) +AC_BEFORE([$0], [XORG_LD_WRAP]) +AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], + [Enable building unit test cases (default: ]_defopt[)]), + [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) +m4_undefine([_defopt]) +AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) +AC_MSG_CHECKING([whether to build unit test cases]) +AC_MSG_RESULT([$enable_unit_tests]) +]) # XORG_ENABLE_UNIT_TESTS + +# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) +# ------------------------------------------------------ +# Minimum version: 1.17.0 +# +# This macro enables a builder to enable/disable integration testing +# It makes no assumption about the test cases' implementation +# Test cases may or may not use Automake "Support for test suites" +# +# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support +# usually requires less dependencies and may be built and run under less +# stringent environments than integration tests. +# +# Interface to module: +# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests +# enable_integration_tests: used in configure.ac for additional configuration +# --enable-integration-tests: 'yes' user instructs the module to build tests +# 'no' user instructs the module not to build tests +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ +AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], + [Enable building integration test cases (default: ]_defopt[)]), + [enable_integration_tests=$enableval], + [enable_integration_tests=]_defopt) +m4_undefine([_defopt]) +AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], + [test "x$enable_integration_tests" != xno]) +AC_MSG_CHECKING([whether to build unit test cases]) +AC_MSG_RESULT([$enable_integration_tests]) +]) # XORG_ENABLE_INTEGRATION_TESTS + +# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) +# ---------------------------------------- +# Minimum version: 1.13.0 +# +# GLib is a library which provides advanced data structures and functions. +# This macro enables a module to test for the presence of Glib. +# +# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. +# Otherwise the value of $enable_unit_tests is blank. +# +# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit +# test support usually requires less dependencies and may be built and run under +# less stringent environments than integration tests. +# +# Interface to module: +# HAVE_GLIB: used in makefiles to conditionally build targets +# with_glib: used in configure.ac to know if GLib has been found +# --with-glib: 'yes' user instructs the module to use glib +# 'no' user instructs the module not to use glib +# +AC_DEFUN([XORG_WITH_GLIB],[ +AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +m4_define([_defopt], m4_default([$2], [auto])) +AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], + [Use GLib library for unit testing (default: ]_defopt[)]), + [with_glib=$withval], [with_glib=]_defopt) +m4_undefine([_defopt]) + +have_glib=no +# Do not probe GLib if user explicitly disabled unit testing +if test "x$enable_unit_tests" != x"no"; then + # Do not probe GLib if user explicitly disabled it + if test "x$with_glib" != x"no"; then + m4_ifval( + [$1], + [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], + [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] + ) + fi +fi + +# Not having GLib when unit testing has been explicitly requested is an error +if test "x$enable_unit_tests" = x"yes"; then + if test "x$have_glib" = x"no"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) + fi +fi + +# Having unit testing disabled when GLib has been explicitly requested is an error +if test "x$enable_unit_tests" = x"no"; then + if test "x$with_glib" = x"yes"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) + fi +fi + +# Not having GLib when it has been explicitly requested is an error +if test "x$with_glib" = x"yes"; then + if test "x$have_glib" = x"no"; then + AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) + fi +fi + +AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) +]) # XORG_WITH_GLIB + +# XORG_LD_WRAP([required|optional]) +# --------------------------------- +# Minimum version: 1.13.0 +# +# Check if linker supports -wrap, passed via compiler flags +# +# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. +# Otherwise the value of $enable_unit_tests is blank. +# +# Argument added in 1.16.0 - default is "required", to match existing behavior +# of returning an error if enable_unit_tests is yes, and ld -wrap is not +# available, an argument of "optional" allows use when some unit tests require +# ld -wrap and others do not. +# +AC_DEFUN([XORG_LD_WRAP],[ +XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], + [AC_LANG_PROGRAM([#include <stdlib.h> + void __wrap_exit(int status) { return; }], + [exit(0);])]) +# Not having ld wrap when unit testing has been explicitly requested is an error +if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then + if test "x$have_ld_wrap" = x"no"; then + AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) + fi +fi +AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) +# +]) # XORG_LD_WRAP + +# XORG_CHECK_LINKER_FLAGS +# ----------------------- +# SYNOPSIS +# +# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) +# +# DESCRIPTION +# +# Check whether the given linker FLAGS work with the current language's +# linker, or whether they give an error. +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# PROGRAM-SOURCE is the program source to link with, if needed +# +# NOTE: Based on AX_CHECK_COMPILER_FLAGS. +# +# LICENSE +# +# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> +# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> +# Copyright (c) 2009 Matteo Frigo +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well.# +AC_DEFUN([XORG_CHECK_LINKER_FLAGS], +[AC_MSG_CHECKING([whether the linker accepts $1]) +dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: +AS_LITERAL_IF([$1], + [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ + ax_save_FLAGS=$LDFLAGS + LDFLAGS="$1" + AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], + AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, + AS_TR_SH(xorg_cv_linker_flags_[$1])=no) + LDFLAGS=$ax_save_FLAGS])], + [ax_save_FLAGS=$LDFLAGS + LDFLAGS="$1" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], + eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, + eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) + LDFLAGS=$ax_save_FLAGS]) +eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) +AC_MSG_RESULT($xorg_check_linker_flags) +if test "x$xorg_check_linker_flags" = xyes; then + m4_default([$2], :) +else + m4_default([$3], :) +fi +]) # XORG_CHECK_LINKER_FLAGS + +# XORG_MEMORY_CHECK_FLAGS +# ----------------------- +# Minimum version: 1.16.0 +# +# This macro attempts to find appropriate memory checking functionality +# for various platforms which unit testing code may use to catch various +# forms of memory allocation and access errors in testing. +# +# Interface to module: +# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging +# Usually added to TESTS_ENVIRONMENT in Makefile.am +# +# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. +# +AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ + +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], + [Environment variables to enable memory checking in tests]) + +# Check for different types of support on different platforms +case $host_os in + solaris*) + AC_CHECK_LIB([umem], [umem_alloc], + [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) + ;; + *-gnu*) # GNU libc - Value is used as a single byte bit pattern, + # both directly and inverted, so should not be 0 or 255. + malloc_debug_env='MALLOC_PERTURB_=15' + ;; + darwin*) + malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' + ;; + *bsd*) + malloc_debug_env='MallocPreScribble=1 MallocScribble=1' + ;; +esac + +# User supplied flags override default flags +if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then + malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" +fi + +AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) +]) # XORG_WITH_LINT + +# XORG_CHECK_MALLOC_ZERO +# ---------------------- +# Minimum version: 1.0.0 +# +# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if +# malloc(0) returns NULL. Packages should add one of these cflags to +# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. +AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ +AC_ARG_ENABLE(malloc0returnsnull, + AS_HELP_STRING([--enable-malloc0returnsnull], + [malloc(0) returns NULL (default: auto)]), + [MALLOC_ZERO_RETURNS_NULL=$enableval], + [MALLOC_ZERO_RETURNS_NULL=auto]) + +AC_MSG_CHECKING([whether malloc(0) returns NULL]) +if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then + AC_RUN_IFELSE([AC_LANG_PROGRAM([ +#include <stdlib.h> +],[ + char *m0, *r0, *c0, *p; + m0 = malloc(0); + p = malloc(10); + r0 = realloc(p,0); + c0 = calloc(0,10); + exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); +])], + [MALLOC_ZERO_RETURNS_NULL=yes], + [MALLOC_ZERO_RETURNS_NULL=no], + [MALLOC_ZERO_RETURNS_NULL=yes]) +fi +AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) + +if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then + MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" + XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS + XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" +else + MALLOC_ZERO_CFLAGS="" + XMALLOC_ZERO_CFLAGS="" + XTMALLOC_ZERO_CFLAGS="" +fi + +AC_SUBST([MALLOC_ZERO_CFLAGS]) +AC_SUBST([XMALLOC_ZERO_CFLAGS]) +AC_SUBST([XTMALLOC_ZERO_CFLAGS]) +]) # XORG_CHECK_MALLOC_ZERO + +# XORG_WITH_LINT() +# ---------------- +# Minimum version: 1.1.0 +# +# This macro enables the use of a tool that flags some suspicious and +# non-portable constructs (likely to be bugs) in C language source code. +# It will attempt to locate the tool and use appropriate options. +# There are various lint type tools on different platforms. +# +# Interface to module: +# LINT: returns the path to the tool found on the platform +# or the value set to LINT on the configure cmd line +# also an Automake conditional +# LINT_FLAGS: an Automake variable with appropriate flags +# +# --with-lint: 'yes' user instructs the module to use lint +# 'no' user instructs the module not to use lint (default) +# +# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. +# If the user sets the value of LINT_FLAGS, they are used verbatim. +# +AC_DEFUN([XORG_WITH_LINT],[ + +AC_ARG_VAR([LINT], [Path to a lint-style command]) +AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) +AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], + [Use a lint-style source code checker (default: disabled)])], + [use_lint=$withval], [use_lint=no]) + +# Obtain platform specific info like program name and options +# The lint program on FreeBSD and NetBSD is different from the one on Solaris +case $host_os in + *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) + lint_name=splint + lint_options="-badflag" + ;; + *freebsd* | *netbsd*) + lint_name=lint + lint_options="-u -b" + ;; + *solaris*) + lint_name=lint + lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" + ;; +esac + +# Test for the presence of the program (either guessed by the code or spelled out by the user) +if test "x$use_lint" = x"yes" ; then + AC_PATH_PROG([LINT], [$lint_name]) + if test "x$LINT" = "x"; then + AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) + fi +elif test "x$use_lint" = x"no" ; then + if test "x$LINT" != "x"; then + AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) + fi +else + AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) +fi + +# User supplied flags override default flags +if test "x$LINT_FLAGS" != "x"; then + lint_options=$LINT_FLAGS +fi + +AC_SUBST([LINT_FLAGS],[$lint_options]) +AM_CONDITIONAL(LINT, [test "x$LINT" != x]) + +]) # XORG_WITH_LINT + +# XORG_LINT_LIBRARY(LIBNAME) +# -------------------------- +# Minimum version: 1.1.0 +# +# Sets up flags for building lint libraries for checking programs that call +# functions in the library. +# +# Interface to module: +# LINTLIB - Automake variable with the name of lint library file to make +# MAKE_LINT_LIB - Automake conditional +# +# --enable-lint-library: - 'yes' user instructs the module to created a lint library +# - 'no' user instructs the module not to create a lint library (default) + +AC_DEFUN([XORG_LINT_LIBRARY],[ +AC_REQUIRE([XORG_WITH_LINT]) +AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], + [Create lint library (default: disabled)])], + [make_lint_lib=$enableval], [make_lint_lib=no]) + +if test "x$make_lint_lib" = x"yes" ; then + LINTLIB=llib-l$1.ln + if test "x$LINT" = "x"; then + AC_MSG_ERROR([Cannot make lint library without --with-lint]) + fi +elif test "x$make_lint_lib" != x"no" ; then + AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) +fi + +AC_SUBST(LINTLIB) +AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) + +]) # XORG_LINT_LIBRARY + +# XORG_COMPILER_BRAND +# ------------------- +# Minimum version: 1.14.0 +# +# Checks for various brands of compilers and sets flags as appropriate: +# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" +# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" +# clang compiler - sets CLANGCC to "yes" +# Intel compiler - sets INTELCC to "yes" +# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" +# +AC_DEFUN([XORG_COMPILER_BRAND], [ +AC_LANG_CASE( + [C], [ + AC_REQUIRE([AC_PROG_CC_C99]) + ], + [C++], [ + AC_REQUIRE([AC_PROG_CXX]) + ] +) +AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) +AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) +AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) +]) # XORG_COMPILER_BRAND + +# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) +# --------------- +# Minimum version: 1.16.0 +# +# Test if the compiler works when passed the given flag as a command line argument. +# If it succeeds, the flag is appeneded to the given variable. If not, it tries the +# next flag in the list until there are no more options. +# +# Note that this does not guarantee that the compiler supports the flag as some +# compilers will simply ignore arguments that they do not understand, but we do +# attempt to weed out false positives by using -Werror=unknown-warning-option and +# -Werror=unused-command-line-argument +# +AC_DEFUN([XORG_TESTSET_CFLAG], [ +m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) +m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) + +AC_LANG_COMPILER_REQUIRE + +AC_LANG_CASE( + [C], [ + AC_REQUIRE([AC_PROG_CC_C99]) + define([PREFIX], [C]) + define([CACHE_PREFIX], [cc]) + define([COMPILER], [$CC]) + ], + [C++], [ + define([PREFIX], [CXX]) + define([CACHE_PREFIX], [cxx]) + define([COMPILER], [$CXX]) + ] +) + +[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" + +if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" + AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], + [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], + [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], + [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) + [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] + PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" +fi + +if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then + if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" + fi + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" + AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], + [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], + [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], + [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) + [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] + PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" +fi + +found="no" +m4_foreach([flag], m4_cdr($@), [ + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" + fi + + PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" + +dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname + AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) + cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) + AC_CACHE_VAL($cacheid, + [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], + [eval $cacheid=yes], + [eval $cacheid=no])]) + + PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" + + eval supported=\$$cacheid + AC_MSG_RESULT([$supported]) + if test "$supported" = "yes" ; then + $1="$$1 ]flag[" + found="yes" + fi + fi +]) +]) # XORG_TESTSET_CFLAG + +# XORG_COMPILER_FLAGS +# --------------- +# Minimum version: 1.16.0 +# +# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line +# arguments supported by the selected compiler which do NOT alter the generated +# code. These arguments will cause the compiler to print various warnings +# during compilation AND turn a conservative set of warnings into errors. +# +# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in +# future versions of util-macros as options are added to new compilers. +# +AC_DEFUN([XORG_COMPILER_FLAGS], [ +AC_REQUIRE([XORG_COMPILER_BRAND]) + +AC_ARG_ENABLE(selective-werror, + AS_HELP_STRING([--disable-selective-werror], + [Turn off selective compiler errors. (default: enabled)]), + [SELECTIVE_WERROR=$enableval], + [SELECTIVE_WERROR=yes]) + +AC_LANG_CASE( + [C], [ + define([PREFIX], [C]) + ], + [C++], [ + define([PREFIX], [CXX]) + ] +) +# -v is too short to test reliably with XORG_TESTSET_CFLAG +if test "x$SUNCC" = "xyes"; then + [BASE_]PREFIX[FLAGS]="-v" +else + [BASE_]PREFIX[FLAGS]="" +fi + +# This chunk of warnings were those that existed in the legacy CWARNFLAGS +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) + +AC_LANG_CASE( + [C], [ + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) + ] +) + +# This chunk adds additional warnings that could catch undesired effects. +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) + +# These are currently disabled because they are noisy. They will be enabled +# in the future once the codebase is sufficiently modernized to silence +# them. For now, I don't want them to drown out the other warnings. +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) + +# Turn some warnings into errors, so we don't accidently get successful builds +# when there are problems that should be fixed. + +if test "x$SELECTIVE_WERROR" = "xyes" ; then +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION +else +AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) +fi + +AC_SUBST([BASE_]PREFIX[FLAGS]) +]) # XORG_COMPILER_FLAGS + +# XORG_CWARNFLAGS +# --------------- +# Minimum version: 1.2.0 +# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) +# +# Defines CWARNFLAGS to enable C compiler warnings. +# +# This function is deprecated because it defines -fno-strict-aliasing +# which alters the code generated by the compiler. If -fno-strict-aliasing +# is needed, then it should be added explicitly in the module when +# it is updated to use BASE_CFLAGS. +# +AC_DEFUN([XORG_CWARNFLAGS], [ +AC_REQUIRE([XORG_COMPILER_FLAGS]) +AC_REQUIRE([XORG_COMPILER_BRAND]) +AC_LANG_CASE( + [C], [ + CWARNFLAGS="$BASE_CFLAGS" + if test "x$GCC" = xyes ; then + CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" + fi + AC_SUBST(CWARNFLAGS) + ] +) +]) # XORG_CWARNFLAGS + +# XORG_STRICT_OPTION +# ----------------------- +# Minimum version: 1.3.0 +# +# Add configure option to enable strict compilation flags, such as treating +# warnings as fatal errors. +# If --enable-strict-compilation is passed to configure, adds strict flags to +# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. +# +# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or +# when strict compilation is unconditionally desired. +AC_DEFUN([XORG_STRICT_OPTION], [ +AC_REQUIRE([XORG_CWARNFLAGS]) +AC_REQUIRE([XORG_COMPILER_FLAGS]) + +AC_ARG_ENABLE(strict-compilation, + AS_HELP_STRING([--enable-strict-compilation], + [Enable all warnings from compiler and make them errors (default: disabled)]), + [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) + +AC_LANG_CASE( + [C], [ + define([PREFIX], [C]) + ], + [C++], [ + define([PREFIX], [CXX]) + ] +) + +[STRICT_]PREFIX[FLAGS]="" +XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) +XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) + +# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not +# activate it with -Werror, so we add it here explicitly. +XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) + +if test "x$STRICT_COMPILE" = "xyes"; then + [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" + AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) +fi +AC_SUBST([STRICT_]PREFIX[FLAGS]) +AC_SUBST([BASE_]PREFIX[FLAGS]) +AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) +]) # XORG_STRICT_OPTION + +# XORG_DEFAULT_OPTIONS +# -------------------- +# Minimum version: 1.3.0 +# +# Defines default options for X.Org modules. +# +AC_DEFUN([XORG_DEFAULT_OPTIONS], [ +AC_REQUIRE([AC_PROG_INSTALL]) +XORG_COMPILER_FLAGS +XORG_CWARNFLAGS +XORG_STRICT_OPTION +XORG_RELEASE_VERSION +XORG_CHANGELOG +XORG_INSTALL +XORG_MANPAGE_SECTIONS +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], + [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) +]) # XORG_DEFAULT_OPTIONS + +# XORG_INSTALL() +# ---------------- +# Minimum version: 1.4.0 +# +# Defines the variable INSTALL_CMD as the command to copy +# INSTALL from $prefix/share/util-macros. +# +AC_DEFUN([XORG_INSTALL], [ +AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` +INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ +mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ +|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ +echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" +AC_SUBST([INSTALL_CMD]) +]) # XORG_INSTALL +dnl Copyright 2005 Red Hat, Inc +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation. +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +dnl OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name of the copyright holders shall +dnl not be used in advertising or otherwise to promote the sale, use or +dnl other dealings in this Software without prior written authorization +dnl from the copyright holders. +dnl + +# XORG_RELEASE_VERSION +# -------------------- +# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. + +AC_DEFUN([XORG_RELEASE_VERSION],[ + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], + [`echo $PACKAGE_VERSION | cut -d . -f 1`], + [Major version of this package]) + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` + if test "x$PVM" = "x"; then + PVM="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], + [$PVM], + [Minor version of this package]) + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` + if test "x$PVP" = "x"; then + PVP="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], + [$PVP], + [Patch version of this package]) +]) + +# XORG_CHANGELOG() +# ---------------- +# Minimum version: 1.2.0 +# +# Defines the variable CHANGELOG_CMD as the command to generate +# ChangeLog from git. +# +# +AC_DEFUN([XORG_CHANGELOG], [ +CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ +mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ +|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ +echo 'git directory not found: installing possibly empty changelog.' >&2)" +AC_SUBST([CHANGELOG_CMD]) +]) # XORG_CHANGELOG + # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # @@ -752,7 +2716,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.3], [], +m4_if([$1], [1.11.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -768,7 +2732,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.3])dnl +[AM_AUTOMAKE_VERSION([1.11.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1,7 +1,7 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-01-04.17; # UTC +scriptversion=2012-03-05.13; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free # Software Foundation, Inc. @@ -79,6 +79,48 @@ func_file_conv () esac } +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () @@ -109,43 +151,34 @@ func_cl_wrapper () ;; esac ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; -l*) - lib=${1#-l} - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - set x "$@" "$dir/$lib.dll.lib" - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - set x "$@" "$dir/$lib.lib" - break - fi - done - IFS=$save_IFS - - test "$found" != yes && set x "$@" "$lib.lib" + func_cl_dashl "${1#-l}" + set x "$@" "$lib" shift ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; -L*) - func_file_conv "${1#-L}" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" + func_cl_dashL "${1#-L}" ;; -static) shared=false diff --git a/config.h.in b/config.h.in index a20ac2b..55d69be 100644 --- a/config.h.in +++ b/config.h.in @@ -9,9 +9,6 @@ /* locale directory */ #undef GNOMELOCALEDIR -/* Define to 1 to enable APT support */ -#undef HAVE_APT - /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET @@ -24,9 +21,6 @@ /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT -/* whether gtk3 is available */ -#undef HAVE_GTK3 - /* Define to 1 to enable GTK Logout Helper */ #undef HAVE_GTKLOGOUTHELPER @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -225,6 +225,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -1537,6 +1543,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -220,21 +244,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -336,6 +364,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -457,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -491,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -512,28 +552,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -613,8 +633,6 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS -HAS_GUDEV_FALSE -HAS_GUDEV_TRUE COVERAGE_LDFLAGS COVERAGE_CFLAGS HAVE_GCOVR_FALSE @@ -640,17 +658,29 @@ CATALOGS MSGFMT_OPTS GNOMELOCALEDIR GETTEXT_PACKAGE +TEST_SERVICE_LDFLAGS +BUILD_TESTS_FALSE +BUILD_TESTS_TRUE +TEST_SERVICE_LIBS +TEST_SERVICE_CFLAGS +CWARNFLAGS +STRICT_CXXFLAGS +BASE_CXXFLAGS +XORG_GTEST_CPPFLAGS +XORG_GTEST_SOURCE +EVEMU_LIBS +EVEMU_CFLAGS +X11_LIBS +X11_CFLAGS +GTEST_SOURCE +GTEST_CPPFLAGS DBUSSERVICEDIR INDICATORICONSDIR INDICATORDIR -BUILD_APT_FALSE -BUILD_APT_TRUE BUILD_GTKLOGOUTHELPER_FALSE BUILD_GTKLOGOUTHELPER_TRUE GTKLOGOUTHELPER_LIBS GTKLOGOUTHELPER_CFLAGS -USE_GTK3_FALSE -USE_GTK3_TRUE GUDEV_LIBS GUDEV_CFLAGS SESSIONERVICE_LIBS @@ -662,6 +692,7 @@ APPLET_CFLAGS AM_BACKSLASH AM_DEFAULT_V AM_V +CXXCPP OTOOL64 OTOOL LIPO @@ -692,6 +723,12 @@ LIBTOOL EGREP GREP CPP +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX DATADIRNAME am__fastdepCC_FALSE am__fastdepCC_TRUE @@ -832,10 +869,14 @@ with_gnu_ld with_sysroot enable_libtool_lock enable_silent_rules -with_gtk enable_gtklogouthelper -enable_apt enable_localinstall +enable_tests +with_gtest_include_path +with_gtest_source_path +with_evemu +enable_selective_werror +enable_strict_compilation enable_gcov ' ac_precious_vars='build_alias @@ -849,15 +890,23 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CXX +CXXFLAGS +CCC CPP +CXXCPP APPLET_CFLAGS APPLET_LIBS SESSIONSERVICE_CFLAGS SESSIONSERVICE_LIBS -GUDEV_CFLAGS -GUDEV_LIBS GTKLOGOUTHELPER_CFLAGS -GTKLOGOUTHELPER_LIBS' +GTKLOGOUTHELPER_LIBS +X11_CFLAGS +X11_LIBS +EVEMU_CFLAGS +EVEMU_LIBS +TEST_SERVICE_CFLAGS +TEST_SERVICE_LIBS' # Initialize some variables set by options. @@ -1313,8 +1362,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1492,9 +1539,15 @@ Optional Features: --disable-silent-rules verbose build output (undo: `make V=0') --enable-gtklogouthelper enable GTK Logout Helper - --disable-apt disable APT support --enable-localinstall install all of the files localy instead of system directories (for distcheck) + --disable-tests Disable test scripts and tools (default=auto) + --disable-selective-werror + Turn off selective compiler errors. (default: + enabled) + --enable-strict-compilation + Enable all warnings from compiler and make them + errors (default: disabled) --enable-gcov enable coverage testing with gcov Optional Packages: @@ -1505,8 +1558,13 @@ Optional Packages: --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). - --with-gtk Which version of gtk to use for the indicator - [default=3] + --with-gtest-include-path + location of the Google test headers + --with-gtest-source-path + location of the Google test sources, defaults to + /usr/src/gtest + --with-evemu support Linux input device recording playback + (default: enabled if available) Some influential environment variables: PKG_CONFIG path to pkg-config utility @@ -1521,7 +1579,10 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> + CXX C++ compiler command + CXXFLAGS C++ compiler flags CPP C preprocessor + CXXCPP C++ preprocessor APPLET_CFLAGS C compiler flags for APPLET, overriding pkg-config APPLET_LIBS linker flags for APPLET, overriding pkg-config @@ -1529,13 +1590,19 @@ Some influential environment variables: C compiler flags for SESSIONSERVICE, overriding pkg-config SESSIONSERVICE_LIBS linker flags for SESSIONSERVICE, overriding pkg-config - GUDEV_CFLAGS - C compiler flags for GUDEV, overriding pkg-config - GUDEV_LIBS linker flags for GUDEV, overriding pkg-config GTKLOGOUTHELPER_CFLAGS C compiler flags for GTKLOGOUTHELPER, overriding pkg-config GTKLOGOUTHELPER_LIBS linker flags for GTKLOGOUTHELPER, overriding pkg-config + X11_CFLAGS C compiler flags for X11, overriding pkg-config + X11_LIBS linker flags for X11, overriding pkg-config + EVEMU_CFLAGS + C compiler flags for EVEMU, overriding pkg-config + EVEMU_LIBS linker flags for EVEMU, overriding pkg-config + TEST_SERVICE_CFLAGS + C compiler flags for TEST_SERVICE, overriding pkg-config + TEST_SERVICE_LIBS + linker flags for TEST_SERVICE, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1604,9 +1671,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1682,7 +1749,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1768,6 +1835,44 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1878,6 +1983,222 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_header_compile +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link + +# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES +# --------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_cxx_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_cxx_check_header_mongrel + +# ac_fn_cxx_check_decl LINENO SYMBOL VAR INCLUDES +# ----------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_cxx_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_cxx_check_decl + # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using @@ -1969,7 +2290,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2389,7 +2710,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2558,7 +2879,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2598,7 +2919,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2649,7 +2970,7 @@ do test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2702,7 +3023,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2788,7 +3109,7 @@ fi # Define the identity of the package. PACKAGE=indicator-session - VERSION=0.3.96 + VERSION=12.10.0 cat >>confdefs.h <<_ACEOF @@ -2892,7 +3213,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2935,7 +3256,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3008,7 +3329,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GLIB_COMPILE_SCHEMAS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3185,7 +3506,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3225,7 +3546,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3278,7 +3599,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3319,7 +3640,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3377,7 +3698,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3421,7 +3742,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3867,8 +4188,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4122,7 +4442,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4162,7 +4482,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4202,7 +4522,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4386,7 +4706,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4426,7 +4746,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4466,7 +4786,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4506,7 +4826,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4557,7 +4877,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4726,7 +5046,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4766,7 +5086,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4819,7 +5139,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4860,7 +5180,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -4918,7 +5238,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4962,7 +5282,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5158,8 +5478,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -5372,6 +5691,391 @@ else fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } @@ -5652,7 +6356,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -5718,7 +6422,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -6065,7 +6769,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -6144,7 +6848,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -6400,7 +7104,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6444,7 +7148,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6868,7 +7572,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6908,7 +7612,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7214,7 +7918,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7254,7 +7958,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7357,7 +8061,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7401,7 +8105,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7526,7 +8230,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7566,7 +8270,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7625,7 +8329,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7665,7 +8369,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8314,7 +9018,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8354,7 +9058,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8434,7 +9138,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8474,7 +9178,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8526,7 +9230,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8566,7 +9270,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8618,7 +9322,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8658,7 +9362,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8710,7 +9414,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8750,7 +9454,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8802,7 +9506,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8842,7 +9546,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9074,6 +9778,17 @@ done +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + + + + # Set options @@ -13073,6 +13788,3209 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$lt_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec_CXX='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + + + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec_CXX='' + fi + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + + else + ld_shlibs_CXX=no + fi + + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + + gnu*) + ;; + + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_CXX=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + ld_shlibs_CXX=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF + + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix[4-9]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs_CXX=no + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + @@ -13143,22 +17061,14 @@ AM_BACKSLASH='\' # Dependencies ########################### -GTK_REQUIRED_VERSION=2.12 -GTK3_REQUIRED_VERSION=3.0 +GTK_REQUIRED_VERSION=3.0 INDICATOR_REQUIRED_VERSION=0.3.19 DBUSMENUGTK_REQUIRED_VERSION=0.5.90 POLKIT_REQUIRED_VERSION=0.92 +DBUSTEST_REQUIRED_VERSION=0.0.5 +DBUSMENUGLIB_REQUIRED_VERSION=0.1.1 -# Check whether --with-gtk was given. -if test "${with_gtk+set}" = set; then : - withval=$with_gtk; -else - with_gtk=3 -fi - - -if test "x$with_gtk" = x3; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPLET" >&5 @@ -13168,18 +17078,18 @@ if test -n "$APPLET_CFLAGS"; then pkg_cv_APPLET_CFLAGS="$APPLET_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK3_REQUIRED_VERSION - indicator3-0.4 >= \$INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK_REQUIRED_VERSION + indicator3-0.4 >= \$INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK_REQUIRED_VERSION + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_APPLET_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>/dev/null` + pkg_cv_APPLET_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= $GTK_REQUIRED_VERSION + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13191,18 +17101,18 @@ if test -n "$APPLET_LIBS"; then pkg_cv_APPLET_LIBS="$APPLET_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK3_REQUIRED_VERSION - indicator3-0.4 >= \$INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK_REQUIRED_VERSION + indicator3-0.4 >= \$INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK_REQUIRED_VERSION + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_APPLET_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>/dev/null` + pkg_cv_APPLET_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= $GTK_REQUIRED_VERSION + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13223,20 +17133,20 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - APPLET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>&1` + APPLET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= $GTK_REQUIRED_VERSION + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>&1` else - APPLET_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>&1` + APPLET_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= $GTK_REQUIRED_VERSION + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$APPLET_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (gtk+-3.0 >= $GTK3_REQUIRED_VERSION - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) were not met: + as_fn_error $? "Package requirements (gtk+-3.0 >= $GTK_REQUIRED_VERSION + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) were not met: $APPLET_PKG_ERRORS @@ -13269,28 +17179,39 @@ $as_echo "yes" >&6; } fi -elif test "x$with_gtk" = x2; then : + + + pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPLET" >&5 -$as_echo_n "checking for APPLET... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SESSIONSERVICE" >&5 +$as_echo_n "checking for SESSIONSERVICE... " >&6; } -if test -n "$APPLET_CFLAGS"; then - pkg_cv_APPLET_CFLAGS="$APPLET_CFLAGS" +if test -n "$SESSIONSERVICE_CFLAGS"; then + pkg_cv_SESSIONSERVICE_CFLAGS="$SESSIONSERVICE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_REQUIRED_VERSION - indicator-0.4 >= \$INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= \$INDICATOR_REQUIRED_VERSION + packagekit-glib2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + packagekit-glib2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_APPLET_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK_REQUIRED_VERSION - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>/dev/null` + pkg_cv_SESSIONSERVICE_CFLAGS=`$PKG_CONFIG --cflags "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + packagekit-glib2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13298,22 +17219,31 @@ fi else pkg_failed=untried fi -if test -n "$APPLET_LIBS"; then - pkg_cv_APPLET_LIBS="$APPLET_LIBS" +if test -n "$SESSIONSERVICE_LIBS"; then + pkg_cv_SESSIONSERVICE_LIBS="$SESSIONSERVICE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_REQUIRED_VERSION - indicator-0.4 >= \$INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= \$INDICATOR_REQUIRED_VERSION + packagekit-glib2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + packagekit-glib2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_APPLET_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= $GTK_REQUIRED_VERSION - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>/dev/null` + pkg_cv_SESSIONSERVICE_LIBS=`$PKG_CONFIG --libs "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + packagekit-glib2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13334,28 +17264,37 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - APPLET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0 >= $GTK_REQUIRED_VERSION - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>&1` + SESSIONSERVICE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + packagekit-glib2" 2>&1` else - APPLET_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.0 >= $GTK_REQUIRED_VERSION - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION" 2>&1` + SESSIONSERVICE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + packagekit-glib2" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$APPLET_PKG_ERRORS" >&5 + echo "$SESSIONSERVICE_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (gtk+-2.0 >= $GTK_REQUIRED_VERSION - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) were not met: + as_fn_error $? "Package requirements (dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + packagekit-glib2) were not met: -$APPLET_PKG_ERRORS +$SESSIONSERVICE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively, you may set the environment variables APPLET_CFLAGS -and APPLET_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables SESSIONSERVICE_CFLAGS +and SESSIONSERVICE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -13366,64 +17305,56 @@ as_fn_error $? "The pkg-config script could not be found or is too old. Make su is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively, you may set the environment variables APPLET_CFLAGS -and APPLET_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables SESSIONSERVICE_CFLAGS +and SESSIONSERVICE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://pkg-config.freedesktop.org/>. See \`config.log' for more details" "$LINENO" 5; } else - APPLET_CFLAGS=$pkg_cv_APPLET_CFLAGS - APPLET_LIBS=$pkg_cv_APPLET_LIBS + SESSIONSERVICE_CFLAGS=$pkg_cv_SESSIONSERVICE_CFLAGS + SESSIONSERVICE_LIBS=$pkg_cv_SESSIONSERVICE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Value for --with-indicator-gtk was neither 2 nor 3 -See \`config.log' for more details" "$LINENO" 5; } -fi -DBUSMENUGLIB_REQUIRED_VERSION=0.1.1 +########################### +# GTK Logout Helper +########################### + +# Check whether --enable-gtklogouthelper was given. +if test "${enable_gtklogouthelper+set}" = set; then : + enableval=$enable_gtklogouthelper; +else + enable_gtklogouthelper=auto +fi -if test "x$with_gtk" = x3; then : + +if test x"$enable_gtklogouthelper" != x"no" ; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SESSIONSERVICE" >&5 -$as_echo_n "checking for SESSIONSERVICE... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKLOGOUTHELPER" >&5 +$as_echo_n "checking for GTKLOGOUTHELPER... " >&6; } -if test -n "$SESSIONSERVICE_CFLAGS"; then - pkg_cv_SESSIONSERVICE_CFLAGS="$SESSIONSERVICE_CFLAGS" +if test -n "$GTKLOGOUTHELPER_CFLAGS"; then + pkg_cv_GTKLOGOUTHELPER_CFLAGS="$GTKLOGOUTHELPER_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= \$INDICATOR_REQUIRED_VERSION - packagekit-glib2\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK_REQUIRED_VERSION + polkit-gobject-1 >= \$POLKIT_REQUIRED_VERSION\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK_REQUIRED_VERSION + polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_SESSIONSERVICE_CFLAGS=`$PKG_CONFIG --cflags "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2" 2>/dev/null` + pkg_cv_GTKLOGOUTHELPER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= $GTK_REQUIRED_VERSION + polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13431,31 +17362,19 @@ fi else pkg_failed=untried fi -if test -n "$SESSIONSERVICE_LIBS"; then - pkg_cv_SESSIONSERVICE_LIBS="$SESSIONSERVICE_LIBS" +if test -n "$GTKLOGOUTHELPER_LIBS"; then + pkg_cv_GTKLOGOUTHELPER_LIBS="$GTKLOGOUTHELPER_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= \$INDICATOR_REQUIRED_VERSION - packagekit-glib2\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK_REQUIRED_VERSION + polkit-gobject-1 >= \$POLKIT_REQUIRED_VERSION\""; } >&5 + ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK_REQUIRED_VERSION + polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_SESSIONSERVICE_LIBS=`$PKG_CONFIG --libs "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2" 2>/dev/null` + pkg_cv_GTKLOGOUTHELPER_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= $GTK_REQUIRED_VERSION + polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13476,220 +17395,4991 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SESSIONSERVICE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2" 2>&1` + GTKLOGOUTHELPER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= $GTK_REQUIRED_VERSION + polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>&1` else - SESSIONSERVICE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2" 2>&1` + GTKLOGOUTHELPER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= $GTK_REQUIRED_VERSION + polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$SESSIONSERVICE_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2) were not met: - -$SESSIONSERVICE_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + echo "$GTKLOGOUTHELPER_PKG_ERRORS" >&5 -Alternatively, you may set the environment variables SESSIONSERVICE_CFLAGS -and SESSIONSERVICE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + have_gtklogouthelper=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SESSIONSERVICE_CFLAGS -and SESSIONSERVICE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://pkg-config.freedesktop.org/>. -See \`config.log' for more details" "$LINENO" 5; } + have_gtklogouthelper=no else - SESSIONSERVICE_CFLAGS=$pkg_cv_SESSIONSERVICE_CFLAGS - SESSIONSERVICE_LIBS=$pkg_cv_SESSIONSERVICE_LIBS + GTKLOGOUTHELPER_CFLAGS=$pkg_cv_GTKLOGOUTHELPER_CFLAGS + GTKLOGOUTHELPER_LIBS=$pkg_cv_GTKLOGOUTHELPER_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } + have_gtklogouthelper=yes +fi + if test x${have_gtklogouthelper} = xyes; then + +$as_echo "#define HAVE_GTKLOGOUTHELPER 1" >>confdefs.h + fi + if test x${enable_gtklogouthelper} = xyes && test x${have_gtklogouthelper} = xno; then + as_fn_error $? "GTK Logout Helper configured but polkit-gobject not found" "$LINENO" 5 + fi +else + have_gtklogouthelper=no +fi + if test x${have_gtklogouthelper} = xyes; then + BUILD_GTKLOGOUTHELPER_TRUE= + BUILD_GTKLOGOUTHELPER_FALSE='#' +else + BUILD_GTKLOGOUTHELPER_TRUE='#' + BUILD_GTKLOGOUTHELPER_FALSE= fi -elif test "x$with_gtk" = x2; then : -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SESSIONSERVICE" >&5 -$as_echo_n "checking for SESSIONSERVICE... " >&6; } -if test -n "$SESSIONSERVICE_CFLAGS"; then - pkg_cv_SESSIONSERVICE_CFLAGS="$SESSIONSERVICE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= \$INDICATOR_REQUIRED_VERSION - packagekit-glib2\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SESSIONSERVICE_CFLAGS=`$PKG_CONFIG --cflags "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes + + +########################### +# Check to see if we're local +########################### + +with_localinstall="no" +# Check whether --enable-localinstall was given. +if test "${enable_localinstall+set}" = set; then : + enableval=$enable_localinstall; with_localinstall=$enableval else - pkg_failed=yes + with_localinstall=no fi - else - pkg_failed=untried + + +########################### +# Indicator Info +########################### + +if test "x$with_localinstall" = "xyes"; then + INDICATORDIR="${libdir}/indicators/2/" + INDICATORICONSDIR="${datadir}/indicator-applet/icons/" +elif test "x$with_gtk" = x2; then + INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4` + INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator-0.4` +else + INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4` + INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4` fi -if test -n "$SESSIONSERVICE_LIBS"; then - pkg_cv_SESSIONSERVICE_LIBS="$SESSIONSERVICE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= \$DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= \$INDICATOR_REQUIRED_VERSION - packagekit-glib2\""; } >&5 - ($PKG_CONFIG --exists --print-errors "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SESSIONSERVICE_LIBS=`$PKG_CONFIG --libs "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes + + + +########################### +# DBus Service Info +########################### + +if test "x$with_localinstall" = "xyes"; then + DBUSSERVICEDIR="${datadir}/dbus-1/services/" else - pkg_failed=yes + DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` fi - else - pkg_failed=untried + + +########################### +# Google Test framework +########################### + +# Check whether --enable-tests was given. +if test "${enable_tests+set}" = set; then : + enableval=$enable_tests; enable_tests=${enableval} +else + enable_tests=auto fi +if test "x$enable_tests" != "xno"; then + # Copyright (C) 2012 Canonical, Ltd. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# Checks whether the gtest source is available on the system. Allows for +# adjusting the include and source path. Sets have_gtest=yes if the source is +# present. Sets GTEST_CPPFLAGS and GTEST_SOURCE to the preprocessor flags and +# source location respectively. + # CHECK_GTEST -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes + + +# Check whether --with-gtest-include-path was given. +if test "${with_gtest_include_path+set}" = set; then : + withval=$with_gtest_include_path; GTEST_CPPFLAGS="-I$withval" +fi + + + +# Check whether --with-gtest-source-path was given. +if test "${with_gtest_source_path+set}" = set; then : + withval=$with_gtest_source_path; GTEST_SOURCE="$withval" else - _pkg_short_errors_supported=no + GTEST_SOURCE="/usr/src/gtest" fi - if test $_pkg_short_errors_supported = yes; then - SESSIONSERVICE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2" 2>&1` - else - SESSIONSERVICE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SESSIONSERVICE_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2) were not met: -$SESSIONSERVICE_PKG_ERRORS + GTEST_CPPFLAGS="$GTEST_CPPFLAGS -I$GTEST_SOURCE" -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -Alternatively, you may set the environment variables SESSIONSERVICE_CFLAGS -and SESSIONSERVICE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. -Alternatively, you may set the environment variables SESSIONSERVICE_CFLAGS -and SESSIONSERVICE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. + tmp_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $GTEST_CPPFLAGS" -To get pkg-config, see <http://pkg-config.freedesktop.org/>. -See \`config.log' for more details" "$LINENO" 5; } + ac_fn_cxx_check_header_mongrel "$LINENO" "gtest/gtest.h" "ac_cv_header_gtest_gtest_h" "$ac_includes_default" +if test "x$ac_cv_header_gtest_gtest_h" = xyes; then : + +fi + + + + CPPFLAGS="$tmp_CPPFLAGS" + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + as_ac_File=`$as_echo "ac_cv_file_$GTEST_SOURCE/src/gtest-all.cc" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTEST_SOURCE/src/gtest-all.cc" >&5 +$as_echo_n "checking for $GTEST_SOURCE/src/gtest-all.cc... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 else - SESSIONSERVICE_CFLAGS=$pkg_cv_SESSIONSERVICE_CFLAGS - SESSIONSERVICE_LIBS=$pkg_cv_SESSIONSERVICE_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "$GTEST_SOURCE/src/gtest-all.cc"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$GTEST_SOURCE/src/gtest-all.cc" | $as_tr_cpp` 1 +_ACEOF +have_gtest_source=yes +else + have_gtest_source=no +fi +as_ac_File=`$as_echo "ac_cv_file_$GTEST_SOURCE/src/gtest_main.cc" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTEST_SOURCE/src/gtest_main.cc" >&5 +$as_echo_n "checking for $GTEST_SOURCE/src/gtest_main.cc... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "$GTEST_SOURCE/src/gtest_main.cc"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$GTEST_SOURCE/src/gtest_main.cc" | $as_tr_cpp` 1 +_ACEOF +have_gtest_source=yes +else + have_gtest_source=no +fi + + + if test "x$ac_cv_header_gtest_gtest_h" = xyes -a \ + "x$have_gtest_source" = xyes; then : + have_gtest=yes + +else + have_gtest=no fi + +# Check whether --with-gtest-source-path was given. +if test "${with_gtest_source_path+set}" = set; then : + withval=$with_gtest_source_path; GTEST_SOURCE="$withval"; GTEST_CPPFLAGS="-I$withval/include" +else + GTEST_SOURCE="/usr/src/gtest" fi +# Check whether --with-gtest-include-path was given. +if test "${with_gtest_include_path+set}" = set; then : + withval=$with_gtest_include_path; GTEST_CPPFLAGS="-I$withval" +fi + + + GTEST_CPPFLAGS="$GTEST_CPPFLAGS -I$GTEST_SOURCE" + + as_ac_File=`$as_echo "ac_cv_file_$GTEST_SOURCE/src/gtest-all.cc" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTEST_SOURCE/src/gtest-all.cc" >&5 +$as_echo_n "checking for $GTEST_SOURCE/src/gtest-all.cc... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "$GTEST_SOURCE/src/gtest-all.cc"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$GTEST_SOURCE/src/gtest-all.cc" | $as_tr_cpp` 1 +_ACEOF +have_gtest=yes +else + have_gtest=no +fi +as_ac_File=`$as_echo "ac_cv_file_$GTEST_SOURCE/src/gtest_main.cc" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTEST_SOURCE/src/gtest_main.cc" >&5 +$as_echo_n "checking for $GTEST_SOURCE/src/gtest_main.cc... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "$GTEST_SOURCE/src/gtest_main.cc"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$GTEST_SOURCE/src/gtest_main.cc" | $as_tr_cpp` 1 +_ACEOF +have_gtest=yes +else + have_gtest=no +fi + + + if test "x$have_gtest_source" = xyes; then : + + +fi + + + + + + +ac_fn_cxx_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default" +if test "x$ac_cv_have_decl___clang__" = xyes; then : + CLANGCC="yes" +else + CLANGCC="no" +fi + +ac_fn_cxx_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default" +if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then : + INTELCC="yes" +else + INTELCC="no" +fi + +ac_fn_cxx_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" +if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then : + SUNCC="yes" +else + SUNCC="no" +fi + + + + + +# Check whether --enable-selective-werror was given. +if test "${enable_selective_werror+set}" = set; then : + enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval +else + SELECTIVE_WERROR=yes +fi + + + + + + +# -v is too short to test reliably with XORG_TESTSET_CFLAG +if test "x$SUNCC" = "xyes"; then + BASE_CXXFLAGS="-v" +else + BASE_CXXFLAGS="" +fi + +# This chunk of warnings were those that existed in the legacy CWARNFLAGS + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wall" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wall" >&5 +$as_echo_n "checking if $CXX supports-Wall... " >&6; } + cacheid=xorg_cv_cxx_flag__Wall + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wall" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wpointer-arith" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wpointer-arith" >&5 +$as_echo_n "checking if $CXX supports-Wpointer-arith... " >&6; } + cacheid=xorg_cv_cxx_flag__Wpointer_arith + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wpointer-arith" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wmissing-declarations" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wmissing-declarations" >&5 +$as_echo_n "checking if $CXX supports-Wmissing-declarations... " >&6; } + cacheid=xorg_cv_cxx_flag__Wmissing_declarations + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wmissing-declarations" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wformat=2" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wformat=2" >&5 +$as_echo_n "checking if $CXX supports-Wformat=2... " >&6; } + cacheid=xorg_cv_cxx_flag__Wformat_2 + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wformat=2" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wformat" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wformat" >&5 +$as_echo_n "checking if $CXX supports-Wformat... " >&6; } + cacheid=xorg_cv_cxx_flag__Wformat + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wformat" + found="yes" + fi + fi + + + + + +# This chunk adds additional warnings that could catch undesired effects. + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wunused" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wunused" >&5 +$as_echo_n "checking if $CXX supports-Wunused... " >&6; } + cacheid=xorg_cv_cxx_flag__Wunused + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wunused" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wuninitialized" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wuninitialized" >&5 +$as_echo_n "checking if $CXX supports-Wuninitialized... " >&6; } + cacheid=xorg_cv_cxx_flag__Wuninitialized + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wuninitialized" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wshadow" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wshadow" >&5 +$as_echo_n "checking if $CXX supports-Wshadow... " >&6; } + cacheid=xorg_cv_cxx_flag__Wshadow + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wshadow" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wcast-qual" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wcast-qual" >&5 +$as_echo_n "checking if $CXX supports-Wcast-qual... " >&6; } + cacheid=xorg_cv_cxx_flag__Wcast_qual + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wcast-qual" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wmissing-noreturn" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wmissing-noreturn" >&5 +$as_echo_n "checking if $CXX supports-Wmissing-noreturn... " >&6; } + cacheid=xorg_cv_cxx_flag__Wmissing_noreturn + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wmissing-noreturn" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wmissing-format-attribute" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wmissing-format-attribute" >&5 +$as_echo_n "checking if $CXX supports-Wmissing-format-attribute... " >&6; } + cacheid=xorg_cv_cxx_flag__Wmissing_format_attribute + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wmissing-format-attribute" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wredundant-decls" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wredundant-decls" >&5 +$as_echo_n "checking if $CXX supports-Wredundant-decls... " >&6; } + cacheid=xorg_cv_cxx_flag__Wredundant_decls + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wredundant-decls" + found="yes" + fi + fi + + + +# These are currently disabled because they are noisy. They will be enabled +# in the future once the codebase is sufficiently modernized to silence +# them. For now, I don't want them to drown out the other warnings. +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) + +# Turn some warnings into errors, so we don't accidently get successful builds +# when there are problems that should be fixed. + +if test "x$SELECTIVE_WERROR" = "xyes" ; then + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=implicit" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=implicit" >&5 +$as_echo_n "checking if $CXX supports-Werror=implicit... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_implicit + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=implicit" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 +$as_echo_n "checking if $CXX supports-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } + cacheid=xorg_cv_cxx_flag__errwarn_E_NO_EXPLICIT_TYPE_GIVEN__errwarn_E_NO_IMPLICIT_DECL_ALLOWED + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=nonnull" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=nonnull" >&5 +$as_echo_n "checking if $CXX supports-Werror=nonnull... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_nonnull + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=nonnull" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=init-self" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=init-self" >&5 +$as_echo_n "checking if $CXX supports-Werror=init-self... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_init_self + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=init-self" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=main" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=main" >&5 +$as_echo_n "checking if $CXX supports-Werror=main... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_main + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=main" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=missing-braces" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=missing-braces" >&5 +$as_echo_n "checking if $CXX supports-Werror=missing-braces... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_missing_braces + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=missing-braces" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=sequence-point" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=sequence-point" >&5 +$as_echo_n "checking if $CXX supports-Werror=sequence-point... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_sequence_point + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=sequence-point" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=return-type" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=return-type" >&5 +$as_echo_n "checking if $CXX supports-Werror=return-type... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_return_type + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=return-type" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 +$as_echo_n "checking if $CXX supports-errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } + cacheid=xorg_cv_cxx_flag__errwarn_E_FUNC_HAS_NO_RETURN_STMT + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=trigraphs" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=trigraphs" >&5 +$as_echo_n "checking if $CXX supports-Werror=trigraphs... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_trigraphs + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=trigraphs" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=array-bounds" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=array-bounds" >&5 +$as_echo_n "checking if $CXX supports-Werror=array-bounds... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_array_bounds + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=array-bounds" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=write-strings" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=write-strings" >&5 +$as_echo_n "checking if $CXX supports-Werror=write-strings... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_write_strings + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=write-strings" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=address" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=address" >&5 +$as_echo_n "checking if $CXX supports-Werror=address... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_address + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=address" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=int-to-pointer-cast" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=int-to-pointer-cast" >&5 +$as_echo_n "checking if $CXX supports-Werror=int-to-pointer-cast... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_int_to_pointer_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=int-to-pointer-cast" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-errwarn=E_BAD_PTR_INT_COMBINATION" >&5 +$as_echo_n "checking if $CXX supports-errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } + cacheid=xorg_cv_cxx_flag__errwarn_E_BAD_PTR_INT_COMBINATION + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=pointer-to-int-cast" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=pointer-to-int-cast" >&5 +$as_echo_n "checking if $CXX supports-Werror=pointer-to-int-cast... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_pointer_to_int_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Werror=pointer-to-int-cast" + found="yes" + fi + fi + + # Also -errwarn=E_BAD_PTR_INT_COMBINATION +else +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5 +$as_echo "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;} + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wimplicit" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wimplicit" >&5 +$as_echo_n "checking if $CXX supports-Wimplicit... " >&6; } + cacheid=xorg_cv_cxx_flag__Wimplicit + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wimplicit" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wnonnull" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wnonnull" >&5 +$as_echo_n "checking if $CXX supports-Wnonnull... " >&6; } + cacheid=xorg_cv_cxx_flag__Wnonnull + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wnonnull" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Winit-self" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Winit-self" >&5 +$as_echo_n "checking if $CXX supports-Winit-self... " >&6; } + cacheid=xorg_cv_cxx_flag__Winit_self + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Winit-self" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wmain" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wmain" >&5 +$as_echo_n "checking if $CXX supports-Wmain... " >&6; } + cacheid=xorg_cv_cxx_flag__Wmain + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wmain" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wmissing-braces" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wmissing-braces" >&5 +$as_echo_n "checking if $CXX supports-Wmissing-braces... " >&6; } + cacheid=xorg_cv_cxx_flag__Wmissing_braces + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wmissing-braces" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wsequence-point" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wsequence-point" >&5 +$as_echo_n "checking if $CXX supports-Wsequence-point... " >&6; } + cacheid=xorg_cv_cxx_flag__Wsequence_point + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wsequence-point" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wreturn-type" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wreturn-type" >&5 +$as_echo_n "checking if $CXX supports-Wreturn-type... " >&6; } + cacheid=xorg_cv_cxx_flag__Wreturn_type + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wreturn-type" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wtrigraphs" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wtrigraphs" >&5 +$as_echo_n "checking if $CXX supports-Wtrigraphs... " >&6; } + cacheid=xorg_cv_cxx_flag__Wtrigraphs + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wtrigraphs" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Warray-bounds" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Warray-bounds" >&5 +$as_echo_n "checking if $CXX supports-Warray-bounds... " >&6; } + cacheid=xorg_cv_cxx_flag__Warray_bounds + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Warray-bounds" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wwrite-strings" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wwrite-strings" >&5 +$as_echo_n "checking if $CXX supports-Wwrite-strings... " >&6; } + cacheid=xorg_cv_cxx_flag__Wwrite_strings + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wwrite-strings" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Waddress" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Waddress" >&5 +$as_echo_n "checking if $CXX supports-Waddress... " >&6; } + cacheid=xorg_cv_cxx_flag__Waddress + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Waddress" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wint-to-pointer-cast" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wint-to-pointer-cast" >&5 +$as_echo_n "checking if $CXX supports-Wint-to-pointer-cast... " >&6; } + cacheid=xorg_cv_cxx_flag__Wint_to_pointer_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wint-to-pointer-cast" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +found="no" + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Wpointer-to-int-cast" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Wpointer-to-int-cast" >&5 +$as_echo_n "checking if $CXX supports-Wpointer-to-int-cast... " >&6; } + cacheid=xorg_cv_cxx_flag__Wpointer_to_int_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + BASE_CXXFLAGS="$BASE_CXXFLAGS -Wpointer-to-int-cast" + found="yes" + fi + fi + + +fi + + + + + + + + + + + + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-gtest\""; } >&5 + ($PKG_CONFIG --exists --print-errors "xorg-gtest") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + have_xorg_gtest=yes +else + have_xorg_gtest=no +fi + + XORG_GTEST_SOURCE=`$PKG_CONFIG --variable=sourcedir --print-errors xorg-gtest` + XORG_GTEST_CPPFLAGS=`$PKG_CONFIG --variable=CPPflags --print-errors xorg-gtest` + XORG_GTEST_CPPFLAGS="$GTEST_CPPFLAGS $XORG_GTEST_CPPFLAGS" + XORG_GTEST_CPPFLAGS="$XORG_GTEST_CPPFLAGS -I$XORG_GTEST_SOURCE" pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUDEV" >&5 -$as_echo_n "checking for GUDEV... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11" >&5 +$as_echo_n "checking for X11... " >&6; } -if test -n "$GUDEV_CFLAGS"; then - pkg_cv_GUDEV_CFLAGS="$GUDEV_CFLAGS" +if test -n "$X11_CFLAGS"; then + pkg_cv_X11_CFLAGS="$X11_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gudev-1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gudev-1.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GUDEV_CFLAGS=`$PKG_CONFIG --cflags "gudev-1.0" 2>/dev/null` + pkg_cv_X11_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13697,16 +22387,16 @@ fi else pkg_failed=untried fi -if test -n "$GUDEV_LIBS"; then - pkg_cv_GUDEV_LIBS="$GUDEV_LIBS" +if test -n "$X11_LIBS"; then + pkg_cv_X11_LIBS="$X11_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gudev-1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gudev-1.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GUDEV_LIBS=`$PKG_CONFIG --libs "gudev-1.0" 2>/dev/null` + pkg_cv_X11_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13727,76 +22417,52 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GUDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gudev-1.0" 2>&1` + X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` else - GUDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gudev-1.0" 2>&1` + X11_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$GUDEV_PKG_ERRORS" >&5 + echo "$X11_PKG_ERRORS" >&5 - has_gudev=false + have_x11=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - has_gudev=false + have_x11=no else - GUDEV_CFLAGS=$pkg_cv_GUDEV_CFLAGS - GUDEV_LIBS=$pkg_cv_GUDEV_LIBS + X11_CFLAGS=$pkg_cv_X11_CFLAGS + X11_LIBS=$pkg_cv_X11_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - has_gudev=true + have_x11=yes fi + # Check if we should include support for utouch-evemu - - if test "x$with_gtk" = "x3"; then - USE_GTK3_TRUE= - USE_GTK3_FALSE='#' +# Check whether --with-evemu was given. +if test "${with_evemu+set}" = set; then : + withval=$with_evemu; else - USE_GTK3_TRUE='#' - USE_GTK3_FALSE= + with_evemu=check fi -if test "x$with_gtk" = x3; then : - -$as_echo "#define HAVE_GTK3 1" >>confdefs.h - - -fi - -########################### -# GTK Logout Helper -########################### - -# Check whether --enable-gtklogouthelper was given. -if test "${enable_gtklogouthelper+set}" = set; then : - enableval=$enable_gtklogouthelper; -else - enable_gtklogouthelper=auto -fi - - -if test x"$enable_gtklogouthelper" != x"no" ; then - if test "x$with_gtk" = x3; then : + if test "x$with_evemu" = xyes; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKLOGOUTHELPER" >&5 -$as_echo_n "checking for GTKLOGOUTHELPER... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVEMU" >&5 +$as_echo_n "checking for EVEMU... " >&6; } -if test -n "$GTKLOGOUTHELPER_CFLAGS"; then - pkg_cv_GTKLOGOUTHELPER_CFLAGS="$GTKLOGOUTHELPER_CFLAGS" +if test -n "$EVEMU_CFLAGS"; then + pkg_cv_EVEMU_CFLAGS="$EVEMU_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK3_REQUIRED_VERSION - polkit-gobject-1 >= \$POLKIT_REQUIRED_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"utouch-evemu\""; } >&5 + ($PKG_CONFIG --exists --print-errors "utouch-evemu") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GTKLOGOUTHELPER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>/dev/null` + pkg_cv_EVEMU_CFLAGS=`$PKG_CONFIG --cflags "utouch-evemu" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13804,19 +22470,16 @@ fi else pkg_failed=untried fi -if test -n "$GTKLOGOUTHELPER_LIBS"; then - pkg_cv_GTKLOGOUTHELPER_LIBS="$GTKLOGOUTHELPER_LIBS" +if test -n "$EVEMU_LIBS"; then + pkg_cv_EVEMU_LIBS="$EVEMU_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK3_REQUIRED_VERSION - polkit-gobject-1 >= \$POLKIT_REQUIRED_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"utouch-evemu\""; } >&5 + ($PKG_CONFIG --exists --print-errors "utouch-evemu") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GTKLOGOUTHELPER_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>/dev/null` + pkg_cv_EVEMU_LIBS=`$PKG_CONFIG --libs "utouch-evemu" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13837,47 +22500,61 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GTKLOGOUTHELPER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>&1` + EVEMU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "utouch-evemu" 2>&1` else - GTKLOGOUTHELPER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= $GTK3_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>&1` + EVEMU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "utouch-evemu" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$GTKLOGOUTHELPER_PKG_ERRORS" >&5 + echo "$EVEMU_PKG_ERRORS" >&5 - have_gtklogouthelper=no + as_fn_error $? "Package requirements (utouch-evemu) were not met: + +$EVEMU_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables EVEMU_CFLAGS +and EVEMU_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - have_gtklogouthelper=no + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables EVEMU_CFLAGS +and EVEMU_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } else - GTKLOGOUTHELPER_CFLAGS=$pkg_cv_GTKLOGOUTHELPER_CFLAGS - GTKLOGOUTHELPER_LIBS=$pkg_cv_GTKLOGOUTHELPER_LIBS + EVEMU_CFLAGS=$pkg_cv_EVEMU_CFLAGS + EVEMU_LIBS=$pkg_cv_EVEMU_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - have_gtklogouthelper=yes + have_xorg_gtest_evemu=yes fi - -elif test "x$with_gtk" = x2; then : +elif test "x$with_evemu" = xcheck; then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKLOGOUTHELPER" >&5 -$as_echo_n "checking for GTKLOGOUTHELPER... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVEMU" >&5 +$as_echo_n "checking for EVEMU... " >&6; } -if test -n "$GTKLOGOUTHELPER_CFLAGS"; then - pkg_cv_GTKLOGOUTHELPER_CFLAGS="$GTKLOGOUTHELPER_CFLAGS" +if test -n "$EVEMU_CFLAGS"; then + pkg_cv_EVEMU_CFLAGS="$EVEMU_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_REQUIRED_VERSION - polkit-gobject-1 >= \$POLKIT_REQUIRED_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"utouch-evemu\""; } >&5 + ($PKG_CONFIG --exists --print-errors "utouch-evemu") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GTKLOGOUTHELPER_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>/dev/null` + pkg_cv_EVEMU_CFLAGS=`$PKG_CONFIG --cflags "utouch-evemu" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13885,19 +22562,16 @@ fi else pkg_failed=untried fi -if test -n "$GTKLOGOUTHELPER_LIBS"; then - pkg_cv_GTKLOGOUTHELPER_LIBS="$GTKLOGOUTHELPER_LIBS" +if test -n "$EVEMU_LIBS"; then + pkg_cv_EVEMU_LIBS="$EVEMU_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_REQUIRED_VERSION - polkit-gobject-1 >= \$POLKIT_REQUIRED_VERSION\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"utouch-evemu\""; } >&5 + ($PKG_CONFIG --exists --print-errors "utouch-evemu") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GTKLOGOUTHELPER_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= $GTK_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>/dev/null` + pkg_cv_EVEMU_LIBS=`$PKG_CONFIG --libs "utouch-evemu" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13918,119 +22592,604 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GTKLOGOUTHELPER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0 >= $GTK_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>&1` + EVEMU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "utouch-evemu" 2>&1` else - GTKLOGOUTHELPER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.0 >= $GTK_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION" 2>&1` + EVEMU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "utouch-evemu" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$GTKLOGOUTHELPER_PKG_ERRORS" >&5 + echo "$EVEMU_PKG_ERRORS" >&5 - have_gtklogouthelper=no + have_xorg_gtest_evemu=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - have_gtklogouthelper=no + have_xorg_gtest_evemu=no else - GTKLOGOUTHELPER_CFLAGS=$pkg_cv_GTKLOGOUTHELPER_CFLAGS - GTKLOGOUTHELPER_LIBS=$pkg_cv_GTKLOGOUTHELPER_LIBS + EVEMU_CFLAGS=$pkg_cv_EVEMU_CFLAGS + EVEMU_LIBS=$pkg_cv_EVEMU_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - have_gtklogouthelper=yes + have_xorg_gtest_evemu=yes +fi +fi + if test "x$have_xorg_gtest_evemu" = xyes; then : + XORG_GTEST_CPPFLAGS="$XORG_GTEST_CPPFLAGS -DHAVE_EVEMU" fi + if test "x$have_gtest" != xyes -o "x$have_x11" != xyes; then : + have_xorg_gtest=no +fi + + if test "x$have_xorg_gtest" = xyes; then : + + + + # Get BASE_CXXFLAGS and STRICT_CXXFLAGS + + + + + + + + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + + +# Check whether --enable-strict-compilation was given. +if test "${enable_strict_compilation+set}" = set; then : + enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval +else + STRICT_COMPILE=no fi - if test x${have_gtklogouthelper} = xyes; then -$as_echo "#define HAVE_GTKLOGOUTHELPER 1" >>confdefs.h - fi - if test x${enable_gtklogouthelper} = xyes && test x${have_gtklogouthelper} = xno; then - as_fn_error $? "GTK Logout Helper configured but polkit-gobject not found" "$LINENO" 5 - fi + + + + + +STRICT_CXXFLAGS="" + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 else - have_gtklogouthelper=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no fi - if test x${have_gtklogouthelper} = xyes; then - BUILD_GTKLOGOUTHELPER_TRUE= - BUILD_GTKLOGOUTHELPER_FALSE='#' +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi + +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 else - BUILD_GTKLOGOUTHELPER_TRUE='#' - BUILD_GTKLOGOUTHELPER_FALSE= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" fi +found="no" + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + CXXFLAGS="$CXXFLAGS -pedantic" -########################### -# APT support -########################### -# Check whether --enable-apt was given. -if test "${enable_apt+set}" = set; then : - enableval=$enable_apt; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-pedantic" >&5 +$as_echo_n "checking if $CXX supports-pedantic... " >&6; } + cacheid=xorg_cv_cxx_flag__pedantic + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes else - enable_apt=yes + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - if test "x$enable_apt" != "xno"; then - BUILD_APT_TRUE= - BUILD_APT_FALSE='#' + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + STRICT_CXXFLAGS="$STRICT_CXXFLAGS -pedantic" + found="yes" + fi + fi + + + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes else - BUILD_APT_TRUE='#' - BUILD_APT_FALSE= + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" fi +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi -if test "x$enable_apt" != "xno"; then +found="no" -$as_echo "#define HAVE_APT 1" >>confdefs.h + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror" >&5 +$as_echo_n "checking if $CXX supports-Werror... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -########################### -# Check to see if we're local -########################### -with_localinstall="no" -# Check whether --enable-localinstall was given. -if test "${enable_localinstall+set}" = set; then : - enableval=$enable_localinstall; with_localinstall=$enableval + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + STRICT_CXXFLAGS="$STRICT_CXXFLAGS -Werror" + found="yes" + fi + fi + + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -errwarn" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-errwarn" >&5 +$as_echo_n "checking if $CXX supports-errwarn... " >&6; } + cacheid=xorg_cv_cxx_flag__errwarn + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 else - with_localinstall=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -########################### -# Indicator Info -########################### + CXXFLAGS="$xorg_testset_save_CXXFLAGS" -if test "x$with_localinstall" = "xyes"; then - INDICATORDIR="${libdir}/indicators/2/" - INDICATORICONSDIR="${datadir}/indicator-applet/icons/" -elif test "x$with_gtk" = x2; then - INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4` - INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator-0.4` + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + STRICT_CXXFLAGS="$STRICT_CXXFLAGS -errwarn" + found="yes" + fi + fi + + + +# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not +# activate it with -Werror, so we add it here explicitly. + + + + + + + + + + + + + +xorg_testset_save_CXXFLAGS="$CXXFLAGS" + +if test "x$xorg_testset_cxx_unknown_warning_option" = "x" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX supports -Werror=unknown-warning-option... " >&6; } +if ${xorg_cv_cxx_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 else - INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4` - INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4` + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unknown_warning_option=yes +else + xorg_cv_cxx_flag_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cxx_flag_unknown_warning_option" >&6; } + xorg_testset_cxx_unknown_warning_option=$xorg_cv_cxx_flag_unknown_warning_option + CXXFLAGS="$xorg_testset_save_CXXFLAGS" fi +if test "x$xorg_testset_cxx_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cxx_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports -Werror=unused-command-line-argument" >&5 +$as_echo_n "checking if $CXX supports -Werror=unused-command-line-argument... " >&6; } +if ${xorg_cv_cxx_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + xorg_cv_cxx_flag_unused_command_line_argument=yes +else + xorg_cv_cxx_flag_unused_command_line_argument=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cxx_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cxx_flag_unused_command_line_argument" >&6; } + xorg_testset_cxx_unused_command_line_argument=$xorg_cv_cxx_flag_unused_command_line_argument + CXXFLAGS="$xorg_testset_save_CXXFLAGS" +fi +found="no" -########################### -# DBus Service Info -########################### + if test $found = "no" ; then + if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option" + fi -if test "x$with_localinstall" = "xyes"; then - DBUSSERVICEDIR="${datadir}/dbus-1/services/" + if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then + CXXFLAGS="$CXXFLAGS -Werror=unused-command-line-argument" + fi + + CXXFLAGS="$CXXFLAGS -Werror=attributes" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports-Werror=attributes" >&5 +$as_echo_n "checking if $CXX supports-Werror=attributes... " >&6; } + cacheid=xorg_cv_cxx_flag__Werror_attributes + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 else - DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + eval $cacheid=yes +else + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + + + CXXFLAGS="$xorg_testset_save_CXXFLAGS" + + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } + if test "$supported" = "yes" ; then + STRICT_CXXFLAGS="$STRICT_CXXFLAGS -Werror=attributes" + found="yes" + fi + fi + + + +if test "x$STRICT_COMPILE" = "xyes"; then + BASE_CXXFLAGS="$BASE_CXXFLAGS $STRICT_CXXFLAGS" + fi + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + + if test "x$enable_tests" = "xauto"; then + enable_tests=${have_gtest} + elif test "x$enable_tests" = "xyes" && test "x$have_gtest" != "xyes"; then + as_fn_error $? "tests were requested but gtest is not installed." "$LINENO" 5 + fi + if test "x$enable_tests" = "xyes"; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEST_SERVICE" >&5 +$as_echo_n "checking for TEST_SERVICE... " >&6; } + +if test -n "$TEST_SERVICE_CFLAGS"; then + pkg_cv_TEST_SERVICE_CFLAGS="$TEST_SERVICE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"indicator3-0.4 >= \$INDICATOR_REQUIRED_VERSION + dbustest-1 >= \$DBUSTEST_REQUIRED_VERSION + dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION\""; } >&5 + ($PKG_CONFIG --exists --print-errors "indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbustest-1 >= $DBUSTEST_REQUIRED_VERSION + dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_TEST_SERVICE_CFLAGS=`$PKG_CONFIG --cflags "indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbustest-1 >= $DBUSTEST_REQUIRED_VERSION + dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$TEST_SERVICE_LIBS"; then + pkg_cv_TEST_SERVICE_LIBS="$TEST_SERVICE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"indicator3-0.4 >= \$INDICATOR_REQUIRED_VERSION + dbustest-1 >= \$DBUSTEST_REQUIRED_VERSION + dbusmenu-glib-0.4 >= \$DBUSMENUGLIB_REQUIRED_VERSION\""; } >&5 + ($PKG_CONFIG --exists --print-errors "indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbustest-1 >= $DBUSTEST_REQUIRED_VERSION + dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_TEST_SERVICE_LIBS=`$PKG_CONFIG --libs "indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbustest-1 >= $DBUSTEST_REQUIRED_VERSION + dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + TEST_SERVICE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbustest-1 >= $DBUSTEST_REQUIRED_VERSION + dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION" 2>&1` + else + TEST_SERVICE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbustest-1 >= $DBUSTEST_REQUIRED_VERSION + dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$TEST_SERVICE_PKG_ERRORS" >&5 + + enable_tests="no" +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + enable_tests="no" +else + TEST_SERVICE_CFLAGS=$pkg_cv_TEST_SERVICE_CFLAGS + TEST_SERVICE_LIBS=$pkg_cv_TEST_SERVICE_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + enable_tests="yes" +fi + fi +fi + if test "x$enable_tests" = "xyes"; then + BUILD_TESTS_TRUE= + BUILD_TESTS_FALSE='#' +else + BUILD_TESTS_TRUE='#' + BUILD_TESTS_FALSE= +fi + + + + ############################## # Custom Junk ############################## @@ -14560,7 +23719,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -14817,7 +23976,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_SHTOOL="shtool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -14864,7 +24023,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LCOV="lcov" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -14901,7 +24060,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GENHTML="genhtml" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -14988,7 +24147,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GCOVR="gcovr" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -15048,16 +24207,7 @@ fi # Files ########################### - if test "x$has_gudev" = "xtrue"; then - HAS_GUDEV_TRUE= - HAS_GUDEV_FALSE='#' -else - HAS_GUDEV_TRUE='#' - HAS_GUDEV_FALSE= -fi - - -ac_config_files="$ac_config_files Makefile src/Makefile data/Makefile data/icons/Makefile data/icons/16x16/Makefile data/icons/16x16/actions/Makefile data/icons/16x16/status/Makefile data/icons/22x22/Makefile data/icons/22x22/actions/Makefile data/icons/22x22/status/Makefile data/icons/24x24/Makefile data/icons/24x24/actions/Makefile data/icons/24x24/status/Makefile data/icons/32x32/Makefile data/icons/32x32/actions/Makefile data/icons/32x32/status/Makefile data/icons/scalable/Makefile data/icons/scalable/actions/Makefile data/icons/scalable/status/Makefile data/extra-sessions/Makefile po/Makefile.in" +ac_config_files="$ac_config_files Makefile src/Makefile data/Makefile data/icons/Makefile data/icons/16x16/Makefile data/icons/16x16/actions/Makefile data/icons/16x16/status/Makefile data/icons/22x22/Makefile data/icons/22x22/actions/Makefile data/icons/22x22/status/Makefile data/icons/24x24/Makefile data/icons/24x24/actions/Makefile data/icons/24x24/status/Makefile data/icons/32x32/Makefile data/icons/32x32/actions/Makefile data/icons/32x32/status/Makefile data/icons/scalable/Makefile data/icons/scalable/actions/Makefile data/icons/scalable/status/Makefile data/extra-sessions/Makefile tests/Makefile po/Makefile.in" cat >confcache <<\_ACEOF @@ -15197,16 +24347,16 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${USE_GTK3_TRUE}" && test -z "${USE_GTK3_FALSE}"; then - as_fn_error $? "conditional \"USE_GTK3\" was never defined. +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_GTKLOGOUTHELPER_TRUE}" && test -z "${BUILD_GTKLOGOUTHELPER_FALSE}"; then as_fn_error $? "conditional \"BUILD_GTKLOGOUTHELPER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${BUILD_APT_TRUE}" && test -z "${BUILD_APT_FALSE}"; then - as_fn_error $? "conditional \"BUILD_APT\" was never defined. +if test -z "${BUILD_TESTS_TRUE}" && test -z "${BUILD_TESTS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GCOV_TRUE}" && test -z "${HAVE_GCOV_FALSE}"; then @@ -15221,10 +24371,6 @@ if test -z "${HAVE_GCOVR_TRUE}" && test -z "${HAVE_GCOVR_FALSE}"; then as_fn_error $? "conditional \"HAVE_GCOVR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAS_GUDEV_TRUE}" && test -z "${HAS_GUDEV_FALSE}"; then - as_fn_error $? "conditional \"HAS_GUDEV\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -15523,16 +24669,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -15592,28 +24738,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -15635,7 +24769,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15701,10 +24835,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.68, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15795,7 +24929,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -15959,6 +25093,60 @@ enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_sub enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' @@ -16037,7 +25225,38 @@ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ -striplib; do +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +reload_flag_CXX \ +compiler_CXX \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_static_CXX \ +lt_cv_prog_compiler_c_o_CXX \ +export_dynamic_flag_spec_CXX \ +whole_archive_flag_spec_CXX \ +compiler_needs_object_CXX \ +with_gnu_ld_CXX \ +allow_undefined_flag_CXX \ +no_undefined_flag_CXX \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_separator_CXX \ +exclude_expsyms_CXX \ +include_expsyms_CXX \ +file_list_spec_CXX \ +compiler_lib_search_dirs_CXX \ +predep_objects_CXX \ +postdep_objects_CXX \ +predeps_CXX \ +postdeps_CXX \ +compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" @@ -16067,7 +25286,18 @@ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do +sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +old_archive_cmds_CXX \ +old_archive_from_new_cmds_CXX \ +old_archive_from_expsyms_cmds_CXX \ +archive_cmds_CXX \ +archive_expsym_cmds_CXX \ +module_cmds_CXX \ +module_expsym_cmds_CXX \ +export_symbols_cmds_CXX \ +prelink_cmds_CXX \ +postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" @@ -16099,6 +25329,8 @@ fi + + _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -16131,6 +25363,7 @@ do "data/icons/scalable/actions/Makefile") CONFIG_FILES="$CONFIG_FILES data/icons/scalable/actions/Makefile" ;; "data/icons/scalable/status/Makefile") CONFIG_FILES="$CONFIG_FILES data/icons/scalable/status/Makefile" ;; "data/extra-sessions/Makefile") CONFIG_FILES="$CONFIG_FILES data/extra-sessions/Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; @@ -16873,7 +26106,7 @@ $as_echo X"$file" | # The names of the tagged configurations supported by this script. -available_tags="" +available_tags="CXX " # ### BEGIN LIBTOOL CONFIG @@ -17260,6 +26493,20 @@ file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + # ### END LIBTOOL CONFIG _LT_EOF @@ -17452,6 +26699,159 @@ fi (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile @@ -17525,9 +26925,8 @@ SUS Indicator Configuration: Prefix: $prefix Indicator Dir: $INDICATORDIR - Indicator GTK: $with_gtk Logout Helper: $have_gtklogouthelper - APT support: $enable_apt + Unit Tests: $enable_tests Coverage reporting: $use_gcov " >&5 $as_echo "$as_me: @@ -17536,8 +26935,7 @@ SUS Indicator Configuration: Prefix: $prefix Indicator Dir: $INDICATORDIR - Indicator GTK: $with_gtk Logout Helper: $have_gtklogouthelper - APT support: $enable_apt + Unit Tests: $enable_tests Coverage reporting: $use_gcov " >&6;} diff --git a/configure.ac b/configure.ac index 1ef7d50..05983f0 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/indicator-session.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-session, 0.3.96) +AM_INIT_AUTOMAKE(indicator-session, 12.10.0) AM_MAINTAINER_MODE @@ -14,6 +14,7 @@ IT_PROG_INTLTOOL([0.35.0]) AC_ISC_POSIX AC_PROG_CC +AC_PROG_CXX AM_PROG_CC_C_O AC_STDC_HEADERS AC_PROG_LIBTOOL @@ -27,66 +28,33 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) # Dependencies ########################### -GTK_REQUIRED_VERSION=2.12 -GTK3_REQUIRED_VERSION=3.0 +GTK_REQUIRED_VERSION=3.0 INDICATOR_REQUIRED_VERSION=0.3.19 DBUSMENUGTK_REQUIRED_VERSION=0.5.90 POLKIT_REQUIRED_VERSION=0.92 +DBUSTEST_REQUIRED_VERSION=0.0.5 +DBUSMENUGLIB_REQUIRED_VERSION=0.1.1 -AC_ARG_WITH([gtk], - [AS_HELP_STRING([--with-gtk], - [Which version of gtk to use for the indicator @<:@default=3@:>@])], - [], - [with_gtk=3]) - -AS_IF([test "x$with_gtk" = x3], - [PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK3_REQUIRED_VERSION - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) - ], - [test "x$with_gtk" = x2], - [PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) - ], - [AC_MSG_FAILURE([Value for --with-indicator-gtk was neither 2 nor 3])] -) +PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK_REQUIRED_VERSION + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION) AC_SUBST(APPLET_CFLAGS) AC_SUBST(APPLET_LIBS) -DBUSMENUGLIB_REQUIRED_VERSION=0.1.1 - -AS_IF([test "x$with_gtk" = x3], - [PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2) - ], - [test "x$with_gtk" = x2], - [PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - dbus-glib-1 - gio-unix-2.0 - indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - packagekit-glib2) - ] -) +PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + dbus-glib-1 + gio-unix-2.0 + indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + packagekit-glib2) AC_SUBST(SESSIONERVICE_CFLAGS) AC_SUBST(SESSIONERVICE_LIBS) -PKG_CHECK_MODULES(GUDEV, gudev-1.0, has_gudev=true, has_gudev=false) AC_SUBST(GUDEV_CFLAGS) AC_SUBST(GUDEV_LIBS) -AM_CONDITIONAL([USE_GTK3], [test "x$with_gtk" = "x3"]) -AS_IF([test "x$with_gtk" = x3], [ - AC_DEFINE(HAVE_GTK3, 1, [whether gtk3 is available]) - ]) - ########################### # GTK Logout Helper ########################### @@ -96,19 +64,10 @@ AC_ARG_ENABLE([gtklogouthelper], enable_gtklogouthelper=auto) if test x"$enable_gtklogouthelper" != x"no" ; then - AS_IF([test "x$with_gtk" = x3], - [PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-3.0 >= $GTK3_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION, - [have_gtklogouthelper=yes], - [have_gtklogouthelper=no]) - ], - [test "x$with_gtk" = x2], - [PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION, - [have_gtklogouthelper=yes], - [have_gtklogouthelper=no]) - ] - ) + PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-3.0 >= $GTK_REQUIRED_VERSION + polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION, + [have_gtklogouthelper=yes], + [have_gtklogouthelper=no]) if test x${have_gtklogouthelper} = xyes; then AC_DEFINE(HAVE_GTKLOGOUTHELPER, 1, [Define to 1 to enable GTK Logout Helper]) fi @@ -124,18 +83,6 @@ AC_SUBST(GTKLOGOUTHELPER_CFLAGS) AC_SUBST(GTKLOGOUTHELPER_LIBS) ########################### -# APT support -########################### -AC_ARG_ENABLE([apt], - AC_HELP_STRING([--disable-apt], [disable APT support]),, - [enable_apt=yes]) -AM_CONDITIONAL([BUILD_APT], [test "x$enable_apt" != "xno"]) - -if test "x$enable_apt" != "xno"; then - AC_DEFINE(HAVE_APT, 1, [Define to 1 to enable APT support]) -fi - -########################### # Check to see if we're local ########################### @@ -170,6 +117,35 @@ else fi AC_SUBST(DBUSSERVICEDIR) +########################### +# Google Test framework +########################### + +AC_ARG_ENABLE([tests], + [AS_HELP_STRING([--disable-tests], [Disable test scripts and tools (default=auto)])], + [enable_tests=${enableval}], + [enable_tests=auto]) +if test "x$enable_tests" != "xno"; then + m4_include([m4/gtest.m4]) + CHECK_GTEST + CHECK_XORG_GTEST + if test "x$enable_tests" = "xauto"; then + enable_tests=${have_gtest} + elif test "x$enable_tests" = "xyes" && test "x$have_gtest" != "xyes"; then + AC_MSG_ERROR([tests were requested but gtest is not installed.]) + fi + if test "x$enable_tests" = "xyes"; then + PKG_CHECK_MODULES([TEST_SERVICE],[indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + dbustest-1 >= $DBUSTEST_REQUIRED_VERSION + dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION], + [enable_tests="yes"], + [enable_tests="no"]) + fi +fi +AM_CONDITIONAL([BUILD_TESTS],[test "x$enable_tests" = "xyes"]) +AC_SUBST([TEST_SERVICE_CFLAGS]) +AC_SUBST([TEST_SERVICE_LDFLAGS]) + ############################## # Custom Junk ############################## @@ -213,8 +189,6 @@ AC_SUBST(COVERAGE_LDFLAGS) # Files ########################### -AM_CONDITIONAL([HAS_GUDEV], [test "x$has_gudev" = "xtrue"]) - AC_CONFIG_FILES([ Makefile src/Makefile @@ -236,6 +210,7 @@ data/icons/scalable/Makefile data/icons/scalable/actions/Makefile data/icons/scalable/status/Makefile data/extra-sessions/Makefile +tests/Makefile po/Makefile.in ]) @@ -251,8 +226,7 @@ SUS Indicator Configuration: Prefix: $prefix Indicator Dir: $INDICATORDIR - Indicator GTK: $with_gtk Logout Helper: $have_gtklogouthelper - APT support: $enable_apt + Unit Tests: $enable_tests Coverage reporting: $use_gcov ]) diff --git a/data/Makefile.in b/data/Makefile.in index cea83a7..b0613dd 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -41,8 +58,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -64,6 +81,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -139,6 +161,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -148,6 +171,11 @@ 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@ @@ -160,6 +188,8 @@ 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@ @@ -171,6 +201,8 @@ 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@ @@ -239,16 +271,25 @@ 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@ @@ -357,8 +398,11 @@ clean-libtool: -rm -rf .libs _libs install-dbus_servicesDATA: $(dbus_services_DATA) @$(NORMAL_INSTALL) - test -z "$(dbus_servicesdir)" || $(MKDIR_P) "$(DESTDIR)$(dbus_servicesdir)" @list='$(dbus_services_DATA)'; test -n "$(dbus_servicesdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dbus_servicesdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dbus_servicesdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -375,8 +419,11 @@ uninstall-dbus_servicesDATA: dir='$(DESTDIR)$(dbus_servicesdir)'; $(am__uninstall_files_from_dir) install-dist_convertDATA: $(dist_convert_DATA) @$(NORMAL_INSTALL) - test -z "$(convertdir)" || $(MKDIR_P) "$(DESTDIR)$(convertdir)" @list='$(dist_convert_DATA)'; test -n "$(convertdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(convertdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(convertdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -559,13 +606,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/data/com.canonical.indicator.session.gschema.xml.in b/data/com.canonical.indicator.session.gschema.xml.in index 0ef3d00..6010b3f 100644 --- a/data/com.canonical.indicator.session.gschema.xml.in +++ b/data/com.canonical.indicator.session.gschema.xml.in @@ -21,21 +21,10 @@ <_description>Makes it so that the shutdown button doesn’t show in the session menu.</_description> </key> <key type="b" name="show-real-name-on-panel"> - <default>true</default> + <default>false</default> <summary>Determine the visibility of the User's real name on the panel</summary> <description>Allow for the Removal of the users name from the panel</description> </key> - <key type="b" name="user-show-menu"> - <default>true</default> - <summary>Determine the visibility of the User Menu</summary> - <description>Allow for the user menu to be hidden by the user.</description> - </key> - <key type="b" name="use-username-in-switch-item"> - <default>false</default> - <summary>Determine what string to use for the user's name in the switch menuitem.</summary> - <description>The switch menuitem as part of the user menu should be default have the label 'Switch User Account'. - This settings gives the user the potential to have the label read 'Switch from $username'</description> - </key> </schema> diff --git a/data/extra-sessions/Makefile.in b/data/extra-sessions/Makefile.in index cde10fc..1efccde 100644 --- a/data/extra-sessions/Makefile.in +++ b/data/extra-sessions/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -20,6 +20,23 @@ ################################### 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@ @@ -44,8 +61,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -60,6 +77,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -101,6 +123,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -110,6 +133,11 @@ 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@ @@ -122,6 +150,8 @@ 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@ @@ -133,6 +163,8 @@ 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@ @@ -201,16 +233,25 @@ 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@ @@ -326,8 +367,11 @@ clean-libtool: -rm -rf .libs _libs install-extra_guestsDATA: $(extra_guests_DATA) @$(NORMAL_INSTALL) - test -z "$(extra_guestsdir)" || $(MKDIR_P) "$(DESTDIR)$(extra_guestsdir)" @list='$(extra_guests_DATA)'; test -n "$(extra_guestsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(extra_guestsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(extra_guestsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/data/icons/16x16/Makefile.in b/data/icons/16x16/Makefile.in index 2ac3c90..d6443fe 100644 --- a/data/icons/16x16/Makefile.in +++ b/data/icons/16x16/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,6 +15,23 @@ @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@ @@ -39,8 +56,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -62,6 +79,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -107,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -116,6 +139,11 @@ 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@ @@ -128,6 +156,8 @@ 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@ @@ -139,6 +169,8 @@ 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@ @@ -207,16 +239,25 @@ 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@ @@ -474,13 +515,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/data/icons/16x16/actions/Makefile.in b/data/icons/16x16/actions/Makefile.in index 83a14ac..260a70d 100644 --- a/data/icons/16x16/actions/Makefile.in +++ b/data/icons/16x16/actions/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -40,8 +57,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -97,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -106,6 +129,11 @@ 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@ @@ -118,6 +146,8 @@ 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@ @@ -129,6 +159,8 @@ 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@ @@ -197,16 +229,25 @@ 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@ @@ -305,8 +346,11 @@ clean-libtool: -rm -rf .libs _libs install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) - test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/data/icons/16x16/status/Makefile.in b/data/icons/16x16/status/Makefile.in index a4863ed..7c2af6e 100644 --- a/data/icons/16x16/status/Makefile.in +++ b/data/icons/16x16/status/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -40,8 +57,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -97,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -106,6 +129,11 @@ 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@ @@ -118,6 +146,8 @@ 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@ @@ -129,6 +159,8 @@ 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@ @@ -197,16 +229,25 @@ 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@ @@ -302,8 +343,11 @@ clean-libtool: -rm -rf .libs _libs install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) - test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/data/icons/22x22/Makefile.in b/data/icons/22x22/Makefile.in index d3c1f55..4368c25 100644 --- a/data/icons/22x22/Makefile.in +++ b/data/icons/22x22/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,6 +15,23 @@ @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@ @@ -39,8 +56,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -62,6 +79,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -107,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -116,6 +139,11 @@ 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@ @@ -128,6 +156,8 @@ 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@ @@ -139,6 +169,8 @@ 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@ @@ -207,16 +239,25 @@ 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@ @@ -474,13 +515,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/data/icons/22x22/actions/Makefile.in b/data/icons/22x22/actions/Makefile.in index 274e1d9..e5a4bad 100644 --- a/data/icons/22x22/actions/Makefile.in +++ b/data/icons/22x22/actions/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -40,8 +57,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -97,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -106,6 +129,11 @@ 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@ @@ -118,6 +146,8 @@ 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@ @@ -129,6 +159,8 @@ 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@ @@ -197,16 +229,25 @@ 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@ @@ -305,8 +346,11 @@ clean-libtool: -rm -rf .libs _libs install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) - test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/data/icons/22x22/status/Makefile.in b/data/icons/22x22/status/Makefile.in index 3f77b86..fec4ac4 100644 --- a/data/icons/22x22/status/Makefile.in +++ b/data/icons/22x22/status/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -40,8 +57,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -97,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -106,6 +129,11 @@ 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@ @@ -118,6 +146,8 @@ 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@ @@ -129,6 +159,8 @@ 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@ @@ -197,16 +229,25 @@ 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@ @@ -302,8 +343,11 @@ clean-libtool: -rm -rf .libs _libs install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) - test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/data/icons/24x24/Makefile.in b/data/icons/24x24/Makefile.in index a8495b1..91f2365 100644 --- a/data/icons/24x24/Makefile.in +++ b/data/icons/24x24/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,6 +15,23 @@ @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@ @@ -39,8 +56,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -62,6 +79,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -107,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -116,6 +139,11 @@ 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@ @@ -128,6 +156,8 @@ 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@ @@ -139,6 +169,8 @@ 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@ @@ -207,16 +239,25 @@ 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@ @@ -474,13 +515,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/data/icons/24x24/actions/Makefile.in b/data/icons/24x24/actions/Makefile.in index 75e79e6..e7f0fd6 100644 --- a/data/icons/24x24/actions/Makefile.in +++ b/data/icons/24x24/actions/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -40,8 +57,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -97,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -106,6 +129,11 @@ 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@ @@ -118,6 +146,8 @@ 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@ @@ -129,6 +159,8 @@ 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@ @@ -197,16 +229,25 @@ 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@ @@ -305,8 +346,11 @@ clean-libtool: -rm -rf .libs _libs install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) - test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/data/icons/24x24/status/Makefile.in b/data/icons/24x24/status/Makefile.in index 8e3bf89..61d5076 100644 --- a/data/icons/24x24/status/Makefile.in +++ b/data/icons/24x24/status/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -40,8 +57,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -97,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -106,6 +129,11 @@ 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@ @@ -118,6 +146,8 @@ 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@ @@ -129,6 +159,8 @@ 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@ @@ -197,16 +229,25 @@ 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@ @@ -302,8 +343,11 @@ clean-libtool: -rm -rf .libs _libs install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) - test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/data/icons/32x32/Makefile.in b/data/icons/32x32/Makefile.in index fa3ec29..c7a1ac2 100644 --- a/data/icons/32x32/Makefile.in +++ b/data/icons/32x32/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,6 +15,23 @@ @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@ @@ -39,8 +56,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -62,6 +79,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -107,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -116,6 +139,11 @@ 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@ @@ -128,6 +156,8 @@ 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@ @@ -139,6 +169,8 @@ 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@ @@ -207,16 +239,25 @@ 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@ @@ -474,13 +515,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/data/icons/32x32/actions/Makefile.in b/data/icons/32x32/actions/Makefile.in index 1f1e3b7..c83a229 100644 --- a/data/icons/32x32/actions/Makefile.in +++ b/data/icons/32x32/actions/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -40,8 +57,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -97,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -106,6 +129,11 @@ 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@ @@ -118,6 +146,8 @@ 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@ @@ -129,6 +159,8 @@ 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@ @@ -197,16 +229,25 @@ 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@ @@ -303,8 +344,11 @@ clean-libtool: -rm -rf .libs _libs install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) - test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/data/icons/32x32/status/Makefile.in b/data/icons/32x32/status/Makefile.in index bf27534..8af90ca 100644 --- a/data/icons/32x32/status/Makefile.in +++ b/data/icons/32x32/status/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -40,8 +57,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -97,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -106,6 +129,11 @@ 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@ @@ -118,6 +146,8 @@ 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@ @@ -129,6 +159,8 @@ 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@ @@ -197,16 +229,25 @@ 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@ @@ -302,8 +343,11 @@ clean-libtool: -rm -rf .libs _libs install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) - test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/data/icons/Makefile.in b/data/icons/Makefile.in index e49ecd3..a64f7bc 100644 --- a/data/icons/Makefile.in +++ b/data/icons/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,6 +15,23 @@ @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@ @@ -39,8 +56,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -62,6 +79,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -107,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -116,6 +139,11 @@ 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@ @@ -128,6 +156,8 @@ 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@ @@ -139,6 +169,8 @@ 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@ @@ -207,16 +239,25 @@ 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@ @@ -475,13 +516,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/data/icons/scalable/Makefile.in b/data/icons/scalable/Makefile.in index ea39187..9632cb3 100644 --- a/data/icons/scalable/Makefile.in +++ b/data/icons/scalable/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,6 +15,23 @@ @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@ @@ -39,8 +56,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -62,6 +79,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -107,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -116,6 +139,11 @@ 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@ @@ -128,6 +156,8 @@ 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@ @@ -139,6 +169,8 @@ 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@ @@ -207,16 +239,25 @@ 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@ @@ -474,13 +515,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ diff --git a/data/icons/scalable/actions/Makefile.in b/data/icons/scalable/actions/Makefile.in index 8cb05a9..205bcd8 100644 --- a/data/icons/scalable/actions/Makefile.in +++ b/data/icons/scalable/actions/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -40,8 +57,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -97,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -106,6 +129,11 @@ 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@ @@ -118,6 +146,8 @@ 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@ @@ -129,6 +159,8 @@ 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@ @@ -197,16 +229,25 @@ 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@ @@ -305,8 +346,11 @@ clean-libtool: -rm -rf .libs _libs install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) - test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/data/icons/scalable/status/Makefile.in b/data/icons/scalable/status/Makefile.in index c84e227..625e9ea 100644 --- a/data/icons/scalable/status/Makefile.in +++ b/data/icons/scalable/status/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @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@ @@ -40,8 +57,8 @@ 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -97,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -106,6 +129,11 @@ 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@ @@ -118,6 +146,8 @@ 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@ @@ -129,6 +159,8 @@ 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@ @@ -197,16 +229,25 @@ 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@ @@ -302,8 +343,11 @@ clean-libtool: -rm -rf .libs _libs install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) - test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; test -n "$(iconsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(iconsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(iconsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2011-12-04.11; # UTC +scriptversion=2012-03-27.16; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ scriptversion=2011-12-04.11; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -40,8 +40,8 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. @@ -57,6 +57,12 @@ EOF ;; esac +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -102,6 +108,12 @@ if test "$depmode" = msvc7msys; then depmode=msvc7 fi +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -156,15 +168,14 @@ gcc) ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory + tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. @@ -203,18 +214,15 @@ sgi) # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else @@ -226,10 +234,17 @@ sgi) rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` @@ -259,12 +274,11 @@ aix) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. + # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. + # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -275,23 +289,26 @@ aix) ;; icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h - # which is wrong. We want: + # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -300,15 +317,21 @@ icc) exit $stat fi rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; @@ -344,7 +367,7 @@ hp2) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// @@ -359,9 +382,9 @@ hp2) tru64) # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. + # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= @@ -407,8 +430,7 @@ tru64) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi @@ -443,11 +465,11 @@ msvc7) p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g -s/\(.*\)/ \1 \\/p +s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { - s/.*/ / + s/.*/'"$tab"'/ G p }' >> "$depfile" @@ -478,7 +500,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -498,15 +520,14 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ + tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -562,8 +583,7 @@ makedepend) # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -583,7 +603,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -652,8 +672,8 @@ msvisualcpp) sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/m4/gtest.m4 b/m4/gtest.m4 new file mode 100644 index 0000000..2de334c --- /dev/null +++ b/m4/gtest.m4 @@ -0,0 +1,63 @@ +# Copyright (C) 2012 Canonical, Ltd. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# Checks whether the gtest source is available on the system. Allows for +# adjusting the include and source path. Sets have_gtest=yes if the source is +# present. Sets GTEST_CPPFLAGS and GTEST_SOURCE to the preprocessor flags and +# source location respectively. +AC_DEFUN([CHECK_GTEST], +[ + AC_ARG_WITH([gtest-include-path], + [AS_HELP_STRING([--with-gtest-include-path], + [location of the Google test headers])], + [GTEST_CPPFLAGS="-I$withval"]) + + AC_ARG_WITH([gtest-source-path], + [AS_HELP_STRING([--with-gtest-source-path], + [location of the Google test sources, defaults to /usr/src/gtest])], + [GTEST_SOURCE="$withval"], + [GTEST_SOURCE="/usr/src/gtest"]) + + GTEST_CPPFLAGS="$GTEST_CPPFLAGS -I$GTEST_SOURCE" + + AC_LANG_PUSH([C++]) + + tmp_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $GTEST_CPPFLAGS" + + AC_CHECK_HEADER([gtest/gtest.h]) + + CPPFLAGS="$tmp_CPPFLAGS" + + AC_LANG_POP + + AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc] + [$GTEST_SOURCE/src/gtest_main.cc], + [have_gtest_source=yes], + [have_gtest_source=no]) + + AS_IF([test "x$ac_cv_header_gtest_gtest_h" = xyes -a \ + "x$have_gtest_source" = xyes], + [have_gtest=yes] + [AC_SUBST(GTEST_CPPFLAGS)] + [AC_SUBST(GTEST_SOURCE)], + [have_gtest=no]) +]) # CHECK_GTEST diff --git a/po/POTFILES.in b/po/POTFILES.in index 03a259c..6392590 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,13 +1,13 @@ [encoding: UTF-8] data/com.canonical.indicator.session.gschema.xml.in data/extra-sessions/classic-desktop.desktop.in.in -src/settings-helper.c -src/lock-helper.c -src/gtk-logout-helper.c src/dialog.c +src/gen-session-dbus.xml.c +src/gtk-logout-helper.c src/indicator-session.c +src/session-dbus.c +src/session-menu-mgr.c src/session-service.c -src/apt-watcher.c -src/device-menu-mgr.c -src/user-menu-mgr.c -src/udev-mgr.c +src/users-service-dbus.c +src/user-widget.c + diff --git a/src/Makefile.am b/src/Makefile.am index b29e8d4..7bc6306 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ - +CLEANFILES = EXTRA_DIST = libexec_PROGRAMS = \ @@ -13,75 +13,96 @@ endif # Indicator Stuff ################### +CLEANFILES += .libs/*.gcda .libs/*.gcno *.gcda *.gcno + sessionlibdir = $(INDICATORDIR) sessionlib_LTLIBRARIES = libsession.la libsession_la_SOURCES = \ indicator-session.c \ gen-session-dbus.xml.h \ - dbus-shared-names.h \ - dbusmenu-shared.h \ + shared-names.h \ user-widget.c \ - user-widget.h \ - accounts-service-client.h \ - accounts-service-user-client.h + user-widget.h libsession_la_CFLAGS = \ $(APPLET_CFLAGS) \ $(COVERAGE_CFLAGS) \ - -Wall -Werror \ + -Wall -Wunused \ -DG_LOG_DOMAIN=\"Indicator-Session\" libsession_la_LIBADD = $(APPLET_LIBS) libsession_la_LDFLAGS = \ $(COVERAGE_LDFLAGS) \ -module -avoid-version -consolekit-manager-client.h: $(srcdir)/org.freedesktop.ConsoleKit.Manager.xml - dbus-binding-tool \ - --prefix=_consolekit_manager_client \ - --mode=glib-client \ - --output=consolekit-manager-client.h \ - $(srcdir)/org.freedesktop.ConsoleKit.Manager.xml - -consolekit-seat-client.h: $(srcdir)/org.freedesktop.ConsoleKit.Seat.xml - dbus-binding-tool \ - --prefix=_consolekit_seat_client \ - --mode=glib-client \ - --output=consolekit-seat-client.h \ - $(srcdir)/org.freedesktop.ConsoleKit.Seat.xml - -consolekit-session-client.h: $(srcdir)/org.freedesktop.ConsoleKit.Session.xml - dbus-binding-tool \ - --prefix=_consolekit_session_client \ - --mode=glib-client \ - --output=consolekit-session-client.h \ - $(srcdir)/org.freedesktop.ConsoleKit.Session.xml - -display-manager-client.h: $(srcdir)/display-manager.xml - dbus-binding-tool \ - --prefix=_gdm_local_display_factory_client \ - --mode=glib-client \ - --output=display-manager-client.h \ - $(srcdir)/display-manager.xml - -accounts-service-client.h: $(srcdir)/accounts-service.xml - dbus-binding-tool \ - --prefix=_accounts_service_client \ - --mode=glib-client \ - --output=accounts-service-client.h \ - $(srcdir)/accounts-service.xml - -accounts-service-user-client.h: $(srcdir)/accounts-service-user.xml - dbus-binding-tool \ - --prefix=_accounts_service_user_client \ - --mode=glib-client \ - --output=accounts-service-user-client.h \ - $(srcdir)/accounts-service-user.xml - -upower-client.h: $(srcdir)/upower.xml - dbus-binding-tool \ - --prefix=_upower_client \ - --mode=glib-client \ - --output=upower-client.h \ - $(srcdir)/upower.xml +dbus_display_manager_sources = \ + dbus-display-manager.c \ + dbus-display-manager.h + +$(dbus_display_manager_sources): display-manager.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-display-manager \ + $^ + +dbus_consolekit_manager_sources = \ + dbus-consolekit-manager.c \ + dbus-consolekit-manager.h + +$(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 = \ + dbus-consolekit-seat.c \ + dbus-consolekit-seat.h + +$(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 = \ + dbus-consolekit-session.c \ + dbus-consolekit-session.h + +$(dbus_consolekit_session_sources): org.freedesktop.ConsoleKit.Session.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-consolekit-session \ + $^ + +dbus_accounts_sources = \ + dbus-accounts.c \ + dbus-accounts.h + +$(dbus_accounts_sources): org.freedesktop.Accounts.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-accounts \ + $^ + +dbus_user_sources = \ + dbus-user.c \ + dbus-user.h + +$(dbus_user_sources): org.freedesktop.Accounts.User.xml + gdbus-codegen \ + --interface-prefix org.freedesktop \ + --generate-c-code dbus-user \ + $^ + +dbus_upower_sources = \ + dbus-upower.c \ + dbus-upower.h + +$(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 $<" @@ -98,54 +119,32 @@ gen-%.xml.h: %.xml ################# indicator_session_service_SOURCES = \ - lock-helper.c \ - lock-helper.h \ + $(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 \ - dbusmenu-shared.h \ - settings-helper.c \ users-service-dbus.h \ users-service-dbus.c \ - user-menu-mgr.h \ - user-menu-mgr.c \ - device-menu-mgr.h \ - device-menu-mgr.c \ - sane-rules.h - -if BUILD_APT -indicator_session_service_SOURCES += \ - apt-watcher.h \ - apt-watcher.c -else -EXTRA_DIST += \ - apt-watcher.h \ - apt-watcher.c -endif - -if HAS_GUDEV -indicator_session_service_SOURCES += \ - udev-mgr.h \ - udev-mgr.c -else -EXTRA_DIST += \ - udev-mgr.h \ - udev-mgr.c -endif + session-menu-mgr.h \ + session-menu-mgr.c indicator_session_service_CFLAGS = \ $(SESSIONSERVICE_CFLAGS) \ $(GCONF_CFLAGS) \ -DLIBEXECDIR=\"$(libexecdir)\" \ - -Wall -Werror \ + -Wall \ -DG_LOG_DOMAIN=\"Indicator-Session\" \ - $(GUDEV_CFLAGS) \ $(COVERAGE_CFLAGS) indicator_session_service_LDADD = \ $(SESSIONSERVICE_LIBS) \ - $(GCONF_LIBS) \ - $(GUDEV_LIBS) + $(GCONF_LIBS) indicator_session_service_LDFLAGS = \ $(COVERAGE_LDFLAGS) @@ -155,9 +154,8 @@ indicator_session_service_LDFLAGS = \ if BUILD_GTKLOGOUTHELPER gtk_logout_helper_SOURCES = \ + $(dbus_consolekit_manager_sources) \ gtk-logout-helper.c \ - settings-helper.c \ - settings-helper.h \ dialog.c \ dialog.h @@ -166,7 +164,7 @@ gtk_logout_helper_CFLAGS = \ $(GTKLOGOUTHELPER_CFLAGS) \ $(GCONF_CFLAGS) \ $(COVERAGE_CFLAGS) \ - -Wall -Werror \ + -Wall \ -DINDICATOR_ICONS_DIR="\"$(INDICATORICONSDIR)\"" gtk_logout_helper_LDADD = \ @@ -184,25 +182,24 @@ endif ############### BUILT_SOURCES = \ - consolekit-manager-client.h \ - consolekit-seat-client.h \ - consolekit-session-client.h \ - display-manager-client.h \ + $(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 \ - upower-client.h \ - accounts-service-client.h \ - accounts-service-user-client.h + gen-session-dbus.xml.h 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 \ - display-manager.xml \ session-dbus.xml \ - upower.xml \ - accounts-service.xml \ - accounts-service-user.xml + upower.xml -CLEANFILES = \ - $(BUILT_SOURCES) +CLEANFILES += $(BUILT_SOURCES) diff --git a/src/Makefile.in b/src/Makefile.in index 5e7dfdb..73b2cdb 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -17,6 +17,23 @@ 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@ @@ -39,30 +56,14 @@ libexec_PROGRAMS = indicator-session-service$(EXEEXT) $(am__EXEEXT_1) @BUILD_GTKLOGOUTHELPER_TRUE@am__append_1 = \ @BUILD_GTKLOGOUTHELPER_TRUE@ gtk-logout-helper -@BUILD_APT_TRUE@am__append_2 = \ -@BUILD_APT_TRUE@ apt-watcher.h \ -@BUILD_APT_TRUE@ apt-watcher.c - -@BUILD_APT_FALSE@am__append_3 = \ -@BUILD_APT_FALSE@ apt-watcher.h \ -@BUILD_APT_FALSE@ apt-watcher.c - -@HAS_GUDEV_TRUE@am__append_4 = \ -@HAS_GUDEV_TRUE@ udev-mgr.h \ -@HAS_GUDEV_TRUE@ udev-mgr.c - -@HAS_GUDEV_FALSE@am__append_5 = \ -@HAS_GUDEV_FALSE@ udev-mgr.h \ -@HAS_GUDEV_FALSE@ udev-mgr.c - 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/gcov.m4 \ - $(top_srcdir)/configure.ac + $(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 @@ -112,10 +113,13 @@ libsession_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(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 = gtk-logout-helper.c \ - settings-helper.c settings-helper.h dialog.c dialog.h -@BUILD_GTKLOGOUTHELPER_TRUE@am_gtk_logout_helper_OBJECTS = gtk_logout_helper-gtk-logout-helper.$(OBJEXT) \ -@BUILD_GTKLOGOUTHELPER_TRUE@ gtk_logout_helper-settings-helper.$(OBJEXT) \ +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 = \ @@ -125,29 +129,28 @@ 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__indicator_session_service_SOURCES_DIST = lock-helper.c \ - lock-helper.h session-service.c session-dbus.c session-dbus.h \ - gen-session-dbus.xml.c dbusmenu-shared.h settings-helper.c \ - users-service-dbus.h users-service-dbus.c user-menu-mgr.h \ - user-menu-mgr.c device-menu-mgr.h device-menu-mgr.c \ - sane-rules.h apt-watcher.h apt-watcher.c udev-mgr.h udev-mgr.c -@BUILD_APT_TRUE@am__objects_1 = indicator_session_service-apt-watcher.$(OBJEXT) -@HAS_GUDEV_TRUE@am__objects_2 = \ -@HAS_GUDEV_TRUE@ indicator_session_service-udev-mgr.$(OBJEXT) -am_indicator_session_service_OBJECTS = \ - indicator_session_service-lock-helper.$(OBJEXT) \ +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-settings-helper.$(OBJEXT) \ indicator_session_service-users-service-dbus.$(OBJEXT) \ - indicator_session_service-user-menu-mgr.$(OBJEXT) \ - indicator_session_service-device-menu-mgr.$(OBJEXT) \ - $(am__objects_1) $(am__objects_2) + indicator_session_service-session-menu-mgr.$(OBJEXT) indicator_session_service_OBJECTS = \ $(am_indicator_session_service_OBJECTS) -indicator_session_service_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +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) \ @@ -182,7 +185,12 @@ SOURCES = $(libsession_la_SOURCES) $(gtk_logout_helper_SOURCES) \ $(indicator_session_service_SOURCES) DIST_SOURCES = $(libsession_la_SOURCES) \ $(am__gtk_logout_helper_SOURCES_DIST) \ - $(am__indicator_session_service_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) @@ -197,6 +205,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CXXFLAGS = @BASE_CXXFLAGS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ @@ -206,6 +215,11 @@ 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@ @@ -218,6 +232,8 @@ 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@ @@ -229,6 +245,8 @@ 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@ @@ -297,16 +315,25 @@ 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@ @@ -356,32 +383,30 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = $(am__append_3) $(am__append_5) \ - org.freedesktop.ConsoleKit.Manager.xml \ - org.freedesktop.ConsoleKit.Seat.xml \ - org.freedesktop.ConsoleKit.Session.xml display-manager.xml \ - session-dbus.xml upower.xml accounts-service.xml \ - accounts-service-user.xml ################### # 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 \ - dbus-shared-names.h \ - dbusmenu-shared.h \ + shared-names.h \ user-widget.c \ - user-widget.h \ - accounts-service-client.h \ - accounts-service-user-client.h + user-widget.h libsession_la_CFLAGS = \ $(APPLET_CFLAGS) \ $(COVERAGE_CFLAGS) \ - -Wall -Werror \ + -Wall -Wunused \ -DG_LOG_DOMAIN=\"Indicator-Session\" libsession_la_LIBADD = $(APPLET_LIBS) @@ -389,29 +414,66 @@ 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 = lock-helper.c lock-helper.h \ - session-service.c session-dbus.c session-dbus.h \ - gen-session-dbus.xml.c dbusmenu-shared.h settings-helper.c \ - users-service-dbus.h users-service-dbus.c user-menu-mgr.h \ - user-menu-mgr.c device-menu-mgr.h device-menu-mgr.c \ - sane-rules.h $(am__append_2) $(am__append_4) +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 -Werror \ + -Wall \ -DG_LOG_DOMAIN=\"Indicator-Session\" \ - $(GUDEV_CFLAGS) \ $(COVERAGE_CFLAGS) indicator_session_service_LDADD = \ $(SESSIONSERVICE_LIBS) \ - $(GCONF_LIBS) \ - $(GUDEV_LIBS) + $(GCONF_LIBS) indicator_session_service_LDFLAGS = \ $(COVERAGE_LDFLAGS) @@ -421,9 +483,8 @@ indicator_session_service_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@ settings-helper.c \ -@BUILD_GTKLOGOUTHELPER_TRUE@ settings-helper.h \ @BUILD_GTKLOGOUTHELPER_TRUE@ dialog.c \ @BUILD_GTKLOGOUTHELPER_TRUE@ dialog.h @@ -432,7 +493,7 @@ indicator_session_service_LDFLAGS = \ @BUILD_GTKLOGOUTHELPER_TRUE@ $(GTKLOGOUTHELPER_CFLAGS) \ @BUILD_GTKLOGOUTHELPER_TRUE@ $(GCONF_CFLAGS) \ @BUILD_GTKLOGOUTHELPER_TRUE@ $(COVERAGE_CFLAGS) \ -@BUILD_GTKLOGOUTHELPER_TRUE@ -Wall -Werror \ +@BUILD_GTKLOGOUTHELPER_TRUE@ -Wall \ @BUILD_GTKLOGOUTHELPER_TRUE@ -DINDICATOR_ICONS_DIR="\"$(INDICATORICONSDIR)\"" @BUILD_GTKLOGOUTHELPER_TRUE@gtk_logout_helper_LDADD = \ @@ -448,18 +509,15 @@ indicator_session_service_LDFLAGS = \ # Other Stuff ############### BUILT_SOURCES = \ - consolekit-manager-client.h \ - consolekit-seat-client.h \ - consolekit-session-client.h \ - display-manager-client.h \ + $(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 \ - upower-client.h \ - accounts-service-client.h \ - accounts-service-user-client.h - -CLEANFILES = \ - $(BUILT_SOURCES) + gen-session-dbus.xml.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -498,7 +556,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-sessionlibLTLIBRARIES: $(sessionlib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(sessionlibdir)" || $(MKDIR_P) "$(DESTDIR)$(sessionlibdir)" @list='$(sessionlib_LTLIBRARIES)'; test -n "$(sessionlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -506,6 +563,8 @@ install-sessionlibLTLIBRARIES: $(sessionlib_LTLIBRARIES) 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)"; \ } @@ -531,8 +590,11 @@ libsession.la: $(libsession_la_OBJECTS) $(libsession_la_DEPENDENCIES) $(EXTRA_li $(AM_V_CCLD)$(libsession_la_LINK) -rpath $(sessionlibdir) $(libsession_la_OBJECTS) $(libsession_la_LIBADD) $(LIBS) install-libexecPROGRAMS: $(libexec_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" @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; \ @@ -585,18 +647,20 @@ mostlyclean-compile: 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)/gtk_logout_helper-settings-helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-apt-watcher.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-device-menu-mgr.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-lock-helper.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-settings-helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-udev-mgr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-user-menu-mgr.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@ @@ -636,6 +700,20 @@ libsession_la-user-widget.lo: user-widget.c @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 @@ -650,20 +728,6 @@ gtk_logout_helper-gtk-logout-helper.obj: gtk-logout-helper.c @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-settings-helper.o: settings-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-settings-helper.o -MD -MP -MF $(DEPDIR)/gtk_logout_helper-settings-helper.Tpo -c -o gtk_logout_helper-settings-helper.o `test -f 'settings-helper.c' || echo '$(srcdir)/'`settings-helper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-settings-helper.Tpo $(DEPDIR)/gtk_logout_helper-settings-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='settings-helper.c' object='gtk_logout_helper-settings-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-settings-helper.o `test -f 'settings-helper.c' || echo '$(srcdir)/'`settings-helper.c - -gtk_logout_helper-settings-helper.obj: settings-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-settings-helper.obj -MD -MP -MF $(DEPDIR)/gtk_logout_helper-settings-helper.Tpo -c -o gtk_logout_helper-settings-helper.obj `if test -f 'settings-helper.c'; then $(CYGPATH_W) 'settings-helper.c'; else $(CYGPATH_W) '$(srcdir)/settings-helper.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-settings-helper.Tpo $(DEPDIR)/gtk_logout_helper-settings-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='settings-helper.c' object='gtk_logout_helper-settings-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-settings-helper.obj `if test -f 'settings-helper.c'; then $(CYGPATH_W) 'settings-helper.c'; else $(CYGPATH_W) '$(srcdir)/settings-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 @@ -678,19 +742,103 @@ gtk_logout_helper-dialog.obj: dialog.c @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-lock-helper.o: lock-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-lock-helper.o -MD -MP -MF $(DEPDIR)/indicator_session_service-lock-helper.Tpo -c -o indicator_session_service-lock-helper.o `test -f 'lock-helper.c' || echo '$(srcdir)/'`lock-helper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-lock-helper.Tpo $(DEPDIR)/indicator_session_service-lock-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lock-helper.c' object='indicator_session_service-lock-helper.o' libtool=no @AMDEPBACKSLASH@ +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-lock-helper.o `test -f 'lock-helper.c' || echo '$(srcdir)/'`lock-helper.c +@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-lock-helper.obj: lock-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-lock-helper.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-lock-helper.Tpo -c -o indicator_session_service-lock-helper.obj `if test -f 'lock-helper.c'; then $(CYGPATH_W) 'lock-helper.c'; else $(CYGPATH_W) '$(srcdir)/lock-helper.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-lock-helper.Tpo $(DEPDIR)/indicator_session_service-lock-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lock-helper.c' object='indicator_session_service-lock-helper.obj' libtool=no @AMDEPBACKSLASH@ +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-lock-helper.obj `if test -f 'lock-helper.c'; then $(CYGPATH_W) 'lock-helper.c'; else $(CYGPATH_W) '$(srcdir)/lock-helper.c'; fi` +@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 @@ -734,20 +882,6 @@ indicator_session_service-gen-session-dbus.xml.obj: gen-session-dbus.xml.c @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-settings-helper.o: settings-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-settings-helper.o -MD -MP -MF $(DEPDIR)/indicator_session_service-settings-helper.Tpo -c -o indicator_session_service-settings-helper.o `test -f 'settings-helper.c' || echo '$(srcdir)/'`settings-helper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-settings-helper.Tpo $(DEPDIR)/indicator_session_service-settings-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='settings-helper.c' object='indicator_session_service-settings-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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-settings-helper.o `test -f 'settings-helper.c' || echo '$(srcdir)/'`settings-helper.c - -indicator_session_service-settings-helper.obj: settings-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-settings-helper.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-settings-helper.Tpo -c -o indicator_session_service-settings-helper.obj `if test -f 'settings-helper.c'; then $(CYGPATH_W) 'settings-helper.c'; else $(CYGPATH_W) '$(srcdir)/settings-helper.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-settings-helper.Tpo $(DEPDIR)/indicator_session_service-settings-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='settings-helper.c' object='indicator_session_service-settings-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) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-settings-helper.obj `if test -f 'settings-helper.c'; then $(CYGPATH_W) 'settings-helper.c'; else $(CYGPATH_W) '$(srcdir)/settings-helper.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 @@ -762,61 +896,19 @@ indicator_session_service-users-service-dbus.obj: users-service-dbus.c @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-user-menu-mgr.o: user-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-user-menu-mgr.o -MD -MP -MF $(DEPDIR)/indicator_session_service-user-menu-mgr.Tpo -c -o indicator_session_service-user-menu-mgr.o `test -f 'user-menu-mgr.c' || echo '$(srcdir)/'`user-menu-mgr.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-user-menu-mgr.Tpo $(DEPDIR)/indicator_session_service-user-menu-mgr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='user-menu-mgr.c' object='indicator_session_service-user-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-user-menu-mgr.o `test -f 'user-menu-mgr.c' || echo '$(srcdir)/'`user-menu-mgr.c - -indicator_session_service-user-menu-mgr.obj: user-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-user-menu-mgr.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-user-menu-mgr.Tpo -c -o indicator_session_service-user-menu-mgr.obj `if test -f 'user-menu-mgr.c'; then $(CYGPATH_W) 'user-menu-mgr.c'; else $(CYGPATH_W) '$(srcdir)/user-menu-mgr.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-user-menu-mgr.Tpo $(DEPDIR)/indicator_session_service-user-menu-mgr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='user-menu-mgr.c' object='indicator_session_service-user-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-user-menu-mgr.obj `if test -f 'user-menu-mgr.c'; then $(CYGPATH_W) 'user-menu-mgr.c'; else $(CYGPATH_W) '$(srcdir)/user-menu-mgr.c'; fi` - -indicator_session_service-device-menu-mgr.o: device-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-device-menu-mgr.o -MD -MP -MF $(DEPDIR)/indicator_session_service-device-menu-mgr.Tpo -c -o indicator_session_service-device-menu-mgr.o `test -f 'device-menu-mgr.c' || echo '$(srcdir)/'`device-menu-mgr.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-device-menu-mgr.Tpo $(DEPDIR)/indicator_session_service-device-menu-mgr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='device-menu-mgr.c' object='indicator_session_service-device-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-device-menu-mgr.o `test -f 'device-menu-mgr.c' || echo '$(srcdir)/'`device-menu-mgr.c - -indicator_session_service-device-menu-mgr.obj: device-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-device-menu-mgr.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-device-menu-mgr.Tpo -c -o indicator_session_service-device-menu-mgr.obj `if test -f 'device-menu-mgr.c'; then $(CYGPATH_W) 'device-menu-mgr.c'; else $(CYGPATH_W) '$(srcdir)/device-menu-mgr.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-device-menu-mgr.Tpo $(DEPDIR)/indicator_session_service-device-menu-mgr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='device-menu-mgr.c' object='indicator_session_service-device-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-device-menu-mgr.obj `if test -f 'device-menu-mgr.c'; then $(CYGPATH_W) 'device-menu-mgr.c'; else $(CYGPATH_W) '$(srcdir)/device-menu-mgr.c'; fi` - -indicator_session_service-apt-watcher.o: apt-watcher.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-apt-watcher.o -MD -MP -MF $(DEPDIR)/indicator_session_service-apt-watcher.Tpo -c -o indicator_session_service-apt-watcher.o `test -f 'apt-watcher.c' || echo '$(srcdir)/'`apt-watcher.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-apt-watcher.Tpo $(DEPDIR)/indicator_session_service-apt-watcher.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='apt-watcher.c' object='indicator_session_service-apt-watcher.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-apt-watcher.o `test -f 'apt-watcher.c' || echo '$(srcdir)/'`apt-watcher.c - -indicator_session_service-apt-watcher.obj: apt-watcher.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-apt-watcher.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-apt-watcher.Tpo -c -o indicator_session_service-apt-watcher.obj `if test -f 'apt-watcher.c'; then $(CYGPATH_W) 'apt-watcher.c'; else $(CYGPATH_W) '$(srcdir)/apt-watcher.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-apt-watcher.Tpo $(DEPDIR)/indicator_session_service-apt-watcher.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='apt-watcher.c' object='indicator_session_service-apt-watcher.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-apt-watcher.obj `if test -f 'apt-watcher.c'; then $(CYGPATH_W) 'apt-watcher.c'; else $(CYGPATH_W) '$(srcdir)/apt-watcher.c'; fi` - -indicator_session_service-udev-mgr.o: udev-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-udev-mgr.o -MD -MP -MF $(DEPDIR)/indicator_session_service-udev-mgr.Tpo -c -o indicator_session_service-udev-mgr.o `test -f 'udev-mgr.c' || echo '$(srcdir)/'`udev-mgr.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-udev-mgr.Tpo $(DEPDIR)/indicator_session_service-udev-mgr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='udev-mgr.c' object='indicator_session_service-udev-mgr.o' libtool=no @AMDEPBACKSLASH@ +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-udev-mgr.o `test -f 'udev-mgr.c' || echo '$(srcdir)/'`udev-mgr.c +@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-udev-mgr.obj: udev-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-udev-mgr.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-udev-mgr.Tpo -c -o indicator_session_service-udev-mgr.obj `if test -f 'udev-mgr.c'; then $(CYGPATH_W) 'udev-mgr.c'; else $(CYGPATH_W) '$(srcdir)/udev-mgr.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-udev-mgr.Tpo $(DEPDIR)/indicator_session_service-udev-mgr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='udev-mgr.c' object='indicator_session_service-udev-mgr.obj' libtool=no @AMDEPBACKSLASH@ +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-udev-mgr.obj `if test -f 'udev-mgr.c'; then $(CYGPATH_W) 'udev-mgr.c'; else $(CYGPATH_W) '$(srcdir)/udev-mgr.c'; fi` +@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 @@ -1038,54 +1130,48 @@ uninstall-am: uninstall-libexecPROGRAMS \ uninstall-sessionlibLTLIBRARIES -consolekit-manager-client.h: $(srcdir)/org.freedesktop.ConsoleKit.Manager.xml - dbus-binding-tool \ - --prefix=_consolekit_manager_client \ - --mode=glib-client \ - --output=consolekit-manager-client.h \ - $(srcdir)/org.freedesktop.ConsoleKit.Manager.xml - -consolekit-seat-client.h: $(srcdir)/org.freedesktop.ConsoleKit.Seat.xml - dbus-binding-tool \ - --prefix=_consolekit_seat_client \ - --mode=glib-client \ - --output=consolekit-seat-client.h \ - $(srcdir)/org.freedesktop.ConsoleKit.Seat.xml - -consolekit-session-client.h: $(srcdir)/org.freedesktop.ConsoleKit.Session.xml - dbus-binding-tool \ - --prefix=_consolekit_session_client \ - --mode=glib-client \ - --output=consolekit-session-client.h \ - $(srcdir)/org.freedesktop.ConsoleKit.Session.xml - -display-manager-client.h: $(srcdir)/display-manager.xml - dbus-binding-tool \ - --prefix=_gdm_local_display_factory_client \ - --mode=glib-client \ - --output=display-manager-client.h \ - $(srcdir)/display-manager.xml - -accounts-service-client.h: $(srcdir)/accounts-service.xml - dbus-binding-tool \ - --prefix=_accounts_service_client \ - --mode=glib-client \ - --output=accounts-service-client.h \ - $(srcdir)/accounts-service.xml - -accounts-service-user-client.h: $(srcdir)/accounts-service-user.xml - dbus-binding-tool \ - --prefix=_accounts_service_user_client \ - --mode=glib-client \ - --output=accounts-service-user-client.h \ - $(srcdir)/accounts-service-user.xml - -upower-client.h: $(srcdir)/upower.xml - dbus-binding-tool \ - --prefix=_upower_client \ - --mode=glib-client \ - --output=upower-client.h \ - $(srcdir)/upower.xml +$(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 $<" diff --git a/src/accounts-service-client.h b/src/accounts-service-client.h deleted file mode 100644 index c4686b3..0000000 --- a/src/accounts-service-client.h +++ /dev/null @@ -1,215 +0,0 @@ -/* Generated by dbus-binding-tool; do not edit! */ - -#include <glib.h> -#include <dbus/dbus-glib.h> - -G_BEGIN_DECLS - -#ifndef _DBUS_GLIB_ASYNC_DATA_FREE -#define _DBUS_GLIB_ASYNC_DATA_FREE -static -#ifdef G_HAVE_INLINE -inline -#endif -void -_dbus_glib_async_data_free (gpointer stuff) -{ - g_slice_free (DBusGAsyncData, stuff); -} -#endif - -#ifndef DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_Accounts -#define DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_Accounts - -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_list_cached_users (DBusGProxy *proxy, GPtrArray** OUT_users, GError **error) - -{ - return dbus_g_proxy_call (proxy, "ListCachedUsers", error, G_TYPE_INVALID, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), OUT_users, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_list_cached_users_reply) (DBusGProxy *proxy, GPtrArray *OUT_users, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_list_cached_users_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - GPtrArray* OUT_users; - dbus_g_proxy_end_call (proxy, call, &error, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &OUT_users, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_list_cached_users_reply)data->cb) (proxy, OUT_users, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_list_cached_users_async (DBusGProxy *proxy, org_freedesktop_Accounts_list_cached_users_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "ListCachedUsers", org_freedesktop_Accounts_list_cached_users_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_find_user_by_id (DBusGProxy *proxy, const gint64 IN_id, char** OUT_user, GError **error) - -{ - return dbus_g_proxy_call (proxy, "FindUserById", error, G_TYPE_INT64, IN_id, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, OUT_user, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_find_user_by_id_reply) (DBusGProxy *proxy, char *OUT_user, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_find_user_by_id_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - char* OUT_user; - dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &OUT_user, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_find_user_by_id_reply)data->cb) (proxy, OUT_user, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_find_user_by_id_async (DBusGProxy *proxy, const gint64 IN_id, org_freedesktop_Accounts_find_user_by_id_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "FindUserById", org_freedesktop_Accounts_find_user_by_id_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INT64, IN_id, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_find_user_by_name (DBusGProxy *proxy, const char * IN_name, char** OUT_user, GError **error) - -{ - return dbus_g_proxy_call (proxy, "FindUserByName", error, G_TYPE_STRING, IN_name, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, OUT_user, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_find_user_by_name_reply) (DBusGProxy *proxy, char *OUT_user, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_find_user_by_name_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - char* OUT_user; - dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &OUT_user, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_find_user_by_name_reply)data->cb) (proxy, OUT_user, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_find_user_by_name_async (DBusGProxy *proxy, const char * IN_name, org_freedesktop_Accounts_find_user_by_name_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "FindUserByName", org_freedesktop_Accounts_find_user_by_name_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_name, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_create_user (DBusGProxy *proxy, const char * IN_name, const char * IN_fullname, const gint IN_accountType, char** OUT_user, GError **error) - -{ - return dbus_g_proxy_call (proxy, "CreateUser", error, G_TYPE_STRING, IN_name, G_TYPE_STRING, IN_fullname, G_TYPE_INT, IN_accountType, G_TYPE_INVALID, DBUS_TYPE_G_OBJECT_PATH, OUT_user, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_create_user_reply) (DBusGProxy *proxy, char *OUT_user, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_create_user_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - char* OUT_user; - dbus_g_proxy_end_call (proxy, call, &error, DBUS_TYPE_G_OBJECT_PATH, &OUT_user, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_create_user_reply)data->cb) (proxy, OUT_user, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_create_user_async (DBusGProxy *proxy, const char * IN_name, const char * IN_fullname, const gint IN_accountType, org_freedesktop_Accounts_create_user_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "CreateUser", org_freedesktop_Accounts_create_user_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_name, G_TYPE_STRING, IN_fullname, G_TYPE_INT, IN_accountType, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_delete_user (DBusGProxy *proxy, const gint64 IN_id, const gboolean IN_removeFiles, GError **error) - -{ - return dbus_g_proxy_call (proxy, "DeleteUser", error, G_TYPE_INT64, IN_id, G_TYPE_BOOLEAN, IN_removeFiles, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_delete_user_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_delete_user_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_delete_user_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_delete_user_async (DBusGProxy *proxy, const gint64 IN_id, const gboolean IN_removeFiles, org_freedesktop_Accounts_delete_user_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "DeleteUser", org_freedesktop_Accounts_delete_user_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INT64, IN_id, G_TYPE_BOOLEAN, IN_removeFiles, G_TYPE_INVALID); -} -#endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_Accounts */ - -G_END_DECLS diff --git a/src/accounts-service-user-client.h b/src/accounts-service-user-client.h deleted file mode 100644 index 499e9bc..0000000 --- a/src/accounts-service-user-client.h +++ /dev/null @@ -1,507 +0,0 @@ -/* Generated by dbus-binding-tool; do not edit! */ - -#include <glib.h> -#include <dbus/dbus-glib.h> - -G_BEGIN_DECLS - -#ifndef _DBUS_GLIB_ASYNC_DATA_FREE -#define _DBUS_GLIB_ASYNC_DATA_FREE -static -#ifdef G_HAVE_INLINE -inline -#endif -void -_dbus_glib_async_data_free (gpointer stuff) -{ - g_slice_free (DBusGAsyncData, stuff); -} -#endif - -#ifndef DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_Accounts_User -#define DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_Accounts_User - -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_user_name (DBusGProxy *proxy, const char * IN_name, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetUserName", error, G_TYPE_STRING, IN_name, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_user_name_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_user_name_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_user_name_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_user_name_async (DBusGProxy *proxy, const char * IN_name, org_freedesktop_Accounts_User_set_user_name_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetUserName", org_freedesktop_Accounts_User_set_user_name_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_name, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_real_name (DBusGProxy *proxy, const char * IN_name, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetRealName", error, G_TYPE_STRING, IN_name, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_real_name_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_real_name_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_real_name_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_real_name_async (DBusGProxy *proxy, const char * IN_name, org_freedesktop_Accounts_User_set_real_name_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetRealName", org_freedesktop_Accounts_User_set_real_name_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_name, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_email (DBusGProxy *proxy, const char * IN_email, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetEmail", error, G_TYPE_STRING, IN_email, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_email_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_email_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_email_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_email_async (DBusGProxy *proxy, const char * IN_email, org_freedesktop_Accounts_User_set_email_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetEmail", org_freedesktop_Accounts_User_set_email_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_email, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_language (DBusGProxy *proxy, const char * IN_language, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetLanguage", error, G_TYPE_STRING, IN_language, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_language_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_language_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_language_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_language_async (DBusGProxy *proxy, const char * IN_language, org_freedesktop_Accounts_User_set_language_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetLanguage", org_freedesktop_Accounts_User_set_language_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_language, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_location (DBusGProxy *proxy, const char * IN_location, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetLocation", error, G_TYPE_STRING, IN_location, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_location_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_location_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_location_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_location_async (DBusGProxy *proxy, const char * IN_location, org_freedesktop_Accounts_User_set_location_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetLocation", org_freedesktop_Accounts_User_set_location_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_location, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_home_directory (DBusGProxy *proxy, const char * IN_homedir, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetHomeDirectory", error, G_TYPE_STRING, IN_homedir, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_home_directory_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_home_directory_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_home_directory_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_home_directory_async (DBusGProxy *proxy, const char * IN_homedir, org_freedesktop_Accounts_User_set_home_directory_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetHomeDirectory", org_freedesktop_Accounts_User_set_home_directory_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_homedir, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_shell (DBusGProxy *proxy, const char * IN_shell, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetShell", error, G_TYPE_STRING, IN_shell, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_shell_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_shell_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_shell_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_shell_async (DBusGProxy *proxy, const char * IN_shell, org_freedesktop_Accounts_User_set_shell_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetShell", org_freedesktop_Accounts_User_set_shell_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_shell, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_icon_file (DBusGProxy *proxy, const char * IN_filename, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetIconFile", error, G_TYPE_STRING, IN_filename, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_icon_file_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_icon_file_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_icon_file_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_icon_file_async (DBusGProxy *proxy, const char * IN_filename, org_freedesktop_Accounts_User_set_icon_file_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetIconFile", org_freedesktop_Accounts_User_set_icon_file_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_filename, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_locked (DBusGProxy *proxy, const gboolean IN_locked, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetLocked", error, G_TYPE_BOOLEAN, IN_locked, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_locked_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_locked_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_locked_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_locked_async (DBusGProxy *proxy, const gboolean IN_locked, org_freedesktop_Accounts_User_set_locked_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetLocked", org_freedesktop_Accounts_User_set_locked_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_BOOLEAN, IN_locked, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_account_type (DBusGProxy *proxy, const gint IN_accountType, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetAccountType", error, G_TYPE_INT, IN_accountType, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_account_type_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_account_type_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_account_type_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_account_type_async (DBusGProxy *proxy, const gint IN_accountType, org_freedesktop_Accounts_User_set_account_type_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetAccountType", org_freedesktop_Accounts_User_set_account_type_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INT, IN_accountType, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_password_mode (DBusGProxy *proxy, const gint IN_mode, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetPasswordMode", error, G_TYPE_INT, IN_mode, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_password_mode_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_password_mode_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_password_mode_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_password_mode_async (DBusGProxy *proxy, const gint IN_mode, org_freedesktop_Accounts_User_set_password_mode_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetPasswordMode", org_freedesktop_Accounts_User_set_password_mode_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_INT, IN_mode, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_password (DBusGProxy *proxy, const char * IN_password, const char * IN_hint, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetPassword", error, G_TYPE_STRING, IN_password, G_TYPE_STRING, IN_hint, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_password_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_password_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_password_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_password_async (DBusGProxy *proxy, const char * IN_password, const char * IN_hint, org_freedesktop_Accounts_User_set_password_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetPassword", org_freedesktop_Accounts_User_set_password_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_STRING, IN_password, G_TYPE_STRING, IN_hint, G_TYPE_INVALID); -} -static -#ifdef G_HAVE_INLINE -inline -#endif -gboolean -org_freedesktop_Accounts_User_set_automatic_login (DBusGProxy *proxy, const gboolean IN_enabled, GError **error) - -{ - return dbus_g_proxy_call (proxy, "SetAutomaticLogin", error, G_TYPE_BOOLEAN, IN_enabled, G_TYPE_INVALID, G_TYPE_INVALID); -} - -typedef void (*org_freedesktop_Accounts_User_set_automatic_login_reply) (DBusGProxy *proxy, GError *error, gpointer userdata); - -static void -org_freedesktop_Accounts_User_set_automatic_login_async_callback (DBusGProxy *proxy, DBusGProxyCall *call, void *user_data) -{ - DBusGAsyncData *data = (DBusGAsyncData*) user_data; - GError *error = NULL; - dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); - (*(org_freedesktop_Accounts_User_set_automatic_login_reply)data->cb) (proxy, error, data->userdata); - return; -} - -static -#ifdef G_HAVE_INLINE -inline -#endif -DBusGProxyCall* -org_freedesktop_Accounts_User_set_automatic_login_async (DBusGProxy *proxy, const gboolean IN_enabled, org_freedesktop_Accounts_User_set_automatic_login_reply callback, gpointer userdata) - -{ - DBusGAsyncData *stuff; - stuff = g_slice_new (DBusGAsyncData); - stuff->cb = G_CALLBACK (callback); - stuff->userdata = userdata; - return dbus_g_proxy_begin_call (proxy, "SetAutomaticLogin", org_freedesktop_Accounts_User_set_automatic_login_async_callback, stuff, _dbus_glib_async_data_free, G_TYPE_BOOLEAN, IN_enabled, G_TYPE_INVALID); -} -#endif /* defined DBUS_GLIB_CLIENT_WRAPPERS_org_freedesktop_Accounts_User */ - -G_END_DECLS diff --git a/src/apt-watcher.c b/src/apt-watcher.c deleted file mode 100644 index 092942f..0000000 --- a/src/apt-watcher.c +++ /dev/null @@ -1,287 +0,0 @@ -/* -Copyright 2011 Canonical Ltd. - -Authors: - Conor Curran <conor.curran@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -// Conor - 6/2/2012 -// Please pull in packagekit's client lib -// using apt-get install --no-install-recommends libpackagekit-glib2-dev -// make sure you don't install package-kit -#define I_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE - -#include <glib/gi18n.h> -#include <packagekit-glib2/packagekit.h> -#include "apt-watcher.h" -#include "dbus-shared-names.h" - -static guint watcher_id; - -struct _AptWatcher -{ - GObject parent_instance; - SessionDbus* session_dbus_interface; - DbusmenuMenuitem* apt_item; - AptState current_state; - GCancellable * proxy_cancel; - GDBusProxy * proxy; -}; - -G_DEFINE_TYPE (AptWatcher, apt_watcher, G_TYPE_OBJECT); - - -static void -get_updates_complete (GObject *source_object, - GAsyncResult *res, - gpointer user_data) -{ - g_return_if_fail (APT_IS_WATCHER (user_data)); - AptWatcher* self = APT_WATCHER (user_data); - - PkResults *results; - PkRestartEnum restart_required; - GError *error = NULL; - results = pk_client_generic_finish (PK_CLIENT(source_object), res, &error); - - if (error != NULL){ - g_warning ("Unable to query for updates - error - %s", error->message); - return; - } - - GPtrArray *packages; - packages = pk_results_get_package_array (results); - - const gchar* disposition; - disposition = dbusmenu_menuitem_property_get (self->apt_item, - DBUSMENU_MENUITEM_PROP_DISPOSITION); - gboolean do_update; - do_update = g_strcmp0 (disposition, DBUSMENU_MENUITEM_DISPOSITION_ALERT) != 0; - - if (packages->len > 0){ - g_print ("Apparently we have updates available - change dbmitem %i", do_update); - if (do_update) - dbusmenu_menuitem_property_set (self->apt_item, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Updates Available…")); - } - else{ - g_print ("No updates available - change dbmitem - %i", do_update); - if (do_update) - dbusmenu_menuitem_property_set (self->apt_item, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Software Up to Date")); - } - - /* check if there was a restart required info in the signal */ - restart_required = pk_results_get_require_restart_worst (results); - if (restart_required == PK_RESTART_ENUM_SYSTEM || - restart_required == PK_RESTART_ENUM_SECURITY_SYSTEM) { - dbusmenu_menuitem_property_set (self->apt_item, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Restart to Complete Updates…")); - dbusmenu_menuitem_property_set (self->apt_item, - DBUSMENU_MENUITEM_PROP_DISPOSITION, - DBUSMENU_MENUITEM_DISPOSITION_ALERT); - session_dbus_restart_required (self->session_dbus_interface); - } - - g_ptr_array_unref (packages); - g_object_unref (results); - g_object_unref (source_object); -} - -static void -apt_watcher_check_for_updates (AptWatcher* self) -{ - PkClient* client; - client = pk_client_new (); - - pk_client_get_updates_async (client, - PK_FILTER_ENUM_NONE, - NULL, NULL, NULL, - (GAsyncReadyCallback)get_updates_complete, - self); -} - -static void apt_watcher_signal_cb ( GDBusProxy* proxy, - gchar* sender_name, - gchar* signal_name, - GVariant* parameters, - gpointer user_data) -{ - g_return_if_fail (APT_IS_WATCHER (user_data)); - AptWatcher* self = APT_WATCHER (user_data); - - g_debug ("apt-watcher-signal cb signal name - %s", signal_name); - if (g_strcmp0(signal_name, "UpdatesChanged") == 0){ - g_debug ("updates changed signal received"); - apt_watcher_check_for_updates (self); - } -} - -static void -apt_watcher_on_name_appeared (GDBusConnection *connection, - const gchar *name, - const gchar *name_owner, - gpointer user_data) -{ - g_return_if_fail (APT_IS_WATCHER (user_data)); - // AptWatcher* watcher = APT_WATCHER (user_data); - - g_print ("Name %s on %s is owned by %s\n", - name, - "the system bus", - name_owner); -} - - -static void -apt_watcher_on_name_vanished (GDBusConnection *connection, - const gchar *name, - gpointer user_data) -{ - g_debug ("Name %s does not exist or has just vanished", - name); - g_return_if_fail (APT_IS_WATCHER (user_data)); -} - -static void -fetch_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data) -{ - GError * error = NULL; - - AptWatcher* self = APT_WATCHER(user_data); - g_return_if_fail(self != NULL); - - GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish (res, &error); - - if (self->proxy_cancel != NULL) { - g_object_unref (self->proxy_cancel); - self->proxy_cancel = NULL; - } - - if (error != NULL) { - g_warning("Could not grab DBus proxy for %s: %s", - "org.debian.apt", error->message); - g_error_free(error); - return; - } - - self->proxy = proxy; - // Set up the watch. - watcher_id = g_bus_watch_name (G_BUS_TYPE_SYSTEM, - "org.freedesktop.PackageKit", - G_BUS_NAME_WATCHER_FLAGS_NONE, - apt_watcher_on_name_appeared, - apt_watcher_on_name_vanished, - self, - NULL); - g_signal_connect (self->proxy, - "g-signal", - G_CALLBACK(apt_watcher_signal_cb), - self); -} - -static gboolean -apt_watcher_start_apt_interaction (gpointer data) -{ - g_return_val_if_fail (APT_IS_WATCHER (data), FALSE); - AptWatcher* self = APT_WATCHER (data); - g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, - G_DBUS_PROXY_FLAGS_NONE, - NULL, - "org.freedesktop.PackageKit", - "/org/freedesktop/PackageKit", - "org.freedesktop.PackageKit", - self->proxy_cancel, - fetch_proxy_cb, - self); - apt_watcher_check_for_updates (self); - return FALSE; -} - - -static void -apt_watcher_show_apt_dialog (DbusmenuMenuitem * mi, - guint timestamp, - gpointer userdata) -{ - GError * error = NULL; - g_return_if_fail (APT_IS_WATCHER (userdata)); - AptWatcher* self = APT_WATCHER (userdata); - const gchar* disposition = NULL; - disposition = dbusmenu_menuitem_property_get (self->apt_item, - DBUSMENU_MENUITEM_PROP_DISPOSITION); - - if (g_strcmp0 (disposition, DBUSMENU_MENUITEM_DISPOSITION_ALERT) == 0){ - gchar * helper = g_build_filename (LIBEXECDIR, "gtk-logout-helper", NULL); - gchar * dialog_line = g_strdup_printf ("%s --%s", helper, "restart"); - g_free(helper); - if (!g_spawn_command_line_async(dialog_line, &error)) { - g_warning("Unable to show dialog: %s", error->message); - g_error_free(error); - } - g_free(dialog_line); - } - else{ - if (!g_spawn_command_line_async("update-manager", &error)) - { - g_warning("Unable to show update-manager: %s", error->message); - g_error_free(error); - } - } -} - -static void -apt_watcher_init (AptWatcher *self) -{ - self->current_state = UP_TO_DATE; - g_timeout_add_seconds (60, - apt_watcher_start_apt_interaction, - self); -} - -static void -apt_watcher_finalize (GObject *object) -{ - g_bus_unwatch_name (watcher_id); - AptWatcher* self = APT_WATCHER (object); - - if (self->proxy != NULL) - g_object_unref (self->proxy); - - G_OBJECT_CLASS (apt_watcher_parent_class)->finalize (object); -} - -static void -apt_watcher_class_init (AptWatcherClass *klass) -{ - GObjectClass* object_class = G_OBJECT_CLASS (klass); - object_class->finalize = apt_watcher_finalize; -} - -AptWatcher* apt_watcher_new (SessionDbus* session_dbus, - DbusmenuMenuitem* item) -{ - AptWatcher* watcher = g_object_new (APT_TYPE_WATCHER, NULL); - watcher->session_dbus_interface = session_dbus; - watcher->apt_item = item; - g_signal_connect (G_OBJECT(watcher->apt_item), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(apt_watcher_show_apt_dialog), watcher); - return watcher; -} - diff --git a/src/apt-watcher.h b/src/apt-watcher.h deleted file mode 100644 index c571502..0000000 --- a/src/apt-watcher.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright 2011 Canonical Ltd. - -Authors: - Conor Curran <conor.curran@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef _APT_WATCHER_H_ -#define _APT_WATCHER_H_ - -#include <glib-object.h> - -#include <libdbusmenu-glib/client.h> - -#include <gtk/gtk.h> -#include <libdbusmenu-gtk/menuitem.h> - -#include "session-dbus.h" - -G_BEGIN_DECLS - -#define APT_TYPE_WATCHER (apt_watcher_get_type ()) -#define APT_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), APT_TYPE_WATCHER, AptWatcher)) -#define APT_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), APT_TYPE_WATCHER, AptWatcherClass)) -#define APT_IS_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), APT_TYPE_WATCHER)) -#define APT_IS_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), APT_TYPE_WATCHER)) -#define APT_WATCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), APT_TYPE_WATCHER, AptWatcherClass)) - -typedef struct _AptWatcherClass AptWatcherClass; -typedef struct _AptWatcher AptWatcher; - -struct _AptWatcherClass -{ - GObjectClass parent_class; -}; - -GType apt_watcher_get_type (void) G_GNUC_CONST; - -AptWatcher* apt_watcher_new (SessionDbus* session_dbus, - DbusmenuMenuitem* apt_item); -G_END_DECLS - -#endif /* _APT_WATCHER_H_ */ diff --git a/src/dbus-accounts.c b/src/dbus-accounts.c new file mode 100644 index 0000000..4443657 --- /dev/null +++ b/src/dbus-accounts.c @@ -0,0 +1,2505 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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; +} + +/** + * 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, (gpointer) info); + 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, 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, 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, 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, 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, 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, *l; + 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 (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.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..d9da913 --- /dev/null +++ b/src/dbus-accounts.h @@ -0,0 +1,333 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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..e0decbe --- /dev/null +++ b/src/dbus-consolekit-manager.c @@ -0,0 +1,4139 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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; +} + +/** + * 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, 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, 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, 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, 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, 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..60c7413 --- /dev/null +++ b/src/dbus-consolekit-manager.h @@ -0,0 +1,615 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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..aa3c9ad --- /dev/null +++ b/src/dbus-consolekit-seat.c @@ -0,0 +1,2339 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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; +} + +/** + * 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, 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, 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, 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, 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, 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..b3d3938 --- /dev/null +++ b/src/dbus-consolekit-seat.h @@ -0,0 +1,349 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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..02b5fdd --- /dev/null +++ b/src/dbus-consolekit-session.c @@ -0,0 +1,5587 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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; +} + +/** + * 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, (gpointer) info); + 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, 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, 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, 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, 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, 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, *l; + 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 (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.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..5156522 --- /dev/null +++ b/src/dbus-consolekit-session.h @@ -0,0 +1,737 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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..0545062 --- /dev/null +++ b/src/dbus-display-manager.c @@ -0,0 +1,1986 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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; +} + +/** + * 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, (gpointer) info); + 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, 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, 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, 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, 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, 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, *l; + 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 (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.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..7feec38 --- /dev/null +++ b/src/dbus-display-manager.h @@ -0,0 +1,267 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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..687849b --- /dev/null +++ b/src/dbus-upower.c @@ -0,0 +1,3189 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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; +} + +/** + * 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, (gpointer) info); + 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, 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, 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, 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, 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, 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, *l; + 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 (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.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..f02f23f --- /dev/null +++ b/src/dbus-upower.h @@ -0,0 +1,381 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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..2b46f01 --- /dev/null +++ b/src/dbus-user.c @@ -0,0 +1,5392 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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; +} + +/** + * 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, (gpointer) info); + 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, 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, 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, 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, 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, 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, *l; + 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 (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.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..b331459 --- /dev/null +++ b/src/dbus-user.h @@ -0,0 +1,632 @@ +/* + * Generated by gdbus-codegen 2.33.3. 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/dbusmenu-shared.h b/src/dbusmenu-shared.h deleted file mode 100644 index 1ef179b..0000000 --- a/src/dbusmenu-shared.h +++ /dev/null @@ -1,4 +0,0 @@ - -#define MENU_SWITCH_TYPE "x-canonical-switch-from" -#define MENU_SWITCH_USER "x-canonical-switch-username" - diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c deleted file mode 100644 index d081937..0000000 --- a/src/device-menu-mgr.c +++ /dev/null @@ -1,795 +0,0 @@ -/* -Copyright 2011 Canonical Ltd. - -Authors: - Conor Curran <conor.curran@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <config.h> -#include <libdbusmenu-glib/client.h> - -#include "device-menu-mgr.h" -#include "settings-helper.h" -#include "dbus-shared-names.h" -#include "dbusmenu-shared.h" -#include "lock-helper.h" -#include "upower-client.h" - -#ifdef HAVE_APT -#include "apt-watcher.h" -#endif /* HAVE_APT */ - -#ifdef HAS_GUDEV -#include "udev-mgr.h" -#endif /* HAS_GUDEV */ - -#define UP_ADDRESS "org.freedesktop.UPower" -#define UP_OBJECT "/org/freedesktop/UPower" -#define UP_INTERFACE "org.freedesktop.UPower" - -#define EXTRA_LAUNCHER_DIR "/usr/share/indicators/session/applications" - -struct _DeviceMenuMgr -{ - GObject parent_instance; - DbusmenuMenuitem* root_item; - SessionDbus* session_dbus_interface; -#ifdef HAVE_APT - AptWatcher* apt_watcher; -#endif /* HAVE_APT */ -#ifdef HAS_GUDEV - UdevMgr* udev_mgr; -#endif /* HAS_GUDEV */ -}; - -static GSettings *lockdown_settings = NULL; -static GSettings *keybinding_settings = NULL; -static DbusmenuMenuitem *lock_menuitem = NULL; -static DbusmenuMenuitem *system_settings_menuitem = NULL; -static DbusmenuMenuitem *display_settings_menuitem = NULL; -static DbusmenuMenuitem *login_settings_menuitem = NULL; -#ifdef HAVE_APT -static DbusmenuMenuitem *software_updates_menuitem = NULL; -#endif /* HAVE_APT */ -static DbusmenuMenuitem *printers_menuitem = NULL; -static DbusmenuMenuitem *scanners_menuitem = NULL; -static DbusmenuMenuitem *webcam_menuitem = NULL; - -static DBusGProxyCall * suspend_call = NULL; -static DBusGProxyCall * hibernate_call = NULL; - -static DbusmenuMenuitem * hibernate_mi = NULL; -static DbusmenuMenuitem * suspend_mi = NULL; -static DbusmenuMenuitem * logout_mi = NULL; -static DbusmenuMenuitem * shutdown_mi = NULL; - -static gboolean can_hibernate = TRUE; -static gboolean can_suspend = TRUE; -static gboolean allow_hibernate = TRUE; -static gboolean allow_suspend = TRUE; - -static DBusGProxy * up_main_proxy = NULL; -static DBusGProxy * up_prop_proxy = NULL; - -static void device_menu_mgr_ensure_settings_client (DeviceMenuMgr* self); -static void setup_up (DeviceMenuMgr* self); -static void device_menu_mgr_rebuild_items (DeviceMenuMgr *self); -static void machine_sleep_with_context (DeviceMenuMgr* self, - gchar* type); -static void show_system_settings_with_context (DbusmenuMenuitem * mi, - guint timestamp, - gchar * type); - -static void device_menu_mgr_show_simple_scan (DbusmenuMenuitem * mi, - guint timestamp, - gchar * type); -static void device_menu_mgr_show_cheese (DbusmenuMenuitem * mi, - guint timestamp, - gchar * type); - -static void -machine_sleep_from_hibernate (DbusmenuMenuitem * mi, - guint timestamp, - gpointer userdata); -static void -machine_sleep_from_suspend (DbusmenuMenuitem * mi, - guint timestamp, - gpointer userdata); - -G_DEFINE_TYPE (DeviceMenuMgr, device_menu_mgr, G_TYPE_OBJECT); - -static void -device_menu_mgr_init (DeviceMenuMgr *self) -{ -#ifdef HAVE_APT - self->apt_watcher = NULL; -#endif /* HAVE_APT */ - self->root_item = dbusmenu_menuitem_new (); - setup_up(self); - g_idle_add(lock_screen_setup, NULL); -} - -static void -device_menu_mgr_finalize (GObject *object) -{ - G_OBJECT_CLASS (device_menu_mgr_parent_class)->finalize (object); -} - -// TODO refactor into one helper method for both menu mgrs. -static void -device_menu_mgr_class_init (DeviceMenuMgrClass *klass) -{ - GObjectClass* object_class = G_OBJECT_CLASS (klass); - object_class->finalize = device_menu_mgr_finalize; -} - -// TODO -// Is this needed anymore -static void -lockdown_changed (GSettings * settings, - const gchar * key, - gpointer user_data) -{ - DeviceMenuMgr* self = DEVICE_MENU_MGR (user_data); - - if (key == NULL) { - return; - } - - if (g_strcmp0 (key, LOCKDOWN_KEY_USER) == 0 || - g_strcmp0 (key, LOCKDOWN_KEY_SCREENSAVER) == 0) { - device_menu_mgr_rebuild_items(self); - } - - return; -} - -static void -keybinding_changed (GSettings *settings, - const gchar *key, - gpointer user_data) -{ - if (key == NULL) { - return; - } - - if (g_strcmp0 (key, KEY_LOCK_SCREEN) == 0) { - gchar * val = g_settings_get_string(settings, key); - g_debug("Keybinding changed to: %s", val); - if (lock_menuitem != NULL) { - dbusmenu_menuitem_property_set_shortcut_string (lock_menuitem, val); - } - g_free (val); - } - return; -} - -static void -machine_sleep_from_suspend (DbusmenuMenuitem * mi, - guint timestamp, - gpointer userdata) -{ - DeviceMenuMgr* self = DEVICE_MENU_MGR (userdata); - machine_sleep_with_context (self, "Suspend"); -} - -static void -machine_sleep_from_hibernate (DbusmenuMenuitem * mi, - guint timestamp, - gpointer userdata) -{ - DeviceMenuMgr* self = DEVICE_MENU_MGR (userdata); - machine_sleep_with_context (self, "Hibernate"); -} - -/* Let's put this machine to sleep, with some info on how - it should sleep. */ -static void -machine_sleep_with_context (DeviceMenuMgr* self, gchar* type) -{ - if (up_main_proxy == NULL) { - g_warning("Can not %s as no upower proxy", type); - } - - dbus_g_proxy_begin_call(up_main_proxy, - type, - NULL, - NULL, - NULL, - G_TYPE_INVALID); - - return; -} - -/* A response to getting the suspend property */ -static void -suspend_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata) -{ - suspend_call = NULL; - DeviceMenuMgr* self = DEVICE_MENU_MGR (userdata); - - GValue candoit = {0}; - GError * error = NULL; - dbus_g_proxy_end_call(proxy, call, &error, G_TYPE_VALUE, &candoit, G_TYPE_INVALID); - if (error != NULL) { - g_warning("Unable to check suspend: %s", error->message); - g_error_free(error); - return; - } - g_debug("Got Suspend: %s", g_value_get_boolean(&candoit) ? "true" : "false"); - - gboolean local_can_suspend = g_value_get_boolean(&candoit); - if (local_can_suspend != can_suspend) { - can_suspend = local_can_suspend; - // TODO figure out what needs updating on the menu - // And add or remove it but just don't rebuild the whole menu - // a waste - device_menu_mgr_rebuild_items(self); - } - return; -} - -/* Response to getting the hibernate property */ -static void -hibernate_prop_cb (DBusGProxy * proxy, DBusGProxyCall * call, gpointer userdata) -{ - hibernate_call = NULL; - DeviceMenuMgr* self = DEVICE_MENU_MGR (userdata); - - GValue candoit = {0}; - GError * error = NULL; - dbus_g_proxy_end_call(proxy, call, &error, G_TYPE_VALUE, &candoit, G_TYPE_INVALID); - if (error != NULL) { - g_warning("Unable to check hibernate: %s", error->message); - g_error_free(error); - return; - } - g_debug("Got Hibernate: %s", g_value_get_boolean(&candoit) ? "true" : "false"); - - gboolean local_can_hibernate = g_value_get_boolean(&candoit); - if (local_can_hibernate != can_hibernate) { - can_hibernate = local_can_hibernate; - device_menu_mgr_rebuild_items(self); - } -} - -/* A signal that we need to recheck to ensure we can still - hibernate and/or suspend */ -static void -up_changed_cb (DBusGProxy * proxy, gpointer user_data) -{ - /* Start Async call to see if we can hibernate */ - if (suspend_call == NULL) { - suspend_call = dbus_g_proxy_begin_call(up_prop_proxy, - "Get", - suspend_prop_cb, - user_data, - NULL, - G_TYPE_STRING, - UP_INTERFACE, - G_TYPE_STRING, - "CanSuspend", - G_TYPE_INVALID, - G_TYPE_VALUE, - G_TYPE_INVALID); - } - - /* Start Async call to see if we can suspend */ - if (hibernate_call == NULL) { - hibernate_call = dbus_g_proxy_begin_call(up_prop_proxy, - "Get", - hibernate_prop_cb, - user_data, - NULL, - G_TYPE_STRING, - UP_INTERFACE, - G_TYPE_STRING, - "CanHibernate", - G_TYPE_INVALID, - G_TYPE_VALUE, - G_TYPE_INVALID); - } -} -/* Handle the callback from the allow functions to check and - see if we're changing the value, and if so, rebuilding the - menus based on that info. */ -static void -allowed_suspend_cb (DBusGProxy *proxy, - gboolean OUT_allowed, - GError *error, - gpointer userdata) -{ - if (error != NULL) { - g_warning("Unable to get information on what is allowed from UPower: %s", - error->message); - return; - } - - if (OUT_allowed != allow_suspend) { - allow_suspend = OUT_allowed; - device_menu_mgr_rebuild_items(DEVICE_MENU_MGR (userdata)); - } -} - -/* Handle the callback from the allow functions to check and - see if we're changing the value, and if so, rebuilding the - menus based on that info. */ -static void -allowed_hibernate_cb (DBusGProxy *proxy, - gboolean OUT_allowed, - GError *error, - gpointer userdata) -{ - if (error != NULL) { - g_warning("Unable to get information on what is allowed from UPower: %s", - error->message); - return; - } - - if (OUT_allowed != allow_hibernate) { - allow_hibernate = OUT_allowed; - device_menu_mgr_rebuild_items(DEVICE_MENU_MGR (userdata)); - } -} - -/* This function goes through and sets up what we need for - DKp checking. We're even setting up the calls for the props - we need */ -static void -setup_up (DeviceMenuMgr* self) { - DBusGConnection * bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL); - g_return_if_fail(bus != NULL); - - if (up_main_proxy == NULL) { - up_main_proxy = dbus_g_proxy_new_for_name(bus, - UP_ADDRESS, - UP_OBJECT, - UP_INTERFACE); - } - g_return_if_fail(up_main_proxy != NULL); - - if (up_prop_proxy == NULL) { - up_prop_proxy = dbus_g_proxy_new_for_name(bus, - UP_ADDRESS, - UP_OBJECT, - DBUS_INTERFACE_PROPERTIES); - /* Connect to changed signal */ - dbus_g_proxy_add_signal(up_main_proxy, - "Changed", - G_TYPE_INVALID); - - dbus_g_proxy_connect_signal(up_main_proxy, - "Changed", - G_CALLBACK(up_changed_cb), - self, - NULL); - } - g_return_if_fail(up_prop_proxy != NULL); - - - /* Force an original "changed" event */ - up_changed_cb(up_main_proxy, self); - - /* Check to see if these are getting blocked by PolicyKit */ - org_freedesktop_UPower_suspend_allowed_async(up_main_proxy, - allowed_suspend_cb, - self); - org_freedesktop_UPower_hibernate_allowed_async(up_main_proxy, - allowed_hibernate_cb, - self); - - return; -} - -/* This is the function to show a dialog on actions that - can destroy data. Currently it just calls the GTK version - but it seems that in the future it should figure out - what's going on and something better. */ -static void -show_dialog (DbusmenuMenuitem * mi, guint timestamp, gchar * type) -{ - -#ifdef HAVE_GTKLOGOUTHELPER - gchar * helper = g_build_filename(LIBEXECDIR, "gtk-logout-helper", NULL); -#else - gchar * helper = g_build_filename("gnome-session-quit", NULL); -#endif /* HAVE_GTKLOGOUTHELPER */ - gchar * dialog_line = g_strdup_printf("%s --%s", helper, type); - g_free(helper); - - g_debug("Showing dialog '%s'", dialog_line); - - GError * error = NULL; - if (!g_spawn_command_line_async(dialog_line, &error)) { - g_warning("Unable to show dialog: %s", error->message); - g_error_free(error); - } - g_free(dialog_line); -} - -static void -show_session_properties (DbusmenuMenuitem * mi, - guint timestamp, - gchar * type) -{ - GError * error = NULL; - if (!g_spawn_command_line_async("gnome-session-properties", &error)) - { - g_warning("Unable to show dialog: %s", error->message); - g_error_free(error); - } -} - -static void -show_printer_properties (DbusmenuMenuitem * mi, - guint timestamp, - gchar * type) -{ - GError * error = NULL; - if (!g_spawn_command_line_async("system-config-printer", &error)) - { - g_warning("Unable to show dialog: %s", error->message); - g_error_free(error); - } -} - -static void -show_system_settings_with_context (DbusmenuMenuitem * mi, - guint timestamp, - gchar * type) -{ - gchar * control_centre_command = g_strdup_printf("%s %s", - "gnome-control-center", - type); - - g_debug("Command centre exec call '%s'", control_centre_command); - - GError * error = NULL; - if (!g_spawn_command_line_async(control_centre_command, &error)) - { - g_warning("Unable to show dialog: %s", error->message); - g_error_free(error); - } - g_free(control_centre_command); -} - -// TODO: refactor both of these down to the one method. -static void device_menu_mgr_show_simple_scan (DbusmenuMenuitem * mi, - guint timestamp, - gchar * type) -{ - GError * error = NULL; - if (!g_spawn_command_line_async("simple-scan", &error)) - { - g_warning("Unable to launch simple-scan: %s", error->message); - g_error_free(error); -#ifdef HAVE_APT - if (!g_spawn_command_line_async("software-center simple-scan", &error)) - { - g_warning ("Unable to launch software-centre simple-scan: %s", - error->message); - g_error_free(error); - } -#endif /* HAVE_APT */ - } -} - -static void device_menu_mgr_show_cheese (DbusmenuMenuitem * mi, - guint timestamp, - gchar * type) -{ - GError * error = NULL; - if (!g_spawn_command_line_async("cheese", &error)) - { - g_warning("Unable to launch cheese: %s", error->message); - g_error_free(error); -#ifdef HAVE_APT - if (!g_spawn_command_line_async("software-center cheese", &error)) - { - g_warning ("Unable to launch software-centre cheese: %s", - error->message); - g_error_free(error); - } -#endif /* HAVE_APT */ - } -} - -static void -device_menu_mgr_build_settings_items (DeviceMenuMgr* self) -{ - system_settings_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (system_settings_menuitem, - DBUSMENU_MENUITEM_PROP_LABEL, - _("System Settings…")); - g_signal_connect (G_OBJECT(system_settings_menuitem), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(show_system_settings_with_context), ""); - dbusmenu_menuitem_child_add_position(self->root_item, - system_settings_menuitem, - 0); - - display_settings_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (display_settings_menuitem, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Displays…")); - g_signal_connect (G_OBJECT(display_settings_menuitem), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(show_system_settings_with_context), "display"); - dbusmenu_menuitem_child_add_position(self->root_item, - display_settings_menuitem, - 1); - login_settings_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (login_settings_menuitem, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Startup Applications…")); - g_signal_connect (G_OBJECT(login_settings_menuitem), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(show_session_properties), - "login"); - dbusmenu_menuitem_child_add_position(self->root_item, - login_settings_menuitem, - 2); -#ifdef HAVE_APT - software_updates_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (software_updates_menuitem, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Software Up to Date")); - dbusmenu_menuitem_child_add_position(self->root_item, - software_updates_menuitem, - 3); -#endif /* HAVE_APT */ - - DbusmenuMenuitem * separator1 = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (separator1, - DBUSMENU_MENUITEM_PROP_TYPE, - DBUSMENU_CLIENT_TYPES_SEPARATOR); - dbusmenu_menuitem_child_add_position (self->root_item, separator1, 4); -} - -static void -device_menu_mgr_build_devices_items (DeviceMenuMgr* self) -{ - DbusmenuMenuitem * device_heading = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (device_heading, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Attached Devices")); - dbusmenu_menuitem_property_set_bool (device_heading, - DBUSMENU_MENUITEM_PROP_ENABLED, - FALSE); - dbusmenu_menuitem_child_add_position (self->root_item, - device_heading, - 5); - - printers_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (printers_menuitem, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Printers")); - g_signal_connect (G_OBJECT(printers_menuitem), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(show_printer_properties), - "printers"); - dbusmenu_menuitem_child_add_position(self->root_item, - printers_menuitem, - 6); - scanners_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (scanners_menuitem, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Scanners")); - g_signal_connect (G_OBJECT(scanners_menuitem), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(device_menu_mgr_show_simple_scan), - NULL); - dbusmenu_menuitem_child_add_position (self->root_item, - scanners_menuitem, - 7); - dbusmenu_menuitem_property_set_bool (scanners_menuitem, - DBUSMENU_MENUITEM_PROP_VISIBLE, - FALSE); - - webcam_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (webcam_menuitem, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Webcam")); - g_signal_connect (G_OBJECT(webcam_menuitem), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(device_menu_mgr_show_cheese), - NULL); - dbusmenu_menuitem_child_add_position (self->root_item, - webcam_menuitem, - 8); - dbusmenu_menuitem_property_set_bool (webcam_menuitem, - DBUSMENU_MENUITEM_PROP_VISIBLE, - FALSE); - - DbusmenuMenuitem * separator3 = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (separator3, - DBUSMENU_MENUITEM_PROP_TYPE, - DBUSMENU_CLIENT_TYPES_SEPARATOR); - dbusmenu_menuitem_child_add_position (self->root_item, separator3, 9); -} - -static void -device_menu_mgr_build_static_items (DeviceMenuMgr* self, gboolean greeter_mode) -{ - // Static Setting items - if (!greeter_mode) { - device_menu_mgr_build_settings_items (self); - } - - // Devices control - if (!greeter_mode) { - device_menu_mgr_build_devices_items (self); - } - - // Session control - if (!greeter_mode) { - gboolean can_lockscreen; - - /* Make sure we have a valid GConf client, and build one - if needed */ - device_menu_mgr_ensure_settings_client (self); - can_lockscreen = !g_settings_get_boolean (lockdown_settings, - LOCKDOWN_KEY_SCREENSAVER); - /* Lock screen item */ - if (can_lockscreen) { - lock_menuitem = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (lock_menuitem, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Lock Screen")); - - gchar * shortcut = g_settings_get_string(keybinding_settings, KEY_LOCK_SCREEN); - if (shortcut != NULL) { - g_debug("Lock screen shortcut: %s", shortcut); - dbusmenu_menuitem_property_set_shortcut_string(lock_menuitem, shortcut); - g_free(shortcut); - } - else { - g_debug("Unable to get lock screen shortcut."); - } - - g_signal_connect (G_OBJECT(lock_menuitem), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(lock_screen), NULL); - dbusmenu_menuitem_child_append(self->root_item, lock_menuitem); - } - - logout_mi = dbusmenu_menuitem_new(); - - if (supress_confirmations()) { - dbusmenu_menuitem_property_set (logout_mi, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Log Out")); - } - else { - dbusmenu_menuitem_property_set (logout_mi, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Log Out\342\200\246")); - } - dbusmenu_menuitem_property_set_bool (logout_mi, - DBUSMENU_MENUITEM_PROP_VISIBLE, - show_logout()); - dbusmenu_menuitem_child_append(self->root_item, logout_mi); - g_signal_connect( G_OBJECT(logout_mi), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(show_dialog), "logout"); - } - - if (can_suspend && allow_suspend) { - suspend_mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (suspend_mi, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Suspend")); - dbusmenu_menuitem_child_append (self->root_item, suspend_mi); - g_signal_connect( G_OBJECT(suspend_mi), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(machine_sleep_from_suspend), - self); - } - - if (can_hibernate && allow_hibernate) { - hibernate_mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (hibernate_mi, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Hibernate")); - dbusmenu_menuitem_child_append(self->root_item, hibernate_mi); - g_signal_connect (G_OBJECT(hibernate_mi), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(machine_sleep_from_hibernate), self); - } - - shutdown_mi = dbusmenu_menuitem_new(); - - if (supress_confirmations()) { - dbusmenu_menuitem_property_set (shutdown_mi, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Shut Down")); - } - else { - dbusmenu_menuitem_property_set (shutdown_mi, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Shut Down\342\200\246")); - } - dbusmenu_menuitem_property_set_bool (shutdown_mi, - DBUSMENU_MENUITEM_PROP_VISIBLE, - show_shutdown()); - dbusmenu_menuitem_child_append (self->root_item, shutdown_mi); - g_signal_connect (G_OBJECT(shutdown_mi), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, -#ifdef HAVE_GTKLOGOUTHELPER - G_CALLBACK(show_dialog), "shutdown"); -#else - G_CALLBACK(show_dialog), "power-off"); -#endif /* HAVE_GTKLOGOUTHELPER */ - - RestartShutdownLogoutMenuItems * restart_shutdown_logout_mi = g_new0 (RestartShutdownLogoutMenuItems, 1); - restart_shutdown_logout_mi->logout_mi = logout_mi; - restart_shutdown_logout_mi->shutdown_mi = shutdown_mi; - - update_menu_entries(restart_shutdown_logout_mi); -#ifdef HAS_GUDEV - // Time to create the udev mgr and hand it the static relevant items. - self->udev_mgr = udev_mgr_new (scanners_menuitem, webcam_menuitem); -#endif -} - -static void -device_menu_mgr_rebuild_items (DeviceMenuMgr* self) -{ - dbusmenu_menuitem_property_set_bool (hibernate_mi, - DBUSMENU_MENUITEM_PROP_VISIBLE, - can_hibernate && allow_hibernate); - dbusmenu_menuitem_property_set_bool (suspend_mi, - DBUSMENU_MENUITEM_PROP_VISIBLE, - can_suspend && allow_suspend); -} - -/* Ensures that we have a GConf client and if we build one - set up the signal handler. */ -static void -device_menu_mgr_ensure_settings_client (DeviceMenuMgr* self) -{ - if (!lockdown_settings) { - lockdown_settings = g_settings_new (LOCKDOWN_SCHEMA); - g_signal_connect(lockdown_settings, "changed", G_CALLBACK(lockdown_changed), self); - } - if (!keybinding_settings) { - keybinding_settings = g_settings_new (KEYBINDING_SCHEMA); - g_signal_connect(lockdown_settings, "changed::" KEY_LOCK_SCREEN, G_CALLBACK(keybinding_changed), self); - } - return; -} - -DbusmenuMenuitem* -device_mgr_get_root_item (DeviceMenuMgr* self) -{ - return self->root_item; -} - -/* - * Clean Entry Point - */ -DeviceMenuMgr* device_menu_mgr_new (SessionDbus* session_dbus, gboolean greeter_mode) -{ - DeviceMenuMgr* device_mgr = g_object_new (DEVICE_TYPE_MENU_MGR, NULL); - device_mgr->session_dbus_interface = session_dbus; - device_menu_mgr_build_static_items (device_mgr, greeter_mode); -#ifdef HAVE_APT - if (software_updates_menuitem != NULL) { - device_mgr->apt_watcher = apt_watcher_new (session_dbus, - software_updates_menuitem); - } -#endif /* HAVE_APT */ - return device_mgr; -} diff --git a/src/device-menu-mgr.h b/src/device-menu-mgr.h deleted file mode 100644 index d3c3a5a..0000000 --- a/src/device-menu-mgr.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2011 Canonical Ltd. - -Authors: - Conor Curran <conor.curran@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - - -#ifndef _DEVICE_MENU_MGR_H_ -#define _DEVICE_MENU_MGR_H_ - -#include <glib-object.h> - -#include "session-dbus.h" - -G_BEGIN_DECLS - -#define DEVICE_TYPE_MENU_MGR (device_menu_mgr_get_type ()) -#define DEVICE_MENU_MGR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEVICE_TYPE_MENU_MGR, DeviceMenuMgr)) -#define DEVICE_MENU_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEVICE_TYPE_MENU_MGR, DeviceMenuMgrClass)) -#define DEVICE_IS_MENU_MGR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEVICE_TYPE_MENU_MGR)) -#define DEVICE_IS_MENU_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEVICE_TYPE_MENU_MGR)) -#define DEVICE_MENU_MGR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEVICE_TYPE_MENU_MGR, DeviceMenuMgrClass)) - -typedef struct _DeviceMenuMgrClass DeviceMenuMgrClass; -typedef struct _DeviceMenuMgr DeviceMenuMgr; - -struct _DeviceMenuMgrClass -{ - GObjectClass parent_class; -}; - -GType device_menu_mgr_get_type (void) G_GNUC_CONST; - -DeviceMenuMgr* device_menu_mgr_new (SessionDbus* session_dbus, gboolean greeter_mode); - -DbusmenuMenuitem* device_mgr_get_root_item (DeviceMenuMgr* self); - -G_END_DECLS - -#endif /* _DEVICE_MENU_MGR_H_ */ diff --git a/src/dialog.c b/src/dialog.c index 4b139ca..c46ac80 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -7,16 +7,16 @@ Copyright 2010 Canonical Ltd. Authors: Ted Gould <ted@canonical.com> -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published by the Free Software Foundation. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along +You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -26,7 +26,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <glib/gi18n.h> -#include "consolekit-manager-client.h" +#include "dbus-consolekit-manager.h" #include "dialog.h" /* Strings */ @@ -34,7 +34,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. static const gchar * title_strings[LOGOUT_DIALOG_TYPE_CNT] = { /* LOGOUT_DIALOG_LOGOUT, */ NC_("title", "Log Out"), /* LOGOUT_DIALOG_RESTART, */ NC_("title", "Restart"), - /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("title", "Shut Down") + /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("title", "Switch Off") }; static const gchar * body_strings[LOGOUT_DIALOG_TYPE_CNT] = { @@ -46,7 +46,7 @@ static const gchar * body_strings[LOGOUT_DIALOG_TYPE_CNT] = { static const gchar * button_strings[LOGOUT_DIALOG_TYPE_CNT] = { /* LOGOUT_DIALOG_LOGOUT, */ NC_("button", "Log Out"), /* LOGOUT_DIALOG_RESTART, */ NC_("button", "Restart"), - /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button", "Shut Down") + /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button", "Switch Off") }; /* TRANSLATORS: These strings have an ellipsis so that the user knows @@ -54,7 +54,7 @@ static const gchar * button_strings[LOGOUT_DIALOG_TYPE_CNT] = { static const gchar * button_auth_strings[LOGOUT_DIALOG_TYPE_CNT] = { /* LOGOUT_DIALOG_LOGOUT, */ NC_("button auth", "Log Out"), /* LOGOUT_DIALOG_RESTART, */ NC_("button auth", "Restart…"), - /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button auth", "Shut Down…") + /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button auth", "Switch Off…") }; /* TRANSLATORS: This button appears on the logout dialog when @@ -137,30 +137,31 @@ check_restart_required (void) static gboolean ck_check_allowed (LogoutDialogType type) { - DBusGConnection * system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL); - g_return_val_if_fail(system_bus != NULL, TRUE); - - DBusGProxy * ck_proxy = dbus_g_proxy_new_for_name (system_bus, - "org.freedesktop.ConsoleKit", - "/org/freedesktop/ConsoleKit/Manager", - "org.freedesktop.ConsoleKit.Manager"); - g_return_val_if_fail(ck_proxy != NULL, TRUE); - - gboolean retval = TRUE; - switch (type) { - case LOGOUT_DIALOG_TYPE_RESTART: - org_freedesktop_ConsoleKit_Manager_can_restart(ck_proxy, &retval, NULL); - break; - case LOGOUT_DIALOG_TYPE_SHUTDOWN: - org_freedesktop_ConsoleKit_Manager_can_stop(ck_proxy, &retval, NULL); - break; - default: - break; - } + gboolean allowed = TRUE; + + ConsoleKitManager * ck_proxy = console_kit_manager_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + "org.freedesktop.ConsoleKit", + "/org/freedesktop/ConsoleKit/Manager", + NULL, + NULL); + if (ck_proxy != NULL) + { + switch (type) { + case LOGOUT_DIALOG_TYPE_RESTART: + console_kit_manager_call_can_restart_sync (ck_proxy, &allowed, NULL, NULL); + break; + case LOGOUT_DIALOG_TYPE_SHUTDOWN: + console_kit_manager_call_can_stop_sync (ck_proxy, &allowed, NULL, NULL); + break; + default: + break; + } - g_object_unref(ck_proxy); + g_object_unref(ck_proxy); + } - return retval; + return allowed; } LogoutDialog * @@ -225,17 +226,17 @@ logout_dialog_new (LogoutDialogType type) button_text, GTK_RESPONSE_OK, NULL); } - - if (type == LOGOUT_DIALOG_TYPE_SHUTDOWN){ - const gchar * restart_text; + + if (type == LOGOUT_DIALOG_TYPE_SHUTDOWN) { + const gchar * restart_text; restart_text = g_dpgettext2 (NULL, "button", button_strings[LOGOUT_DIALOG_TYPE_RESTART]); - gtk_dialog_add_button (GTK_DIALOG(dialog), restart_text, GTK_RESPONSE_HELP); - } + gtk_dialog_add_button (GTK_DIALOG(dialog), restart_text, GTK_RESPONSE_HELP); + } gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); - /* The following is a workaround to fix an issue in GtkMessageDialog - in which the user can tab through the text in addition to + /* The following is a workaround to fix an issue in GtkMessageDialog + in which the user can tab through the text in addition to the buttons. */ GtkWidget *message_area = gtk_message_dialog_get_message_area(GTK_MESSAGE_DIALOG(dialog)); GList *children = gtk_container_get_children(GTK_CONTAINER(message_area)); diff --git a/src/display-manager.xml b/src/display-manager.xml index 92f5e05..07b5f29 100644 --- a/src/display-manager.xml +++ b/src/display-manager.xml @@ -1,20 +1,30 @@ <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> + <node> <interface name="org.freedesktop.DisplayManager.Seat"> + <property name="CanSwitch" type="b" access="read"/> + + <property name="HasGuestAccount" type="b" access="read"/> + + <property name="Sessions" type="ao" access="read"/> + <!-- Show greeter to allow new login / switch users --> <method name="SwitchToGreeter"/> <!-- Switch to a user, starting a new display if required --> <method name="SwitchToUser"> <arg name="username" direction="in" type="s"/> - <arg name="session" direction="in" type="s"/> + <arg name="session_name" direction="in" type="s"/> </method> <!-- Switch to the guest user --> <method name="SwitchToGuest"> - <arg name="session" direction="in" type="s"/> + <arg name="session_name" direction="in" type="s"/> </method> + <method name='Lock'/> + </interface> + </node> diff --git a/src/gtk-logout-helper.c b/src/gtk-logout-helper.c index f5c11ba..7868978 100644 --- a/src/gtk-logout-helper.c +++ b/src/gtk-logout-helper.c @@ -8,26 +8,28 @@ Authors: Ted Gould <ted@canonical.com> Christoph Korn <c_korn@gmx.de> -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published by the Free Software Foundation. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along +You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <config.h> +#include "config.h" + #include <locale.h> #include <glib.h> -#include <gtk/gtk.h> +#include <glib/gi18n.h> /* textdomain(), bindtextdomain() */ #include <dbus/dbus-glib.h> +#include <gtk/gtk.h> #include "dialog.h" -#include "settings-helper.h" +#include "shared-names.h" static void consolekit_fallback (LogoutDialogType action) @@ -90,7 +92,7 @@ session_action (LogoutDialogType action) GError * error = NULL; gboolean res = FALSE; - sbus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); + sbus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); if (sbus == NULL) { g_warning("Unable to get DBus session bus."); return; @@ -112,15 +114,15 @@ session_action (LogoutDialogType action) if (action == LOGOUT_DIALOG_TYPE_LOG_OUT) { g_debug("Asking Session manager to 'Logout'"); - res = dbus_g_proxy_call_with_timeout (sm_proxy, "Logout", INT_MAX, &error, + res = dbus_g_proxy_call_with_timeout (sm_proxy, "Logout", INT_MAX, &error, G_TYPE_UINT, 1, G_TYPE_INVALID, G_TYPE_INVALID); } else if (action == LOGOUT_DIALOG_TYPE_SHUTDOWN) { g_debug("Asking Session manager to 'RequestShutdown'"); - res = dbus_g_proxy_call_with_timeout (sm_proxy, "RequestShutdown", INT_MAX, &error, + res = dbus_g_proxy_call_with_timeout (sm_proxy, "RequestShutdown", INT_MAX, &error, G_TYPE_INVALID, G_TYPE_INVALID); } else if (action == LOGOUT_DIALOG_TYPE_RESTART) { g_debug("Asking Session manager to 'RequestReboot'"); - res = dbus_g_proxy_call_with_timeout (sm_proxy, "RequestReboot", INT_MAX, &error, + res = dbus_g_proxy_call_with_timeout (sm_proxy, "RequestReboot", INT_MAX, &error, G_TYPE_INVALID, G_TYPE_INVALID); } else { g_warning ("Unknown session action"); @@ -137,10 +139,7 @@ session_action (LogoutDialogType action) } g_object_unref(sm_proxy); - - if (error != NULL) { - g_error_free(error); - } + g_clear_error (&error); return; } @@ -179,6 +178,17 @@ static GOptionEntry options[] = { {NULL} }; +static gboolean +suppress_confirmations (void) +{ + GSettings * s = g_settings_new (SESSION_SCHEMA); + const gboolean suppress = g_settings_get_boolean (s, SUPPRESS_KEY); + g_clear_object (&s); + return suppress; +} + + + int main (int argc, char * argv[]) { @@ -207,7 +217,7 @@ main (int argc, char * argv[]) INDICATOR_ICONS_DIR); GtkWidget * dialog = NULL; - if (!supress_confirmations()) { + if (!suppress_confirmations()) { g_debug("Showing dialog to ask for user confirmation"); dialog = GTK_WIDGET(logout_dialog_new(type)); } diff --git a/src/indicator-session.c b/src/indicator-session.c index c6f4d9c..53ff87e 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -1,23 +1,23 @@ /* A small wrapper utility to load indicators and put them as menu items -into the gnome-panel using it's applet interface. +into the gnome-panel using its applet interface. Copyright 2009 Canonical Ltd. Authors: Ted Gould <ted@canonical.com> Conor Curran <conor.curran@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published by the Free Software Foundation. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along +You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -38,8 +38,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <libindicator/indicator-service-manager.h> #include <libindicator/indicator-image-helper.h> -#include "dbus-shared-names.h" -#include "dbusmenu-shared.h" +#include "shared-names.h" #include "user-widget.h" #define INDICATOR_SESSION_TYPE (indicator_session_get_type ()) @@ -52,18 +51,19 @@ with this program. If not, see <http://www.gnu.org/licenses/>. typedef struct _IndicatorSession IndicatorSession; typedef struct _IndicatorSessionClass IndicatorSessionClass; -struct _IndicatorSessionClass { - IndicatorObjectClass parent_class; +struct _IndicatorSessionClass +{ + IndicatorObjectClass parent_class; }; -struct _IndicatorSession { - IndicatorObject parent; - IndicatorServiceManager * service; - IndicatorObjectEntry users; - IndicatorObjectEntry devices; - gboolean show_users_entry; - GCancellable * service_proxy_cancel; - GDBusProxy * service_proxy; +struct _IndicatorSession +{ + IndicatorObject parent; + IndicatorServiceManager * service; + IndicatorObjectEntry entry; + GCancellable * service_proxy_cancel; + GDBusProxy * service_proxy; + GSettings * settings; }; static gboolean greeter_mode; @@ -75,10 +75,6 @@ INDICATOR_SET_VERSION INDICATOR_SET_TYPE(INDICATOR_SESSION_TYPE) /* Prototypes */ -static gboolean build_menu_switch (DbusmenuMenuitem * newitem, - DbusmenuMenuitem * parent, - DbusmenuClient * client, - gpointer user_data); static gboolean new_user_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client, @@ -93,7 +89,6 @@ static void service_connection_cb (IndicatorServiceManager * sm, gboolean connec static void receive_signal (GDBusProxy * proxy, gchar * sender_name, gchar * signal_name, GVariant * parameters, gpointer user_data); static void service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data); static void user_real_name_get_cb (GObject * obj, GAsyncResult * res, gpointer user_data); -static void user_menu_visibility_get_cb (GObject* obj, GAsyncResult* res, gpointer user_data); static void indicator_session_class_init (IndicatorSessionClass *klass); static void indicator_session_init (IndicatorSession *self); @@ -102,10 +97,10 @@ static void indicator_session_finalize (GObject *object); static GList* indicator_session_get_entries (IndicatorObject* obj); static guint indicator_session_get_location (IndicatorObject * io, IndicatorObjectEntry * entry); - + G_DEFINE_TYPE (IndicatorSession, indicator_session, INDICATOR_OBJECT_TYPE); -static void +static void indicator_session_class_init (IndicatorSessionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); @@ -122,126 +117,64 @@ indicator_session_class_init (IndicatorSessionClass *klass) static void indicator_session_init (IndicatorSession *self) { - self->service = NULL; - self->service_proxy_cancel = NULL; - self->service_proxy = NULL; - self->show_users_entry = FALSE; - - /* Now let's fire these guys up. */ - self->service = indicator_service_manager_new_version(INDICATOR_SESSION_DBUS_NAME, + self->settings = g_settings_new ("com.canonical.indicator.session"); + + /* Now let's fire these guys up. */ + self->service = indicator_service_manager_new_version(INDICATOR_SESSION_DBUS_NAME, INDICATOR_SESSION_DBUS_VERSION); - g_signal_connect(G_OBJECT(self->service), - INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE, - G_CALLBACK(service_connection_cb), self); - - GtkWidget* avatar_icon = NULL; - // users - self->users.name_hint = PACKAGE"-users"; - self->users.menu = GTK_MENU (dbusmenu_gtkmenu_new (INDICATOR_USERS_DBUS_NAME, - INDICATOR_USERS_DBUS_OBJECT)); - // Set the image to the default avator image - GdkPixbuf* pixbuf = NULL; - GError* error = NULL; - pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), - "avatar-default", - 17, - GTK_ICON_LOOKUP_FORCE_SIZE, - &error); - - // I think the avatar image is available always but just in case have a fallback - if (error != NULL) { - g_warning ("Could not load the default avatar image for some reason"); - self->users.image = indicator_image_helper (USER_ITEM_ICON_DEFAULT); - } - else{ - avatar_icon = gtk_image_new (); - gtk_image_set_from_pixbuf (GTK_IMAGE (avatar_icon), pixbuf); - self->users.image = GTK_IMAGE (avatar_icon); - g_object_unref (pixbuf); - g_error_free (error); - } - - self->users.label = GTK_LABEL (gtk_label_new (NULL)); - self->users.accessible_desc = _("User Menu"); - - const gchar *greeter_var; - greeter_var = g_getenv("INDICATOR_GREETER_MODE"); - greeter_mode = g_strcmp0(greeter_var, "1") == 0; - - // devices - self->devices.name_hint = PACKAGE"-devices"; - self->devices.accessible_desc = _("Device Menu"); - self->devices.menu = GTK_MENU (dbusmenu_gtkmenu_new(INDICATOR_SESSION_DBUS_NAME, - INDICATOR_SESSION_DBUS_OBJECT)); - if (greeter_mode){ - self->devices.image = indicator_image_helper (GREETER_ICON_DEFAULT); - } - else{ - self->devices.image = indicator_image_helper (ICON_DEFAULT); - } - - gtk_widget_show (GTK_WIDGET(self->devices.menu)); - gtk_widget_show (GTK_WIDGET(self->devices.image)); - gtk_widget_show (GTK_WIDGET(self->users.image)); - gtk_widget_show (GTK_WIDGET(self->users.menu)); - - g_object_ref_sink (self->users.menu); - g_object_ref_sink (self->users.image); - g_object_ref_sink (self->devices.menu); - g_object_ref_sink (self->devices.image); - - // Setup the handlers for users - DbusmenuClient * users_client = DBUSMENU_CLIENT(dbusmenu_gtkmenu_get_client(DBUSMENU_GTKMENU(self->users.menu))); - dbusmenu_client_add_type_handler (users_client, + g_signal_connect (G_OBJECT(self->service), + INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE, + G_CALLBACK(service_connection_cb), self); + + greeter_mode = !g_strcmp0(g_getenv("INDICATOR_GREETER_MODE"), "1"); + + self->entry.name_hint = PACKAGE; + self->entry.accessible_desc = _("Session Menu"); + self->entry.label = GTK_LABEL (gtk_label_new ("User Name")); + self->entry.image = greeter_mode + ? indicator_image_helper (GREETER_ICON_DEFAULT) + : indicator_image_helper (ICON_DEFAULT); + self->entry.menu = GTK_MENU (dbusmenu_gtkmenu_new(INDICATOR_SESSION_DBUS_NAME, + INDICATOR_SESSION_DBUS_OBJECT)); + g_settings_bind (self->settings, "show-real-name-on-panel", + self->entry.label, "visible", + G_SETTINGS_BIND_GET); + + gtk_widget_show (GTK_WIDGET(self->entry.menu)); + gtk_widget_show (GTK_WIDGET(self->entry.image)); + g_object_ref_sink (self->entry.menu); + g_object_ref_sink (self->entry.image); + + // set up the handlers + DbusmenuClient * menu_client = DBUSMENU_CLIENT(dbusmenu_gtkmenu_get_client(DBUSMENU_GTKMENU(self->entry.menu))); + dbusmenu_client_add_type_handler (menu_client, USER_ITEM_TYPE, new_user_item); - dbusmenu_client_add_type_handler_full (users_client, - MENU_SWITCH_TYPE, - build_menu_switch, - self, NULL); - - // Setup the handlers for devices - DbusmenuClient * devices_client = DBUSMENU_CLIENT(dbusmenu_gtkmenu_get_client(DBUSMENU_GTKMENU(self->devices.menu))); - dbusmenu_client_add_type_handler (devices_client, + dbusmenu_client_add_type_handler (menu_client, RESTART_ITEM_TYPE, build_restart_item); - - GtkAccelGroup * agroup = gtk_accel_group_new(); - dbusmenu_gtkclient_set_accel_group(DBUSMENU_GTKCLIENT(devices_client), agroup); - return; + dbusmenu_gtkclient_set_accel_group (DBUSMENU_GTKCLIENT(menu_client), + gtk_accel_group_new()); } static void indicator_session_dispose (GObject *object) { - IndicatorSession * self = INDICATOR_SESSION(object); + IndicatorSession * self = INDICATOR_SESSION(object); - if (self->service != NULL) { - g_object_unref(G_OBJECT(self->service)); - self->service = NULL; - } + g_clear_object (&self->settings); + g_clear_object (&self->service); + g_clear_object (&self->service_proxy); - if (self->service_proxy != NULL) { - g_object_unref(self->service_proxy); - self->service_proxy = NULL; - } + if (self->service_proxy_cancel != NULL) + { + g_cancellable_cancel(self->service_proxy_cancel); + g_clear_object (&self->service_proxy_cancel); + } - if (self->service_proxy_cancel != NULL) { - g_cancellable_cancel(self->service_proxy_cancel); - g_object_unref(self->service_proxy_cancel); - self->service_proxy_cancel = NULL; - } - - if (self->users.menu != NULL) { - g_object_unref (self->users.menu); - } - - if (self->devices.menu != NULL) { - g_object_unref (self->devices.menu); - } + g_clear_object (&self->entry.menu); - G_OBJECT_CLASS (indicator_session_parent_class)->dispose (object); - return; + G_OBJECT_CLASS (indicator_session_parent_class)->dispose (object); } static void @@ -255,35 +188,16 @@ indicator_session_finalize (GObject *object) static GList* indicator_session_get_entries (IndicatorObject* obj) { - g_return_val_if_fail(IS_INDICATOR_SESSION(obj), NULL); - IndicatorSession* self = INDICATOR_SESSION (obj); - - g_debug ("get entries"); - GList * retval = NULL; - // Only show the users menu if we have more than one - if (self->show_users_entry == TRUE){ - retval = g_list_prepend (retval, &self->users); - } - retval = g_list_prepend (retval, &self->devices); + g_return_val_if_fail(IS_INDICATOR_SESSION(obj), NULL); - if (retval != NULL) { - retval = g_list_reverse(retval); - } - return retval; + IndicatorSession* self = INDICATOR_SESSION (obj); + return g_list_append (NULL, &self->entry); } static guint indicator_session_get_location (IndicatorObject * io, IndicatorObjectEntry * entry) -{ - IndicatorSession * self = INDICATOR_SESSION (io); - if (entry == &self->users){ - return 0; - } - else if (entry == &self->devices){ - return 1; - } - g_warning ("IOEntry handed to us to position but we don't own it!"); +{ return 0; } @@ -298,24 +212,16 @@ service_connection_cb (IndicatorServiceManager * sm, gboolean connected, gpointe // Its a reconnect ! // Fetch synchronisation data and return (proxy is still legit) g_dbus_proxy_call (self->service_proxy, - "GetUserMenuVisibility", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, - user_menu_visibility_get_cb, - user_data); - g_dbus_proxy_call (self->service_proxy, "GetUserRealName", NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, user_real_name_get_cb, - user_data); + user_data); return; } - + self->service_proxy_cancel = g_cancellable_new(); g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, @@ -326,7 +232,7 @@ service_connection_cb (IndicatorServiceManager * sm, gboolean connected, gpointe self->service_proxy_cancel, service_proxy_cb, self); - } + } return; } @@ -341,10 +247,7 @@ service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data) GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error); - if (self->service_proxy_cancel != NULL) { - g_object_unref(self->service_proxy_cancel); - self->service_proxy_cancel = NULL; - } + g_clear_object (&self->service_proxy_cancel); if (error != NULL) { g_warning("Could not grab DBus proxy for %s: %s", INDICATOR_SESSION_DBUS_NAME, error->message); @@ -357,17 +260,7 @@ service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data) self->service_proxy = proxy; g_signal_connect(proxy, "g-signal", G_CALLBACK(receive_signal), self); - - // Figure out whether we should show the user menu at all. - g_dbus_proxy_call (self->service_proxy, - "GetUserMenuVisibility", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, - user_menu_visibility_get_cb, - user_data); - + // Fetch the user's real name for the user entry label g_dbus_proxy_call (self->service_proxy, "GetUserRealName", @@ -384,17 +277,13 @@ service_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data) static gboolean new_user_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, - DbusmenuClient * client, - gpointer user_data) + DbusmenuClient * client, + gpointer user_data) { - + g_return_val_if_fail (DBUSMENU_IS_MENUITEM(newitem), FALSE); + g_return_val_if_fail (DBUSMENU_IS_GTKCLIENT(client), FALSE); - GtkWidget* user_item = NULL; - - g_return_val_if_fail(DBUSMENU_IS_MENUITEM(newitem), FALSE); - g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), FALSE); - - user_item = user_widget_new(newitem); + GtkWidget * user_item = user_widget_new (newitem); GtkMenuItem *user_widget = GTK_MENU_ITEM(user_item); @@ -415,191 +304,51 @@ new_user_item (DbusmenuMenuitem * newitem, static void user_real_name_get_cb (GObject * obj, GAsyncResult * res, gpointer user_data) { - IndicatorSession * self = INDICATOR_SESSION(user_data); - GError * error = NULL; - GVariant * result; + IndicatorSession * self = INDICATOR_SESSION(user_data); - result = g_dbus_proxy_call_finish(self->service_proxy, res, &error); + GError * error = NULL; + GVariant * result = g_dbus_proxy_call_finish(self->service_proxy, res, &error); - if (error != NULL) { - g_warning ("unable to complete real name dbus query"); - g_error_free (error); - return; - } - - const gchar* username = NULL; - g_variant_get (result, "(&s)", &username); - indicator_session_update_users_label (self, username); - return; -} - -static void -user_menu_visibility_get_cb (GObject* obj, GAsyncResult* res, gpointer user_data) -{ - IndicatorSession * self = INDICATOR_SESSION(user_data); - GError * error = NULL; - GVariant * result; - - result = g_dbus_proxy_call_finish(self->service_proxy, res, &error); - - if (error != NULL) { - g_warning ("unable to complete real name dbus query"); - g_error_free (error); - return; - } - gboolean update; - g_variant_get (result, "(b)", &update); - - // If it is what we had before no need to do anything... - if (self->show_users_entry == update){ - return; - } - //Otherwise - self->show_users_entry = update; - - if (self->show_users_entry == TRUE){ - g_signal_emit_by_name ((gpointer)self, - "entry-added", - &self->users); - } - else{ - g_signal_emit_by_name ((gpointer)self, - "entry-removed", - &self->users); - } + if (error != NULL) + { + g_warning ("Unable to complete real name dbus query: %s", error->message); + g_clear_error (&error); + } + else + { + const gchar * username = NULL; + g_variant_get (result, "(&s)", &username); + indicator_session_update_users_label (self, username); + g_variant_unref (result); + } } /* Receives all signals from the service, routed to the appropriate functions */ static void receive_signal (GDBusProxy * proxy, - gchar * sender_name, - gchar * signal_name, - GVariant * parameters, - gpointer user_data) + gchar * sender_name, + gchar * signal_name, + GVariant * parameters, + gpointer user_data) { - IndicatorSession * self = INDICATOR_SESSION(user_data); + IndicatorSession * self = INDICATOR_SESSION(user_data); - if (g_strcmp0(signal_name, "UserRealNameUpdated") == 0) { - const gchar* username = NULL; - g_variant_get (parameters, "(&s)", &username); - indicator_session_update_users_label (self, username); - } - else if (g_strcmp0(signal_name, "UserMenuIsVisible") == 0) { - gboolean update; - g_variant_get (parameters, "(b)", &update); - - // If it is what we had before no need to do anything... - if (self->show_users_entry == update){ - return; - } - - //Otherwise - self->show_users_entry = update; - - if (self->show_users_entry == TRUE){ - g_signal_emit_by_name ((gpointer)self, - "entry-added", - &self->users); - - } - else{ - g_signal_emit_by_name ((gpointer)self, - "entry-removed", - &self->users); + if (!g_strcmp0(signal_name, "UserRealNameUpdated")) + { + const gchar * username = NULL; + g_variant_get (parameters, "(&s)", &username); + indicator_session_update_users_label (self, username); } - } - else if (g_strcmp0(signal_name, "RestartRequired") == 0) { - if (greeter_mode == TRUE){ - indicator_image_helper_update(self->devices.image, GREETER_ICON_RESTART); - } - else{ - g_debug ("reboot required"); - indicator_image_helper_update(self->devices.image, ICON_RESTART); + else if (!g_strcmp0(signal_name, "RestartRequired")) + { + indicator_image_helper_update (self->entry.image, greeter_mode ? GREETER_ICON_RESTART : ICON_RESTART); + self->entry.accessible_desc = _("Device Menu (reboot required)"); + g_signal_emit (G_OBJECT(self), INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE_ID, 0, &self->entry); } - self->devices.accessible_desc = _("Device Menu (reboot required)"); - g_signal_emit(G_OBJECT(self), INDICATOR_OBJECT_SIGNAL_ACCESSIBLE_DESC_UPDATE_ID, 0, &(self->devices)); - } } -static void -switch_property_change (DbusmenuMenuitem * item, - const gchar * property, - GVariant * variant, - gpointer user_data) -{ - if (g_strcmp0 (property, MENU_SWITCH_USER) != 0) { - return; - } - - GtkMenuItem * gmi = dbusmenu_gtkclient_menuitem_get(DBUSMENU_GTKCLIENT(user_data), item); - gchar * finalstring = NULL; - gboolean set_ellipsize = FALSE; - gboolean no_name_in_lang = FALSE; - - const gchar * translate = C_("session_menu:switchfrom", "1"); - if (g_strcmp0(translate, "1") != 0) { - no_name_in_lang = TRUE; - } - - GSettings* settings = g_settings_new ("com.canonical.indicator.session"); - gboolean use_username = g_settings_get_boolean (settings, - "use-username-in-switch-item"); - g_object_unref (settings); - - if (variant == NULL || g_variant_get_string(variant, NULL) == NULL || - g_variant_get_string(variant, NULL)[0] == '\0' || no_name_in_lang - || use_username == FALSE) { - finalstring = _("Switch User Account…"); - set_ellipsize = FALSE; - } - - if (finalstring == NULL) { - const gchar * username = g_variant_get_string(variant, NULL); - GtkStyle * style = gtk_widget_get_style(GTK_WIDGET(gmi)); - - PangoLayout * layout = pango_layout_new(gtk_widget_get_pango_context(GTK_WIDGET(gmi))); - pango_layout_set_text (layout, username, -1); - pango_layout_set_font_description(layout, style->font_desc); - - gint width; - pango_layout_get_pixel_size(layout, &width, NULL); - g_object_unref(layout); - g_debug("Username width %dpx", width); - - gint point = pango_font_description_get_size(style->font_desc); - g_debug("Font size %f pt", (gfloat)point / PANGO_SCALE); - - gdouble dpi = gdk_screen_get_resolution(gdk_screen_get_default()); - g_debug("Screen DPI %f", dpi); - - gdouble pixels_per_em = ((point * dpi) / 72.0f) / PANGO_SCALE; - gdouble ems = width / pixels_per_em; - g_debug("Username width %fem", ems); - - finalstring = g_strdup_printf(_("Switch From %s…"), username); - if (ems >= 20.0f) { - set_ellipsize = TRUE; - } else { - set_ellipsize = FALSE; - } - - } - gtk_menu_item_set_label(gmi, finalstring); - - GtkLabel * label = GTK_LABEL(gtk_bin_get_child(GTK_BIN(gmi))); - if (label != NULL) { - if (set_ellipsize) { - gtk_label_set_ellipsize(label, PANGO_ELLIPSIZE_END); - } else { - gtk_label_set_ellipsize(label, PANGO_ELLIPSIZE_NONE); - } - } - return; -} - -static const gchar * dbusmenu_item_data = "dbusmenu-item"; static void restart_property_change (DbusmenuMenuitem * item, @@ -657,64 +406,8 @@ build_restart_item (DbusmenuMenuitem * newitem, } static void -switch_style_set (GtkWidget * widget, - GtkStyle * prev_style, - gpointer user_data) +indicator_session_update_users_label (IndicatorSession * self, + const gchar * name) { - DbusmenuGtkClient * client = DBUSMENU_GTKCLIENT(user_data); - DbusmenuMenuitem * mi = DBUSMENU_MENUITEM(g_object_get_data(G_OBJECT(widget), - dbusmenu_item_data)); - - switch_property_change (mi, - MENU_SWITCH_USER, - dbusmenu_menuitem_property_get_variant(mi, MENU_SWITCH_USER), - client); - return; -} - -static gboolean -build_menu_switch (DbusmenuMenuitem * newitem, - DbusmenuMenuitem * parent, - DbusmenuClient * client, - gpointer user_data) -{ - GtkMenuItem * gmi = GTK_MENU_ITEM(gtk_menu_item_new()); - if (gmi == NULL) { - return FALSE; - } - - g_object_set_data(G_OBJECT(gmi), dbusmenu_item_data, newitem); - - dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, gmi, parent); - - g_signal_connect (G_OBJECT(newitem), - DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, - G_CALLBACK(switch_property_change), - client); - g_signal_connect (G_OBJECT(gmi), - "style-set", - G_CALLBACK(switch_style_set), - client); - - switch_property_change (newitem, - MENU_SWITCH_USER, - dbusmenu_menuitem_property_get_variant(newitem, MENU_SWITCH_USER), client); - - return TRUE; -} - -static void -indicator_session_update_users_label (IndicatorSession* self, - const gchar* name) -{ - if (name == NULL){ - gtk_widget_hide(GTK_WIDGET(self->users.label)); - return; - } - - GSettings* settings = g_settings_new ("com.canonical.indicator.session"); - const gboolean use_name = g_settings_get_boolean (settings, "show-real-name-on-panel"); - gtk_label_set_text (self->users.label, name); - gtk_widget_set_visible (GTK_WIDGET(self->users.label), use_name); - g_object_unref (settings); + gtk_label_set_text (self->entry.label, name ? name : ""); } diff --git a/src/lock-helper.c b/src/lock-helper.c deleted file mode 100644 index 8eae674..0000000 --- a/src/lock-helper.c +++ /dev/null @@ -1,157 +0,0 @@ -/* -A small helper for locking the screen. - -Copyright 2009 Canonical Ltd. - -Authors: - Ted Gould <ted@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <glib/gi18n.h> -#include <gio/gio.h> -#include <dbus/dbus-glib.h> -#include "lock-helper.h" - -#define SCREENSAVER_SCHEMA "org.gnome.desktop.screensaver" -#define SCREENSAVER_LOCK_ENABLED_KEY "lock-enabled" - -static DBusGProxy * gss_proxy = NULL; -static GMainLoop * gss_mainloop = NULL; - -static gboolean is_guest = FALSE; - -static GSettings * settings = NULL; - -void build_gss_proxy (void); - -/* This is our logic on whether the screen should be locked - or not. It effects everything else. */ -gboolean -will_lock_screen (void) -{ - if (is_guest) { - return FALSE; - } - - if (settings == NULL) { - settings = g_settings_new (SCREENSAVER_SCHEMA); - } - - return g_settings_get_boolean (settings, SCREENSAVER_LOCK_ENABLED_KEY); -} - -/* When the screensave go active, if we've got a mainloop - running we should quit it. */ -static void -gss_active_changed (DBusGProxy * proxy, gboolean active, gpointer data) -{ - if (active && gss_mainloop != NULL) { - g_main_loop_quit(gss_mainloop); - } - - return; -} - -static gboolean -get_greeter_mode (void) -{ - const gchar *var; - var = g_getenv("INDICATOR_GREETER_MODE"); - return (g_strcmp0(var, "1") == 0); -} - -/* Build the gss proxy and set up it's signals */ -void -build_gss_proxy (void) -{ - if (gss_proxy == NULL) { - if (get_greeter_mode ()) - return; /* Don't start/lock the screensaver from the login screen */ - - DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); - g_return_if_fail(session_bus != NULL); - - gss_proxy = dbus_g_proxy_new_for_name(session_bus, - "org.gnome.ScreenSaver", - "/", - "org.gnome.ScreenSaver"); - g_return_if_fail(gss_proxy != NULL); - - dbus_g_proxy_add_signal(gss_proxy, "ActiveChanged", G_TYPE_BOOLEAN, G_TYPE_INVALID); - dbus_g_proxy_connect_signal(gss_proxy, "ActiveChanged", G_CALLBACK(gss_active_changed), NULL, NULL); - } - - return; -} - -/* This is a timeout, we only want to wait for the screen to - lock for a little bit, but not forever. */ -static gboolean -activate_timeout (gpointer data) -{ - /* Clear the ID for the timeout */ - guint * address = (guint *)data; - *address = 0; - - /* Quit the mainloop */ - if (gss_mainloop != NULL) { - g_main_loop_quit(gss_mainloop); - } - - return FALSE; -} - -/* A fun little function to actually lock the screen. If, - that's what you want, let's do it! */ -void -lock_screen (DbusmenuMenuitem * mi, guint timestamp, gpointer data) -{ - g_debug("Lock Screen"); - - build_gss_proxy(); - g_return_if_fail(gss_proxy != NULL); - - dbus_g_proxy_call_no_reply(gss_proxy, - "Lock", - G_TYPE_INVALID, - G_TYPE_INVALID); - - if (gss_mainloop == NULL) { - gss_mainloop = g_main_loop_new(NULL, FALSE); - } - - guint timer = g_timeout_add_seconds(1, activate_timeout, &timer); - - g_main_loop_run(gss_mainloop); - - if (timer != 0) { - g_source_remove(timer); - } - - return; -} - -/* Do what it takes to make the lock screen function work - and be happy. */ -gboolean -lock_screen_setup (gpointer data) -{ - if (!g_strcmp0(g_get_user_name(), "guest")) { - is_guest = TRUE; - } - - return FALSE; -} - diff --git a/src/lock-helper.h b/src/lock-helper.h deleted file mode 100644 index e2d5106..0000000 --- a/src/lock-helper.h +++ /dev/null @@ -1,31 +0,0 @@ -/* -A small helper for locking the screen. - -Copyright 2009 Canonical Ltd. - -Authors: - Ted Gould <ted@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef LOCK_HELPER_H__ -#define LOCK_HELPER_H__ - -#include <libdbusmenu-glib/menuitem.h> - -gboolean will_lock_screen (void); -void lock_screen (DbusmenuMenuitem * mi, guint timestamp, gpointer data); -gboolean lock_screen_setup (gpointer data); - -#endif /* LOCK_HELPER_H__ */ diff --git a/src/accounts-service-user.xml b/src/org.freedesktop.Accounts.User.xml index bd4cb21..53f54d4 100644 --- a/src/accounts-service-user.xml +++ b/src/org.freedesktop.Accounts.User.xml @@ -2,6 +2,7 @@ "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" > <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> + <interface name="org.freedesktop.Accounts.User"> <method name="SetUserName"> @@ -125,10 +126,10 @@ <doc:para> Sets the users language. </doc:para> - <doc:language> + <doc:para> The expectation is that display managers will start the users session with this locale. - </doc:language> + </doc:para> </doc:description> <doc:permission> The caller needs one of the following PolicyKit authorizations: @@ -150,6 +151,46 @@ </doc:doc> </method> + <method name="SetXSession"> + <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> + <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="user_set_x_session"/> + <arg name="x_session" direction="in" type="s"> + <doc:doc> + <doc:summary> + The new xsession to start (e.g. "gnome") + </doc:summary> + </doc:doc> + </arg> + <doc:doc> + <doc:description> + <doc:para> + Sets the users x session. + </doc:para> + <doc:para> + The expectation is that display managers will log the user in to this + specified session, if available. + </doc:para> + </doc:description> + <doc:permission> + The caller needs one of the following PolicyKit authorizations: + <doc:list> + <doc:item> + <doc:term>org.freedesktop.accounts.change-own-user-data</doc:term> + <doc:definition>To change his own language</doc:definition> + </doc:item> + <doc:item> + <doc:term>org.freedesktop.accounts.user-administration</doc:term> + <doc:definition>To change the language of another user</doc:definition> + </doc:item> + </doc:list> + </doc:permission> + <doc:errors> + <doc:error name="org.freedesktop.Accounts.Error.PermissionDenied">if the caller lacks the appropriate PolicyKit authorization</doc:error> + <doc:error name="org.freedesktop.Accounts.Error.Failed">if the operation failed</doc:error> + </doc:errors> + </doc:doc> + </method> + <method name="SetLocation"> <annotation name="org.freedesktop.DBus.GLib.Async" value=""/> <arg name="location" direction="in" type="s"> @@ -340,10 +381,6 @@ <doc:term>1</doc:term> <doc:definition>Administrator</doc:definition> </doc:item> - <doc:item> - <doc:term>2</doc:term> - <doc:definition>Supervised user</doc:definition> - </doc:item> </doc:list> </doc:summary> </doc:doc> @@ -541,10 +578,6 @@ <doc:term>1</doc:term> <doc:definition>Administrator</doc:definition> </doc:item> - <doc:item> - <doc:term>2</doc:term> - <doc:definition>Supervised user</doc:definition> - </doc:item> </doc:list> </doc:para> </doc:description> @@ -591,6 +624,16 @@ </doc:doc> </property> + <property name="XSession" type="s" access="read"> + <doc:doc> + <doc:description> + <doc:para> + The users x session. + </doc:para> + </doc:description> + </doc:doc> + </property> + <property name="Location" type="s" access="read"> <doc:doc> <doc:description> @@ -675,6 +718,18 @@ </doc:doc> </property> + <property name="SystemAccount" type="b" access="read"> + <doc:doc> + <doc:description> + <doc:para> + Whether this is a 'system' account, like 'root' or 'nobody'. + System accounts should normally not appear in lists of + users, and ListCachedUsers will not include such accounts. + </doc:para> + </doc:description> + </doc:doc> + </property> + <signal name="Changed"> <doc:doc> <doc:description> diff --git a/src/accounts-service.xml b/src/org.freedesktop.Accounts.xml index 9c19761..9c19761 100644 --- a/src/accounts-service.xml +++ b/src/org.freedesktop.Accounts.xml diff --git a/src/org.freedesktop.ConsoleKit.Seat.xml b/src/org.freedesktop.ConsoleKit.Seat.xml index d95990b..58c2ce7 100644 --- a/src/org.freedesktop.ConsoleKit.Seat.xml +++ b/src/org.freedesktop.ConsoleKit.Seat.xml @@ -101,7 +101,7 @@ seat at a time.</doc:para> </method> <signal name="ActiveSessionChanged"> - <arg name="ssid" type="o"> + <arg name="ssid" type="s"> <doc:doc> <doc:summary>Session ID</doc:summary> </doc:doc> diff --git a/src/sane-rules.h b/src/sane-rules.h deleted file mode 100644 index 0b72e52..0000000 --- a/src/sane-rules.h +++ /dev/null @@ -1,778 +0,0 @@ -void populate_scsi_scanners (GHashTable* scanners) -{ - GList* epson = NULL; - epson = g_list_append (epson, g_strdup ("GT-9700")); - epson = g_list_append (epson, g_strdup ("GT-9800")); - epson = g_list_append (epson, g_strdup ("Perfection1200")); - epson = g_list_append (epson, g_strdup ("Perfection636")); - epson = g_list_append (epson, g_strdup ("SCANNER GT-7000")); - g_hash_table_insert (scanners, - g_strdup("EPSON"), - epson); - - - GList* hp = NULL; - hp = g_list_append (hp, g_strdup ("C1130A")); - hp = g_list_append (hp, g_strdup ("C1750A")); - hp = g_list_append (hp, g_strdup ("C1790A")); - hp = g_list_append (hp, g_strdup ("C2500A")); - hp = g_list_append (hp, g_strdup ("C2520A")); - hp = g_list_append (hp, g_strdup ("C5110A")); - hp = g_list_append (hp, g_strdup ("C6270A")); - hp = g_list_append (hp, g_strdup ("C7670A")); - g_hash_table_insert (scanners, - g_strdup("HP"), - hp); -} - - - -void populate_usb_scanners (GHashTable* scanners) -{ - GList* hp = NULL; - - hp = g_list_append (hp, g_strdup ("0101")); - hp = g_list_append (hp, g_strdup ("0105")); - hp = g_list_append (hp, g_strdup ("0201")); - hp = g_list_append (hp, g_strdup ("0205")); - hp = g_list_append (hp, g_strdup ("0305")); - hp = g_list_append (hp, g_strdup ("0401")); - hp = g_list_append (hp, g_strdup ("0405")); - hp = g_list_append (hp, g_strdup ("0505")); - hp = g_list_append (hp, g_strdup ("0601")); - hp = g_list_append (hp, g_strdup ("0605")); - hp = g_list_append (hp, g_strdup ("0701")); - hp = g_list_append (hp, g_strdup ("0705")); - hp = g_list_append (hp, g_strdup ("0801")); - hp = g_list_append (hp, g_strdup ("0805")); - hp = g_list_append (hp, g_strdup ("0901")); - hp = g_list_append (hp, g_strdup ("0a01")); - hp = g_list_append (hp, g_strdup ("0b01")); - hp = g_list_append (hp, g_strdup ("1005")); - hp = g_list_append (hp, g_strdup ("1105")); - hp = g_list_append (hp, g_strdup ("1205")); - hp = g_list_append (hp, g_strdup ("1305")); - hp = g_list_append (hp, g_strdup ("1405")); - hp = g_list_append (hp, g_strdup ("1705")); - hp = g_list_append (hp, g_strdup ("1805")); - hp = g_list_append (hp, g_strdup ("2005")); - hp = g_list_append (hp, g_strdup ("2205")); - hp = g_list_append (hp, g_strdup ("2305")); - hp = g_list_append (hp, g_strdup ("2405")); - hp = g_list_append (hp, g_strdup ("2605")); - hp = g_list_append (hp, g_strdup ("2805")); - hp = g_list_append (hp, g_strdup ("3805")); - hp = g_list_append (hp, g_strdup ("3905")); - hp = g_list_append (hp, g_strdup ("3B17")); - hp = g_list_append (hp, g_strdup ("4105")); - hp = g_list_append (hp, g_strdup ("4205")); - hp = g_list_append (hp, g_strdup ("4305")); - hp = g_list_append (hp, g_strdup ("4505")); - hp = g_list_append (hp, g_strdup ("4605")); - hp = g_list_append (hp, g_strdup ("5617")); - hp = g_list_append (hp, g_strdup ("5717")); - - g_hash_table_insert (scanners, - g_strdup("03f0"), - hp); - - GList* mustek_2 = NULL; - mustek_2 = g_list_append (mustek_2, g_strdup ("1000")); - mustek_2 = g_list_append (mustek_2, g_strdup ("1001")); - g_hash_table_insert (scanners, - g_strdup("0400"), - mustek_2); - - GList* kodak = NULL; - kodak = g_list_append (kodak, g_strdup ("6001")); - kodak = g_list_append (kodak, g_strdup ("6002")); - kodak = g_list_append (kodak, g_strdup ("6003")); - kodak = g_list_append (kodak, g_strdup ("6004")); - kodak = g_list_append (kodak, g_strdup ("6005")); - g_hash_table_insert (scanners, - g_strdup("040a"), - kodak); - - GList* creative = NULL; - - creative = g_list_append (creative, g_strdup ("4007")); - - g_hash_table_insert (scanners, - g_strdup("041e"), - creative); - - GList* lexmark = NULL; - - lexmark = g_list_append (lexmark, g_strdup("002d")); - lexmark = g_list_append (lexmark, g_strdup("0060")); - lexmark = g_list_append (lexmark, g_strdup("007c")); - lexmark = g_list_append (lexmark, g_strdup("007d")); - - g_hash_table_insert (scanners, - g_strdup("043d"), - lexmark); - - - GList* genius = NULL; - genius = g_list_append (genius, g_strdup("2004")); - genius = g_list_append (genius, g_strdup("2007")); - genius = g_list_append (genius, g_strdup("2008")); - genius = g_list_append (genius, g_strdup("2009")); - genius = g_list_append (genius, g_strdup("2011")); - genius = g_list_append (genius, g_strdup("2013")); - genius = g_list_append (genius, g_strdup("2014")); - genius = g_list_append (genius, g_strdup("2015")); - genius = g_list_append (genius, g_strdup("2016")); - genius = g_list_append (genius, g_strdup("2017")); - genius = g_list_append (genius, g_strdup("201a")); - genius = g_list_append (genius, g_strdup("201b")); - genius = g_list_append (genius, g_strdup("201d")); - genius = g_list_append (genius, g_strdup("201e")); - genius = g_list_append (genius, g_strdup("201f")); - genius = g_list_append (genius, g_strdup("20c1")); - g_hash_table_insert (scanners, - g_strdup("0458"), - genius); - - GList* medion = NULL; - medion = g_list_append (medion, g_strdup("0377")); - g_hash_table_insert (scanners, - g_strdup("0461"), - medion); - - GList* trust = NULL; - trust = g_list_append (trust, g_strdup("1000")); - trust = g_list_append (trust, g_strdup("1002")); - g_hash_table_insert (scanners, - g_strdup("047b"), - trust); - - GList* kyocera = NULL; - kyocera = g_list_append (kyocera, g_strdup("0335")); - g_hash_table_insert (scanners, - g_strdup("0482"), - kyocera); - - GList* compaq = NULL; - compaq = g_list_append (compaq, g_strdup("001a")); - g_hash_table_insert (scanners, - g_strdup("049f"), - compaq); - GList* benq = NULL; - benq = g_list_append (benq, g_strdup("1a20")); - benq = g_list_append (benq, g_strdup("1a2a")); - benq = g_list_append (benq, g_strdup("2022")); - benq = g_list_append (benq, g_strdup("2040")); - benq = g_list_append (benq, g_strdup("2060")); - benq = g_list_append (benq, g_strdup("207e")); - benq = g_list_append (benq, g_strdup("20b0")); - benq = g_list_append (benq, g_strdup("20be")); - benq = g_list_append (benq, g_strdup("20c0")); - benq = g_list_append (benq, g_strdup("20de")); - benq = g_list_append (benq, g_strdup("20f8")); - benq = g_list_append (benq, g_strdup("20fc")); - benq = g_list_append (benq, g_strdup("20fe")); - benq = g_list_append (benq, g_strdup("2137")); - benq = g_list_append (benq, g_strdup("2211")); - g_hash_table_insert (scanners, - g_strdup("04a5"), - benq); - - GList* visioneer = NULL; - visioneer = g_list_append (visioneer, g_strdup("0229")); - visioneer = g_list_append (visioneer, g_strdup("0390")); - visioneer = g_list_append (visioneer, g_strdup("0420")); - visioneer = g_list_append (visioneer, g_strdup("0421")); - visioneer = g_list_append (visioneer, g_strdup("0422")); - visioneer = g_list_append (visioneer, g_strdup("0423")); - visioneer = g_list_append (visioneer, g_strdup("0424")); - visioneer = g_list_append (visioneer, g_strdup("0426")); - visioneer = g_list_append (visioneer, g_strdup("0427")); - visioneer = g_list_append (visioneer, g_strdup("0444")); - visioneer = g_list_append (visioneer, g_strdup("0446")); - visioneer = g_list_append (visioneer, g_strdup("0447")); - visioneer = g_list_append (visioneer, g_strdup("0448")); - visioneer = g_list_append (visioneer, g_strdup("0449")); - visioneer = g_list_append (visioneer, g_strdup("044c")); - visioneer = g_list_append (visioneer, g_strdup("0474")); - visioneer = g_list_append (visioneer, g_strdup("0475")); - visioneer = g_list_append (visioneer, g_strdup("0477")); - visioneer = g_list_append (visioneer, g_strdup("0478")); - visioneer = g_list_append (visioneer, g_strdup("0479")); - visioneer = g_list_append (visioneer, g_strdup("047a")); - visioneer = g_list_append (visioneer, g_strdup("047b")); - visioneer = g_list_append (visioneer, g_strdup("047c")); - visioneer = g_list_append (visioneer, g_strdup("048c")); - visioneer = g_list_append (visioneer, g_strdup("048d")); - visioneer = g_list_append (visioneer, g_strdup("048e")); - visioneer = g_list_append (visioneer, g_strdup("048f")); - visioneer = g_list_append (visioneer, g_strdup("0490")); - visioneer = g_list_append (visioneer, g_strdup("0491")); - visioneer = g_list_append (visioneer, g_strdup("0492")); - visioneer = g_list_append (visioneer, g_strdup("0493")); - visioneer = g_list_append (visioneer, g_strdup("0494")); - visioneer = g_list_append (visioneer, g_strdup("0495")); - visioneer = g_list_append (visioneer, g_strdup("0497")); - visioneer = g_list_append (visioneer, g_strdup("0498")); - visioneer = g_list_append (visioneer, g_strdup("0499")); - visioneer = g_list_append (visioneer, g_strdup("049a")); - visioneer = g_list_append (visioneer, g_strdup("049b")); - visioneer = g_list_append (visioneer, g_strdup("049c")); - visioneer = g_list_append (visioneer, g_strdup("049d")); - visioneer = g_list_append (visioneer, g_strdup("04a7")); - visioneer = g_list_append (visioneer, g_strdup("04ac")); - g_hash_table_insert (scanners, - g_strdup("04a7"), - visioneer); - GList* canon = NULL; - canon = g_list_append (canon, g_strdup("1601")); - canon = g_list_append (canon, g_strdup("1602")); - canon = g_list_append (canon, g_strdup("1603")); - canon = g_list_append (canon, g_strdup("1604")); - canon = g_list_append (canon, g_strdup("1606")); - canon = g_list_append (canon, g_strdup("1607")); - canon = g_list_append (canon, g_strdup("1608")); - canon = g_list_append (canon, g_strdup("1609")); - canon = g_list_append (canon, g_strdup("160a")); - canon = g_list_append (canon, g_strdup("160b")); - canon = g_list_append (canon, g_strdup("1706")); - canon = g_list_append (canon, g_strdup("1707")); - canon = g_list_append (canon, g_strdup("1708")); - canon = g_list_append (canon, g_strdup("1709")); - canon = g_list_append (canon, g_strdup("170a")); - canon = g_list_append (canon, g_strdup("170b")); - canon = g_list_append (canon, g_strdup("170c")); - canon = g_list_append (canon, g_strdup("170d")); - canon = g_list_append (canon, g_strdup("170e")); - canon = g_list_append (canon, g_strdup("1712")); - canon = g_list_append (canon, g_strdup("1713")); - canon = g_list_append (canon, g_strdup("1714")); - canon = g_list_append (canon, g_strdup("1715")); - canon = g_list_append (canon, g_strdup("1716")); - canon = g_list_append (canon, g_strdup("1717")); - canon = g_list_append (canon, g_strdup("1718")); - canon = g_list_append (canon, g_strdup("1719")); - canon = g_list_append (canon, g_strdup("171a")); - canon = g_list_append (canon, g_strdup("171b")); - canon = g_list_append (canon, g_strdup("171c")); - canon = g_list_append (canon, g_strdup("1721")); - canon = g_list_append (canon, g_strdup("1722")); - canon = g_list_append (canon, g_strdup("1723")); - canon = g_list_append (canon, g_strdup("1724")); - canon = g_list_append (canon, g_strdup("1725")); - canon = g_list_append (canon, g_strdup("1726")); - canon = g_list_append (canon, g_strdup("1727")); - canon = g_list_append (canon, g_strdup("1728")); - canon = g_list_append (canon, g_strdup("1729")); - canon = g_list_append (canon, g_strdup("172b")); - canon = g_list_append (canon, g_strdup("172c")); - canon = g_list_append (canon, g_strdup("172d")); - canon = g_list_append (canon, g_strdup("172e")); - canon = g_list_append (canon, g_strdup("172f")); - canon = g_list_append (canon, g_strdup("1730")); - canon = g_list_append (canon, g_strdup("1731")); - canon = g_list_append (canon, g_strdup("1732")); - canon = g_list_append (canon, g_strdup("1733")); - canon = g_list_append (canon, g_strdup("1734")); - canon = g_list_append (canon, g_strdup("1735")); - canon = g_list_append (canon, g_strdup("1736")); - canon = g_list_append (canon, g_strdup("173a")); - canon = g_list_append (canon, g_strdup("173b")); - canon = g_list_append (canon, g_strdup("173c")); - canon = g_list_append (canon, g_strdup("173d")); - canon = g_list_append (canon, g_strdup("173e")); - canon = g_list_append (canon, g_strdup("173f")); - canon = g_list_append (canon, g_strdup("1740")); - canon = g_list_append (canon, g_strdup("1741")); - canon = g_list_append (canon, g_strdup("1742")); - canon = g_list_append (canon, g_strdup("1901")); - canon = g_list_append (canon, g_strdup("1904")); - canon = g_list_append (canon, g_strdup("1905")); - canon = g_list_append (canon, g_strdup("1909")); - canon = g_list_append (canon, g_strdup("190a")); - canon = g_list_append (canon, g_strdup("2204")); - canon = g_list_append (canon, g_strdup("2206")); - canon = g_list_append (canon, g_strdup("2207")); - canon = g_list_append (canon, g_strdup("2208")); - canon = g_list_append (canon, g_strdup("220d")); - canon = g_list_append (canon, g_strdup("220e")); - canon = g_list_append (canon, g_strdup("2213")); - canon = g_list_append (canon, g_strdup("221c")); - canon = g_list_append (canon, g_strdup("2220")); - canon = g_list_append (canon, g_strdup("2222")); - canon = g_list_append (canon, g_strdup("262f")); - canon = g_list_append (canon, g_strdup("2630")); - canon = g_list_append (canon, g_strdup("263c")); - canon = g_list_append (canon, g_strdup("263d")); - canon = g_list_append (canon, g_strdup("263e")); - canon = g_list_append (canon, g_strdup("263f")); - canon = g_list_append (canon, g_strdup("264c")); - canon = g_list_append (canon, g_strdup("264d")); - canon = g_list_append (canon, g_strdup("264e")); - canon = g_list_append (canon, g_strdup("264f")); - canon = g_list_append (canon, g_strdup("2659")); - canon = g_list_append (canon, g_strdup("265d")); - canon = g_list_append (canon, g_strdup("265e")); - canon = g_list_append (canon, g_strdup("265f")); - canon = g_list_append (canon, g_strdup("2660")); - canon = g_list_append (canon, g_strdup("2684")); - canon = g_list_append (canon, g_strdup("2686")); - canon = g_list_append (canon, g_strdup("26a3")); - canon = g_list_append (canon, g_strdup("26b0")); - canon = g_list_append (canon, g_strdup("26b4")); - canon = g_list_append (canon, g_strdup("26b5")); - canon = g_list_append (canon, g_strdup("26ec")); - canon = g_list_append (canon, g_strdup("26ed")); - canon = g_list_append (canon, g_strdup("26ee")); - g_hash_table_insert (scanners, - g_strdup("04a9"), - canon); - - GList* nikon = NULL; - nikon = g_list_append (nikon, g_strdup ("4000")); - nikon = g_list_append (nikon, g_strdup ("4001")); - nikon = g_list_append (nikon, g_strdup ("4002")); - g_hash_table_insert (scanners, - g_strdup("04b0"), - nikon); - - GList* epson = NULL; - - // for testing (its a printer not a scanner!) - //epson = g_list_append (epson, g_strdup ("0001")); - - epson = g_list_append (epson, g_strdup("0101")); - epson = g_list_append (epson, g_strdup("0103")); - epson = g_list_append (epson, g_strdup("0104")); - epson = g_list_append (epson, g_strdup("0105")); - epson = g_list_append (epson, g_strdup("0106")); - epson = g_list_append (epson, g_strdup("0107")); - epson = g_list_append (epson, g_strdup("0109")); - epson = g_list_append (epson, g_strdup("010a")); - epson = g_list_append (epson, g_strdup("010b")); - epson = g_list_append (epson, g_strdup("010c")); - epson = g_list_append (epson, g_strdup("010e")); - epson = g_list_append (epson, g_strdup("010f")); - epson = g_list_append (epson, g_strdup("0110")); - epson = g_list_append (epson, g_strdup("0112")); - epson = g_list_append (epson, g_strdup("0114")); - epson = g_list_append (epson, g_strdup("011b")); - epson = g_list_append (epson, g_strdup("011c")); - epson = g_list_append (epson, g_strdup("011d")); - epson = g_list_append (epson, g_strdup("011e")); - epson = g_list_append (epson, g_strdup("011f")); - epson = g_list_append (epson, g_strdup("0120")); - epson = g_list_append (epson, g_strdup("0121")); - epson = g_list_append (epson, g_strdup("0122")); - epson = g_list_append (epson, g_strdup("0126")); - epson = g_list_append (epson, g_strdup("0128")); - epson = g_list_append (epson, g_strdup("0129")); - epson = g_list_append (epson, g_strdup("012a")); - epson = g_list_append (epson, g_strdup("012b")); - epson = g_list_append (epson, g_strdup("012c")); - epson = g_list_append (epson, g_strdup("0135")); - epson = g_list_append (epson, g_strdup("0801")); - epson = g_list_append (epson, g_strdup("0802")); - epson = g_list_append (epson, g_strdup("0805")); - epson = g_list_append (epson, g_strdup("0806")); - epson = g_list_append (epson, g_strdup("0807")); - epson = g_list_append (epson, g_strdup("0808")); - epson = g_list_append (epson, g_strdup("080c")); - epson = g_list_append (epson, g_strdup("080d")); - epson = g_list_append (epson, g_strdup("080e")); - epson = g_list_append (epson, g_strdup("080f")); - epson = g_list_append (epson, g_strdup("0810")); - epson = g_list_append (epson, g_strdup("0811")); - epson = g_list_append (epson, g_strdup("0813")); - epson = g_list_append (epson, g_strdup("0814")); - epson = g_list_append (epson, g_strdup("0815")); - epson = g_list_append (epson, g_strdup("0817")); - epson = g_list_append (epson, g_strdup("0818")); - epson = g_list_append (epson, g_strdup("0819")); - epson = g_list_append (epson, g_strdup("081a")); - epson = g_list_append (epson, g_strdup("081c")); - epson = g_list_append (epson, g_strdup("081d")); - epson = g_list_append (epson, g_strdup("081f")); - epson = g_list_append (epson, g_strdup("0820")); - epson = g_list_append (epson, g_strdup("0827")); - epson = g_list_append (epson, g_strdup("0828")); - epson = g_list_append (epson, g_strdup("0829")); - epson = g_list_append (epson, g_strdup("082a")); - epson = g_list_append (epson, g_strdup("082b")); - epson = g_list_append (epson, g_strdup("082e")); - epson = g_list_append (epson, g_strdup("082f")); - epson = g_list_append (epson, g_strdup("0830")); - epson = g_list_append (epson, g_strdup("0833")); - epson = g_list_append (epson, g_strdup("0834")); - epson = g_list_append (epson, g_strdup("0835")); - epson = g_list_append (epson, g_strdup("0836")); - epson = g_list_append (epson, g_strdup("0837")); - epson = g_list_append (epson, g_strdup("0838")); - epson = g_list_append (epson, g_strdup("0839")); - epson = g_list_append (epson, g_strdup("083a")); - epson = g_list_append (epson, g_strdup("083c")); - epson = g_list_append (epson, g_strdup("0841")); - epson = g_list_append (epson, g_strdup("0843")); - epson = g_list_append (epson, g_strdup("0844")); - epson = g_list_append (epson, g_strdup("0846")); - epson = g_list_append (epson, g_strdup("0847")); - epson = g_list_append (epson, g_strdup("0848")); - epson = g_list_append (epson, g_strdup("0849")); - epson = g_list_append (epson, g_strdup("084a")); - epson = g_list_append (epson, g_strdup("084c")); - epson = g_list_append (epson, g_strdup("084d")); - epson = g_list_append (epson, g_strdup("084f")); - epson = g_list_append (epson, g_strdup("0851")); - epson = g_list_append (epson, g_strdup("0854")); - epson = g_list_append (epson, g_strdup("0856")); - g_hash_table_insert (scanners, - g_strdup("04b8"), - epson); - - GList* fujitsu = NULL; - fujitsu = g_list_append (fujitsu, g_strdup ("1029")); - fujitsu = g_list_append (fujitsu, g_strdup ("1041")); - fujitsu = g_list_append (fujitsu, g_strdup ("1042")); - fujitsu = g_list_append (fujitsu, g_strdup ("1078")); - fujitsu = g_list_append (fujitsu, g_strdup ("1095")); - fujitsu = g_list_append (fujitsu, g_strdup ("1096")); - fujitsu = g_list_append (fujitsu, g_strdup ("1097")); - fujitsu = g_list_append (fujitsu, g_strdup ("10ad")); - fujitsu = g_list_append (fujitsu, g_strdup ("10ae")); - fujitsu = g_list_append (fujitsu, g_strdup ("10af")); - fujitsu = g_list_append (fujitsu, g_strdup ("10c7")); - fujitsu = g_list_append (fujitsu, g_strdup ("10cf")); - fujitsu = g_list_append (fujitsu, g_strdup ("10e0")); - fujitsu = g_list_append (fujitsu, g_strdup ("10e1")); - fujitsu = g_list_append (fujitsu, g_strdup ("10e2")); - fujitsu = g_list_append (fujitsu, g_strdup ("10e6")); - fujitsu = g_list_append (fujitsu, g_strdup ("10e7")); - fujitsu = g_list_append (fujitsu, g_strdup ("10ef")); - fujitsu = g_list_append (fujitsu, g_strdup ("10f2")); - fujitsu = g_list_append (fujitsu, g_strdup ("10fe")); - fujitsu = g_list_append (fujitsu, g_strdup ("1135")); - fujitsu = g_list_append (fujitsu, g_strdup ("114a")); - fujitsu = g_list_append (fujitsu, g_strdup ("114d")); - fujitsu = g_list_append (fujitsu, g_strdup ("114e")); - fujitsu = g_list_append (fujitsu, g_strdup ("114f")); - fujitsu = g_list_append (fujitsu, g_strdup ("1150")); - fujitsu = g_list_append (fujitsu, g_strdup ("1155")); - fujitsu = g_list_append (fujitsu, g_strdup ("1156")); - fujitsu = g_list_append (fujitsu, g_strdup ("116f")); - fujitsu = g_list_append (fujitsu, g_strdup ("1174")); - fujitsu = g_list_append (fujitsu, g_strdup ("1175")); - fujitsu = g_list_append (fujitsu, g_strdup ("1176")); - fujitsu = g_list_append (fujitsu, g_strdup ("1177")); - fujitsu = g_list_append (fujitsu, g_strdup ("1178")); - fujitsu = g_list_append (fujitsu, g_strdup ("117f")); - fujitsu = g_list_append (fujitsu, g_strdup ("119d")); - fujitsu = g_list_append (fujitsu, g_strdup ("119e")); - fujitsu = g_list_append (fujitsu, g_strdup ("119f")); - fujitsu = g_list_append (fujitsu, g_strdup ("11a0")); - fujitsu = g_list_append (fujitsu, g_strdup ("11a2")); - fujitsu = g_list_append (fujitsu, g_strdup ("11ed")); - fujitsu = g_list_append (fujitsu, g_strdup ("11ee")); - fujitsu = g_list_append (fujitsu, g_strdup ("11ef")); - fujitsu = g_list_append (fujitsu, g_strdup ("11f1")); - fujitsu = g_list_append (fujitsu, g_strdup ("11f2")); - fujitsu = g_list_append (fujitsu, g_strdup ("11f3")); - fujitsu = g_list_append (fujitsu, g_strdup ("11f4")); - fujitsu = g_list_append (fujitsu, g_strdup ("11fc")); - g_hash_table_insert (scanners, - g_strdup("04c5"), - fujitsu); - GList* konica = NULL; - konica = g_list_append (konica, g_strdup ("0722")); - g_hash_table_insert (scanners, - g_strdup("04c8"), - konica); - GList* panasonic = NULL; - panasonic = g_list_append (panasonic, g_strdup ("1000")); - panasonic = g_list_append (panasonic, g_strdup ("1001")); - panasonic = g_list_append (panasonic, g_strdup ("1006")); - panasonic = g_list_append (panasonic, g_strdup ("1007")); - panasonic = g_list_append (panasonic, g_strdup ("1009")); - panasonic = g_list_append (panasonic, g_strdup ("100a")); - panasonic = g_list_append (panasonic, g_strdup ("100f")); - panasonic = g_list_append (panasonic, g_strdup ("1010")); - g_hash_table_insert (scanners, - g_strdup("04da"), - panasonic); - - GList* samsung = NULL; - - samsung = g_list_append (samsung, g_strdup ("341b")); - samsung = g_list_append (samsung, g_strdup ("341f")); - samsung = g_list_append (samsung, g_strdup ("3426")); - samsung = g_list_append (samsung, g_strdup ("342a")); - samsung = g_list_append (samsung, g_strdup ("342b")); - samsung = g_list_append (samsung, g_strdup ("342c")); - samsung = g_list_append (samsung, g_strdup ("3433")); - samsung = g_list_append (samsung, g_strdup ("3434")); - samsung = g_list_append (samsung, g_strdup ("343c")); - samsung = g_list_append (samsung, g_strdup ("3434")); - g_hash_table_insert (scanners, - g_strdup("04e8"), - samsung); - - GList* pentax = NULL; - pentax = g_list_append (pentax, g_strdup ("2038")); - g_hash_table_insert (scanners, - g_strdup("04f9"), - pentax); - - GList* apitek = NULL; - apitek = g_list_append (apitek, g_strdup ("0202")); - g_hash_table_insert (scanners, - g_strdup("0553"), - apitek); - - GList* mustek = NULL; - mustek = g_list_append (mustek, g_strdup ("0001")); - mustek = g_list_append (mustek, g_strdup ("0002")); - mustek = g_list_append (mustek, g_strdup ("0006")); - mustek = g_list_append (mustek, g_strdup ("0008")); - mustek = g_list_append (mustek, g_strdup ("0010")); - mustek = g_list_append (mustek, g_strdup ("0210")); - mustek = g_list_append (mustek, g_strdup ("0218")); - mustek = g_list_append (mustek, g_strdup ("0219")); - mustek = g_list_append (mustek, g_strdup ("021a")); - mustek = g_list_append (mustek, g_strdup ("021b")); - mustek = g_list_append (mustek, g_strdup ("021c")); - mustek = g_list_append (mustek, g_strdup ("021d")); - mustek = g_list_append (mustek, g_strdup ("021e")); - mustek = g_list_append (mustek, g_strdup ("021f")); - mustek = g_list_append (mustek, g_strdup ("0409")); - g_hash_table_insert (scanners, - g_strdup("055f"), - mustek); - GList* artec = NULL; - artec = g_list_append (artec, g_strdup ("4002")); - artec = g_list_append (artec, g_strdup ("4003")); - artec = g_list_append (artec, g_strdup ("4004")); - artec = g_list_append (artec, g_strdup ("4005")); - artec = g_list_append (artec, g_strdup ("4006")); - artec = g_list_append (artec, g_strdup ("4007")); - artec = g_list_append (artec, g_strdup ("4009")); - artec = g_list_append (artec, g_strdup ("4010")); - artec = g_list_append (artec, g_strdup ("4011")); - g_hash_table_insert (scanners, - g_strdup("05d8"), - artec); - - GList* microtek = NULL; - microtek = g_list_append (microtek, g_strdup ("0099")); - microtek = g_list_append (microtek, g_strdup ("009a")); - microtek = g_list_append (microtek, g_strdup ("00a3")); - microtek = g_list_append (microtek, g_strdup ("00b6")); - microtek = g_list_append (microtek, g_strdup ("30cf")); - microtek = g_list_append (microtek, g_strdup ("30d4")); - microtek = g_list_append (microtek, g_strdup ("40b3")); - microtek = g_list_append (microtek, g_strdup ("40b8")); - microtek = g_list_append (microtek, g_strdup ("40ca")); - microtek = g_list_append (microtek, g_strdup ("40cb")); - microtek = g_list_append (microtek, g_strdup ("40dd")); - microtek = g_list_append (microtek, g_strdup ("40ff")); - microtek = g_list_append (microtek, g_strdup ("80a3")); - g_hash_table_insert (scanners, - g_strdup("05da"), - microtek); - - GList* avision = NULL; - avision = g_list_append (avision, g_strdup ("0268")); - avision = g_list_append (avision, g_strdup ("026a")); - avision = g_list_append (avision, g_strdup ("0a13")); - avision = g_list_append (avision, g_strdup ("0a15")); - avision = g_list_append (avision, g_strdup ("0a16")); - avision = g_list_append (avision, g_strdup ("0a18")); - avision = g_list_append (avision, g_strdup ("0a19")); - avision = g_list_append (avision, g_strdup ("0a23")); - avision = g_list_append (avision, g_strdup ("0a24")); - avision = g_list_append (avision, g_strdup ("0a25")); - avision = g_list_append (avision, g_strdup ("0a27")); - avision = g_list_append (avision, g_strdup ("0a2a")); - avision = g_list_append (avision, g_strdup ("0a2b")); - avision = g_list_append (avision, g_strdup ("0a2c")); - avision = g_list_append (avision, g_strdup ("0a2d")); - avision = g_list_append (avision, g_strdup ("0a2e")); - avision = g_list_append (avision, g_strdup ("0a2f")); - avision = g_list_append (avision, g_strdup ("0a33")); - avision = g_list_append (avision, g_strdup ("0a3a")); - avision = g_list_append (avision, g_strdup ("0a3c")); - avision = g_list_append (avision, g_strdup ("0a40")); - avision = g_list_append (avision, g_strdup ("0a41")); - avision = g_list_append (avision, g_strdup ("0a45")); - avision = g_list_append (avision, g_strdup ("0a4d")); - avision = g_list_append (avision, g_strdup ("0a4e")); - avision = g_list_append (avision, g_strdup ("0a4f")); - avision = g_list_append (avision, g_strdup ("0a5e")); - avision = g_list_append (avision, g_strdup ("0a61")); - avision = g_list_append (avision, g_strdup ("0a65")); - avision = g_list_append (avision, g_strdup ("0a66")); - avision = g_list_append (avision, g_strdup ("0a68")); - avision = g_list_append (avision, g_strdup ("0a82")); - avision = g_list_append (avision, g_strdup ("0a84")); - avision = g_list_append (avision, g_strdup ("0a93")); - avision = g_list_append (avision, g_strdup ("0a94")); - avision = g_list_append (avision, g_strdup ("0aa1")); - avision = g_list_append (avision, g_strdup ("1a35")); - g_hash_table_insert (scanners, - g_strdup("0638"), - avision); - GList* minolta = NULL; - minolta = g_list_append (minolta, g_strdup ("4004")); - minolta = g_list_append (minolta, g_strdup ("400d")); - minolta = g_list_append (minolta, g_strdup ("400e")); - g_hash_table_insert (scanners, - g_strdup("0686"), - minolta); - - GList* agfa = NULL; - agfa = g_list_append (agfa, g_strdup ("0001")); - agfa = g_list_append (agfa, g_strdup ("0002")); - agfa = g_list_append (agfa, g_strdup ("0100")); - agfa = g_list_append (agfa, g_strdup ("2061")); - agfa = g_list_append (agfa, g_strdup ("208d")); - agfa = g_list_append (agfa, g_strdup ("208f")); - agfa = g_list_append (agfa, g_strdup ("2091")); - agfa = g_list_append (agfa, g_strdup ("2093")); - agfa = g_list_append (agfa, g_strdup ("2095")); - agfa = g_list_append (agfa, g_strdup ("2097")); - agfa = g_list_append (agfa, g_strdup ("20fd")); - agfa = g_list_append (agfa, g_strdup ("20ff")); - g_hash_table_insert (scanners, - g_strdup("06bd"), - minolta); - - GList* umax_2 = NULL; - umax_2 = g_list_append (umax_2, g_strdup ("0020")); - g_hash_table_insert (scanners, - g_strdup("06dc"), - umax_2); - - GList* plustek = NULL; - - plustek = g_list_append (plustek, g_strdup ("0001")); - plustek = g_list_append (plustek, g_strdup ("0010")); - plustek = g_list_append (plustek, g_strdup ("0011")); - plustek = g_list_append (plustek, g_strdup ("0013")); - plustek = g_list_append (plustek, g_strdup ("0015")); - plustek = g_list_append (plustek, g_strdup ("0017")); - plustek = g_list_append (plustek, g_strdup ("0400")); - plustek = g_list_append (plustek, g_strdup ("0401")); - plustek = g_list_append (plustek, g_strdup ("0402")); - plustek = g_list_append (plustek, g_strdup ("0403")); - plustek = g_list_append (plustek, g_strdup ("040b")); - plustek = g_list_append (plustek, g_strdup ("040e")); - plustek = g_list_append (plustek, g_strdup ("0412")); - plustek = g_list_append (plustek, g_strdup ("0413")); - plustek = g_list_append (plustek, g_strdup ("0422")); - plustek = g_list_append (plustek, g_strdup ("0454")); - plustek = g_list_append (plustek, g_strdup ("045f")); - plustek = g_list_append (plustek, g_strdup ("0462")); - plustek = g_list_append (plustek, g_strdup ("0900")); - g_hash_table_insert (scanners, - g_strdup("07b3"), - plustek); - - GList* corex = NULL; - corex = g_list_append (corex, g_strdup ("0002")); - corex = g_list_append (corex, g_strdup ("0005")); - g_hash_table_insert (scanners, - g_strdup("08f0"), - corex); - - GList* xerox = NULL; - xerox = g_list_append (xerox, g_strdup ("3d5d")); - xerox = g_list_append (xerox, g_strdup ("3da4")); - xerox = g_list_append (xerox, g_strdup ("420c")); - xerox = g_list_append (xerox, g_strdup ("4265")); - xerox = g_list_append (xerox, g_strdup ("4293")); - xerox = g_list_append (xerox, g_strdup ("4294")); - g_hash_table_insert (scanners, - g_strdup("0924"), - xerox); - - GList* pentax_2 = NULL; - pentax_2 = g_list_append (pentax_2, g_strdup ("3210")); - g_hash_table_insert (scanners, - g_strdup("0a17"), - pentax_2); - - GList* portable = NULL; - portable = g_list_append (portable, g_strdup ("1000")); - g_hash_table_insert (scanners, - g_strdup("0a53"), - portable); - - GList* syscan = NULL; - syscan = g_list_append (syscan, g_strdup ("4600")); - syscan = g_list_append (syscan, g_strdup ("4802")); - syscan = g_list_append (syscan, g_strdup ("4803")); - syscan = g_list_append (syscan, g_strdup ("480c")); - syscan = g_list_append (syscan, g_strdup ("4810")); - syscan = g_list_append (syscan, g_strdup ("6620")); - g_hash_table_insert (scanners, - g_strdup("0a82"), - syscan); - - GList* canon_2 = NULL; - canon_2 = g_list_append (canon_2, g_strdup ("160c")); - canon_2 = g_list_append (canon_2, g_strdup ("160f")); - canon_2 = g_list_append (canon_2, g_strdup ("1614")); - canon_2 = g_list_append (canon_2, g_strdup ("1617")); - canon_2 = g_list_append (canon_2, g_strdup ("1618")); - canon_2 = g_list_append (canon_2, g_strdup ("161a")); - canon_2 = g_list_append (canon_2, g_strdup ("161b")); - canon_2 = g_list_append (canon_2, g_strdup ("161d")); - canon_2 = g_list_append (canon_2, g_strdup ("1620")); - canon_2 = g_list_append (canon_2, g_strdup ("1622")); - canon_2 = g_list_append (canon_2, g_strdup ("1623")); - canon_2 = g_list_append (canon_2, g_strdup ("1624")); - canon_2 = g_list_append (canon_2, g_strdup ("1626")); - canon_2 = g_list_append (canon_2, g_strdup ("162b")); - canon_2 = g_list_append (canon_2, g_strdup ("1638")); - canon_2 = g_list_append (canon_2, g_strdup ("1639")); - g_hash_table_insert (scanners, - g_strdup("1083"), - canon_2); - - GList* digital = NULL; - digital = g_list_append (digital, g_strdup ("0001")); - g_hash_table_insert (scanners, - g_strdup("1183"), - digital); - - GList* konica_2 = NULL; - konica_2 = g_list_append (konica_2, g_strdup ("2089")); - g_hash_table_insert (scanners, - g_strdup("132b"), - konica_2); - - GList* umax = NULL; - umax = g_list_append (umax, g_strdup ("0010")); - umax = g_list_append (umax, g_strdup ("0030")); - umax = g_list_append (umax, g_strdup ("0050")); - umax = g_list_append (umax, g_strdup ("0060")); - umax = g_list_append (umax, g_strdup ("0070")); - umax = g_list_append (umax, g_strdup ("0130")); - umax = g_list_append (umax, g_strdup ("0160")); - umax = g_list_append (umax, g_strdup ("0230")); - g_hash_table_insert (scanners, - g_strdup("1606"), - umax); - - GList* docketport = NULL; - docketport = g_list_append (docketport, g_strdup ("4810")); - g_hash_table_insert (scanners, - g_strdup("1dcc"), - docketport); - - GList* dell = NULL; - dell = g_list_append (dell, g_strdup ("5105")); - dell = g_list_append (dell, g_strdup ("5124")); - dell = g_list_append (dell, g_strdup ("5250")); - g_hash_table_insert (scanners, - g_strdup("413c"), - dell); -} diff --git a/src/session-dbus.c b/src/session-dbus.c index 232e440..4ece444 100644 --- a/src/session-dbus.c +++ b/src/session-dbus.c @@ -7,16 +7,16 @@ Authors: Ted Gould <ted@canonical.com> Conor Curran <conor.curran@canonical.com> -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published by the Free Software Foundation. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along +You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -27,7 +27,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <gio/gio.h> #include "session-dbus.h" -#include "dbus-shared-names.h" +#include "shared-names.h" static GVariant * get_users_real_name (SessionDbus * service); static void bus_get_cb (GObject * object, GAsyncResult * res, gpointer user_data); @@ -38,7 +38,6 @@ static void bus_method_call (GDBusConnection * connection, const gchar * sender, typedef struct _SessionDbusPrivate SessionDbusPrivate; struct _SessionDbusPrivate { gchar * name; - gboolean user_menu_is_visible; GDBusConnection * bus; GCancellable * bus_cancel; guint dbus_registration; @@ -104,7 +103,6 @@ session_dbus_init (SessionDbus *self) priv->bus = NULL; priv->bus_cancel = NULL; priv->dbus_registration = 0; - priv->user_menu_is_visible = FALSE; priv->bus_cancel = g_cancellable_new(); g_bus_get(G_BUS_TYPE_SESSION, @@ -164,16 +162,12 @@ bus_method_call (GDBusConnection * connection, const gchar * sender, GDBusMethodInvocation * invocation, gpointer user_data) { SessionDbus * service = SESSION_DBUS (user_data); - SessionDbusPrivate * priv = SESSION_DBUS_GET_PRIVATE (service); GVariant * retval = NULL; if (g_strcmp0(method, "GetUserRealName") == 0) { retval = get_users_real_name (service); } - else if (g_strcmp0 (method, "GetUserMenuVisibility") == 0){ - retval = g_variant_new ("(b)", priv->user_menu_is_visible); - } else { g_warning("Calling method '%s' on the indicator service and it's unknown", method); } @@ -212,10 +206,7 @@ session_dbus_finalize (GObject *object) { SessionDbusPrivate * priv = SESSION_DBUS_GET_PRIVATE(object); - if (priv->name != NULL) { - g_free(priv->name); - priv->name = NULL; - } + g_clear_pointer (&priv->name, g_free); G_OBJECT_CLASS (session_dbus_parent_class)->finalize (object); return; @@ -225,7 +216,7 @@ static GVariant * get_users_real_name (SessionDbus * service) { SessionDbusPrivate * priv = SESSION_DBUS_GET_PRIVATE(service); - return g_variant_new ("(s)", priv->name); + return g_variant_new ("(s)", priv->name ? priv->name : ""); } SessionDbus * @@ -244,11 +235,8 @@ session_dbus_set_users_real_name (SessionDbus * session, const gchar * name) { SessionDbusPrivate * priv = SESSION_DBUS_GET_PRIVATE(session); GError * error = NULL; - if (priv->name != NULL) { - g_free(priv->name); - priv->name = NULL; - } - + + g_free (priv->name); priv->name = g_strdup(name); if (priv->bus != NULL) { @@ -269,36 +257,11 @@ session_dbus_set_users_real_name (SessionDbus * session, const gchar * name) return; } -void -session_dbus_set_user_menu_visibility (SessionDbus* session, - gboolean visible) -{ - SessionDbusPrivate * priv = SESSION_DBUS_GET_PRIVATE(session); - GError * error = NULL; - - priv->user_menu_is_visible = visible; - - if (priv->bus != NULL) { - g_dbus_connection_emit_signal (priv->bus, - NULL, - INDICATOR_SESSION_SERVICE_DBUS_OBJECT, - INDICATOR_SESSION_SERVICE_DBUS_IFACE, - "UserMenuIsVisible", - g_variant_new ("(b)", priv->user_menu_is_visible), - &error); - - if (error != NULL) { - g_warning("Unable to send UserMenuIsVisible signal: %s", error->message); - g_error_free(error); - } - } -} - void session_dbus_restart_required (SessionDbus* session) { SessionDbusPrivate * priv = SESSION_DBUS_GET_PRIVATE(session); GError * error = NULL; - + if (priv->bus != NULL) { g_debug("About to send RebootRequired signal"); @@ -314,6 +277,6 @@ void session_dbus_restart_required (SessionDbus* session) g_warning("Unable to send reboot-required signal: %s", error->message); g_error_free(error); } - } - + } + } diff --git a/src/session-dbus.h b/src/session-dbus.h index 4dc340a..7520f06 100644 --- a/src/session-dbus.h +++ b/src/session-dbus.h @@ -50,7 +50,6 @@ GType session_dbus_get_type (void); SessionDbus * session_dbus_new (void); void session_dbus_set_name (SessionDbus * session, const gchar * name); void session_dbus_set_users_real_name (SessionDbus * session, const gchar * name); -void session_dbus_set_user_menu_visibility (SessionDbus* session, gboolean visible); void session_dbus_restart_required (SessionDbus* session); G_END_DECLS diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c new file mode 100644 index 0000000..96fc2a0 --- /dev/null +++ b/src/session-menu-mgr.c @@ -0,0 +1,1172 @@ +/* +Copyright 2011 Canonical Ltd. + +Authors: + Charles Kerr <charles.kerr@canonical.com> + Conor Curran <conor.curran@canonical.com> + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "config.h" + +#include <sys/types.h> +#include <pwd.h> /* geteuid(), getpwuid() */ + +#include <glib.h> +#include <glib/gi18n.h> + +#include <libdbusmenu-glib/client.h> +#include <libdbusmenu-gtk/menuitem.h> + +#include "dbus-upower.h" +#include "session-menu-mgr.h" +#include "shared-names.h" +#include "users-service-dbus.h" + +#define DEBUG_SHOW_ALL FALSE + +#define UPOWER_ADDRESS "org.freedesktop.UPower" +#define UPOWER_PATH "/org/freedesktop/UPower" + +#define CMD_HELP "yelp" +#define CMD_INFO "gnome-control-center info" +#define CMD_SYSTEM_SETTINGS "gnome-control-center" +#ifdef HAVE_GTKLOGOUTHELPER + #define HAVE_RESTART_CMD TRUE + #define CMD_RESTART LIBEXECDIR"/gtk-logout-helper --restart" + #define CMD_LOGOUT LIBEXECDIR"/gtk-logout-helper --logout" + #define CMD_SHUTDOWN LIBEXECDIR"/gtk-logout-helper --shutdown" +#else + #define HAVE_RESTART_CMD FALSE /* hmm, no gnome-session-quit --restart? */ + #define CMD_RESTART "" + #define CMD_LOGOUT "gnome-session-quit --logout" + #define CMD_SHUTDOWN "gnome-session-quit --power-off" +#endif + +/** + * Which switch menuitem to show -- based on lockdown settings, + * greeter mode, number of users in the system, and so on. + * See get_switcher_mode() + */ +typedef enum +{ + SWITCHER_MODE_SCREENSAVER, + SWITCHER_MODE_LOCK, + SWITCHER_MODE_SWITCH, + SWITCHER_MODE_SWITCH_OR_LOCK +} +SwitcherMode; + +/** + * Creates and manages the menumodel and associated actions for the + * session menu described at <https://wiki.ubuntu.com/SystemMenu>. + * + * This is a pretty straightforward class: it creates the menumodel + * and listens for events that can affect the model's properties. + * + * Simple event sources, such as GSettings and a UPower DBus proxy, + * are handled here. More involved event sources are delegated to the + * UsersServiceDBus facade class. + */ +struct _SessionMenuMgr +{ + GObject parent_instance; + + DbusmenuMenuitem * top_mi; + DbusmenuMenuitem * screensaver_mi; + DbusmenuMenuitem * lock_mi; + DbusmenuMenuitem * lock_switch_mi; + DbusmenuMenuitem * guest_mi; + DbusmenuMenuitem * logout_mi; + DbusmenuMenuitem * suspend_mi; + DbusmenuMenuitem * hibernate_mi; + DbusmenuMenuitem * restart_mi; + DbusmenuMenuitem * shutdown_mi; + + GSList * user_menuitems; + gint user_menuitem_index; + + GSettings * lockdown_settings; + GSettings * indicator_settings; + GSettings * keybinding_settings; + + /* cached settings taken from the upower proxy */ + gboolean can_hibernate; + gboolean can_suspend; + gboolean allow_hibernate; + gboolean allow_suspend; + + gboolean greeter_mode; + + GCancellable * cancellable; + DBusUPower * upower_proxy; + SessionDbus * session_dbus; + UsersServiceDbus * users_dbus_facade; +}; + +static SwitcherMode get_switcher_mode (SessionMenuMgr *); + +static void init_upower_proxy (SessionMenuMgr *); + +static void update_screensaver_shortcut (SessionMenuMgr *); +static void update_user_menuitems (SessionMenuMgr *); +static void update_session_menuitems (SessionMenuMgr *); +static void update_confirmation_labels (SessionMenuMgr *); + +static void action_func_lock (SessionMenuMgr *); +static void action_func_suspend (SessionMenuMgr *); +static void action_func_hibernate (SessionMenuMgr *); +static void action_func_switch_to_lockscreen (SessionMenuMgr *); +static void action_func_switch_to_greeter (SessionMenuMgr *); +static void action_func_switch_to_guest (SessionMenuMgr *); +static void action_func_switch_to_user (AccountsUser *); +static void action_func_spawn_async (const char * cmd); + +static gboolean is_this_guest_session (void); +static gboolean is_this_live_session (void); + +static void on_guest_logged_in_changed (UsersServiceDbus *, + SessionMenuMgr *); + +static void on_user_logged_in_changed (UsersServiceDbus *, + AccountsUser *, + SessionMenuMgr *); + +/** +*** GObject init / dispose +**/ + +G_DEFINE_TYPE (SessionMenuMgr, session_menu_mgr, G_TYPE_OBJECT); + +static void +session_menu_mgr_init (SessionMenuMgr *mgr) +{ + mgr->top_mi = dbusmenu_menuitem_new (); + + /* Lockdown settings */ + GSettings * s = g_settings_new ("org.gnome.desktop.lockdown"); + g_signal_connect_swapped (s, "changed::disable-log-out", + G_CALLBACK(update_session_menuitems), mgr); + g_signal_connect_swapped (s, "changed::disable-lock-screen", + G_CALLBACK(update_user_menuitems), mgr); + g_signal_connect_swapped (s, "changed::disable-user-switching", + G_CALLBACK(update_user_menuitems), mgr); + mgr->lockdown_settings = s; + + /* Indicator settings */ + s = g_settings_new ("com.canonical.indicator.session"); + g_signal_connect_swapped (s, "changed::suppress-logout-restart-shutdown", + G_CALLBACK(update_confirmation_labels), mgr); + g_signal_connect_swapped (s, "changed::suppress-logout-menuitem", + G_CALLBACK(update_session_menuitems), mgr); + g_signal_connect_swapped (s, "changed::suppress-restart-menuitem", + G_CALLBACK(update_session_menuitems), mgr); + g_signal_connect_swapped (s, "changed::suppress-shutdown-menuitem", + G_CALLBACK(update_session_menuitems), mgr); + mgr->indicator_settings = s; + + /* Keybinding settings */ + s = g_settings_new ("org.gnome.settings-daemon.plugins.media-keys"); + g_signal_connect_swapped (s, "changed::screensaver", + G_CALLBACK(update_screensaver_shortcut), mgr); + mgr->keybinding_settings = s; + + /* listen for user events */ + mgr->users_dbus_facade = g_object_new (USERS_SERVICE_DBUS_TYPE, NULL); + g_signal_connect_swapped (mgr->users_dbus_facade, "user-list-changed", + G_CALLBACK (update_user_menuitems), mgr); + g_signal_connect (mgr->users_dbus_facade, "user-logged-in-changed", + G_CALLBACK(on_user_logged_in_changed), mgr); + g_signal_connect (mgr->users_dbus_facade, "guest-logged-in-changed", + G_CALLBACK(on_guest_logged_in_changed), mgr); + + init_upower_proxy (mgr); +} + +static void +session_menu_mgr_dispose (GObject *object) +{ + SessionMenuMgr * mgr = SESSION_MENU_MGR (object); + + if (mgr->cancellable != NULL) + { + g_cancellable_cancel (mgr->cancellable); + g_clear_object (&mgr->cancellable); + } + + g_clear_object (&mgr->indicator_settings); + g_clear_object (&mgr->lockdown_settings); + g_clear_object (&mgr->keybinding_settings); + g_clear_object (&mgr->upower_proxy); + g_clear_object (&mgr->users_dbus_facade); + g_clear_object (&mgr->top_mi); + g_clear_object (&mgr->session_dbus); + + g_slist_free (mgr->user_menuitems); + mgr->user_menuitems = NULL; + + G_OBJECT_CLASS (session_menu_mgr_parent_class)->dispose (object); +} + +static void +session_menu_mgr_class_init (SessionMenuMgrClass * klass) +{ + GObjectClass* object_class = G_OBJECT_CLASS (klass); + object_class->dispose = session_menu_mgr_dispose; +} + +/*** +**** UPower Proxy: +**** +**** 1. While bootstrapping, we invoke the AllowSuspend and AllowHibernate +**** methods to find out whether or not those features are allowed. +**** 2. While bootstrapping, we get the CanSuspend and CanHibernate properties +**** and also listen for property changes. +**** 3. These four values are used to set suspend and hibernate's visibility. +**** +***/ + +static void +on_upower_properties_changed (SessionMenuMgr * mgr) +{ + gboolean b; + gboolean need_refresh = FALSE; + + /* suspend */ + b = dbus_upower_get_can_suspend (mgr->upower_proxy); + if (mgr->can_suspend != b) + { + mgr->can_suspend = b; + need_refresh = TRUE; + } + + /* hibernate */ + b = dbus_upower_get_can_hibernate (mgr->upower_proxy); + if (mgr->can_hibernate != b) + { + mgr->can_hibernate = b; + need_refresh = TRUE; + } + + if (need_refresh) + { + update_session_menuitems (mgr); + } +} + +static void +init_upower_proxy (SessionMenuMgr * mgr) +{ + /* default values */ + mgr->can_suspend = TRUE; + mgr->can_hibernate = TRUE; + mgr->allow_suspend = TRUE; + mgr->allow_hibernate = TRUE; + + mgr->cancellable = g_cancellable_new (); + + GError * error = NULL; + mgr->upower_proxy = dbus_upower_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + UPOWER_ADDRESS, + UPOWER_PATH, + NULL, + &error); + if (error != NULL) + { + g_warning ("Error creating upower proxy: %s", error->message); + g_clear_error (&error); + } + else + { + dbus_upower_call_suspend_allowed_sync (mgr->upower_proxy, + &mgr->allow_suspend, + NULL, + &error); + if (error != NULL) + { + g_warning ("%s: %s", G_STRFUNC, error->message); + g_clear_error (&error); + } + + dbus_upower_call_hibernate_allowed_sync (mgr->upower_proxy, + &mgr->allow_hibernate, + NULL, + &error); + if (error != NULL) + { + g_warning ("%s: %s", G_STRFUNC, error->message); + g_clear_error (&error); + } + + on_upower_properties_changed (mgr); + g_signal_connect_swapped (mgr->upower_proxy, "changed", + G_CALLBACK(on_upower_properties_changed), mgr); + } +} + +/*** +**** Menuitem Helpers +***/ + +static inline void +mi_set_label (DbusmenuMenuitem * mi, const char * str) +{ + dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_LABEL, str); +} + +static inline void +mi_set_type (DbusmenuMenuitem * mi, const char * str) +{ + dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_TYPE, str); +} + +static inline void +mi_set_visible (DbusmenuMenuitem * mi, gboolean b) +{ + dbusmenu_menuitem_property_set_bool (mi, DBUSMENU_MENUITEM_PROP_VISIBLE, + b || DEBUG_SHOW_ALL); +} + +static inline void +mi_set_logged_in (DbusmenuMenuitem * mi, gboolean b) +{ + dbusmenu_menuitem_property_set_bool (mi, USER_ITEM_PROP_LOGGED_IN, b); +} + +static DbusmenuMenuitem* +mi_new_separator (void) +{ + DbusmenuMenuitem * mi = dbusmenu_menuitem_new (); + mi_set_type (mi, DBUSMENU_CLIENT_TYPES_SEPARATOR); + return mi; +} + +static DbusmenuMenuitem* +mi_new (const char * label) +{ + DbusmenuMenuitem * mi = dbusmenu_menuitem_new (); + mi_set_label (mi, label); + return mi; +} + +/*** +**** Admin Menuitems +**** <https://wiki.ubuntu.com/SystemMenu#Admin_items> +***/ + +static void +build_admin_menuitems (SessionMenuMgr * mgr) +{ + if (!mgr->greeter_mode) + { + DbusmenuMenuitem * mi; + const gboolean show_settings = !mgr->greeter_mode; + + mi = mi_new (_("About This Computer")); + dbusmenu_menuitem_child_append (mgr->top_mi, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK(action_func_spawn_async), CMD_INFO); + + mi = mi_new (_("Ubuntu Help")); + dbusmenu_menuitem_child_append (mgr->top_mi, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK(action_func_spawn_async), CMD_HELP); + + mi = mi_new_separator (); + mi_set_visible (mi, show_settings); + dbusmenu_menuitem_child_append (mgr->top_mi, mi); + + mi = mi_new (_("System Settings\342\200\246")); + mi_set_visible (mi, show_settings); + dbusmenu_menuitem_child_append (mgr->top_mi, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK(action_func_spawn_async), + CMD_SYSTEM_SETTINGS); + + mi = mi_new_separator (); + dbusmenu_menuitem_child_append (mgr->top_mi, mi); + } +} + +/*** +**** Session Menuitems +**** <https://wiki.ubuntu.com/SystemMenu#Session_items> +***/ + +static void +update_session_menuitems (SessionMenuMgr * mgr) +{ + gboolean v; + GSettings * s = mgr->indicator_settings; + + v = !mgr->greeter_mode + && !is_this_live_session() + && !g_settings_get_boolean (mgr->lockdown_settings, "disable-log-out") + && !g_settings_get_boolean (s, "suppress-logout-menuitem"); + mi_set_visible (mgr->logout_mi, v); + + v = mgr->can_suspend + && mgr->allow_suspend; + mi_set_visible (mgr->suspend_mi, v); + + v = mgr->can_hibernate + && mgr->allow_hibernate; + mi_set_visible (mgr->hibernate_mi, v); + + v = HAVE_RESTART_CMD + && !g_settings_get_boolean (s, "suppress-restart-menuitem"); + mi_set_visible (mgr->restart_mi, v); + + v = !g_settings_get_boolean (s, "suppress-shutdown-menuitem"); + mi_set_visible (mgr->shutdown_mi, v); +} + +/* Update the ellipses when the confirmation setting changes. + * + * <http://developer.gnome.org/hig-book/3.0/menus-design.html.en>: + * "Label the menu item with a trailing ellipsis ("...") only if the + * command requires further input from the user before it can be performed." + */ +static void +update_confirmation_labels (SessionMenuMgr * mgr) +{ + const gboolean confirm_needed = !g_settings_get_boolean ( + mgr->indicator_settings, + "suppress-logout-restart-shutdown"); + + mi_set_label (mgr->logout_mi, confirm_needed ? _("Log Out\342\200\246") + : _("Log Out")); + + mi_set_label (mgr->shutdown_mi, confirm_needed ? _("Switch Off\342\200\246") + : _("Switch Off")); + + dbusmenu_menuitem_property_set (mgr->restart_mi, RESTART_ITEM_LABEL, + confirm_needed ? _("Restart\342\200\246") + : _("Restart")); +} + +static void +build_session_menuitems (SessionMenuMgr* mgr) +{ + DbusmenuMenuitem * mi; + + mi = mgr->logout_mi = mi_new (_("Log Out\342\200\246")); + dbusmenu_menuitem_child_append (mgr->top_mi, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK(action_func_spawn_async), CMD_LOGOUT); + + mi = mgr->suspend_mi = mi_new ("Suspend"); + dbusmenu_menuitem_child_append (mgr->top_mi, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK(action_func_suspend), mgr); + + mi = mgr->hibernate_mi = mi_new (_("Hibernate")); + dbusmenu_menuitem_child_append (mgr->top_mi, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK(action_func_hibernate), mgr); + + mi = mgr->restart_mi = dbusmenu_menuitem_new (); + mi_set_type (mi, RESTART_ITEM_TYPE); + dbusmenu_menuitem_property_set (mi, RESTART_ITEM_LABEL, _("Restart\342\200\246")); + dbusmenu_menuitem_child_append (mgr->top_mi, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK(action_func_spawn_async), CMD_RESTART); + + mi = mgr->shutdown_mi = mi_new (_("Switch Off\342\200\246")); + dbusmenu_menuitem_child_append (mgr->top_mi, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK(action_func_spawn_async), CMD_SHUTDOWN); + + update_confirmation_labels (mgr); + update_session_menuitems (mgr); +} + +/**** +***** User Menuitems +***** https://wiki.ubuntu.com/SystemMenu#Account-switching_items +****/ + +/* Local extensions to AccountsUser */ + +static GQuark +get_menuitem_quark (void) +{ + static GQuark q = 0; + + if (G_UNLIKELY(!q)) + { + q = g_quark_from_static_string ("menuitem"); + } + + return q; +} + +static DbusmenuMenuitem* +user_get_menuitem (AccountsUser * user) +{ + return g_object_get_qdata (G_OBJECT(user), get_menuitem_quark()); +} + +static void +user_clear_menuitem (AccountsUser * user) +{ + g_object_steal_qdata (G_OBJECT(user), get_menuitem_quark()); +} + +static void +user_set_menuitem (AccountsUser * user, DbusmenuMenuitem * mi) +{ + g_object_set_qdata (G_OBJECT(user), get_menuitem_quark(), mi); + + g_object_weak_ref (G_OBJECT(mi), (GWeakNotify)user_clear_menuitem, user); +} + +/***/ + +static GQuark +get_mgr_quark (void) +{ + static GQuark q = 0; + + if (G_UNLIKELY(!q)) + { + q = g_quark_from_static_string ("session-menu-mgr"); + } + + return q; +} + +static SessionMenuMgr* +user_get_mgr (AccountsUser * user) +{ + return g_object_get_qdata (G_OBJECT(user), get_mgr_quark()); +} + +static void +user_set_mgr (AccountsUser * user, SessionMenuMgr * mgr) +{ + g_object_set_qdata (G_OBJECT(user), get_mgr_quark(), mgr); +} + +/***/ + +static GQuark +get_collision_quark (void) +{ + static GQuark q = 0; + + if (G_UNLIKELY(!q)) + { + q = g_quark_from_static_string ("name-collision"); + } + + return q; +} + +static gboolean +user_has_name_collision (AccountsUser * u) +{ + return g_object_get_qdata (G_OBJECT(u), get_collision_quark()) != NULL; +} + +static void +user_set_name_collision (AccountsUser * u, gboolean b) +{ + g_object_set_qdata (G_OBJECT(u), get_collision_quark(), GINT_TO_POINTER(b)); +} + +/*** +**** +***/ + +static void +on_guest_logged_in_changed (UsersServiceDbus * usd, + SessionMenuMgr * mgr) +{ + if (mgr->guest_mi != NULL) + { + mi_set_logged_in (mgr->guest_mi, + users_service_dbus_is_guest_logged_in (usd)); + } +} + +/* When a user's login state changes, + update the corresponding menuitem's LOGGED_IN property */ +static void +on_user_logged_in_changed (UsersServiceDbus * usd, + AccountsUser * user, + SessionMenuMgr * mgr) +{ + DbusmenuMenuitem * mi = user_get_menuitem (user); + + if (mi != NULL) + { + mi_set_logged_in (mi, users_service_dbus_is_user_logged_in (usd, user)); + } +} + +static void +update_screensaver_shortcut (SessionMenuMgr * mgr) +{ + gchar * s = g_settings_get_string (mgr->keybinding_settings, "screensaver"); + g_debug ("%s Screensaver shortcut changed to: '%s'", G_STRLOC, s); + + if (mgr->lock_mi != NULL) + { + dbusmenu_menuitem_property_set_shortcut_string (mgr->lock_mi, s); + } + + if (mgr->lock_switch_mi != NULL) + { + dbusmenu_menuitem_property_set_shortcut_string (mgr->lock_switch_mi, s); + } + + if (mgr->screensaver_mi != NULL) + { + dbusmenu_menuitem_property_set_shortcut_string (mgr->screensaver_mi, s); + } + + g_free (s); +} + +static void +update_user_menuitem_icon (DbusmenuMenuitem * mi, AccountsUser * user) +{ + const gchar * str = accounts_user_get_icon_file (user); + + if (!str || !*str) + { + str = USER_ITEM_ICON_DEFAULT; + } + + dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_ICON, str); +} + +static void +update_user_menuitem_name (DbusmenuMenuitem * mi, AccountsUser * user) +{ + GString * gstr = g_string_new (accounts_user_get_real_name (user)); + + if (user_has_name_collision (user)) + { + g_string_append_printf (gstr, " (%s)", accounts_user_get_user_name(user)); + } + + dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, gstr->str); + g_string_free (gstr, TRUE); +} + +static void +on_user_property_changed (AccountsUser * user, + GParamSpec * pspec, + DbusmenuMenuitem * mi) +{ + static const char * interned_icon_file = NULL; + static const char * interned_real_name = NULL; + static const char * interned_user_name = NULL; + + if (G_UNLIKELY (interned_icon_file == NULL)) + { + interned_icon_file = g_intern_static_string ("icon-file"); + interned_user_name = g_intern_static_string ("user-name"); + interned_real_name = g_intern_static_string ("real-name"); + } + + if (pspec->name == interned_icon_file) + { + update_user_menuitem_icon (mi, user); + } + else if ((pspec->name == interned_real_name) + || (pspec->name == interned_user_name)) + { + /* name changing can affect other menuitems too by invalidating + the sort order or name collision flags... so let's rebuild */ + update_user_menuitems (user_get_mgr (user)); + } +} + +typedef struct +{ + gpointer instance; + gulong handler_id; +} +SignalHandlerData; + +/* when a user menuitem is destroyed, + it should stop listening for its UserAccount's property changes */ +static void +on_user_menuitem_destroyed (SignalHandlerData * data) +{ + g_signal_handler_disconnect (data->instance, data->handler_id); + g_free (data); +} + +static DbusmenuMenuitem* +user_menuitem_new (AccountsUser * user, SessionMenuMgr * mgr) +{ + DbusmenuMenuitem * mi = dbusmenu_menuitem_new (); + mi_set_type (mi, USER_ITEM_TYPE); + + /* set the name & icon and listen for property changes */ + update_user_menuitem_name (mi, user); + update_user_menuitem_icon (mi, user); + SignalHandlerData * hd = g_new0 (SignalHandlerData, 1); + hd->instance = user; + hd->handler_id = g_signal_connect (user, "notify", + G_CALLBACK(on_user_property_changed), mi); + g_object_weak_ref (G_OBJECT(mi), (GWeakNotify)on_user_menuitem_destroyed, hd); + + /* set the logged-in property */ + mi_set_logged_in (mi, + users_service_dbus_is_user_logged_in (mgr->users_dbus_facade, user)); + + /* set the is-current-user property */ + const gboolean is_current_user = + !g_strcmp0 (g_get_user_name(), accounts_user_get_user_name(user)); + dbusmenu_menuitem_property_set_bool (mi, + USER_ITEM_PROP_IS_CURRENT_USER, + is_current_user); + + /* set the switch-to-user action */ + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK (action_func_switch_to_user), user); + + /* give this AccountsUser a hook back to this menuitem */ + user_set_menuitem (user, mi); + user_set_mgr (user, mgr); + + return mi; +} + +/* for sorting AccountsUsers from most to least frequently used */ +static gint +compare_users_by_login_frequency (gconstpointer a, gconstpointer b) +{ + const guint64 a_freq = accounts_user_get_login_frequency (ACCOUNTS_USER(a)); + const guint64 b_freq = accounts_user_get_login_frequency (ACCOUNTS_USER(b)); + if (a_freq > b_freq) return -1; + if (a_freq < b_freq) return 1; + return 0; +} + +/* for sorting AccountsUsers alphabetically */ +static gint +compare_users_by_username (gconstpointer ga, gconstpointer gb) +{ + AccountsUser * a = ACCOUNTS_USER(ga); + AccountsUser * b = ACCOUNTS_USER(gb); + + const int ret = g_strcmp0 (accounts_user_get_real_name (a), + accounts_user_get_real_name (b)); + + if (!ret) /* names are the same, so both have a name collision */ + { + user_set_name_collision (a, TRUE); + user_set_name_collision (b, TRUE); + } + + return ret; +} + +static gboolean +is_user_switching_allowed (SessionMenuMgr * mgr) +{ + /* maybe it's locked down */ + if (g_settings_get_boolean (mgr->lockdown_settings, "disable-user-switching")) + { + return FALSE; + } + + /* maybe the seat doesn't support activation */ + if (!users_service_dbus_can_activate_session (mgr->users_dbus_facade)) + { + return FALSE; + } + + return TRUE; +} + +static void +build_user_menuitems (SessionMenuMgr * mgr) +{ + g_return_if_fail (!mgr->greeter_mode); + + DbusmenuMenuitem * mi; + GSList * items = NULL; + gint pos = mgr->user_menuitem_index; + const char * current_real_name = NULL; + + /** + *** Start Screen Saver + *** Switch Account... + *** Lock + *** Lock / Switch Account... + **/ + + const SwitcherMode mode = get_switcher_mode (mgr); + + mi = mgr->screensaver_mi = mi_new (_("Start Screen Saver")); + mi_set_visible (mi, mode == SWITCHER_MODE_SCREENSAVER); + dbusmenu_menuitem_child_add_position (mgr->top_mi, mi, pos++); + items = g_slist_prepend (items, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK (action_func_lock), mgr); + + mi = mi_new (_("Switch User Account\342\200\246")); + mi_set_visible (mi, mode == SWITCHER_MODE_SWITCH); + dbusmenu_menuitem_child_add_position (mgr->top_mi, mi, pos++); + items = g_slist_prepend (items, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK (action_func_switch_to_greeter), mgr); + + mi = mgr->lock_mi = mi_new (_("Lock")); + mi_set_visible (mi, mode == SWITCHER_MODE_LOCK); + dbusmenu_menuitem_child_add_position (mgr->top_mi, mi, pos++); + items = g_slist_prepend (items, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK (action_func_switch_to_lockscreen), mgr); + + mi = mgr->lock_switch_mi = mi_new (_("Lock/Switch Account\342\200\246")); + mi_set_visible (mi, mode == SWITCHER_MODE_SWITCH_OR_LOCK); + dbusmenu_menuitem_child_add_position (mgr->top_mi, mi, pos++); + items = g_slist_prepend (items, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK (action_func_switch_to_lockscreen), mgr); + + const gboolean is_guest = is_this_guest_session (); + const gboolean guest_allowed = + users_service_dbus_guest_session_enabled (mgr->users_dbus_facade); + mi = mgr->guest_mi = dbusmenu_menuitem_new (); + mi_set_type (mi, USER_ITEM_TYPE); + mi_set_visible (mi, !is_guest && guest_allowed); + dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, _("Guest Session")); + dbusmenu_menuitem_child_add_position (mgr->top_mi, mi, pos++); + on_guest_logged_in_changed (mgr->users_dbus_facade, mgr); + items = g_slist_prepend (items, mi); + g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, + G_CALLBACK (action_func_switch_to_guest), mgr); + + if (guest_allowed && is_guest) + { + current_real_name = _("Guest"); + } + + /*** + **** Users + ***/ + + /* if we can switch to another user account, show them here */ + const char * const username = g_get_user_name(); + GList * users = users_service_dbus_get_user_list (mgr->users_dbus_facade); + + /* since we're building (or rebuilding) from scratch, + clear the name collision flags */ + GList * u; + for (u=users; u!=NULL; u=u->next) + { + AccountsUser * user = ACCOUNTS_USER(u->data); + + user_set_name_collision (user, FALSE); + + if (!g_strcmp0 (username, accounts_user_get_user_name(user))) + { + current_real_name = accounts_user_get_real_name (user); + } + } + + if (is_user_switching_allowed (mgr)) + { + /* pick the most frequently used accounts */ + const int MAX_USERS = 12; /* this limit comes from the spec */ + if (g_list_length(users) > MAX_USERS) + { + users = g_list_sort (users, compare_users_by_login_frequency); + GList * last = g_list_nth (users, MAX_USERS-1); + GList * remainder = last->next; + last->next = NULL; + remainder->prev = NULL; + g_list_free (remainder); + } + + /* Sort the users by name for display */ + users = g_list_sort (users, compare_users_by_username); + + /* Create menuitems for them */ + int i; + for (i=0, u=users; i<MAX_USERS && u!=NULL; u=u->next, i++) + { + AccountsUser * user = u->data; + DbusmenuMenuitem * mi = user_menuitem_new (user, mgr); + dbusmenu_menuitem_child_add_position (mgr->top_mi, mi, pos++); + items = g_slist_prepend (items, mi); + } + } + + g_list_free (users); + + /* separator */ + mi = mi_new_separator (); + dbusmenu_menuitem_child_add_position (mgr->top_mi, mi, pos++); + items = g_slist_prepend (items, mi); + + if (current_real_name != NULL) + { + session_dbus_set_users_real_name (mgr->session_dbus, + current_real_name); + } + + update_screensaver_shortcut (mgr); + mgr->user_menuitems = items; +} + +static void +update_user_menuitems (SessionMenuMgr * mgr) +{ + /* remove any previous user menuitems */ + GSList * l; + for (l=mgr->user_menuitems; l!=NULL; l=l->next) + { + dbusmenu_menuitem_child_delete (mgr->top_mi, l->data); + } + g_slist_free (mgr->user_menuitems); + mgr->user_menuitems = NULL; + + /* add fresh user menuitems */ + if (!mgr->greeter_mode) + { + build_user_menuitems (mgr); + } +} + +/*** +**** Actions! +***/ + +static void +action_func_spawn_async (const char * cmd) +{ + GError * error = NULL; + + g_debug ("%s calling \"%s\"", G_STRFUNC, cmd); + g_spawn_command_line_async (cmd, &error); + + if (error != NULL) + { + g_warning ("Unable to execute \"%s\": %s", cmd, error->message); + g_clear_error (&error); + } +} + +/* Calling "Lock" locks the screen & goes to black. + Calling "SimulateUserActivity" afterwards shows the Lock Screen. */ +static void +lock_helper (SessionMenuMgr * mgr, gboolean show_lock_screen) +{ + if (!g_settings_get_boolean (mgr->lockdown_settings, "disable-lock-screen")) + { + GError * error = NULL; + GDBusProxy * proxy = g_dbus_proxy_new_for_bus_sync ( + G_BUS_TYPE_SESSION, + G_DBUS_PROXY_FLAGS_NONE, + NULL, + "org.gnome.ScreenSaver", + "/org/gnome/ScreenSaver", + "org.gnome.ScreenSaver", + NULL, + &error); + + if (error == NULL) + { + g_dbus_proxy_call_sync (proxy, "Lock", + NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, + &error); + } + + if ((error == NULL) && show_lock_screen) + { + g_dbus_proxy_call_sync (proxy, "SimulateUserActivity", + NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, + &error); + } + + if (error != NULL) + { + g_warning ("Error locking screen: %s", error->message); + } + + g_clear_object (&proxy); + g_clear_error (&error); + } +} + +static void +action_func_lock (SessionMenuMgr * mgr) +{ + lock_helper (mgr, FALSE); +} + +static void +action_func_switch_to_lockscreen (SessionMenuMgr * mgr) +{ + lock_helper (mgr, TRUE); +} + +static void +action_func_switch_to_greeter (SessionMenuMgr * mgr) +{ + action_func_lock (mgr); + users_service_dbus_show_greeter (mgr->users_dbus_facade); +} + +static void +action_func_switch_to_user (AccountsUser * user) +{ + SessionMenuMgr * mgr = user_get_mgr (user); + g_return_if_fail (mgr != NULL); + action_func_lock (mgr); + users_service_dbus_activate_user_session (mgr->users_dbus_facade, user); +} + +static void +action_func_switch_to_guest (SessionMenuMgr * mgr) +{ + action_func_lock (mgr); + users_service_dbus_activate_guest_session (mgr->users_dbus_facade); +} + +static void +action_func_suspend (SessionMenuMgr * mgr) +{ + GError * error = NULL; + + dbus_upower_call_suspend_sync (mgr->upower_proxy, + mgr->cancellable, + &error); + + if (error != NULL) + { + g_warning ("%s: %s", G_STRFUNC, error->message); + g_clear_error (&error); + } +} + +static void +action_func_hibernate (SessionMenuMgr * mgr) +{ + GError * error = NULL; + + dbus_upower_call_hibernate_sync (mgr->upower_proxy, + mgr->cancellable, + &error); + + if (error != NULL) + { + g_warning ("%s: %s", G_STRFUNC, error->message); + g_clear_error (&error); + } +} + +/*** +**** +***/ + +static gboolean +is_this_guest_session (void) +{ + /* FIXME: this test has been here awhile and seems to work, + but seems brittle to me */ + return geteuid() < 500; +} + +static gboolean +is_this_live_session (void) +{ + const struct passwd * const pw = getpwuid (geteuid()); + return (pw->pw_uid==999) && !g_strcmp0("ubuntu",pw->pw_name); +} + +static SwitcherMode +get_switcher_mode (SessionMenuMgr * mgr) +{ + SwitcherMode mode; + + const gboolean can_lock = !g_settings_get_boolean (mgr->lockdown_settings, + "disable-lock-screen"); + const gboolean can_switch = is_user_switching_allowed (mgr); + + if (!can_lock && !can_switch) /* hmm, quite an extreme lockdown */ + { + mode = SWITCHER_MODE_SCREENSAVER; + } + else if (is_this_live_session()) /* live sessions can't lock or switch */ + { + mode = SWITCHER_MODE_SCREENSAVER; + } + else if (!can_switch) /* switching's locked down */ + { + mode = SWITCHER_MODE_LOCK; + } + else if (is_this_guest_session ()) /* guest sessions can't lock */ + { + mode = SWITCHER_MODE_SWITCH; + } + else /* both locking & switching are allowed */ + { + GList * l = users_service_dbus_get_user_list (mgr->users_dbus_facade); + const size_t user_count = g_list_length (l); + g_list_free (l); + + /* only show switch mode if we have users to switch to */ + mode = user_count > (is_this_guest_session() ? 0 : 1) + ? SWITCHER_MODE_SWITCH_OR_LOCK + : SWITCHER_MODE_LOCK; + } + + return mode; +} + + +/*** +**** +***/ + +SessionMenuMgr* +session_menu_mgr_new (SessionDbus * session_dbus, + gboolean greeter_mode) +{ + SessionMenuMgr* mgr = g_object_new (SESSION_TYPE_MENU_MGR, NULL); + mgr->greeter_mode = greeter_mode; + mgr->session_dbus = g_object_ref (session_dbus); + build_admin_menuitems (mgr); + const guint n = g_list_length (dbusmenu_menuitem_get_children (mgr->top_mi)); + mgr->user_menuitem_index = n; + update_user_menuitems (mgr); + build_session_menuitems (mgr); + return mgr; +} + +/** + * session_menu_mgr_get_menu: + * + * Returns: (transfer none): the manager's menu. + */ +DbusmenuMenuitem * +session_menu_mgr_get_menu (SessionMenuMgr * mgr) +{ + g_return_val_if_fail (IS_SESSION_MENU_MGR(mgr), NULL); + + return mgr->top_mi; +} diff --git a/src/session-menu-mgr.h b/src/session-menu-mgr.h new file mode 100644 index 0000000..5a173e1 --- /dev/null +++ b/src/session-menu-mgr.h @@ -0,0 +1,55 @@ +/* +Copyright 2011 Canonical Ltd. + +Authors: + Conor Curran <conor.curran@canonical.com> + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#ifndef _SESSION_MENU_MGR_H_ +#define _SESSION_MENU_MGR_H_ + +#include <glib-object.h> + +#include "session-dbus.h" + +G_BEGIN_DECLS + +#define SESSION_TYPE_MENU_MGR (session_menu_mgr_get_type ()) +#define SESSION_MENU_MGR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SESSION_TYPE_MENU_MGR, SessionMenuMgr)) +#define SESSION_MENU_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SESSION_TYPE_MENU_MGR, SessionMenuMgrClass)) +#define IS_SESSION_MENU_MGR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SESSION_TYPE_MENU_MGR)) +#define IS_SESSION_MENU_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SESSION_TYPE_MENU_MGR)) +#define SESSION_MENU_MGR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SESSION_TYPE_MENU_MGR, SessionMenuMgrClass)) + +typedef struct _SessionMenuMgrClass SessionMenuMgrClass; +typedef struct _SessionMenuMgr SessionMenuMgr; + +struct _SessionMenuMgrClass +{ + GObjectClass parent_class; +}; + +GType session_menu_mgr_get_type (void) G_GNUC_CONST; + +SessionMenuMgr* session_menu_mgr_new (SessionDbus * session_dbus, + gboolean greeter_mode); + +DbusmenuMenuitem* session_menu_mgr_get_menu (SessionMenuMgr * mgr); + + +G_END_DECLS + +#endif /* _SESSION_MENU_MGR_H_ */ diff --git a/src/session-service.c b/src/session-service.c index 1dd1e14..91bbccd 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -9,21 +9,22 @@ Authors: Christoph Korn <c_korn@gmx.de> Cody Russell <crussell@canonical.com> Conor Curran <conor.curran@canonical.com> + Charles Kerr <charles.kerr@canonical.com> -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published by the Free Software Foundation. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along +You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <config.h> +#include "config.h" #include <unistd.h> #include <locale.h> @@ -32,55 +33,37 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <gio/gio.h> #include <gio/gdesktopappinfo.h> -#include <dbus/dbus-glib.h> -#include <dbus/dbus-glib-bindings.h> - #include <libdbusmenu-glib/server.h> -#include <libdbusmenu-glib/menuitem.h> -#include <libdbusmenu-glib/client.h> #include <gtk/gtk.h> -#include <libdbusmenu-gtk/menuitem.h> #include <libindicator/indicator-service.h> -#include "dbus-shared-names.h" -#include "dbusmenu-shared.h" -#include "users-service-dbus.h" -#include "user-menu-mgr.h" -#include "device-menu-mgr.h" #include "session-dbus.h" +#include "session-menu-mgr.h" +#include "shared-names.h" +#include "users-service-dbus.h" -typedef struct _ActivateData ActivateData; -struct _ActivateData -{ - UsersServiceDbus *service; - UserData *user; -}; - -//static UsersServiceDbus *dbus_interface = NULL; -static SessionDbus *session_dbus = NULL; +static SessionDbus * session_dbus = NULL; static GMainLoop * mainloop = NULL; -/* When the service interface starts to shutdown, we - should follow it. */ +/* When the service interface starts to shutdown, + we should follow it. */ void service_shutdown (IndicatorService * service, gpointer user_data) { - if (mainloop != NULL) { - g_debug("Service shutdown"); - g_main_loop_quit(mainloop); - } - return; + if (mainloop != NULL) + { + g_debug ("Service shutdown"); + g_main_loop_quit (mainloop); + } } -static gboolean -get_greeter_mode (void) +static inline gboolean +is_greeter_mode (void) { - const gchar *var; - var = g_getenv("INDICATOR_GREETER_MODE"); - return (g_strcmp0(var, "1") == 0); + return !g_strcmp0 (g_getenv ("INDICATOR_GREETER_MODE"), "1"); } /* Main, is well, main. It brings everything up and throws @@ -88,41 +71,28 @@ get_greeter_mode (void) int main (int argc, char ** argv) { - gboolean greeter_mode; - g_type_init(); - /* Setting up i18n and gettext. Apparently, we need - all of these. */ - setlocale (LC_ALL, ""); - bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); - textdomain (GETTEXT_PACKAGE); + /* Setting up i18n and gettext. + Apparently we need all of these. */ + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); + textdomain (GETTEXT_PACKAGE); - IndicatorService * service = indicator_service_new_version (INDICATOR_SESSION_DBUS_NAME, - INDICATOR_SESSION_DBUS_VERSION); - g_signal_connect (G_OBJECT(service), - INDICATOR_SERVICE_SIGNAL_SHUTDOWN, + IndicatorService * service = indicator_service_new_version (INDICATOR_SESSION_DBUS_NAME, + INDICATOR_SESSION_DBUS_VERSION); + g_signal_connect (G_OBJECT(service), INDICATOR_SERVICE_SIGNAL_SHUTDOWN, G_CALLBACK(service_shutdown), NULL); - session_dbus = session_dbus_new(); + session_dbus = session_dbus_new(); - greeter_mode = get_greeter_mode(); - - // Devices - DeviceMenuMgr* device_mgr = device_menu_mgr_new (session_dbus, greeter_mode); - DbusmenuServer * server = dbusmenu_server_new(INDICATOR_SESSION_DBUS_OBJECT); - dbusmenu_server_set_root(server, device_mgr_get_root_item (device_mgr)); - - if (!greeter_mode) { - // Users - UserMenuMgr* user_mgr = user_menu_mgr_new (session_dbus, greeter_mode); - DbusmenuServer* users_server = dbusmenu_server_new (INDICATOR_USERS_DBUS_OBJECT); - dbusmenu_server_set_root (users_server, user_mgr_get_root_item (user_mgr)); - } + SessionMenuMgr * menu_mgr = session_menu_mgr_new (session_dbus, is_greeter_mode()); + DbusmenuServer* server = dbusmenu_server_new (INDICATOR_SESSION_DBUS_OBJECT); + dbusmenu_server_set_root (server, session_menu_mgr_get_menu (menu_mgr)); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); - + return 0; } diff --git a/src/settings-helper.c b/src/settings-helper.c deleted file mode 100644 index 007f83f..0000000 --- a/src/settings-helper.c +++ /dev/null @@ -1,167 +0,0 @@ -/* -A small wrapper utility for connecting to GSettings. - -Copyright 2009 Canonical Ltd. - -Authors: - Christoph Korn <c_korn@gmx.de> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <gio/gio.h> -#include <glib/gi18n.h> - -#include <dbus/dbus-glib.h> -#include <dbus/dbus-glib-bindings.h> - -#include <libdbusmenu-glib/server.h> -#include <libdbusmenu-glib/menuitem.h> - -#include "dbus-shared-names.h" -#include "settings-helper.h" - -static GSettings* settings = NULL; - -static guint confirmation_notify = 0; -static guint logout_notify = 0; -static guint restart_notify = 0; -static guint shutdown_notify = 0; - -static gboolean -build_settings (void) { - if (settings == NULL) { - settings = g_settings_new (SESSION_SCHEMA); - } - if (settings == NULL) { - return FALSE; - } - return TRUE; -} - -gboolean -supress_confirmations (void) { - gboolean settings_built = build_settings(); - g_return_val_if_fail(settings_built, FALSE); - return g_settings_get_boolean (settings, SUPPRESS_KEY) ; -} - -gboolean -should_show_user_menu (void) { - gboolean settings_built = build_settings(); - g_return_val_if_fail(settings_built, TRUE); - return g_settings_get_boolean (settings, SHOW_USER_MENU) ; -} - -gboolean -show_logout (void) { - gboolean settings_built = build_settings(); - g_return_val_if_fail(settings_built, TRUE); - return !g_settings_get_boolean (settings, LOGOUT_KEY) ; -} - -gboolean -show_restart (void) { - gboolean settings_built = build_settings(); - g_return_val_if_fail(settings_built, TRUE); - return !g_settings_get_boolean (settings, RESTART_KEY) ; -} - -gboolean -show_shutdown (void) { - gboolean settings_built = build_settings(); - g_return_val_if_fail(settings_built, TRUE); - return !g_settings_get_boolean (settings, SHUTDOWN_KEY) ; -} - -static void update_menu_entries_callback (GSettings * settings, const gchar * key, gpointer data) { - RestartShutdownLogoutMenuItems * restart_shutdown_logout_mi = (RestartShutdownLogoutMenuItems*) data; - - if(g_strcmp0 (key, SUPPRESS_KEY) == 0) { - if (g_settings_get_boolean (settings, key)) { - dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->logout_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out")); - dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->restart_mi, RESTART_ITEM_LABEL, _("Restart")); - dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shut Down")); - } else { - dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->logout_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out…")); - dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->restart_mi, RESTART_ITEM_LABEL, _("Restart…")); - dbusmenu_menuitem_property_set(restart_shutdown_logout_mi->shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shut Down…")); - } - } -} - -static void -update_logout_callback (GSettings * settings, const gchar * key, gpointer data) { - DbusmenuMenuitem * mi = (DbusmenuMenuitem*) data; - - if(g_strcmp0 (key, LOGOUT_KEY) == 0) { - dbusmenu_menuitem_property_set_bool(mi, DBUSMENU_MENUITEM_PROP_VISIBLE, !g_settings_get_boolean(settings, key)); - } -} - -static void -update_restart_callback (GSettings * settings, const gchar * key, gpointer data) { - DbusmenuMenuitem * mi = (DbusmenuMenuitem*) data; - - if(g_strcmp0 (key, RESTART_KEY) == 0) { - dbusmenu_menuitem_property_set_bool(mi, DBUSMENU_MENUITEM_PROP_VISIBLE, !g_settings_get_boolean(settings, key)); - } -} - -static void -update_shutdown_callback (GSettings * settings, const gchar * key, gpointer data) { - DbusmenuMenuitem * mi = (DbusmenuMenuitem*) data; - - if(g_strcmp0 (key, SHUTDOWN_KEY) == 0) { - dbusmenu_menuitem_property_set_bool(mi, DBUSMENU_MENUITEM_PROP_VISIBLE, !g_settings_get_boolean(settings, key)); - } -} - -void -update_menu_entries(RestartShutdownLogoutMenuItems * restart_shutdown_logout_mi) { - /* If we don't have a client, build one. */ - gboolean settings_built = build_settings(); - g_return_if_fail(settings_built); - - if (confirmation_notify != 0) { - g_signal_handler_disconnect (settings, confirmation_notify); - confirmation_notify = 0; - } - - if (logout_notify != 0) { - g_signal_handler_disconnect (settings, logout_notify); - logout_notify = 0; - } - - if (restart_notify != 0) { - g_signal_handler_disconnect (settings, restart_notify); - restart_notify = 0; - } - - if (shutdown_notify != 0) { - g_signal_handler_disconnect (settings, shutdown_notify); - shutdown_notify = 0; - } - - confirmation_notify = g_signal_connect (settings, "changed::" SUPPRESS_KEY, - G_CALLBACK(update_menu_entries_callback), restart_shutdown_logout_mi); - logout_notify = g_signal_connect (settings, "changed::" LOGOUT_KEY, - G_CALLBACK(update_logout_callback), restart_shutdown_logout_mi->logout_mi); - restart_notify = g_signal_connect (settings, "changed::" RESTART_KEY, - G_CALLBACK(update_restart_callback), restart_shutdown_logout_mi->restart_mi); - shutdown_notify = g_signal_connect (settings, "changed::" SHUTDOWN_KEY, - G_CALLBACK(update_shutdown_callback), restart_shutdown_logout_mi->shutdown_mi); - - return; -} - diff --git a/src/settings-helper.h b/src/settings-helper.h deleted file mode 100644 index ea0c99f..0000000 --- a/src/settings-helper.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -A small wrapper utility for connecting to GSettings. - -Copyright 2009 Canonical Ltd. - -Authors: - Christoph Korn <c_korn@gmx.de> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - - -#ifndef __GCONF_HELPER_H__ -#define __GCONF_HELPER_H__ - -#include <glib/gi18n.h> - -#include <dbus/dbus-glib.h> -#include <dbus/dbus-glib-bindings.h> - -#include <libdbusmenu-glib/server.h> -#include <libdbusmenu-glib/menuitem.h> - -#define SESSION_SCHEMA "com.canonical.indicator.session" -#define SUPPRESS_KEY "suppress-logout-restart-shutdown" -#define LOGOUT_KEY "suppress-logout-menuitem" -#define RESTART_KEY "suppress-restart-menuitem" -#define SHUTDOWN_KEY "suppress-shutdown-menuitem" -#define SHOW_USER_MENU "user-show-menu" -#define USER_USERNAME_IN_SWITCH_ITEM "use-username-in-switch-item" - -#define LOCKDOWN_SCHEMA "org.gnome.desktop.lockdown" -#define LOCKDOWN_KEY_USER "disable-user-switching" -#define LOCKDOWN_KEY_SCREENSAVER "disable-lock-screen" -#define KEYBINDING_SCHEMA "org.gnome.settings-daemon.plugins.media-keys" -#define KEY_LOCK_SCREEN "screensaver" - -typedef struct _RestartShutdownLogoutMenuItems -{ - DbusmenuMenuitem * logout_mi; - DbusmenuMenuitem * restart_mi; - DbusmenuMenuitem * shutdown_mi; -} -RestartShutdownLogoutMenuItems; - -void update_menu_entries(RestartShutdownLogoutMenuItems*); -gboolean supress_confirmations (void); -gboolean show_logout (void); -gboolean show_restart (void); -gboolean show_shutdown (void); -gboolean should_show_user_menu (void); - - -#endif /* __GCONF_HELPER__ */ diff --git a/src/dbus-shared-names.h b/src/shared-names.h index 5f35903..dcda182 100644 --- a/src/dbus-shared-names.h +++ b/src/shared-names.h @@ -23,33 +23,12 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef __DBUS_SHARED_NAMES_H__ #define __DBUS_SHARED_NAMES_H__ -typedef enum { - UP_TO_DATE, - CHECKING_FOR_UPDATES, - UPDATES_AVAILABLE, - UPGRADE_IN_PROGRESS, - FINISHED, - RESTART_NEEDED, - DONT_KNOW -}AptState; - -typedef enum { - SIMULATION, - REAL -}TransactionType; - -#define INDICATOR_USERS_DBUS_NAME INDICATOR_SESSION_DBUS_NAME -#define INDICATOR_USERS_DBUS_OBJECT "/com/canonical/indicator/users/menu" -#define INDICATOR_USERS_SERVICE_DBUS_OBJECT "/org/gnome/DisplayManager/UserManager" -#define INDICATOR_USERS_SERVICE_DBUS_INTERFACE "org.gnome.DisplayManager.UserManager" - #define INDICATOR_SESSION_DBUS_NAME "com.canonical.indicator.session" #define INDICATOR_SESSION_DBUS_OBJECT "/com/canonical/indicator/session/menu" #define INDICATOR_SESSION_DBUS_VERSION 0 #define INDICATOR_SESSION_SERVICE_DBUS_OBJECT "/com/canonical/indicator/session/service" #define INDICATOR_SESSION_SERVICE_DBUS_IFACE "com.canonical.indicator.session.service" - #define USER_ITEM_TYPE "x-canonical-user-item" #define USER_ITEM_PROP_NAME "user-item-name" #define USER_ITEM_PROP_LOGGED_IN "user-item-logged-in" @@ -66,4 +45,13 @@ typedef enum { #define GREETER_ICON_DEFAULT "system-shutdown-panel" #define GREETER_ICON_RESTART "system-shutdown-panel-restart" +/* the session indicator's settings */ +#define SESSION_SCHEMA "com.canonical.indicator.session" +#define SUPPRESS_KEY "suppress-logout-restart-shutdown" +#define LOGOUT_KEY "suppress-logout-menuitem" +#define RESTART_KEY "suppress-restart-menuitem" +#define SHUTDOWN_KEY "suppress-shutdown-menuitem" +#define SHOW_USER_MENU "user-show-menu" + + #endif /* __DBUS_SHARED_NAMES_H__ */ diff --git a/src/udev-mgr.c b/src/udev-mgr.c deleted file mode 100644 index 5f197d6..0000000 --- a/src/udev-mgr.c +++ /dev/null @@ -1,546 +0,0 @@ -/* -Copyright 2011 Canonical Ltd. - -Authors: - Conor Curran <conor.curran@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <gudev/gudev.h> - -#include <glib/gi18n.h> - -#include "udev-mgr.h" -#include "sane-rules.h" - -static void udevice_mgr_device_list_iterator (gpointer data, - gpointer userdata); -static void udev_mgr_uevent_cb (GUdevClient *client, - gchar *action, - GUdevDevice *device, - gpointer user_data); -static void udev_mgr_update_menuitems (UdevMgr* self); -static void udev_mgr_check_if_usb_device_is_supported (UdevMgr* self, - GUdevDevice *device, - UdevMgrDeviceAction action); -static void udev_mgr_handle_webcam (UdevMgr* self, - GUdevDevice* device, - UdevMgrDeviceAction action); -static void udev_mgr_handle_scsi_device (UdevMgr* self, - GUdevDevice* device, - UdevMgrDeviceAction action); - -static void udev_mgr_cleanup_lists(gpointer data, gpointer self); -static void udev_mgr_cleanup_entries(gpointer data, gpointer self); - - -static void debug_device (UdevMgr* self, - GUdevDevice* device, - UdevMgrDeviceAction action); - -static gchar* format_device_name (UdevMgr* self, - const gchar* brand, - const gchar* generic, - const gchar* branded) G_GNUC_WARN_UNUSED_RESULT; -struct _UdevMgr -{ - GObject parent_instance; - DbusmenuMenuitem* scanner_item; - DbusmenuMenuitem* webcam_item; - GUdevClient* client; - GHashTable* supported_usb_scanners; - GHashTable* supported_scsi_scanners; - GHashTable* scanners_present; - GHashTable* webcams_present; -}; - -const char *subsystems[3] = {"usb", "scsi", "video4linux"}; -const gchar* usb_subsystem = "usb"; -const gchar* scsi_subsystem = "scsi"; -const gchar* video4linux_subsystem = "video4linux"; - - -G_DEFINE_TYPE (UdevMgr, udev_mgr, G_TYPE_OBJECT); - -static void -udev_mgr_init (UdevMgr* self) -{ - self->client = NULL; - self->supported_usb_scanners = NULL; - self->scanners_present = NULL; - self->webcams_present = NULL; - self->client = g_udev_client_new (subsystems); - self->supported_usb_scanners = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - (GDestroyNotify)udev_mgr_cleanup_lists); - self->supported_scsi_scanners = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - (GDestroyNotify)udev_mgr_cleanup_lists); - self->scanners_present = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - g_free); - self->webcams_present = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - g_free); - - // load into memory all supported scanners ... - populate_usb_scanners (self->supported_usb_scanners); - populate_scsi_scanners (self->supported_scsi_scanners); - g_signal_connect (G_OBJECT (self->client), - "uevent", - G_CALLBACK (udev_mgr_uevent_cb), - self); -} - -static void -udev_mgr_cleanup_lists(gpointer data, gpointer self) -{ - GList* scanners = (GList*)data; - g_list_foreach (scanners, udev_mgr_cleanup_entries, NULL); - g_list_free(scanners); -} - -static void -udev_mgr_cleanup_entries(gpointer data, gpointer self) -{ - gchar* entry = (gchar*)data; - g_free(entry); -} - -static void -udev_mgr_finalize (GObject *object) -{ - UdevMgr* self = UDEV_MGR (object); - g_hash_table_destroy (self->supported_scsi_scanners); - g_hash_table_destroy (self->supported_usb_scanners); - g_hash_table_destroy (self->scanners_present); - g_hash_table_destroy (self->webcams_present); - G_OBJECT_CLASS (udev_mgr_parent_class)->finalize (object); -} - -static void -udev_mgr_class_init (UdevMgrClass *klass) -{ - GObjectClass* object_class = G_OBJECT_CLASS (klass); - object_class->finalize = udev_mgr_finalize; -} - -static void -udevice_mgr_device_list_iterator (gpointer data, gpointer userdata) -{ - g_return_if_fail (G_UDEV_IS_DEVICE (data)); - g_return_if_fail (UDEV_IS_MGR (userdata)); - - UdevMgr* self = UDEV_MGR (userdata); - - GUdevDevice* device = G_UDEV_DEVICE (data); - - const gchar* subsystem = NULL; - subsystem = g_udev_device_get_subsystem (device); - - if (g_strcmp0 (subsystem, "usb") == 0){ - udev_mgr_check_if_usb_device_is_supported (self, device, ADD); - } - else if (g_strcmp0 (subsystem, "video4linux") == 0){ - udev_mgr_handle_webcam (self, device, ADD); - } - else if (g_strcmp0 (subsystem, "scsi") == 0){ - udev_mgr_handle_scsi_device (self, device, ADD); - } - - g_object_unref (device); -} - - -static void udev_mgr_update_menuitems (UdevMgr* self) -{ - dbusmenu_menuitem_property_set_bool (self->scanner_item, - DBUSMENU_MENUITEM_PROP_VISIBLE, - g_hash_table_size (self->scanners_present) > 0); - - dbusmenu_menuitem_property_set_bool (self->webcam_item, - DBUSMENU_MENUITEM_PROP_VISIBLE, - g_hash_table_size (self->webcams_present) > 0); - -} - -static void udev_mgr_uevent_cb (GUdevClient *client, - gchar *action, - GUdevDevice *device, - gpointer user_data) -{ - g_return_if_fail (UDEV_IS_MGR (user_data)); - UdevMgr* self = UDEV_MGR (user_data); - g_return_if_fail (device != NULL); - - g_debug ("just received a UEVENT with an action : %s", action); - - UdevMgrDeviceAction udev_mgr_action = ADD; - - if (g_strcmp0 (action, "remove") == 0){ - udev_mgr_action = REMOVE; - } - - const gchar* subsystem = NULL; - subsystem = g_udev_device_get_subsystem (device); - - if (g_strcmp0 (subsystem, "usb") == 0){ - udev_mgr_check_if_usb_device_is_supported (self, - device, - udev_mgr_action); - } - else if (g_strcmp0 (subsystem, "video4linux") == 0){ - udev_mgr_handle_webcam (self, device, udev_mgr_action); - } - else if (g_strcmp0 (subsystem, "scsi") == 0){ - udev_mgr_handle_scsi_device (self, device, udev_mgr_action); - } -} - - -static void -udev_mgr_handle_webcam (UdevMgr* self, - GUdevDevice* device, - UdevMgrDeviceAction action) -{ - if (FALSE) - debug_device (self, device, action); - - const gchar* vendor; - const gchar* product; - - vendor = g_udev_device_get_property (device, "ID_VENDOR_ID"); - product = g_udev_device_get_property (device, "ID_MODEL_ID"); - - if (!vendor || !product) { - return; - } - - if (action == REMOVE){ - if (g_hash_table_lookup (self->webcams_present, product) == NULL){ - g_warning ("Got a remove event on a webcam device but we don't have that device in our webcam cache"); - return; - } - g_hash_table_remove (self->webcams_present, - product); - dbusmenu_menuitem_property_set (self->webcam_item, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Webcam")); - } - else { - if (g_hash_table_lookup (self->webcams_present, product) != NULL){ - g_warning ("Got an ADD event on a webcam device but we already have that device in our webcam cache"); - return; - } - - const gchar* manufacturer = NULL; - manufacturer = g_udev_device_get_property (device, "ID_VENDOR"); - - if (manufacturer != NULL){ - gchar * label = format_device_name(self, manufacturer, _("Webcam"), _("%s Webcam")); - dbusmenu_menuitem_property_set (self->webcam_item, - DBUSMENU_MENUITEM_PROP_LABEL, - label); - g_free(label); - } - - g_hash_table_insert (self->webcams_present, - g_strdup (product), - g_strdup (vendor)); - } - udev_mgr_update_menuitems (self); -} - -static void -debug_device (UdevMgr* self, - GUdevDevice* device, - UdevMgrDeviceAction action) -{ - const gchar* vendor; - const gchar* product; - const gchar* number; - const gchar* name; - const gchar* manufacturer; - - vendor = g_udev_device_get_property (device, "ID_VENDOR_ID"); - manufacturer = g_udev_device_get_property (device, "ID_VENDOR"); - product = g_udev_device_get_property (device, "ID_MODEL_ID"); - number = g_udev_device_get_number (device); - name = g_udev_device_get_name (device); - - g_debug ("%s device vendor id %s , product id of %s , number of %s and name of %s", - g_strdup(manufacturer), - g_strdup(vendor), - g_strdup(product), - g_strdup(number), - g_strdup(name)); - - /*const gchar *const *list; - const gchar *const *iter; - char propstr[500]; - guint32 namelen = 0, i; - - list = g_udev_device_get_property_keys(device); - - for (iter = list; iter && *iter; iter++) { - if (strlen(*iter) > namelen) - namelen = strlen(*iter); - } - namelen++; - - for (iter = list; iter && *iter; iter++) { - strcpy(propstr, *iter); - strcat(propstr, ":"); - for (i = 0; i < namelen - strlen(*iter); i++) - strcat(propstr, " "); - strcat(propstr, g_udev_device_get_property(device, *iter)); - g_debug("%s", propstr); - }*/ -} -// TODO SCSI is not dynamic right ? -// i.e. just need to handle startup scan. -static void udev_mgr_handle_scsi_device (UdevMgr* self, - GUdevDevice* device, - UdevMgrDeviceAction action) -{ - const gchar* type = NULL; - type = g_udev_device_get_property (device, "TYPE"); - - if (!type) { - return; - } - - // apparently anything thats type 6 and SCSI is a Scanner - if (g_strcmp0 (type, "6") == 0 && action == ADD){ - - const gchar* manufacturer = NULL; - manufacturer = g_udev_device_get_property (device, "ID_VENDOR"); - - if (manufacturer != NULL){ - gchar * label = format_device_name(self, manufacturer, _("Scanner"), _("%s Scanner")); - dbusmenu_menuitem_property_set (self->scanner_item, - DBUSMENU_MENUITEM_PROP_LABEL, - label); - g_free(label); - } - - gchar* random_scanner_name = g_strdup_printf("%p--scanner", self); - g_hash_table_insert (self->scanners_present, - random_scanner_name, - g_strdup("Scanner")); - udev_mgr_update_menuitems (self); - return; - } - - // We only care about type 3 for the special cases below - if (g_strcmp0 (type, "3") != 0){ - return; - } - - const gchar* vendor = NULL; - vendor = g_udev_device_get_property (device, "VENDOR"); - - if (vendor == NULL) - return; - - GList* vendor_list = NULL; - vendor_list = g_hash_table_lookup (self->supported_scsi_scanners, - (gpointer)vendor); - if (vendor_list == NULL) - return; - - const gchar* model_id = NULL; - model_id = g_udev_device_get_property (device, "MODEL"); - - if (model_id == NULL) - return; - - GList* model_entry = NULL; - model_entry = g_list_find_custom (vendor_list, - model_id, - (GCompareFunc)g_strcmp0); - - if (model_entry != NULL){ - if (action == REMOVE){ - if (g_hash_table_lookup (self->scanners_present, g_strdup(vendor)) == NULL){ - g_warning ("Got an REMOVE event on a scanner device but we dont have that device in our scanners cache"); - } - else{ - g_hash_table_remove (self->scanners_present, vendor); - dbusmenu_menuitem_property_set (self->scanner_item, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Scanner")); - - } - } - else{ - if (g_hash_table_lookup (self->scanners_present, g_strdup(vendor)) != NULL){ - g_warning ("Got an ADD event on a scanner device but we already have that device in our scanners cache"); - } - else{ - const gchar* manufacturer = NULL; - manufacturer = g_udev_device_get_property (device, "ID_VENDOR"); - - if (manufacturer != NULL){ - gchar * label = format_device_name(self, manufacturer, _("Scanner"), _("%s Scanner")); - dbusmenu_menuitem_property_set (self->scanner_item, - DBUSMENU_MENUITEM_PROP_LABEL, - label); - g_free(label); - } - g_hash_table_insert (self->scanners_present, - g_strdup(vendor), - g_strdup(model_id)); - } - } - udev_mgr_update_menuitems (self); - } -} - -static void -udev_mgr_check_if_usb_device_is_supported (UdevMgr* self, - GUdevDevice *device, - UdevMgrDeviceAction action) -{ - const gchar* vendor = NULL; - //debug_device (self, device, action); - - vendor = g_udev_device_get_property (device, "ID_VENDOR_ID"); - - if (vendor == NULL) - return; - - //g_debug ("vendor = %s", vendor); - - GList* vendor_list = NULL; - vendor_list = g_hash_table_lookup (self->supported_usb_scanners, - (gpointer)vendor); - if (vendor_list == NULL) - return; - - const gchar* model_id = NULL; - model_id = g_udev_device_get_property (device, "ID_MODEL_ID"); - - if (model_id == NULL) - return; - - GList* model_entry = NULL; - model_entry = g_list_find_custom(vendor_list, model_id, (GCompareFunc)g_strcmp0); - - if (model_entry != NULL){ - if (action == REMOVE){ - if (g_hash_table_lookup (self->scanners_present, g_strdup(vendor)) == NULL){ - g_warning ("Got an REMOVE event on a scanner device but we dont have that device in our scanners cache"); - } - else{ - g_hash_table_remove (self->scanners_present, vendor); - dbusmenu_menuitem_property_set (self->scanner_item, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Scanner")); - } - } - else{ - if (g_hash_table_lookup (self->scanners_present, g_strdup(vendor)) != NULL){ - g_warning ("Got an ADD event on a scanner device but we already have that device in our scanners cache"); - } - else{ - const gchar* manufacturer = NULL; - - manufacturer = g_udev_device_get_property (device, "ID_VENDOR"); - if (manufacturer != NULL){ - gchar * label = format_device_name(self, manufacturer, _("Scanner"), _("%s Scanner")); - dbusmenu_menuitem_property_set (self->scanner_item, - DBUSMENU_MENUITEM_PROP_LABEL, - label); - g_free(label); - } - - g_hash_table_insert (self->scanners_present, - g_strdup(vendor), - g_strdup(model_id)); - } - } - udev_mgr_update_menuitems (self); - } -} - -UdevMgr* udev_mgr_new (DbusmenuMenuitem* scanner, - DbusmenuMenuitem* webcam) -{ - UdevMgr* mgr = g_object_new (UDEV_TYPE_MGR, NULL); - mgr->scanner_item = scanner; - mgr->webcam_item = webcam; - - // Check for USB devices - GList* usb_devices_available = NULL; - usb_devices_available = g_udev_client_query_by_subsystem (mgr->client, - usb_subsystem); - if (usb_devices_available != NULL){ - g_list_foreach (usb_devices_available, - udevice_mgr_device_list_iterator, - mgr); - - g_list_free (usb_devices_available); - } - // Check for webcams - GList* video_devices_available = NULL; - video_devices_available = g_udev_client_query_by_subsystem (mgr->client, - video4linux_subsystem); - if (video_devices_available != NULL){ - g_list_foreach (video_devices_available, - udevice_mgr_device_list_iterator, - mgr); - - g_list_free (video_devices_available); - } - // Check for SCSI devices - GList* scsi_devices_available = NULL; - scsi_devices_available = g_udev_client_query_by_subsystem (mgr->client, - scsi_subsystem); - if (scsi_devices_available != NULL){ - g_list_foreach (scsi_devices_available, - udevice_mgr_device_list_iterator, - mgr); - g_list_free (scsi_devices_available); - } - return mgr; -} - -static gchar* format_device_name (UdevMgr* self, - const gchar* brand, - const gchar* generic, - const gchar* branded) -{ - // We don't want to accommodate long names - if (strlen(brand) > 7) - return g_strdup(generic); - - gint i = 0; - - // If it contains something other than an alphabetic entry ignore it. - for(i = 0; i < sizeof(brand); i++){ - if ( !g_ascii_isalpha (brand[i]) ) - return g_strdup(generic); - } - - gchar* lowered = g_ascii_strdown (brand, -1); - lowered[0] = g_ascii_toupper (lowered[0]); - gchar* label = g_strdup_printf(branded, lowered); - g_free (lowered); - return label; -} diff --git a/src/udev-mgr.h b/src/udev-mgr.h deleted file mode 100644 index 2e57cff..0000000 --- a/src/udev-mgr.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2011 Canonical Ltd. - -Authors: - Conor Curran <conor.curran@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef _UDEV_MGR_H_ -#define _UDEV_MGR_H_ - -#include <glib-object.h> -#include <libdbusmenu-glib/client.h> - -#include <gtk/gtk.h> -#include <libdbusmenu-gtk/menuitem.h> - -G_BEGIN_DECLS - -#define UDEV_TYPE_MGR (udev_mgr_get_type ()) -#define UDEV_MGR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UDEV_TYPE_MGR, UdevMgr)) -#define UDEV_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UDEV_TYPE_MGR, UdevMgrClass)) -#define UDEV_IS_MGR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UDEV_TYPE_MGR)) -#define UDEV_IS_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UDEV_TYPE_MGR)) -#define UDEV_MGR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UDEV_TYPE_MGR, UdevMgrClass)) - -typedef struct _UdevMgrClass UdevMgrClass; -typedef struct _UdevMgr UdevMgr; - -struct _UdevMgrClass -{ - GObjectClass parent_class; -}; - - -GType udev_mgr_get_type (void) G_GNUC_CONST; -UdevMgr* udev_mgr_new (DbusmenuMenuitem* scanner_item, - DbusmenuMenuitem* webcam_item); - -typedef enum { - ADD, - REMOVE -}UdevMgrDeviceAction; - -G_END_DECLS - -#endif /* _UDEV_MGR_H_ */ diff --git a/src/upower.xml b/src/upower.xml index a4066ff..18d5fbd 100644 --- a/src/upower.xml +++ b/src/upower.xml @@ -86,7 +86,7 @@ method return sender=:1.386 -> dest=:1.451 reply_serial=2 <!-- ************************************************************ --> <signal name="DeviceChanged"> - <arg name="device" type="o"> + <arg name="device" type="s"> <doc:doc><doc:summary>Object path of device that was changed.</doc:summary></doc:doc> </arg> diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c deleted file mode 100644 index 3f4bdc4..0000000 --- a/src/user-menu-mgr.c +++ /dev/null @@ -1,428 +0,0 @@ -/* -Copyright 2011 Canonical Ltd. - -Authors: - Conor Curran <conor.curran@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include <libdbusmenu-glib/client.h> -#include "user-menu-mgr.h" -#include "settings-helper.h" -#include "dbus-shared-names.h" -#include "dbusmenu-shared.h" -#include "lock-helper.h" -#include "users-service-dbus.h" - -static GSettings* settings = NULL; -static DbusmenuMenuitem *switch_menuitem = NULL; - -struct _UserMenuMgr -{ - GObject parent_instance; - UsersServiceDbus* users_dbus_interface; - DbusmenuMenuitem* root_item; - gint user_count; - SessionDbus* session_dbus_interface; -}; - -static void activate_new_session (DbusmenuMenuitem * mi, - guint timestamp, - gpointer user_data); -static void activate_user_session (DbusmenuMenuitem *mi, - guint timestamp, - gpointer user_data); -static void activate_user_accounts (DbusmenuMenuitem *mi, - guint timestamp, - gpointer user_data); -static gint compare_users_by_username (const gchar *a, - const gchar *b); -static void activate_user_accounts (DbusmenuMenuitem *mi, - guint timestamp, - gpointer user_data); -static void user_menu_mgr_rebuild_items (UserMenuMgr *self, - gboolean greeter_mode); -static gboolean check_new_session (); -static void user_change (UsersServiceDbus *service, - const gchar *user_id, - gpointer user_data); -static void ensure_settings_client (); -static gboolean is_this_guest_session (void); -static void activate_guest_session (DbusmenuMenuitem * mi, - guint timestamp, - gpointer user_data); - - -G_DEFINE_TYPE (UserMenuMgr, user_menu_mgr, G_TYPE_OBJECT); - - -static void -user_menu_mgr_init (UserMenuMgr *self) -{ - self->users_dbus_interface = g_object_new (USERS_SERVICE_DBUS_TYPE, NULL); - self->root_item = dbusmenu_menuitem_new (); - g_signal_connect (G_OBJECT (self->users_dbus_interface), - "user-added", - G_CALLBACK (user_change), - self); - g_signal_connect (G_OBJECT (self->users_dbus_interface), - "user-deleted", - G_CALLBACK (user_change), - self); -} - -static void -user_menu_mgr_finalize (GObject *object) -{ - /* TODO: Add deinitalization code here */ - G_OBJECT_CLASS (user_menu_mgr_parent_class)->finalize (object); -} - -static void -user_menu_mgr_class_init (UserMenuMgrClass *klass) -{ - GObjectClass* object_class = G_OBJECT_CLASS (klass); - object_class->finalize = user_menu_mgr_finalize; -} - -/* Builds up the menu for us */ -static void -user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode) -{ - DbusmenuMenuitem *mi = NULL; - DbusmenuMenuitem *guest_mi = NULL; - GList *u; - UserData *user; - gboolean can_activate; - GList *children; - - /* Make sure we have a valid GConf client, and build one - if needed */ - ensure_settings_client (); - - /* Check to see which menu items we're allowed to have */ - can_activate = users_service_dbus_can_activate_session (self->users_dbus_interface) && - !g_settings_get_boolean (settings, LOCKDOWN_KEY_USER); - - /* Remove the old menu items if that makes sense */ - children = dbusmenu_menuitem_take_children (self->root_item); - g_list_foreach (children, (GFunc)g_object_unref, NULL); - g_list_free (children); - - /* Set to NULL just incase we don't end up building one */ - users_service_dbus_set_guest_item(self->users_dbus_interface, NULL); - - /* Build all of the user switching items */ - if (can_activate == TRUE) - { - - gboolean guest_enabled = users_service_dbus_guest_session_enabled (self->users_dbus_interface); - GList * users = NULL; - users = users_service_dbus_get_user_list (self->users_dbus_interface); - self->user_count = g_list_length(users); - - gboolean gsettings_user_menu_is_visible = should_show_user_menu(); - - if (gsettings_user_menu_is_visible == FALSE || greeter_mode == TRUE){ - session_dbus_set_user_menu_visibility (self->session_dbus_interface, - FALSE); - } - else{ - // This needs to be updated once the ability to query guest session support is available - session_dbus_set_user_menu_visibility (self->session_dbus_interface, - guest_enabled || self->user_count > 1); - } - - // TODO we should really return here if the menu is not going to be shown. - - if (check_new_session ()){ - switch_menuitem = dbusmenu_menuitem_new (); - dbusmenu_menuitem_property_set (switch_menuitem, - DBUSMENU_MENUITEM_PROP_TYPE, - MENU_SWITCH_TYPE); - dbusmenu_menuitem_property_set (switch_menuitem, - MENU_SWITCH_USER, - g_get_user_name()); - dbusmenu_menuitem_child_append (self->root_item, switch_menuitem); - g_signal_connect (G_OBJECT (switch_menuitem), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK (activate_new_session), - self->users_dbus_interface); - } - - if ( !is_this_guest_session () && guest_enabled) - { - guest_mi = dbusmenu_menuitem_new (); - dbusmenu_menuitem_property_set (guest_mi, - DBUSMENU_MENUITEM_PROP_TYPE, - USER_ITEM_TYPE); - dbusmenu_menuitem_property_set (guest_mi, - USER_ITEM_PROP_NAME, - _("Guest Session")); - dbusmenu_menuitem_property_set_bool (guest_mi, - USER_ITEM_PROP_LOGGED_IN, - FALSE); - dbusmenu_menuitem_child_append (self->root_item, guest_mi); - g_signal_connect (G_OBJECT (guest_mi), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK (activate_guest_session), - self); - users_service_dbus_set_guest_item (self->users_dbus_interface, - guest_mi); - } - else{ - session_dbus_set_users_real_name (self->session_dbus_interface, - _("Guest")); - } - - - - if (self->user_count > MINIMUM_USERS) { - users = g_list_sort (users, (GCompareFunc)compare_users_by_username); - } - - for (u = users; u != NULL; u = g_list_next (u)) { - user = u->data; - g_debug ("%s: %s", user->user_name, user->real_name); - user->service = self->users_dbus_interface; - gboolean current_user = g_strcmp0 (user->user_name, g_get_user_name()) == 0; - if (current_user == TRUE){ - g_debug ("about to set the users real name to %s for user %s", - user->real_name, user->user_name); - session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name); - } - - if (self->user_count > MINIMUM_USERS) { - mi = dbusmenu_menuitem_new (); - dbusmenu_menuitem_property_set (mi, - DBUSMENU_MENUITEM_PROP_TYPE, - USER_ITEM_TYPE); - if (user->real_name_conflict) { - gchar * conflictedname = g_strdup_printf("%s (%s)", user->real_name, user->user_name); - dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, conflictedname); - g_free(conflictedname); - } else { - //g_debug ("%p: %s", user, user->real_name); - dbusmenu_menuitem_property_set (mi, - USER_ITEM_PROP_NAME, - user->real_name); - } - dbusmenu_menuitem_property_set_bool (mi, - USER_ITEM_PROP_LOGGED_IN, - user->sessions != NULL); - if (user->icon_file != NULL && user->icon_file[0] != '\0') { - g_debug ("user %s has this icon : %s", - user->user_name, - user->icon_file); - dbusmenu_menuitem_property_set (mi, - USER_ITEM_PROP_ICON, - user->icon_file); - } else { - dbusmenu_menuitem_property_set (mi, - USER_ITEM_PROP_ICON, - USER_ITEM_ICON_DEFAULT); - } - - - /*g_debug ("user name = %s and g user name = %s", - user->user_name, - g_get_user_name());*/ - - dbusmenu_menuitem_property_set_bool (mi, - USER_ITEM_PROP_IS_CURRENT_USER, - current_user); - dbusmenu_menuitem_child_append (self->root_item, mi); - g_signal_connect (G_OBJECT (mi), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK (activate_user_session), - user); - user->menuitem = mi; - } - } - g_list_free(users); - } - // Add the user accounts and separator - DbusmenuMenuitem * separator1 = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (separator1, - DBUSMENU_MENUITEM_PROP_TYPE, - DBUSMENU_CLIENT_TYPES_SEPARATOR); - dbusmenu_menuitem_child_append (self->root_item, separator1); - - DbusmenuMenuitem * user_accounts_item = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set (user_accounts_item, - DBUSMENU_MENUITEM_PROP_TYPE, - DBUSMENU_CLIENT_TYPES_DEFAULT); - dbusmenu_menuitem_property_set (user_accounts_item, - DBUSMENU_MENUITEM_PROP_LABEL, - _("User Accounts…")); - - g_signal_connect (G_OBJECT (user_accounts_item), - DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK (activate_user_accounts), - NULL); - - dbusmenu_menuitem_child_append (self->root_item, user_accounts_item); - - -} - -/* Checks to see if we can create sessions */ -// TODO what is this ? -static gboolean -check_new_session () -{ - return TRUE; -} - -/* Check to see if the lockdown key is protecting from - locking the screen. If not, lock it. */ -static void -lock_if_possible (void) { - ensure_settings_client (); - - if (!g_settings_get_boolean (settings, LOCKDOWN_KEY_SCREENSAVER)) { - lock_screen(NULL, 0, NULL); - } - - return; -} - - -/* Starts a new generic session */ -static void -activate_new_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data) -{ - lock_if_possible(); - - users_service_dbus_show_greeter (USERS_SERVICE_DBUS(user_data)); - - return; -} - -/* Activates a session for a particular user. */ -static void -activate_user_session (DbusmenuMenuitem *mi, guint timestamp, gpointer user_data) -{ - UserData *user = (UserData *)user_data; - UsersServiceDbus *service = user->service; - - lock_if_possible(); - - users_service_dbus_activate_user_session (service, user); -} - -/* Comparison function to look into the UserData struct - to compare by using the username value */ -static gint -compare_users_by_username (const gchar *a, - const gchar *b) -{ - UserData *user1 = (UserData *)a; - UserData *user2 = (UserData *)b; - - gint retval = g_strcmp0 (user1->real_name, user2->real_name); - - /* If they're the same, they're both in conflict. */ - if (retval == 0) { - user1->real_name_conflict = TRUE; - user2->real_name_conflict = TRUE; - } - - return retval; -} - -static void -activate_user_accounts (DbusmenuMenuitem *mi, - guint timestamp, - gpointer user_data) -{ - GError * error = NULL; - if (!g_spawn_command_line_async("gnome-control-center user-accounts", &error)) - { - g_warning("Unable to show control centre: %s", error->message); - g_error_free(error); - } -} - -/* Signal called when a user is added. It updates the count and - rebuilds the menu */ -static void -user_change (UsersServiceDbus *service, - const gchar *user_id, - gpointer user_data) -{ - g_return_if_fail (USER_IS_MENU_MGR (user_data)); - UserMenuMgr* user_mgr = USER_MENU_MGR(user_data); - user_menu_mgr_rebuild_items (user_mgr, FALSE); - return; -} - -/* Ensures that we have a GConf client and if we build one - set up the signal handler. */ -static void -ensure_settings_client () -{ - if(!settings) { - settings = g_settings_new (LOCKDOWN_SCHEMA); - } - return; -} - -DbusmenuMenuitem* -user_mgr_get_root_item (UserMenuMgr* self) -{ - return self->root_item; -} - -/* Checks to see if we should show the guest suession item */ -static gboolean -is_this_guest_session (void) -{ - if (geteuid() < 500) { - /* System users shouldn't have guest account shown. Mostly - this would be the case of the guest user itself. */ - return TRUE; - } - - return FALSE; -} - -/* Called when someone clicks on the guest session item. */ -static void -activate_guest_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data) -{ - g_return_if_fail (USER_IS_MENU_MGR (user_data)); - UserMenuMgr* user_mgr = USER_MENU_MGR(user_data); - UsersServiceDbus *service = user_mgr->users_dbus_interface; - - lock_if_possible(); - - if (users_service_dbus_activate_guest_session(service)) { - return; - } -} - - -/* - * Clean Entry Point - */ -UserMenuMgr* user_menu_mgr_new (SessionDbus* session_dbus, gboolean greeter_mode) -{ - UserMenuMgr* user_mgr = g_object_new (USER_TYPE_MENU_MGR, NULL); - user_mgr->session_dbus_interface = session_dbus; - user_menu_mgr_rebuild_items (user_mgr, greeter_mode); - return user_mgr; -} - - diff --git a/src/user-menu-mgr.h b/src/user-menu-mgr.h deleted file mode 100644 index 40f7b18..0000000 --- a/src/user-menu-mgr.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2011 Canonical Ltd. - -Authors: - Conor Curran <conor.curran@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published -by the Free Software Foundation. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR -PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - - -#ifndef _USER_MENU_MGR_H_ -#define _USER_MENU_MGR_H_ - - -#include <glib-object.h> -#include <libdbusmenu-gtk/menuitem.h> - -#include "session-dbus.h" - -G_BEGIN_DECLS - -#define USER_TYPE_MENU_MGR (user_menu_mgr_get_type ()) -#define USER_MENU_MGR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), USER_TYPE_MENU_MGR, UserMenuMgr)) -#define USER_MENU_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), USER_TYPE_MENU_MGR, UserMenuMgrClass)) -#define USER_IS_MENU_MGR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), USER_TYPE_MENU_MGR)) -#define USER_IS_MENU_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), USER_TYPE_MENU_MGR)) -#define USER_MENU_MGR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), USER_TYPE_MENU_MGR, UserMenuMgrClass)) - -typedef struct _UserMenuMgrClass UserMenuMgrClass; -typedef struct _UserMenuMgr UserMenuMgr; - -struct _UserMenuMgrClass -{ - GObjectClass parent_class; -}; - -GType user_menu_mgr_get_type (void) G_GNUC_CONST; -UserMenuMgr* user_menu_mgr_new (SessionDbus* session_dbus, - gboolean greeter_mode); - -DbusmenuMenuitem* user_mgr_get_root_item (UserMenuMgr* self); -G_END_DECLS - -#endif /* _USER_MENU_MGR_H_ */ diff --git a/src/user-widget.c b/src/user-widget.c index 33b9e40..b0d2dd4 100644 --- a/src/user-widget.c +++ b/src/user-widget.c @@ -4,31 +4,31 @@ Copyright 2011 Canonical Ltd. Authors: Conor Curran <conor.curran@canonical.com> Mirco Müller <mirco.mueller@canonical.com> - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License version 3, as published + Charles Kerr <charles.kerr@canonical.com> + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published by the Free Software Foundation. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranties of -MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along +You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H -#include "config.h" + #include "config.h" #endif -#include <glib/gi18n.h> #include <gtk/gtk.h> -#include <glib.h> -#include <math.h> + #include <libindicator/indicator-image-helper.h> + +#include "shared-names.h" #include "user-widget.h" -#include "dbus-shared-names.h" typedef struct _UserWidgetPrivate UserWidgetPrivate; @@ -37,7 +37,6 @@ struct _UserWidgetPrivate { DbusmenuMenuitem* twin_item; GtkWidget* user_image; - gboolean using_personal_icon; GtkWidget* user_name; GtkWidget* container; GtkWidget* tick_icon; @@ -47,13 +46,6 @@ struct _UserWidgetPrivate #define USER_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), USER_WIDGET_TYPE, UserWidgetPrivate)) -typedef struct -{ - double r; - double g; - double b; -} CairoColorRGB; - /* Prototypes */ static void user_widget_class_init (UserWidgetClass *klass); static void user_widget_init (UserWidget *self); @@ -62,50 +54,18 @@ static void user_widget_finalize (GObject *object); static void user_widget_set_twin_item (UserWidget* self, DbusmenuMenuitem* twin_item); -// keyevent consumers -static gboolean user_widget_button_release_event (GtkWidget *menuitem, - GdkEventButton *event); -// Dbusmenuitem properties update callback -static void user_widget_property_update (DbusmenuMenuitem* item, - gchar* property, - GVariant* value, - gpointer userdata); - - -static void _color_shade (const CairoColorRGB *a, - float k, - CairoColorRGB *b); - -static void draw_album_border (GtkWidget *widget, gboolean selected); - -#if GTK_CHECK_VERSION(3, 0, 0) + static gboolean user_widget_primitive_draw_cb_gtk_3 (GtkWidget *image, cairo_t* cr, gpointer user_data); -static gboolean user_widget_draw_usericon_gtk_3 (GtkWidget *widget, - cairo_t* cr, - gpointer user_data); - -#else -static gboolean user_widget_primitive_draw_cb (GtkWidget *image, - GdkEventExpose *event, - gpointer user_data); -static gboolean user_widget_draw_usericon_gtk_2 (GtkWidget *widget, - GdkEventExpose *event, - gpointer user_data); - -#endif G_DEFINE_TYPE (UserWidget, user_widget, GTK_TYPE_MENU_ITEM); static void user_widget_class_init (UserWidgetClass *klass) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + GObjectClass * gobject_class = G_OBJECT_CLASS (klass); - widget_class->button_release_event = user_widget_button_release_event; - g_type_class_add_private (klass, sizeof (UserWidgetPrivate)); gobject_class->dispose = user_widget_dispose; @@ -115,79 +75,57 @@ user_widget_class_init (UserWidgetClass *klass) static void user_widget_init (UserWidget *self) { - UserWidgetPrivate * priv = USER_WIDGET_GET_PRIVATE(self); - - gint padding = 0; - gtk_widget_style_get (GTK_WIDGET(self), - "horizontal-padding", - &padding, - NULL); - + self->priv = USER_WIDGET_GET_PRIVATE(self); + + UserWidgetPrivate * priv = self->priv; + priv->user_image = NULL; priv->user_name = NULL; priv->logged_in = FALSE; priv->sessions_active = FALSE; priv->container = NULL; priv->tick_icon = NULL; - - // Create the UI elements. + + // Create the UI elements. priv->user_image = gtk_image_new (); - gtk_misc_set_alignment(GTK_MISC(priv->user_image), 0.0, 0.0); + gtk_misc_set_alignment(GTK_MISC(priv->user_image), 0.0, 0.0); gtk_misc_set_padding (GTK_MISC(priv->user_image),0, 4.0); - + priv->user_name = gtk_label_new (""); -#if HAVE_GTK3 - priv->container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -#else - priv->container = gtk_hbox_new (FALSE, 0); -#endif + priv->container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); - priv->tick_icon = gtk_image_new_from_icon_name ("account-logged-in", + priv->tick_icon = gtk_image_new_from_icon_name ("account-logged-in", GTK_ICON_SIZE_MENU); - gtk_misc_set_alignment(GTK_MISC(priv->tick_icon), 1.0, 0.5); - + gtk_misc_set_alignment(GTK_MISC(priv->tick_icon), 1.0, 0.5); + // Pack it together gtk_box_pack_start (GTK_BOX (priv->container), priv->user_image, FALSE, FALSE, - 0); + 0); gtk_box_pack_start (GTK_BOX (priv->container), priv->user_name, FALSE, FALSE, - 3); - gtk_box_pack_start (GTK_BOX(priv->container), - priv->tick_icon, - FALSE, - FALSE, 5); - - gtk_widget_show_all (priv->container); - gtk_container_add (GTK_CONTAINER (self), priv->container); + 3); + gtk_box_pack_end (GTK_BOX(priv->container), + priv->tick_icon, + FALSE, + FALSE, 5); + + gtk_widget_show_all (priv->container); + gtk_container_add (GTK_CONTAINER (self), priv->container); gtk_widget_show_all (priv->tick_icon); gtk_widget_set_no_show_all (priv->tick_icon, TRUE); gtk_widget_hide (priv->tick_icon); - - + + // Fetch the drawing context. - #if GTK_CHECK_VERSION(3, 0, 0) - g_signal_connect_after (GTK_WIDGET(self), "draw", + g_signal_connect_after (GTK_WIDGET(self), "draw", G_CALLBACK(user_widget_primitive_draw_cb_gtk_3), GTK_WIDGET(self)); - - g_signal_connect_after (GTK_WIDGET(priv->user_image), "draw", - G_CALLBACK(user_widget_draw_usericon_gtk_3), - GTK_WIDGET(self)); - - #else - g_signal_connect_after (GTK_WIDGET(self), "expose-event", - G_CALLBACK(user_widget_primitive_draw_cb), - GTK_WIDGET(self)); - g_signal_connect_after (GTK_WIDGET(priv->user_image), "expose-event", - G_CALLBACK(user_widget_draw_usericon_gtk_2), - GTK_WIDGET(self)); - #endif } static void @@ -206,519 +144,145 @@ user_widget_finalize (GObject *object) /*****************************************************************/ -#if GTK_CHECK_VERSION(3, 0, 0) - // TODO handle drawing of green check mark static gboolean user_widget_primitive_draw_cb_gtk_3 (GtkWidget *widget, cairo_t* cr, gpointer user_data) { - g_return_val_if_fail(IS_USER_WIDGET(user_data), FALSE); UserWidget* meta = USER_WIDGET(user_data); - UserWidgetPrivate * priv = USER_WIDGET_GET_PRIVATE(meta); + UserWidgetPrivate * priv = USER_WIDGET_GET_PRIVATE(meta); // Draw dot only when user is the current user. - if (!dbusmenu_menuitem_property_get_bool (priv->twin_item, - USER_ITEM_PROP_IS_CURRENT_USER)){ - return FALSE; - } - - GtkStyle *style; - gdouble x, y; - style = gtk_widget_get_style (widget); - - GtkAllocation allocation; - gtk_widget_get_allocation (widget, &allocation); - x = allocation.x + 13; - y = allocation.height / 2; - - cairo_arc (cr, x, y, 3.0, 0.0, 2 * G_PI);; - - cairo_set_source_rgb (cr, style->fg[gtk_widget_get_state(widget)].red/65535.0, - style->fg[gtk_widget_get_state(widget)].green/65535.0, - style->fg[gtk_widget_get_state(widget)].blue/65535.0); - cairo_fill (cr); - - return FALSE; -} - -static gboolean -user_widget_draw_usericon_gtk_3 (GtkWidget *widget, - cairo_t* cr, - gpointer user_data) -{ - g_return_val_if_fail(IS_USER_WIDGET(user_data), FALSE); - UserWidget* meta = USER_WIDGET(user_data); - UserWidgetPrivate * priv = USER_WIDGET_GET_PRIVATE(meta); + if (dbusmenu_menuitem_property_get_bool (priv->twin_item, USER_ITEM_PROP_IS_CURRENT_USER)) + { + gdouble x, y; + GtkStyle * style = gtk_widget_get_style (widget); + + GtkAllocation allocation; + gtk_widget_get_allocation (widget, &allocation); + x = allocation.x + 13; + y = allocation.height / 2; + + cairo_arc (cr, x, y, 3.0, 0.0, 2 * G_PI); + + cairo_set_source_rgb (cr, style->fg[gtk_widget_get_state(widget)].red/65535.0, + style->fg[gtk_widget_get_state(widget)].green/65535.0, + style->fg[gtk_widget_get_state(widget)].blue/65535.0); + cairo_fill (cr); + } - if (priv->using_personal_icon == FALSE) - return FALSE; - - draw_album_border (widget, FALSE); return FALSE; } -/** - * TODO: - * Sort out gtk2 - */ -// GTK 2 Expose handler -#else -static gboolean -user_widget_draw_usericon_gtk_2 (GtkWidget *widget, - GdkEventExpose *event, - gpointer user_data) -{ - g_return_val_if_fail(IS_USER_WIDGET(user_data), FALSE); - UserWidget* meta = USER_WIDGET(user_data); - UserWidgetPrivate * priv = USER_WIDGET_GET_PRIVATE(meta); +/*** +**** +***/ - if (priv->using_personal_icon == FALSE) - return FALSE; - - draw_album_border (widget, FALSE); - return FALSE; -} +static const int ICON_SIZE = 24; -static gboolean -user_widget_primitive_draw_cb (GtkWidget *widget, - GdkEventExpose *event, - gpointer user_data) +static void +update_icon (UserWidget * self, DbusmenuMenuitem * mi) { - g_return_val_if_fail(IS_USER_WIDGET(user_data), FALSE); - UserWidget* meta = USER_WIDGET(user_data); - UserWidgetPrivate * priv = USER_WIDGET_GET_PRIVATE(meta); + GdkPixbuf * pixbuf = NULL; + + /* first, try the menuitem's icon property */ + const gchar * icon_name = dbusmenu_menuitem_property_get (mi, USER_ITEM_PROP_ICON); + if (icon_name) + { + GError* error = NULL; + pixbuf = gdk_pixbuf_new_from_file_at_size (icon_name, ICON_SIZE, ICON_SIZE, &error); + if (error != NULL) + { + g_warning ("Couldn't load the image \"%s\": %s", icon_name, error->message); + g_clear_error (&error); + } + } - // Draw dot only when user is the current user. - if (!dbusmenu_menuitem_property_get_bool (priv->twin_item, - USER_ITEM_PROP_IS_CURRENT_USER)){ - return FALSE; - } - - GtkStyle *style; - cairo_t *cr; - cr = (cairo_t*) gdk_cairo_create (gtk_widget_get_window (widget)); - - gdouble x, y; - style = gtk_widget_get_style (widget); - - GtkAllocation allocation; - - gtk_widget_get_allocation (widget, &allocation); - x = allocation.x + 13; - y = allocation.y + allocation.height/2; - - cairo_arc (cr, x, y, 3.0, 0.0, 2 * G_PI);; - - cairo_set_source_rgb (cr, style->fg[gtk_widget_get_state(widget)].red/65535.0, - style->fg[gtk_widget_get_state(widget)].green/65535.0, - style->fg[gtk_widget_get_state(widget)].blue/65535.0); - cairo_fill (cr); - cairo_destroy (cr); - - return FALSE; -} -#endif + /* as a fallback, try to use the default user icon */ + if (pixbuf == NULL) + { + pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), + USER_ITEM_ICON_DEFAULT, + ICON_SIZE, + GTK_ICON_LOOKUP_FORCE_SIZE, + NULL); + } + if (pixbuf != NULL) + { + gtk_image_set_from_pixbuf (GTK_IMAGE(self->priv->user_image), pixbuf); + g_object_unref (pixbuf); + } +} static void -draw_album_border(GtkWidget *widg, gboolean selected) +update_logged_in (UserWidget * self, DbusmenuMenuitem * mi) { - cairo_t *cr; - cr = gdk_cairo_create (gtk_widget_get_window (widg)); - #if GTK_CHECK_VERSION(3, 0, 0) - gtk_style_context_add_class (gtk_widget_get_style_context (widg), - "menu"); - #endif - - GtkStyle *style; - style = gtk_widget_get_style (widg); - - GtkAllocation alloc; - gtk_widget_get_allocation (widg, &alloc); - gint offset = 0; - gint v_offset = 4; - - alloc.width = alloc.width + (offset * 2); - alloc.height = alloc.height - v_offset - 2; - alloc.x = alloc.x - offset; - alloc.y = alloc.y + v_offset/2 +1; - - CairoColorRGB bg_normal, fg_normal; - - bg_normal.r = style->bg[0].red/65535.0; - bg_normal.g = style->bg[0].green/65535.0; - bg_normal.b = style->bg[0].blue/65535.0; - - gint state = selected ? 5 : 0; - - fg_normal.r = style->fg[state].red/65535.0; - fg_normal.g = style->fg[state].green/65535.0; - fg_normal.b = style->fg[state].blue/65535.0; - - CairoColorRGB dark_top_color; - CairoColorRGB light_bottom_color; - CairoColorRGB background_color; - - _color_shade ( &bg_normal, 0.93, &background_color ); - _color_shade ( &bg_normal, 0.23, &dark_top_color ); - _color_shade ( &fg_normal, 0.55, &light_bottom_color ); - - cairo_rectangle (cr, - alloc.x, alloc.y, - alloc.width, alloc.height); - - cairo_set_line_width (cr, 1.0); - - cairo_clip ( cr ); - - cairo_move_to (cr, alloc.x, alloc.y ); - cairo_line_to (cr, alloc.x + alloc.width, - alloc.y ); - cairo_line_to ( cr, alloc.x + alloc.width, - alloc.y + alloc.height ); - cairo_line_to ( cr, alloc.x, alloc.y + alloc.height ); - cairo_line_to ( cr, alloc.x, alloc.y); - cairo_close_path (cr); - - cairo_set_source_rgba ( cr, - background_color.r, - background_color.g, - background_color.b, - 1.0 ); - - cairo_stroke ( cr ); - - cairo_move_to (cr, alloc.x, alloc.y ); - cairo_line_to (cr, alloc.x + alloc.width, - alloc.y ); - - cairo_close_path (cr); - cairo_set_source_rgba ( cr, - dark_top_color.r, - dark_top_color.g, - dark_top_color.b, - 1.0 ); - - cairo_stroke ( cr ); - - cairo_move_to ( cr, alloc.x + alloc.width, - alloc.y + alloc.height ); - cairo_line_to ( cr, alloc.x, alloc.y + alloc.height ); - - cairo_close_path (cr); - cairo_set_source_rgba ( cr, - light_bottom_color.r, - light_bottom_color.g, - light_bottom_color.b, - 1.0); - - cairo_stroke ( cr ); - cairo_destroy (cr); + const gboolean b = dbusmenu_menuitem_property_get_bool (mi, USER_ITEM_PROP_LOGGED_IN); + + g_debug ("User \"%s\" %s active sessions", + dbusmenu_menuitem_property_get (mi, USER_ITEM_PROP_NAME), + b ? "has" : "doesn't have"); + + gtk_widget_set_visible (self->priv->tick_icon, b); } static void -_color_rgb_to_hls (gdouble *r, - gdouble *g, - gdouble *b) +update_name (UserWidget * self, DbusmenuMenuitem * mi) { - gdouble min; - gdouble max; - gdouble red; - gdouble green; - gdouble blue; - gdouble h = 0; - gdouble l; - gdouble s; - gdouble delta; - - red = *r; - green = *g; - blue = *b; - - if (red > green) - { - if (red > blue) - max = red; - else - max = blue; - - if (green < blue) - min = green; - else - min = blue; - } - else - { - if (green > blue) - max = green; - else - max = blue; - - if (red < blue) - min = red; - else - min = blue; - } - l = (max+min)/2; - if (fabs (max-min) < 0.0001) - { - h = 0; - s = 0; - } - else - { - if (l <= 0.5) - s = (max-min)/(max+min); - else - s = (max-min)/(2-max-min); - - delta = (max -min) != 0 ? (max -min) : 1; - - if(delta == 0) - delta = 1; - if (red == max) - h = (green-blue)/delta; - else if (green == max) - h = 2+(blue-red)/delta; - else if (blue == max) - h = 4+(red-green)/delta; - - h *= 60; - if (h < 0.0) - h += 360; - } - - *r = h; - *g = l; - *b = s; + gtk_label_set_label (GTK_LABEL(self->priv->user_name), + dbusmenu_menuitem_property_get (mi, USER_ITEM_PROP_NAME)); } static void -_color_hls_to_rgb (gdouble *h, - gdouble *l, - gdouble *s) +user_widget_property_update (DbusmenuMenuitem * mi, + const gchar * property, + GVariant * value, + UserWidget * self) { - gdouble hue; - gdouble lightness; - gdouble saturation; - gdouble m1, m2; - gdouble r, g, b; + g_return_if_fail (IS_USER_WIDGET (self)); - lightness = *l; - saturation = *s; - - if (lightness <= 0.5) - m2 = lightness*(1+saturation); - else - m2 = lightness+saturation-lightness*saturation; - - m1 = 2*lightness-m2; - - if (saturation == 0) - { - *h = lightness; - *l = lightness; - *s = lightness; - } + if (!g_strcmp0 (property, USER_ITEM_PROP_LOGGED_IN)) + { + update_logged_in (self, mi); + } + else if (!g_strcmp0 (property, USER_ITEM_PROP_ICON)) + { + update_icon (self, mi); + } + else if (!g_strcmp0 (property, USER_ITEM_PROP_NAME)) + { + update_name (self, mi); + } else - { - hue = *h+120; - while (hue > 360) - hue -= 360; - while (hue < 0) - hue += 360; - - if (hue < 60) - r = m1+(m2-m1)*hue/60; - else if (hue < 180) - r = m2; - else if (hue < 240) - r = m1+(m2-m1)*(240-hue)/60; - else - r = m1; - - hue = *h; - while (hue > 360) - hue -= 360; - while (hue < 0) - hue += 360; - - if (hue < 60) - g = m1+(m2-m1)*hue/60; - else if (hue < 180) - g = m2; - else if (hue < 240) - g = m1+(m2-m1)*(240-hue)/60; - else - g = m1; - - hue = *h-120; - while (hue > 360) - hue -= 360; - while (hue < 0) - hue += 360; - - if (hue < 60) - b = m1+(m2-m1)*hue/60; - else if (hue < 180) - b = m2; - else if (hue < 240) - b = m1+(m2-m1)*(240-hue)/60; - else - b = m1; - - *h = r; - *l = g; - *s = b; - } -} - -void -_color_shade (const CairoColorRGB *a, float k, CairoColorRGB *b) -{ - double red; - double green; - double blue; - - red = a->r; - green = a->g; - blue = a->b; - - if (k == 1.0) - { - b->r = red; - b->g = green; - b->b = blue; - return; - } - - _color_rgb_to_hls (&red, &green, &blue); - - green *= k; - if (green > 1.0) - green = 1.0; - else if (green < 0.0) - green = 0.0; - - blue *= k; - if (blue > 1.0) - blue = 1.0; - else if (blue < 0.0) - blue = 0.0; - - _color_hls_to_rgb (&red, &green, &blue); - - b->r = red; - b->g = green; - b->b = blue; -} - - -/*****************************************************************/ - -/* Suppress/consume keyevents */ -static gboolean -user_widget_button_release_event (GtkWidget *menuitem, - GdkEventButton *event) -{ - return FALSE; + { + g_debug ("%s FIXME: unhandled property change %s", G_STRFUNC, property); + } } - -/** - * TODO, be sensitive to UI updates - * */ -static void -user_widget_property_update (DbusmenuMenuitem* item, gchar* property, - GVariant* value, gpointer userdata) +static void +user_widget_set_twin_item (UserWidget * self, DbusmenuMenuitem * mi) { - g_return_if_fail (IS_USER_WIDGET (userdata)); - //gtk_widget_queue_redraw (GTK_WIDGET(userdata)); -} - + self->priv->twin_item = mi; + update_icon (self, mi); + update_name (self, mi); + update_logged_in (self, mi); - -static void -user_widget_set_twin_item (UserWidget* self, - DbusmenuMenuitem* twin_item) -{ - UserWidgetPrivate* priv = USER_WIDGET_GET_PRIVATE(self); - priv->twin_item = twin_item; - g_signal_connect( G_OBJECT(priv->twin_item), "property-changed", + g_signal_connect (G_OBJECT(mi), "property-changed", G_CALLBACK(user_widget_property_update), self); - - const gchar * icon_name = dbusmenu_menuitem_property_get (twin_item, - USER_ITEM_PROP_ICON); - gtk_label_set_label (GTK_LABEL (priv->user_name), - dbusmenu_menuitem_property_get (twin_item, USER_ITEM_PROP_NAME)); - - if (dbusmenu_menuitem_property_get_bool (twin_item, USER_ITEM_PROP_LOGGED_IN)) { - g_debug ("%s USER HAS ACTIVE SESSIONS", - dbusmenu_menuitem_property_get (twin_item, USER_ITEM_PROP_NAME)); - gtk_widget_show(priv->tick_icon); - } - else { - g_debug ("%s USER DOESN'T HAVE ACTIVE SESSIONS", - dbusmenu_menuitem_property_get (twin_item, USER_ITEM_PROP_NAME)); - gtk_widget_hide(priv->tick_icon); - } - - GdkPixbuf* pixbuf = NULL; - GError* error = NULL; - pixbuf = gdk_pixbuf_new_from_file_at_size(icon_name, 32, 32, NULL); - - if (pixbuf == NULL || error != NULL) { - g_warning ("Could not load the user image (%s) for some reason", - icon_name); - if (pixbuf != NULL){ - g_object_unref (pixbuf); - pixbuf = NULL; - } - if (error != NULL){ - g_error_free (error); - error = NULL; - } - - priv->using_personal_icon = FALSE; - - pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), - USER_ITEM_ICON_DEFAULT, - 32, - GTK_ICON_LOOKUP_FORCE_SIZE, - &error); - } - else{ - priv->using_personal_icon = TRUE; - } - - if (pixbuf == NULL || error != NULL) { - g_warning ("Could not load the user image"); - if (error != NULL){ - g_error_free (error); - error = NULL; - } - } - else{ - gtk_image_set_from_pixbuf (GTK_IMAGE(priv->user_image), pixbuf); - } - if (pixbuf != NULL){ - g_object_unref (pixbuf); - pixbuf = NULL; - } } /** - * transport_new: - * @returns: a new #UserWidget. - **/ -GtkWidget* -user_widget_new(DbusmenuMenuitem *item) + * user_widget_new: + * @returns: a new #UserWidget. + **/ +GtkWidget* +user_widget_new (DbusmenuMenuitem *item) { GtkWidget* widget = g_object_new(USER_WIDGET_TYPE, NULL); user_widget_set_twin_item ( USER_WIDGET(widget), item ); - return widget; + return widget; } diff --git a/src/user-widget.h b/src/user-widget.h index 52a5e34..0953e6c 100644 --- a/src/user-widget.h +++ b/src/user-widget.h @@ -31,18 +31,23 @@ G_BEGIN_DECLS #define IS_USER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), USER_WIDGET_TYPE)) #define USER_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), USER_WIDGET_TYPE, UserWidgetClass)) -typedef struct _UserWidget UserWidget; -typedef struct _UserWidgetClass UserWidgetClass; +typedef struct _UserWidget UserWidget; +typedef struct _UserWidgetClass UserWidgetClass; +typedef struct _UserWidgetPrivate UserWidgetPrivate; -struct _UserWidgetClass { +struct _UserWidgetClass +{ GtkMenuItemClass parent_class; }; -struct _UserWidget { +struct _UserWidget +{ + /*< private >*/ GtkMenuItem parent; + UserWidgetPrivate * priv; }; -GType user_widget_get_type (void); +GType user_widget_get_type (void) G_GNUC_CONST; GtkWidget* user_widget_new(DbusmenuMenuitem *twin_item); G_END_DECLS diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c index 09f916d..fec17dc 100644 --- a/src/users-service-dbus.c +++ b/src/users-service-dbus.c @@ -4,6 +4,7 @@ * * Authors: * Cody Russell <crussell@canonical.com> + * Charles Kerr <charles.kerr@canonical.com> * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -19,101 +20,134 @@ */ #ifdef HAVE_CONFIG_H -#include "config.h" + #include "config.h" #endif -#include <string.h> +#include <glib.h> + #include <errno.h> -#include <pwd.h> -#include <dbus/dbus-glib.h> -#include <dbus/dbus-glib.h> -#include <dbus/dbus-glib-lowlevel.h> +#include <pwd.h> /* getpwuid() */ -#include "dbus-shared-names.h" -#include "display-manager-client.h" +#include "dbus-accounts.h" +#include "dbus-consolekit-manager.h" +#include "dbus-consolekit-seat.h" +#include "dbus-consolekit-session.h" +#include "dbus-display-manager.h" +#include "dbus-user.h" +#include "shared-names.h" #include "users-service-dbus.h" -#include "accounts-service-client.h" -#include "consolekit-manager-client.h" -#include "consolekit-session-client.h" -#include "consolekit-seat-client.h" #define CK_ADDR "org.freedesktop.ConsoleKit" #define CK_SESSION_IFACE "org.freedesktop.ConsoleKit.Session" +/** +*** +**/ + +static void update_user_list (UsersServiceDbus * self); + +static gchar* get_seat (UsersServiceDbus * service); + +static void on_user_added (Accounts * o, + const gchar * user_object_path, + UsersServiceDbus * service); + +static void on_user_deleted (Accounts * o, + const gchar * user_object_path, + UsersServiceDbus * service); -static void users_service_dbus_class_init (UsersServiceDbusClass *klass); -static void users_service_dbus_init (UsersServiceDbus *self); -static void users_service_dbus_dispose (GObject *object); -static void users_service_dbus_finalize (GObject *object); -static void create_display_manager_proxy (UsersServiceDbus *self); -static void create_accounts_service_proxy (UsersServiceDbus *self); -static void create_seat_proxy (UsersServiceDbus *self); -static void create_ck_proxy (UsersServiceDbus *self); -static void create_cksession_proxy (UsersServiceDbus *self); -static gchar *get_seat (UsersServiceDbus *service); -static void user_added (DBusGProxy *proxy, - const gchar *user_id, - gpointer user_data); -static void user_deleted (DBusGProxy *proxy, - const gchar *user_id, - gpointer user_data); -static void user_changed (DBusGProxy *proxy, - gpointer user_data); -static void seat_proxy_session_added (DBusGProxy *seat_proxy, - const gchar *session_id, - UsersServiceDbus *service); -static void seat_proxy_session_removed (DBusGProxy *seat_proxy, - const gchar *session_id, - UsersServiceDbus *service); -static void sync_users (UsersServiceDbus *self); -static gboolean do_add_session (UsersServiceDbus *service, - UserData *user, - const gchar *ssid); -static gchar * get_seat_internal (DBusGProxy *proxy); - -/* Private */ -typedef struct _UsersServiceDbusPrivate UsersServiceDbusPrivate; +static void on_session_added (ConsoleKitSeat * seat, + const gchar * ssid, + UsersServiceDbus * service); + +static void on_session_removed (ConsoleKitSeat * seat, + const gchar * ssid, + UsersServiceDbus * service); + +static void on_session_list (ConsoleKitSeat * seat, + GAsyncResult * result, + UsersServiceDbus * service); + +/*** +**** Priv Struct +***/ struct _UsersServiceDbusPrivate { - GHashTable *users; - gint count; - gchar *seat; - gchar *ssid; - - DBusGConnection *system_bus; + gchar * seat; + gchar * guest_ssid; - DBusGProxy *accounts_service_proxy; - DBusGProxy *display_manager_proxy; - DBusGProxy *display_manager_props_proxy; - DBusGProxy *ck_proxy; - DBusGProxy *seat_proxy; - DBusGProxy *session_proxy; + /* ssid -> AccountsUser lookup */ + GHashTable * sessions; - GHashTable *exclusions; - GHashTable *sessions; + /* user object path -> AccountsUser lookup */ + GHashTable * users; - DbusmenuMenuitem * guest_item; - gchar * guest_session_id; - gboolean guest_session_enabled; + GCancellable * cancellable; + ConsoleKitSeat * seat_proxy; + ConsoleKitManager * ck_manager_proxy; + Accounts * accounts_proxy; }; -#define USERS_SERVICE_DBUS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), USERS_SERVICE_DBUS_TYPE, UsersServiceDbusPrivate)) +/*** +**** GObject +***/ -/* Signals */ -enum { - USER_ADDED, - USER_DELETED, - LAST_SIGNAL +enum +{ + USER_LIST_CHANGED, + USER_LOGGED_IN_CHANGED, + GUEST_LOGGED_IN_CHANGED, + N_SIGNALS }; -static guint signals[LAST_SIGNAL] = { 0 }; +static guint signals[N_SIGNALS] = { 0 }; -/* GObject Boilerplate */ G_DEFINE_TYPE (UsersServiceDbus, users_service_dbus, G_TYPE_OBJECT); static void +users_service_dbus_dispose (GObject *object) +{ + UsersServiceDbusPrivate * priv = USERS_SERVICE_DBUS(object)->priv; + + g_clear_object (&priv->accounts_proxy); + g_clear_object (&priv->seat_proxy); + g_clear_object (&priv->ck_manager_proxy); + + if (priv->cancellable != NULL) + { + g_cancellable_cancel (priv->cancellable); + g_clear_object (&priv->cancellable); + } + + if (priv->users != NULL) + { + g_hash_table_destroy (priv->users); + priv->users = NULL; + } + + if (priv->sessions != NULL) + { + g_hash_table_destroy (priv->sessions); + priv->sessions = NULL; + } + + G_OBJECT_CLASS (users_service_dbus_parent_class)->dispose (object); +} + +static void +users_service_dbus_finalize (GObject *object) +{ + UsersServiceDbusPrivate * priv = USERS_SERVICE_DBUS(object)->priv; + + g_free (priv->guest_ssid); + g_free (priv->seat); + + G_OBJECT_CLASS (users_service_dbus_parent_class)->finalize (object); +} + +static void users_service_dbus_class_init (UsersServiceDbusClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); @@ -123,845 +157,866 @@ users_service_dbus_class_init (UsersServiceDbusClass *klass) object_class->dispose = users_service_dbus_dispose; object_class->finalize = users_service_dbus_finalize; - signals[USER_ADDED] = g_signal_new ("user-added", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (UsersServiceDbusClass, user_added), - NULL, NULL, - g_cclosure_marshal_VOID__STRING, - G_TYPE_NONE, 1, G_TYPE_STRING); - - signals[USER_DELETED] = g_signal_new ("user-deleted", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (UsersServiceDbusClass, user_deleted), - NULL, NULL, - g_cclosure_marshal_VOID__STRING, - G_TYPE_NONE, 1, G_TYPE_STRING); + signals[USER_LIST_CHANGED] = g_signal_new ( + "user-list-changed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (UsersServiceDbusClass, user_list_changed), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + signals[USER_LOGGED_IN_CHANGED] = g_signal_new ( + "user-logged-in-changed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (UsersServiceDbusClass, user_logged_in_changed), + NULL, NULL, + g_cclosure_marshal_VOID__OBJECT, + G_TYPE_NONE, 1, G_TYPE_OBJECT); + + signals[GUEST_LOGGED_IN_CHANGED] = g_signal_new ( + "guest-logged-in-changed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (UsersServiceDbusClass, guest_logged_in_changed), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); } static void users_service_dbus_init (UsersServiceDbus *self) { - GError *error = NULL; - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); + GError * error = NULL; - priv->users = NULL; - priv->count = 0; - priv->guest_item = NULL; - priv->guest_session_id = NULL; - - priv->guest_session_enabled = FALSE; + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, + USERS_SERVICE_DBUS_TYPE, + UsersServiceDbusPrivate); - /* Get the system bus */ - priv->system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); + UsersServiceDbusPrivate * p = self->priv; + + p->cancellable = g_cancellable_new (); + + /* ssid -> AccountsUser */ + p->sessions = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + g_object_unref); + + /* user object path -> AccountsUser */ + p->users = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + g_object_unref); + + /** + *** create the consolekit manager proxy... + **/ + + p->ck_manager_proxy = console_kit_manager_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + "org.freedesktop.ConsoleKit", + "/org/freedesktop/ConsoleKit/Manager", + NULL, + &error); if (error != NULL) { - g_error ("Unable to get system bus"); - g_error_free(error); - - return; + g_warning ("%s: %s", G_STRLOC, error->message); + g_clear_error (&error); } - priv->sessions = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - g_free); + p->seat = get_seat (self); - priv->users = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - NULL); + /** + *** create the consolekit seat proxy... + **/ + + if (p->seat != NULL) + { + ConsoleKitSeat * proxy = console_kit_seat_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + "org.freedesktop.ConsoleKit", + p->seat, + NULL, + &error); - create_ck_proxy (self); - create_seat_proxy (self); - create_display_manager_proxy (self); - create_accounts_service_proxy (self); + if (error != NULL) + { + g_warning ("Failed to connect to the ConsoleKit seat: %s", error->message); + g_clear_error (&error); + } + else + { + g_signal_connect (proxy, "session-added", + G_CALLBACK (on_session_added), self); + g_signal_connect (proxy, "session-removed", + G_CALLBACK (on_session_removed), self); + console_kit_seat_call_get_sessions (proxy, p->cancellable, + (GAsyncReadyCallback)on_session_list, self); + p->seat_proxy = proxy; + } + } + + /** + *** create the accounts manager proxy... + **/ + + Accounts * proxy = accounts_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + "org.freedesktop.Accounts", + "/org/freedesktop/Accounts", + NULL, + &error); + if (error != NULL) + { + g_warning ("%s: %s", G_STRFUNC, error->message); + g_clear_error (&error); + } + else + { + g_signal_connect (proxy, "user-added", G_CALLBACK(on_user_added), self); + g_signal_connect (proxy, "user-deleted", G_CALLBACK(on_user_deleted), self); + p->accounts_proxy = proxy; + update_user_list (self); + } } +/*** +**** +***/ + static void -users_service_dbus_dispose (GObject *object) +emit_user_list_changed (UsersServiceDbus * self) { - G_OBJECT_CLASS (users_service_dbus_parent_class)->dispose (object); + g_signal_emit (self, signals[USER_LIST_CHANGED], 0); } static void -users_service_dbus_finalize (GObject *object) +emit_user_login_changed (UsersServiceDbus * self, AccountsUser * user) { - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (object); - - if (priv->guest_session_id != NULL) { - g_free(priv->guest_session_id); - priv->guest_session_id = NULL; - } - - G_OBJECT_CLASS (users_service_dbus_parent_class)->finalize (object); + g_signal_emit (self, signals[USER_LOGGED_IN_CHANGED], 0, user); } - static void -create_display_manager_proxy (UsersServiceDbus *self) -{ - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - GError *error = NULL; - const gchar *seat = NULL; - - seat = g_getenv ("XDG_SEAT_PATH"); - g_debug ("CREATING DM PROXIES WITH %s", seat); - priv->display_manager_proxy = dbus_g_proxy_new_for_name (priv->system_bus, - "org.freedesktop.DisplayManager", - seat, - "org.freedesktop.DisplayManager.Seat"); - - priv->display_manager_props_proxy = dbus_g_proxy_new_for_name (priv->system_bus, - "org.freedesktop.DisplayManager", - seat, - "org.freedesktop.DBus.Properties"); - - - if (!priv->display_manager_proxy) - { - g_warning ("Failed to get DisplayManager seat proxy."); - return; - } - if (!priv->display_manager_props_proxy) - { - g_warning ("Failed to get DisplayManager Properties seat proxy."); - return; - } - - GValue has_guest_session = {0}; - g_value_init (&has_guest_session, G_TYPE_BOOLEAN); - if (!dbus_g_proxy_call (priv->display_manager_props_proxy, - "Get", - &error, - G_TYPE_STRING, - "org.freedesktop.DisplayManager.Seat", - G_TYPE_STRING, - "HasGuestAccount", - G_TYPE_INVALID, - G_TYPE_VALUE, - &has_guest_session, - G_TYPE_INVALID)) - { - g_warning ("Failed to get the HasGuestSession property from the DisplayManager Properties seat proxy. error: %s", error->message); - g_error_free (error); - return; - } - g_debug ("Does seat have a guest account = %i", g_value_get_boolean (&has_guest_session)); - priv->guest_session_enabled = g_value_get_boolean (&has_guest_session); +emit_guest_login_changed (UsersServiceDbus * self) +{ + g_signal_emit (self, signals[GUEST_LOGGED_IN_CHANGED], 0); } -static void -create_accounts_service_proxy (UsersServiceDbus *self) -{ - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - GPtrArray *users = g_ptr_array_new (); - GError *error = NULL; - - priv->accounts_service_proxy = dbus_g_proxy_new_for_name (priv->system_bus, - "org.freedesktop.Accounts", - "/org/freedesktop/Accounts", - "org.freedesktop.Accounts"); - - dbus_g_proxy_add_signal (priv->accounts_service_proxy, - "UserAdded", - DBUS_TYPE_G_OBJECT_PATH, - G_TYPE_INVALID); - - dbus_g_proxy_add_signal (priv->accounts_service_proxy, - "UserChanged", - DBUS_TYPE_G_OBJECT_PATH, - G_TYPE_INVALID); - - dbus_g_proxy_add_signal (priv->accounts_service_proxy, - "UserDeleted", - DBUS_TYPE_G_OBJECT_PATH, - G_TYPE_INVALID); - - dbus_g_proxy_connect_signal (priv->accounts_service_proxy, - "UserAdded", - G_CALLBACK (user_added), - self, - NULL); - - dbus_g_proxy_connect_signal (priv->accounts_service_proxy, - "UserDeleted", - G_CALLBACK (user_deleted), - self, - NULL); - - if (!org_freedesktop_Accounts_list_cached_users (priv->accounts_service_proxy, - &users, - &error)) - { - g_warning ("failed to retrieve user count: %s", error->message); - g_error_free (error); +/*** +**** +***/ - return; +static ConsoleKitSession* +create_consolekit_session_proxy (const char * ssid) +{ + GError * error = NULL; + + ConsoleKitSession * p = console_kit_session_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + CK_ADDR, + ssid, + NULL, + &error); + if (error != NULL) + { + g_warning ("%s: %s", G_STRLOC, error->message); + g_error_free (error); } - priv->count = users->len; - g_ptr_array_free (users, TRUE); - sync_users (self); + return p; } -static void -create_ck_proxy (UsersServiceDbus *self) +static gchar * +get_seat_from_session_proxy (ConsoleKitSession * session_proxy) { - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); + gchar * seat = NULL; - priv->ck_proxy = dbus_g_proxy_new_for_name (priv->system_bus, - "org.freedesktop.ConsoleKit", - "/org/freedesktop/ConsoleKit/Manager", - "org.freedesktop.ConsoleKit.Manager"); - - if (!priv->ck_proxy) + GError * error = NULL; + console_kit_session_call_get_seat_id_sync (session_proxy, + &seat, + NULL, + &error); + if (error != NULL) { - g_warning ("Failed to get ConsoleKit proxy."); - return; + g_debug ("%s: %s", G_STRLOC, error->message); + g_error_free (error); } + + return seat; } -/* Get the initial sessions when starting up */ -static void -get_cksessions_cb (DBusGProxy *proxy, GPtrArray * sessions, GError * error, gpointer userdata) +static gchar * +get_seat (UsersServiceDbus *service) { - if (error != NULL) { - g_warning("Unable to get initial sessions: %s", error->message); - return; - } + gchar * seat = NULL; + gchar * ssid = NULL; + GError * error = NULL; + UsersServiceDbusPrivate * priv = service->priv; - /* If there's no error we should at least get an - array of zero entries */ - g_return_if_fail(sessions != NULL); - g_debug("Got %d initial sessions", sessions->len); + console_kit_manager_call_get_current_session_sync (priv->ck_manager_proxy, + &ssid, + NULL, + &error); - int i; - for (i = 0; i < sessions->len; i++) { - seat_proxy_session_added(proxy, g_ptr_array_index(sessions, i), USERS_SERVICE_DBUS(userdata)); - } + if (error != NULL) + { + g_debug ("%s: %s", G_STRLOC, error->message); + g_error_free (error); + } + else + { + ConsoleKitSession * session = create_consolekit_session_proxy (ssid); + + if (session != NULL) + { + seat = get_seat_from_session_proxy (session); + g_object_unref (session); + } + } - return; + return seat; } -static void -create_seat_proxy (UsersServiceDbus *self) +/*** +**** AccountsUser add-ons for tracking sessions +***/ + +static GHashTable* +user_get_sessions_hashset (AccountsUser * user) { - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - GError *error = NULL; + static GQuark q = 0; - priv->seat = get_seat (self); - if (priv->seat == NULL) + if (G_UNLIKELY(!q)) { - return; + q = g_quark_from_static_string ("sessions"); } - priv->seat_proxy = dbus_g_proxy_new_for_name_owner (priv->system_bus, - "org.freedesktop.ConsoleKit", - priv->seat, - "org.freedesktop.ConsoleKit.Seat", - &error); - - if (!priv->seat_proxy) + GObject * o = G_OBJECT (user); + GHashTable * h = g_object_get_qdata (o, q); + if (h == NULL) { - if (error != NULL) - { - g_warning ("Failed to connect to the ConsoleKit seat: %s", error->message); - g_error_free (error); - } - - return; + h = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + g_object_set_qdata_full (o, q, h, (GDestroyNotify)g_hash_table_destroy); } - dbus_g_proxy_add_signal (priv->seat_proxy, - "SessionAdded", - DBUS_TYPE_G_OBJECT_PATH, - G_TYPE_INVALID); - dbus_g_proxy_add_signal (priv->seat_proxy, - "SessionRemoved", - DBUS_TYPE_G_OBJECT_PATH, - G_TYPE_INVALID); + return h; +} - dbus_g_proxy_connect_signal (priv->seat_proxy, - "SessionAdded", - G_CALLBACK (seat_proxy_session_added), - self, - NULL); - dbus_g_proxy_connect_signal (priv->seat_proxy, - "SessionRemoved", - G_CALLBACK (seat_proxy_session_removed), - self, - NULL); +static void +user_add_session (AccountsUser * user, const char * ssid) +{ + g_hash_table_add (user_get_sessions_hashset(user), g_strdup(ssid)); +} - org_freedesktop_ConsoleKit_Seat_get_sessions_async (priv->seat_proxy, get_cksessions_cb, self); +static void +user_remove_session (AccountsUser * user, const char * ssid) +{ + g_hash_table_remove (user_get_sessions_hashset(user), ssid); +} - return; +static guint +user_count_sessions (AccountsUser * user) +{ + return g_hash_table_size (user_get_sessions_hashset(user)); } +/*** +**** Users +***/ + +/* adds this user session to the user's and service's session tables */ static void -create_cksession_proxy (UsersServiceDbus *service) +add_user_session (UsersServiceDbus * service, + AccountsUser * user, + const gchar * ssid) { - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service); + ConsoleKitSession * session_proxy = create_consolekit_session_proxy (ssid); + if (session_proxy != NULL) + { + UsersServiceDbusPrivate * priv = service->priv; + gchar * seat = get_seat_from_session_proxy (session_proxy); - priv->session_proxy = dbus_g_proxy_new_for_name (priv->system_bus, - CK_ADDR, - priv->ssid, - CK_SESSION_IFACE); + /* is this session in our seat? */ + if (seat && priv->seat && !g_strcmp0 (seat, priv->seat)) + { + /* does this session have a display? */ + gchar * display = NULL; + console_kit_session_call_get_x11_display_sync (session_proxy, + &display, + NULL, NULL); + const gboolean has_display = display && *display; + g_free (display); + + if (has_display) + { + const gchar * username = accounts_user_get_user_name (user); + g_debug ("%s adding %s's session '%s' to our tables", + G_STRLOC, username, ssid); - if (!priv->session_proxy) - { - g_warning ("Failed to get ConsoleKit session proxy"); - return; + g_hash_table_insert (priv->sessions, + g_strdup (ssid), + g_object_ref (user)); + + user_add_session (user, ssid); + } + } + + g_free (seat); + g_object_unref (session_proxy); } } -static gchar * -get_seat (UsersServiceDbus *service) +/* calls add_user_session() for each of this user's sessions */ +static void +add_user_sessions (UsersServiceDbus *self, AccountsUser * user) { - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service); - GError *error = NULL; - gchar *ssid = NULL; - gchar *seat; + const guint64 uid = accounts_user_get_uid (user); + const char * username = accounts_user_get_user_name (user); + g_debug ("%s adding %s (%i)", G_STRLOC, username, (int)uid); + + GError * error = NULL; + gchar ** sessions = NULL; + console_kit_manager_call_get_sessions_for_unix_user_sync ( + self->priv->ck_manager_proxy, + uid, + &sessions, + NULL, + &error); - if (!dbus_g_proxy_call (priv->ck_proxy, - "GetCurrentSession", - &error, - G_TYPE_INVALID, - DBUS_TYPE_G_OBJECT_PATH, - &ssid, - G_TYPE_INVALID)) + if (error != NULL) { - if (error) + g_debug ("%s: %s", G_STRLOC, error->message); + g_error_free (error); + } + else if (sessions != NULL) + { + int i; + + for (i=0; sessions[i]; i++) { - g_debug ("Failed to call GetCurrentSession: %s", error->message); - g_error_free (error); + const char * const ssid = sessions[i]; + g_debug ("%s adding %s's session %s", G_STRLOC, username, ssid); + add_user_session (self, user, ssid); } - if (ssid) - g_free (ssid); - - return NULL; + g_strfreev (sessions); } +} - priv->ssid = ssid; - create_cksession_proxy (service); - - seat = get_seat_internal (priv->session_proxy); - - return seat; +/* returns true if this property is one we use */ +static gboolean +is_interesting_user_property (const char * key) +{ + return !g_strcmp0 (key, "IconFile") + || !g_strcmp0 (key, "LoginFrequency") + || !g_strcmp0 (key, "RealName") + || !g_strcmp0 (key, "Uid") + || !g_strcmp0 (key, "UserName"); } -static gchar * -get_seat_internal (DBusGProxy *proxy) +static void +sync_user_properties (GDBusProxy * source, GDBusProxy * target) { - GError *error = NULL; - gchar *seat = NULL; + gchar ** keys = g_dbus_proxy_get_cached_property_names (source); - if (!org_freedesktop_ConsoleKit_Session_get_seat_id (proxy, &seat, &error)) + if (keys != NULL) { - if (error) + int i; + GVariantBuilder builder; + gboolean changed = FALSE; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); + + for (i=0; keys[i]; i++) { - g_debug ("Failed to call GetSeatId: %s", error->message); + const gchar * const key = keys[i]; - return NULL; + if (is_interesting_user_property (key)) + { + GVariant * oldval = g_dbus_proxy_get_cached_property (target, key); + GVariant * newval = g_dbus_proxy_get_cached_property (source, key); + + /* all the properties we're interested in are + basic types safe for g_variant_compare()... */ + g_assert (g_variant_type_is_basic(g_variant_get_type(newval))); + + if (g_variant_compare (oldval, newval)) + { + changed = TRUE; + g_dbus_proxy_set_cached_property (target, key, newval); + g_variant_builder_add (&builder, "{sv}", key, newval); + } + + g_variant_unref (newval); + g_variant_unref (oldval); + } } - } - return seat; -} - -static gboolean -get_unix_user (UsersServiceDbus *service, - const gchar *session_id, - uid_t *uidp) -{ - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service); - GError *error = NULL; - guint uid; - DBusGProxy *session_proxy; - - g_debug("Building session proxy for: %s", session_id); - session_proxy = dbus_g_proxy_new_for_name_owner(priv->system_bus, - CK_ADDR, - session_id, - CK_SESSION_IFACE, - &error); - - if (error != NULL) { - g_warning("Unable to get CK Session proxy: %s", error->message); - g_error_free(error); - return FALSE; - } - - if (!org_freedesktop_ConsoleKit_Session_get_unix_user(session_proxy, &uid, &error)) - { - if (error) + if (changed) { - g_warning ("Failed to call GetUnixUser: %s", error->message); - g_error_free (error); + g_signal_emit_by_name (target, "g-properties-changed", g_variant_builder_end(&builder), keys); } - g_object_unref(session_proxy); - return FALSE; + g_variant_builder_clear (&builder); + g_strfreev (keys); } +} - if (uidp != NULL) +/** + * The AccountsUserProxy's properties aren't being updated automatically + * for some reason... the only update we get is the 'changed' signal. + * This function is a workaround to update our User object's properties. + */ +static void +on_user_changed (AccountsUser * user, UsersServiceDbus * service) +{ + AccountsUser * tmp = accounts_user_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + "org.freedesktop.Accounts", + g_dbus_proxy_get_object_path (G_DBUS_PROXY(user)), + NULL, + NULL); + if (tmp != NULL) { - *uidp = (uid_t)uid; + sync_user_properties (G_DBUS_PROXY(tmp), G_DBUS_PROXY(user)); + g_object_unref (tmp); } - - g_object_unref(session_proxy); - return TRUE; } -static gboolean -do_add_session (UsersServiceDbus *service, - UserData *user, - const gchar *ssid) -{ - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service); - GError *error = NULL; - gchar *seat = NULL; - gchar *xdisplay = NULL; - DBusGProxy * session_proxy; - GList *l; - - session_proxy = dbus_g_proxy_new_for_name_owner(priv->system_bus, - CK_ADDR, - ssid, - CK_SESSION_IFACE, - &error); - - if (error != NULL) { - g_warning("Unable to get CK Session proxy: %s", error->message); - g_error_free(error); - return FALSE; - } - - seat = get_seat_internal (session_proxy); - - if (!seat || !priv->seat || strcmp (seat, priv->seat) != 0) { - g_object_unref(session_proxy); - return FALSE; - } - - if (!org_freedesktop_ConsoleKit_Session_get_x11_display (session_proxy, &xdisplay, &error)) - { - if (error) - { - g_debug ("Failed to call GetX11Display: %s", error->message); - g_error_free (error); - } - - g_object_unref(session_proxy); - return FALSE; - } - - g_object_unref(session_proxy); - - if (!xdisplay || xdisplay[0] == '\0') - return FALSE; +static void +add_user_from_object_path (UsersServiceDbus * self, + const char * user_object_path) +{ + GError * error = NULL; - g_hash_table_insert (priv->sessions, - g_strdup (ssid), - g_strdup (user->user_name)); + AccountsUser * user = accounts_user_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + "org.freedesktop.Accounts", + user_object_path, + NULL, + &error); - l = g_list_find_custom (user->sessions, ssid, (GCompareFunc)g_strcmp0); - if (l == NULL) + if (error != NULL) { - g_debug ("Adding session %s", ssid); - - user->sessions = g_list_prepend (user->sessions, g_strdup (ssid)); - - if (user->menuitem != NULL) { - dbusmenu_menuitem_property_set_bool(user->menuitem, USER_ITEM_PROP_LOGGED_IN, TRUE); - } + g_warning ("%s: %s", G_STRLOC, error->message); + g_clear_error (&error); } else { - g_debug ("User %s already has session %s", user->user_name, ssid); - } + AccountsUser * prev = g_hash_table_lookup (self->priv->users, user_object_path); + + if (prev != NULL) /* we've already got this user... sync its properties */ + { + sync_user_properties (G_DBUS_PROXY(user), G_DBUS_PROXY(prev)); + g_object_unref (user); + user = prev; + } + else /* ooo, we got a new user */ + { + g_signal_connect (user, "changed", G_CALLBACK(on_user_changed), self); + g_hash_table_insert (self->priv->users, g_strdup(user_object_path), user); + } - return TRUE; + add_user_sessions (self, user); + } } + +/* asks org.freedesktop.Accounts for a list of users and + * calls add_user_from_object_path() on each of those users */ static void -add_sessions_for_user (UsersServiceDbus *self, - UserData *user) +update_user_list (UsersServiceDbus *self) { - g_return_if_fail (IS_USERS_SERVICE_DBUS(self)); + g_return_if_fail(IS_USERS_SERVICE_DBUS(self)); - g_debug ("!!!!!!!!!! - add_sessions_for_user %i %s", - (int)user->uid, user->user_name); + GError * error = NULL; + char ** object_paths = NULL; + UsersServiceDbusPrivate * priv = self->priv; - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - GError *error; - GPtrArray *sessions; - int i; + accounts_call_list_cached_users_sync (priv->accounts_proxy, + &object_paths, + NULL, + &error); - error = NULL; - if (!org_freedesktop_ConsoleKit_Manager_get_sessions_for_unix_user(priv->ck_proxy, user->uid, &sessions, &error)) + if (error != NULL) { - g_debug ("Failed to call GetSessionsForUnixUser: %s", error->message); - g_error_free (error); - - return; + g_warning ("%s: %s", G_STRFUNC, error->message); + g_clear_error (&error); } - - for (i = 0; i < sessions->len; i++) + else if (object_paths != NULL) { - char *ssid; + gint i; - ssid = g_ptr_array_index (sessions, i); - do_add_session (self, user, ssid); + for (i=0; object_paths[i] != NULL; ++i) + { + add_user_from_object_path (self, object_paths[i]); + } + + emit_user_list_changed (self); + + g_strfreev (object_paths); } - g_ptr_array_foreach (sessions, (GFunc)g_free, NULL); - g_ptr_array_free (sessions, TRUE); + g_debug ("%s finished updating the user list", G_STRLOC); } +static void +on_user_added (Accounts * o G_GNUC_UNUSED, + const gchar * user_path G_GNUC_UNUSED, + UsersServiceDbus * service) +{ + /* We see a new user but we might not want to list it -- + for example, lightdm shows up when we switch to the greeter. + So instead of adding the user directly here, let's ask + org.freedesktop.Accounts for a fresh list of users + because it filters out special cases. */ + update_user_list (service); +} static void -seat_proxy_session_added (DBusGProxy *seat_proxy, - const gchar *session_id, - UsersServiceDbus *service) +on_user_deleted (Accounts * o G_GNUC_UNUSED, + const gchar * user_path, + UsersServiceDbus * service) { - g_return_if_fail(IS_USERS_SERVICE_DBUS(service)); - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service); - uid_t uid; - struct passwd *pwent; - UserData *user; + AccountsUser * user = g_hash_table_lookup (service->priv->users, user_path); - if (!get_unix_user (service, session_id, &uid)) + if (user != NULL) { - g_warning ("Failed to lookup user for session"); - return; + GObject * o = g_object_ref (G_OBJECT(user)); + g_hash_table_remove (service->priv->users, user_path); + emit_user_list_changed (service); + g_object_unref (o); } +} - errno = 0; - pwent = getpwuid (uid); - if (!pwent) - { - g_warning ("Failed to lookup user id %d: %s", (int)uid, g_strerror (errno)); - return; - } +static AccountsUser * +find_user_from_username (UsersServiceDbus * self, + const gchar * username) +{ + AccountsUser * match = NULL; - /* We need to special case guest here because it doesn't - show up in the GDM user tables. */ - if (g_strcmp0("guest", pwent->pw_name) == 0) { - if (priv->guest_item != NULL) { - dbusmenu_menuitem_property_set_bool(priv->guest_item, USER_ITEM_PROP_LOGGED_IN, TRUE); - } - priv->guest_session_id = g_strdup(session_id); - g_debug("Found guest session: %s", priv->guest_session_id); - return; - } + g_return_val_if_fail (IS_USERS_SERVICE_DBUS(self), match); - user = users_service_dbus_get_user_by_username (service, pwent->pw_name); - if (!user) - return; + gpointer user; + GHashTableIter iter; + g_hash_table_iter_init (&iter, self->priv->users); + while (!match && g_hash_table_iter_next (&iter, NULL, &user)) + { + if (!g_strcmp0 (username, accounts_user_get_user_name (user))) + { + match = user; + } + } - do_add_session (service, user, session_id); + return match; } +/*** +**** Sessions +***/ + static void -seat_proxy_session_removed (DBusGProxy *seat_proxy, - const gchar *session_id, - UsersServiceDbus *service) -{ - g_return_if_fail(IS_USERS_SERVICE_DBUS(service)); - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service); - UserData *user; - gchar *username; - GList *l; - - username = g_hash_table_lookup (priv->sessions, session_id); - if (!username) { - if (g_strcmp0(session_id, priv->guest_session_id) == 0) { - g_debug("Removing guest session: %s", priv->guest_session_id); - if (priv->guest_item != NULL) { - dbusmenu_menuitem_property_set_bool(priv->guest_item, USER_ITEM_PROP_LOGGED_IN, FALSE); - } - g_free(priv->guest_session_id); - priv->guest_session_id = NULL; - } - return; - } - - user = users_service_dbus_get_user_by_username (service, username); - if (!user) - return; - - l = g_list_find_custom (user->sessions, - session_id, - (GCompareFunc)g_strcmp0); - if (l) - { - g_debug ("Removing session %s", session_id); - - g_free (l->data); - user->sessions = g_list_delete_link (user->sessions, l); - if (user->menuitem != NULL && user->sessions == NULL) { - dbusmenu_menuitem_property_set_bool(user->menuitem, USER_ITEM_PROP_LOGGED_IN, FALSE); - } +on_session_removed (ConsoleKitSeat * seat_proxy, + const gchar * ssid, + UsersServiceDbus * service) +{ + g_return_if_fail (IS_USERS_SERVICE_DBUS (service)); + + UsersServiceDbusPrivate * priv = service->priv; + g_debug ("%s %s() session removed %s", G_STRLOC, G_STRFUNC, ssid); + + if (!g_strcmp0 (ssid, priv->guest_ssid)) + { + g_debug ("%s removing guest session %s", G_STRLOC, ssid); + g_clear_pointer (&priv->guest_ssid, g_free); + emit_guest_login_changed (service); } else { - g_debug ("Session not found: %s", session_id); + AccountsUser * user = g_hash_table_lookup (priv->sessions, ssid); + if (user == NULL) + { + g_debug ("%s we're not tracking ssid %s", G_STRLOC, ssid); + } + else + { + GObject * o = g_object_ref (G_OBJECT(user)); + g_hash_table_remove (service->priv->users, ssid); + user_remove_session (user, ssid); + emit_user_login_changed (service, user); + g_object_unref (o); + } } } -static void -sync_users (UsersServiceDbus *self) +static gchar* +get_unix_username_from_ssid (UsersServiceDbus * self, + const gchar * ssid) { - g_return_if_fail(IS_USERS_SERVICE_DBUS(self)); - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); + gchar * username = NULL; - if (priv->count > MINIMUM_USERS) + ConsoleKitSession * session_proxy = create_consolekit_session_proxy (ssid); + if (session_proxy != NULL) { - GPtrArray *users = NULL; - GError *error = NULL; - gint i; - - users = g_ptr_array_new (); - - if (!org_freedesktop_Accounts_list_cached_users (priv->accounts_service_proxy, - &users, - &error)) + guint uid = 0; + GError * error = NULL; + console_kit_session_call_get_unix_user_sync (session_proxy, + &uid, + NULL, &error); + if (error != NULL) { - g_warning ("failed to retrieve user list: %s", error->message); - g_error_free (error); - - return; + g_warning ("%s: %s", G_STRLOC, error->message); + g_clear_error (&error); } - - for (i = 0; i < users->len; i++) + else { - gchar *id; - DBusGProxy *proxy; - UserData *user; - GError *error = NULL; - - id = g_ptr_array_index (users, i); - - proxy = dbus_g_proxy_new_for_name (priv->system_bus, - "org.freedesktop.Accounts", - id, - "org.freedesktop.DBus.Properties"); - - GHashTable *properties; - if (!dbus_g_proxy_call (proxy, "GetAll", &error, - G_TYPE_STRING, "org.freedesktop.Accounts.User", G_TYPE_INVALID, - dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &properties, G_TYPE_INVALID)) - { - g_warning ("unable to retrieve user info: %s", error->message); - g_error_free (error); - - continue; - } - - user = g_hash_table_lookup (priv->users, id); - // Double check we havent processed this user already - if (user != NULL) + errno = 0; + const struct passwd * pwent = getpwuid (uid); + if (pwent == NULL) { - g_free(user->user_name); - g_free(user->real_name); - g_free(user->icon_file); - user->real_name_conflict = FALSE; - //continue; + g_warning ("Failed to lookup user id %d: %s", (int)uid, g_strerror(errno)); } else - { - user = g_new0 (UserData, 1); + { + username = g_strdup (pwent->pw_name); } - // Can't subscribe to the Changed signal on each individual user path - // for some reason. - dbus_g_proxy_add_signal (proxy, - "Changed", - G_TYPE_INVALID); - - dbus_g_proxy_connect_signal (proxy, "Changed", - G_CALLBACK(user_changed), - self, - NULL); - user->uid = g_value_get_uint64 (g_hash_table_lookup (properties, "Uid")); - user->user_name = g_strdup (g_value_get_string (g_hash_table_lookup (properties, "UserName"))); - user->real_name = g_strdup (g_value_get_string (g_hash_table_lookup (properties, "RealName"))); - user->icon_file = g_strdup (g_value_get_string (g_hash_table_lookup (properties, "IconFile"))); - user->real_name_conflict = FALSE; - user->menuitem = NULL; - - g_hash_table_unref (properties); - - g_hash_table_insert (priv->users, - g_strdup (id), - user); - - add_sessions_for_user (self, user); } - g_ptr_array_free (users, TRUE); + g_object_unref (session_proxy); } + + return username; } -static void -user_changed (DBusGProxy *proxy, - gpointer user_data) +static gboolean +is_guest_username (const char * username) { - g_debug ("JUST RESYNCED THE USERS FROM A USER CHANGE"); - UsersServiceDbus *service = (UsersServiceDbus *)user_data; - sync_users (service); + if (!g_strcmp0 (username, "guest")) + return TRUE; + + if (username && g_str_has_prefix (username, "guest-")) + return TRUE; + + return FALSE; } +/* If the new session belongs to 'guest', update our guest_ssid. + Otherwise, call add_user_session() to update our session tables */ static void -user_added (DBusGProxy *proxy, - const gchar *user_id, - gpointer user_data) +on_session_added (ConsoleKitSeat * seat_proxy G_GNUC_UNUSED, + const gchar * ssid, + UsersServiceDbus * service) { - UsersServiceDbus *service = (UsersServiceDbus *)user_data; - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service); - priv->count++; - sync_users (service); - g_signal_emit (service, - signals[USER_ADDED], - 0, - user_id); -} + g_return_if_fail (IS_USERS_SERVICE_DBUS(service)); -static void -user_deleted (DBusGProxy *proxy, - const gchar *user_id, - gpointer user_data) -{ - UsersServiceDbus *service = (UsersServiceDbus *)user_data; - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service); + gchar * username = get_unix_username_from_ssid (service, ssid); + g_debug ("%s %s() username %s has new session %s", G_STRLOC, G_STRFUNC, username, ssid); + + if (is_guest_username (username)) + { + /* handle guest as a special case -- it's not in the GDM + user tables and there isn't be an AccountsUser for it */ + g_debug("Found guest session: %s", ssid); + g_free (service->priv->guest_ssid); + service->priv->guest_ssid = g_strdup (ssid); + emit_guest_login_changed (service); + } + else + { + AccountsUser * user = find_user_from_username (service, username); - priv->count--; - g_hash_table_remove (priv->users, user_id); + if (user != NULL) + { + add_user_session (service, user, ssid); + emit_user_login_changed (service, user); + } + } - g_signal_emit (service, - signals[USER_DELETED], - 0, - user_id); - + g_free (username); } -UserData * -users_service_dbus_get_user_by_username (UsersServiceDbus *self, - const gchar *username) +/* Receives a list of sessions and calls on_session_added() for each of them */ +static void +on_session_list (ConsoleKitSeat * seat_proxy, + GAsyncResult * result, + UsersServiceDbus * self) { - GHashTableIter iter; - gpointer value; + GError * error = NULL; + gchar ** sessions = NULL; + g_debug ("%s bootstrapping the session list", G_STRLOC); - g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), NULL); + console_kit_seat_call_get_sessions_finish (seat_proxy, + &sessions, + result, + &error); + + if (error != NULL) + { + g_debug ("%s: %s", G_STRLOC, error->message); + g_error_free (error); + } + else if (sessions != NULL) + { + int i; + + for (i=0; sessions[i]; i++) + { + g_debug ("%s adding initial session '%s'", G_STRLOC, sessions[i]); + on_session_added (seat_proxy, sessions[i], self); + } + + g_strfreev (sessions); + } + + g_debug ("%s done bootstrapping the session list", G_STRLOC); +} - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); +static DisplayManagerSeat * +create_display_proxy (UsersServiceDbus * self) +{ + const gchar * const seat = g_getenv ("XDG_SEAT_PATH"); + g_debug ("%s creating a DisplayManager proxy for seat %s", G_STRLOC, seat); + + GError * error = NULL; + DisplayManagerSeat * p = display_manager_seat_proxy_new_for_bus_sync ( + G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + "org.freedesktop.DisplayManager", + seat, + NULL, + &error); - g_hash_table_iter_init (&iter, priv->users); - while (g_hash_table_iter_next (&iter, NULL, &value)) + if (error != NULL) { - UserData *user = value; - if (strcmp (user->user_name, username) == 0) - return user; + g_warning ("%s: %s", G_STRLOC, error->message); + g_error_free (error); } - return NULL; + return p; } +/*** +**** Public API +***/ + +/** + * users_service_dbus_get_user_list: + * + * Returns: (transfer container): a list of AccountsUser objects + */ GList * -users_service_dbus_get_user_list (UsersServiceDbus *self) +users_service_dbus_get_user_list (UsersServiceDbus * self) { g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), NULL); - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); + return g_hash_table_get_values (self->priv->users); +} + +/** + * users_service_dbus_show_greeter: + * + * Ask the Display Mnaager to switch to the greeter screen. + */ +void +users_service_dbus_show_greeter (UsersServiceDbus * self) +{ + g_return_if_fail (IS_USERS_SERVICE_DBUS(self)); - return g_hash_table_get_values (priv->users); + DisplayManagerSeat * dp = create_display_proxy (self); + display_manager_seat_call_switch_to_greeter_sync (dp, NULL, NULL); + g_clear_object (&dp); } -gboolean -users_service_dbus_show_greeter (UsersServiceDbus *self) +/** + * users_service_dbus_activate_guest_session: + * + * Activates the guest account. + */ +void +users_service_dbus_activate_guest_session (UsersServiceDbus * self) { - g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE); - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - return org_freedesktop_DisplayManager_Seat_switch_to_greeter(priv->display_manager_proxy, NULL); + g_return_if_fail(IS_USERS_SERVICE_DBUS(self)); + + DisplayManagerSeat * dp = create_display_proxy (self); + display_manager_seat_call_switch_to_guest_sync (dp, "", NULL, NULL); + g_clear_object (&dp); } -/* Activates the guest account if it can. */ -gboolean -users_service_dbus_activate_guest_session (UsersServiceDbus *self) +/** + * users_service_dbus_activate_user_session: + * + * Activates a specific user. + */ +void +users_service_dbus_activate_user_session (UsersServiceDbus * self, + AccountsUser * user) { - g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE); - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - return org_freedesktop_DisplayManager_Seat_switch_to_guest(priv->display_manager_proxy, "", NULL); + g_return_if_fail (IS_USERS_SERVICE_DBUS(self)); + + const char * const username = accounts_user_get_user_name (user); + DisplayManagerSeat * dp = create_display_proxy (self); + display_manager_seat_call_switch_to_user_sync (dp, username, "", NULL, NULL); + g_clear_object (&dp); } -/* Activates a specific user */ +/** + * users_service_dbus_guest_session_enabled: + * + * Tells whether or not guest sessions are allowed. + */ gboolean -users_service_dbus_activate_user_session (UsersServiceDbus *self, - UserData *user) +users_service_dbus_guest_session_enabled (UsersServiceDbus * self) { - g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE); - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - return org_freedesktop_DisplayManager_Seat_switch_to_user(priv->display_manager_proxy, user->user_name, "", NULL); + g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE); + + DisplayManagerSeat * dp = create_display_proxy (self); + const gboolean enabled = display_manager_seat_get_has_guest_account (dp); + g_clear_object (&dp); + return enabled; } gboolean -users_service_dbus_can_activate_session (UsersServiceDbus *self) +users_service_dbus_can_activate_session (UsersServiceDbus * self) { - g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE); - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); gboolean can_activate = FALSE; - GError *error = NULL; - if (!priv->seat_proxy) - { - create_seat_proxy (self); - } - - if (!priv->seat || priv->seat[0] == '\0') - { - return FALSE; - } + g_return_val_if_fail (IS_USERS_SERVICE_DBUS(self), can_activate); - if (!dbus_g_proxy_call (priv->seat_proxy, - "CanActivateSessions", - &error, - G_TYPE_INVALID, - G_TYPE_BOOLEAN, &can_activate, - G_TYPE_INVALID)) + GError * error = NULL; + console_kit_seat_call_can_activate_sessions_sync (self->priv->seat_proxy, + &can_activate, + NULL, + &error); + if (error != NULL) { - if (error != NULL){ - g_warning ("Failed to determine if seat can activate sessions: %s", - error->message); - g_error_free (error); - } - return FALSE; + g_warning ("%s: %s", G_STRLOC, error->message); + g_error_free (error); } return can_activate; } -/* Sets the menu item that represents the guest account */ -void -users_service_dbus_set_guest_item (UsersServiceDbus * self, DbusmenuMenuitem * mi) +gboolean +users_service_dbus_is_guest_logged_in (UsersServiceDbus * self) { - g_return_if_fail(IS_USERS_SERVICE_DBUS(self)); - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - priv->guest_item = mi; + g_return_val_if_fail (IS_USERS_SERVICE_DBUS(self), FALSE); - if (priv->guest_session_id != NULL) { - dbusmenu_menuitem_property_set_bool(priv->guest_item, USER_ITEM_PROP_LOGGED_IN, TRUE); - } - - return; + return self->priv->guest_ssid != NULL; } -gboolean users_service_dbus_guest_session_enabled (UsersServiceDbus * self) +gboolean +users_service_dbus_is_user_logged_in (UsersServiceDbus * self, + AccountsUser * user) { - g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE); - UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - - return priv->guest_session_enabled; -} + g_return_val_if_fail (IS_USERS_SERVICE_DBUS(self), FALSE); + g_return_val_if_fail (IS_ACCOUNTS_USER(user), FALSE); + return user_count_sessions (user) > 0; +} diff --git a/src/users-service-dbus.h b/src/users-service-dbus.h index b7db690..0f082c3 100644 --- a/src/users-service-dbus.h +++ b/src/users-service-dbus.h @@ -3,6 +3,7 @@ * * Authors: * Cody Russell <crussell@canonical.com> + * Charles Kerr <charles.kerr@canonical.com> * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -22,69 +23,74 @@ #include <glib.h> #include <glib-object.h> -#include <libdbusmenu-glib/menuitem.h> -G_BEGIN_DECLS - -#define USERS_SERVICE_DBUS_TYPE (users_service_dbus_get_type ()) -#define USERS_SERVICE_DBUS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), USERS_SERVICE_DBUS_TYPE, UsersServiceDbus)) -#define USERS_SERVICE_DBUS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), USERS_SERVICE_DBUS_TYPE, UsersServiceDbusClass)) -#define IS_USERS_SERVICE_DBUS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), USERS_SERVICE_DBUS_TYPE)) -#define IS_USERS_SERVICE_DBUS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), USERS_SERVICE_DBUS_TYPE)) -#define USERS_SERVICE_DBUS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), USERS_SERVICE_DBUS_TYPE, UsersServiceDbusClass)) - -typedef struct _UsersServiceDbus UsersServiceDbus; -typedef struct _UsersServiceDbusClass UsersServiceDbusClass; -typedef struct _UserData UserData; - -struct _UserData -{ - gint64 uid; - gchar *user_name; - gchar *real_name; - gchar *icon_file; +#include "dbus-user.h" /* for AccountsUser */ - GList *sessions; +G_BEGIN_DECLS - /* Whether the real name here conflicts with another in the system */ - gboolean real_name_conflict; - /* The menuitem representing this user if there is one. */ - DbusmenuMenuitem * menuitem; +#define USERS_SERVICE_DBUS_TYPE (users_service_dbus_get_type ()) +#define USERS_SERVICE_DBUS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), USERS_SERVICE_DBUS_TYPE, UsersServiceDbus)) +#define IS_USERS_SERVICE_DBUS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), USERS_SERVICE_DBUS_TYPE)) - UsersServiceDbus *service; -}; +typedef struct _UsersServiceDbus UsersServiceDbus; +typedef struct _UsersServiceDbusClass UsersServiceDbusClass; +typedef struct _UsersServiceDbusPrivate UsersServiceDbusPrivate; -/* XXX - MAXIMUM_USERS should be set to 7 once we've - * got some gdm issues worked out. +/** + * A facade class which interacts with multiple DBus services to + * track info which is useful to the interactor's user menu: + * + * 1. A list of users to add to the user menu. + * + * Each user is an AccountsUser object, which is a GDBusProxy + * to an org.freedesktop.Accounts.User object. + * + * We initially build this list by calling org.freedesktop.Accounts' + * GetCachedUsers method. We also monitor o.f.Accounts' UserAdded + * and UserDeleted and update the list accordingly. + * + * 2. Track which users currently have X sessions. + * This is used for the menuitems' USER_ITEM_PROP_LOGGED_IN property. + * + * We initially build this list by calling org.freedesktop.ConsoleKit.Seat's + * GetDevices method. We also monitor the seat for SessionAdded and + * SessionRemoved and update the list accordingly. + * + * 3. Provide an API for user switching and guest sessions. + * These are typically pass-through functions to GDBusProxies. + * */ -#define MINIMUM_USERS 0 - -struct _UsersServiceDbus { +struct _UsersServiceDbus +{ + /*< private >*/ GObject parent; + UsersServiceDbusPrivate * priv; }; -struct _UsersServiceDbusClass { +struct _UsersServiceDbusClass +{ GObjectClass parent_class; /* Signals */ - void (* user_added) (UsersServiceDbus *self, const gchar *user_id, gpointer user_data); - void (* user_deleted) (UsersServiceDbus *self, const gchar *user_id, gpointer user_data); + void (* user_list_changed) (UsersServiceDbus*, gpointer); + void (* user_logged_in_changed) (UsersServiceDbus*, AccountsUser*, gpointer); + void (* guest_logged_in_changed) (UsersServiceDbus*, gpointer); }; -GType users_service_dbus_get_type (void) G_GNUC_CONST; +GType users_service_dbus_get_type (void) G_GNUC_CONST; + +GList * users_service_dbus_get_user_list (UsersServiceDbus * self); -UserData *users_service_dbus_get_user_by_username (UsersServiceDbus *self, - const gchar *username); -GList *users_service_dbus_get_user_list (UsersServiceDbus *self); -gboolean users_service_dbus_show_greeter (UsersServiceDbus *self); -gboolean users_service_dbus_can_activate_session (UsersServiceDbus *self); -gboolean users_service_dbus_activate_user_session (UsersServiceDbus *self, - UserData *user); -gboolean users_service_dbus_activate_guest_session (UsersServiceDbus *self); -void users_service_dbus_set_guest_item (UsersServiceDbus * self, - DbusmenuMenuitem * mi); +gboolean users_service_dbus_is_guest_logged_in (UsersServiceDbus * self); +gboolean users_service_dbus_is_user_logged_in (UsersServiceDbus * self, + AccountsUser * user); -gboolean users_service_dbus_guest_session_enabled (UsersServiceDbus * self); +void users_service_dbus_show_greeter (UsersServiceDbus * self); +gboolean users_service_dbus_guest_session_enabled (UsersServiceDbus * self); +gboolean users_service_dbus_can_activate_session (UsersServiceDbus * self); +void users_service_dbus_activate_guest_session (UsersServiceDbus * self); +void users_service_dbus_activate_user_session (UsersServiceDbus * self, + AccountsUser * user); G_END_DECLS diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..0d30bba --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,24 @@ + +AM_CPPFLAGS = \ + $(GTEST_CPPFLAGS) \ + $(XORG_GTEST_CPPFLAGS) \ + $(INDICATOR_CFLAGS) \ + -I${top_srcdir}/src \ + -Wall -Werror +AM_CXXFLAGS = $(GTEST_CXXFLAGS) + +TESTS = test-service +check_PROGRAMS = test-service +test_service_SOURCES = test-service.cc +test_service_LDADD = $(TEST_SERVICE_LIBS) libgtest.a $(XORG_GTEST_MAIN_LIBS) $(X11_LIBS) +test_service_CPPFLAGS = \ + $(TEST_SERVICE_CFLAGS) \ + $(AM_CPPFLAGS) \ + -DINDICATOR_SERVICE_PATH="\"$(top_builddir)/src/indicator-session-service\"" + +check_LIBRARIES = libgtest.a +nodist_libgtest_a_SOURCES = \ + $(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp \ + $(GTEST_SOURCE)/src/gtest-all.cc \ + $(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp + diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 0000000..ec73565 --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,804 @@ +# 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@ +TESTS = test-service$(EXEEXT) +check_PROGRAMS = test-service$(EXEEXT) +subdir = tests +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 = +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +libgtest_a_AR = $(AR) $(ARFLAGS) +libgtest_a_LIBADD = +nodist_libgtest_a_OBJECTS = xorg-gtest-all.$(OBJEXT) \ + gtest-all.$(OBJEXT) xorg-gtest_main.$(OBJEXT) +libgtest_a_OBJECTS = $(nodist_libgtest_a_OBJECTS) +am_test_service_OBJECTS = test_service-test-service.$(OBJEXT) +test_service_OBJECTS = $(am_test_service_OBJECTS) +am__DEPENDENCIES_1 = +test_service_DEPENDENCIES = $(am__DEPENDENCIES_1) libgtest.a \ + $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(nodist_libgtest_a_SOURCES) $(test_service_SOURCES) +DIST_SOURCES = $(test_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 +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +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@ +AM_CPPFLAGS = \ + $(GTEST_CPPFLAGS) \ + $(XORG_GTEST_CPPFLAGS) \ + $(INDICATOR_CFLAGS) \ + -I${top_srcdir}/src \ + -Wall -Werror + +AM_CXXFLAGS = $(GTEST_CXXFLAGS) +test_service_SOURCES = test-service.cc +test_service_LDADD = $(TEST_SERVICE_LIBS) libgtest.a $(XORG_GTEST_MAIN_LIBS) $(X11_LIBS) +test_service_CPPFLAGS = \ + $(TEST_SERVICE_CFLAGS) \ + $(AM_CPPFLAGS) \ + -DINDICATOR_SERVICE_PATH="\"$(top_builddir)/src/indicator-session-service\"" + +check_LIBRARIES = libgtest.a +nodist_libgtest_a_SOURCES = \ + $(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp \ + $(GTEST_SOURCE)/src/gtest-all.cc \ + $(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cc .cpp .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 tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tests/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): + +clean-checkLIBRARIES: + -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) +libgtest.a: $(libgtest_a_OBJECTS) $(libgtest_a_DEPENDENCIES) $(EXTRA_libgtest_a_DEPENDENCIES) + $(AM_V_at)-rm -f libgtest.a + $(AM_V_AR)$(libgtest_a_AR) libgtest.a $(libgtest_a_OBJECTS) $(libgtest_a_LIBADD) + $(AM_V_at)$(RANLIB) libgtest.a + +clean-checkPROGRAMS: + @list='$(check_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 +test-service$(EXEEXT): $(test_service_OBJECTS) $(test_service_DEPENDENCIES) $(EXTRA_test_service_DEPENDENCIES) + @rm -f test-service$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(test_service_OBJECTS) $(test_service_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtest-all.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_service-test-service.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorg-gtest-all.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorg-gtest_main.Po@am__quote@ + +.cc.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +xorg-gtest-all.o: $(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT xorg-gtest-all.o -MD -MP -MF $(DEPDIR)/xorg-gtest-all.Tpo -c -o xorg-gtest-all.o `test -f '$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp' || echo '$(srcdir)/'`$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xorg-gtest-all.Tpo $(DEPDIR)/xorg-gtest-all.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp' object='xorg-gtest-all.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o xorg-gtest-all.o `test -f '$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp' || echo '$(srcdir)/'`$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp + +xorg-gtest-all.obj: $(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT xorg-gtest-all.obj -MD -MP -MF $(DEPDIR)/xorg-gtest-all.Tpo -c -o xorg-gtest-all.obj `if test -f '$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp'; then $(CYGPATH_W) '$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp'; else $(CYGPATH_W) '$(srcdir)/$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xorg-gtest-all.Tpo $(DEPDIR)/xorg-gtest-all.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp' object='xorg-gtest-all.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o xorg-gtest-all.obj `if test -f '$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp'; then $(CYGPATH_W) '$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp'; else $(CYGPATH_W) '$(srcdir)/$(XORG_GTEST_SOURCE)/src/xorg-gtest-all.cpp'; fi` + +gtest-all.o: $(GTEST_SOURCE)/src/gtest-all.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gtest-all.o -MD -MP -MF $(DEPDIR)/gtest-all.Tpo -c -o gtest-all.o `test -f '$(GTEST_SOURCE)/src/gtest-all.cc' || echo '$(srcdir)/'`$(GTEST_SOURCE)/src/gtest-all.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtest-all.Tpo $(DEPDIR)/gtest-all.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(GTEST_SOURCE)/src/gtest-all.cc' object='gtest-all.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gtest-all.o `test -f '$(GTEST_SOURCE)/src/gtest-all.cc' || echo '$(srcdir)/'`$(GTEST_SOURCE)/src/gtest-all.cc + +gtest-all.obj: $(GTEST_SOURCE)/src/gtest-all.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gtest-all.obj -MD -MP -MF $(DEPDIR)/gtest-all.Tpo -c -o gtest-all.obj `if test -f '$(GTEST_SOURCE)/src/gtest-all.cc'; then $(CYGPATH_W) '$(GTEST_SOURCE)/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/$(GTEST_SOURCE)/src/gtest-all.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtest-all.Tpo $(DEPDIR)/gtest-all.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(GTEST_SOURCE)/src/gtest-all.cc' object='gtest-all.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gtest-all.obj `if test -f '$(GTEST_SOURCE)/src/gtest-all.cc'; then $(CYGPATH_W) '$(GTEST_SOURCE)/src/gtest-all.cc'; else $(CYGPATH_W) '$(srcdir)/$(GTEST_SOURCE)/src/gtest-all.cc'; fi` + +xorg-gtest_main.o: $(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT xorg-gtest_main.o -MD -MP -MF $(DEPDIR)/xorg-gtest_main.Tpo -c -o xorg-gtest_main.o `test -f '$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp' || echo '$(srcdir)/'`$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xorg-gtest_main.Tpo $(DEPDIR)/xorg-gtest_main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp' object='xorg-gtest_main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o xorg-gtest_main.o `test -f '$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp' || echo '$(srcdir)/'`$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp + +xorg-gtest_main.obj: $(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT xorg-gtest_main.obj -MD -MP -MF $(DEPDIR)/xorg-gtest_main.Tpo -c -o xorg-gtest_main.obj `if test -f '$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp'; then $(CYGPATH_W) '$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xorg-gtest_main.Tpo $(DEPDIR)/xorg-gtest_main.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp' object='xorg-gtest_main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o xorg-gtest_main.obj `if test -f '$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp'; then $(CYGPATH_W) '$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp'; else $(CYGPATH_W) '$(srcdir)/$(XORG_GTEST_SOURCE)/src/xorg-gtest_main.cpp'; fi` + +test_service-test-service.o: test-service.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_service_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_service-test-service.o -MD -MP -MF $(DEPDIR)/test_service-test-service.Tpo -c -o test_service-test-service.o `test -f 'test-service.cc' || echo '$(srcdir)/'`test-service.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_service-test-service.Tpo $(DEPDIR)/test_service-test-service.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test-service.cc' object='test_service-test-service.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_service_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_service-test-service.o `test -f 'test-service.cc' || echo '$(srcdir)/'`test-service.cc + +test_service-test-service.obj: test-service.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_service_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test_service-test-service.obj -MD -MP -MF $(DEPDIR)/test_service-test-service.Tpo -c -o test_service-test-service.obj `if test -f 'test-service.cc'; then $(CYGPATH_W) 'test-service.cc'; else $(CYGPATH_W) '$(srcdir)/test-service.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_service-test-service.Tpo $(DEPDIR)/test_service-test-service.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test-service.cc' object='test_service-test-service.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_service_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test_service-test-service.obj `if test -f 'test-service.cc'; then $(CYGPATH_W) 'test-service.cc'; else $(CYGPATH_W) '$(srcdir)/test-service.cc'; fi` + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +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 + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + +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 + $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + clean-libtool 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-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +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: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + clean-libtool 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-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +# 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/tests/test-service.cc b/tests/test-service.cc new file mode 100644 index 0000000..73d905b --- /dev/null +++ b/tests/test-service.cc @@ -0,0 +1,56 @@ +/* +Copyright 2012 Canonical Ltd. + +Authors: + Charles Kerr <charles.kerr@canonical.com> + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR +PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <libindicator/indicator-service-test.h> + +#include "shared-names.h" + +/*** +**** +***/ + +/** + * Fixture class for testing indicator-session-service with Google Test. + */ +class SessionServiceTest: public IndicatorServiceTest +{ + public: + virtual ~SessionServiceTest() {} + SessionServiceTest(): IndicatorServiceTest(INDICATOR_SESSION_DBUS_NAME, + INDICATOR_SESSION_DBUS_OBJECT, + INDICATOR_SERVICE_PATH) { } + public: + virtual void SetUp() { + wait_seconds(1); + IndicatorServiceTest::SetUp(); + } + virtual void TearDown() { + IndicatorServiceTest::TearDown(); + } +}; + + +/** + * Basic sanity test to see if we can account for all our menuitems. + */ +TEST_F(SessionServiceTest, HelloWorld) +{ + ASSERT_TRUE(true); +} + |