[gnome-control-center/wip/inigomartinez/meson: 2/2] build: Port to meson build system
- From: Iñigo Martínez <inigomartinez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/inigomartinez/meson: 2/2] build: Port to meson build system
- Date: Wed, 6 Sep 2017 09:39:30 +0000 (UTC)
commit a79aea5f8fbf7f11df82e196770ea87542159331
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Tue Jul 25 22:28:38 2017 +0200
build: Port to meson build system
https://bugzilla.gnome.org/show_bug.cgi?id=785414
man/meson.build | 26 +
meson.build | 409 ++
meson_options.txt | 5 +
meson_post_install.py | 10 +
panels/background/meson.build | 128 +
panels/bluetooth/meson.build | 42 +
panels/color/icons/meson.build | 21 +
panels/color/meson.build | 63 +
panels/common/meson.build | 106 +
panels/datetime/icons/meson.build | 19 +
panels/datetime/meson.build | 217 +
panels/datetime/po-timezones/meson.build | 73 +
panels/display/icons/meson.build | 18 +
panels/display/meson.build | 68 +
panels/info/meson.build | 109 +
panels/keyboard/meson.build | 104 +
panels/meson.build | 44 +
panels/mouse/meson.build | 72 +
panels/network/connection-editor/meson.build | 56 +
panels/network/meson.build | 79 +
panels/network/wireless-security/meson.build | 71 +
panels/notifications/meson.build | 46 +
panels/online-accounts/icons/meson.build | 15 +
panels/online-accounts/meson.build | 48 +
panels/power/icons/meson.build | 15 +
panels/power/meson.build | 55 +
panels/printers/meson.build | 99 +
panels/privacy/meson.build | 40 +
panels/region/meson.build | 60 +
panels/search/meson.build | 49 +
panels/sharing/meson.build | 100 +
panels/sound/data/icons/meson.build | 69 +
panels/sound/data/sounds/meson.build | 31 +
panels/sound/data/symbolic-icons/meson.build | 13 +
panels/sound/meson.build | 67 +
panels/universal-access/meson.build | 53 +
panels/user-accounts/meson.build | 171 +
panels/user-accounts/um-realm-generated.c | 8722 ++++++++++++++++++++++++++
panels/user-accounts/um-realm-generated.h | 1201 ++++
panels/wacom/calibrator/meson.build | 36 +
panels/wacom/meson.build | 108 +
po/meson.build | 1 +
search-provider/meson.build | 50 +
shell/alt/meson.build | 14 +
shell/appdata/meson.build | 10 +
shell/completions/meson.build | 14 +
shell/meson.build | 180 +
subprojects/gvc | 2 +-
subprojects/libgd | 2 +-
49 files changed, 13009 insertions(+), 2 deletions(-)
---
diff --git a/man/meson.build b/man/meson.build
new file mode 100644
index 0000000..cab3fa9
--- /dev/null
+++ b/man/meson.build
@@ -0,0 +1,26 @@
+xsltproc = find_program('xsltproc', required: false)
+assert(xsltproc.found(), 'xsltproc is required to build documentation')
+
+xsltproc_cmd = [
+ xsltproc,
+ '--output', '@OUTPUT@',
+ '--nonet',
+ '--stringparam', 'man.output.quietly', '1',
+ '--stringparam', 'funcsynopsis.style', 'ansi',
+ '--stringparam', 'man.th.extra1.suppress', '1',
+ '--stringparam', 'man.authors.section.enabled', '0',
+ '--stringparam', 'man.copyright.section.enabled', '0',
+ 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+ '@INPUT@'
+]
+
+output = meson.project_name() + '.1'
+
+custom_target(
+ output,
+ input: meson.project_name() + '.xml',
+ output: output,
+ command: xsltproc_cmd,
+ install: true,
+ install_dir: join_paths(control_center_mandir, 'man1')
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..5ba5976
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,409 @@
+project(
+ 'gnome-control-center', 'c',
+ version: '3.25.92',
+ license: 'GPL2',
+ default_options: [
+ 'buildtype=debugoptimized',
+ 'warning_level=1'
+ ],
+ meson_version: '>= 0.43.0'
+)
+
+control_center_version = meson.project_version()
+
+control_center_api_version = '2.0'
+control_center_api_name = '@0@-@1@'.format(meson.project_name(), control_center_api_version)
+
+control_center_prefix = get_option('prefix')
+control_center_bindir = join_paths(control_center_prefix, get_option('bindir'))
+control_center_datadir = join_paths(control_center_prefix, get_option('datadir'))
+control_center_libexecdir = join_paths(control_center_prefix, get_option('libexecdir'))
+control_center_localedir = join_paths(control_center_prefix, get_option('localedir'))
+control_center_mandir = join_paths(control_center_prefix, get_option('mandir'))
+control_center_sysconfdir = join_paths(control_center_prefix, get_option('sysconfdir'))
+
+control_center_pkgdatadir = join_paths(control_center_datadir, meson.project_name())
+
+control_center_desktopdir = join_paths(control_center_datadir, 'applications')
+
+control_center_buildtype = get_option('buildtype')
+control_center_debug = control_center_buildtype.contains('debug')
+
+host_is_linux = host_machine.system().contains('linux')
+host_is_s390 = host_machine.cpu().contains('s390')
+
+cc = meson.get_compiler('c')
+
+config_h = configuration_data()
+
+# defines
+set_defines = [
+ # package
+ ['PACKAGE', meson.project_name()],
+ ['PACKAGE_BUGREPORT', 'http://bugzilla.gnome.org/enter_bug.cgi?product=' + meson.project_name()],
+ ['PACKAGE_NAME', meson.project_name()],
+ ['PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), control_center_version)],
+ ['PACKAGE_TARNAME', meson.project_name()],
+ ['PACKAGE_URL', ''],
+ ['PACKAGE_VERSION', control_center_version],
+ ['VERSION', control_center_version],
+ # i18n
+ ['GETTEXT_PACKAGE', control_center_api_name]
+]
+
+foreach define: set_defines
+ config_h.set_quoted(define[0], define[1])
+endforeach
+
+# debug
+config_h.set('NDEBUG', not control_center_debug)
+config_h.set('GNOME_ENABLE_DEBUG', control_center_debug)
+
+config_h.set('USER_DIR_MODE', 0700,
+ description: 'Permissions for creating the user\'s config, cache and data directories')
+
+# headers
+check_headers = [
+ ['HAVE_DLFCN_H', 'dlfcn.h'],
+ ['HAVE_INTTYPES_H', 'inttypes.h'],
+ ['HAVE_MEMORY_H', 'memory.h'],
+ ['HAVE_STDINT_H', 'stdint.h'],
+ ['HAVE_STDLIB_H', 'stdlib.h'],
+ ['HAVE_STRINGS_H', 'strings.h'],
+ ['HAVE_STRING_H', 'string.h'],
+ ['HAVE_SYS_STAT_H', 'sys/stat.h'],
+ ['HAVE_SYS_TYPES_H', 'sys/types.h'],
+ ['HAVE_UNISTD_H', 'unistd.h']
+]
+
+foreach header: check_headers
+ config_h.set(header[0], cc.has_header(header[1]))
+endforeach
+
+# functions
+check_functions = [
+ # i18n
+ ['HAVE_DCGETTEXT', 'dcgettext'],
+ ['HAVE_GETTEXT', 'gettext']
+]
+
+foreach func: check_functions
+ config_h.set(func[0], cc.has_function(func[1]))
+endforeach
+
+# compiler flags
+common_flags = ['-DHAVE_CONFIG_H']
+
+# Only add this when optimizing is enabled (default)
+optimized_src = '''
+ #if __OPTIMIZE__ == 0
+ #error No optimization
+ #endif
+'''
+
+control_center_optimized = control_center_buildtype.contains('optimized') and cc.compiles(optimized_src)
+message('whether_optimization is enabled: ' + control_center_optimized.to_string())
+
+if control_center_optimized
+ common_flags += '-Wp,-D_FORTIFY_SOURCE=2'
+endif
+
+if control_center_debug
+ test_flags = [
+ '-Wcast-align',
+ '-Wmissing-field-initializers',
+ '-Wmissing-declarations',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wno-strict-aliasing',
+ '-Wno-sign-compare'
+ ]
+
+ foreach flag: test_flags
+ if cc.has_argument(flag)
+ common_flags += [flag]
+ endif
+ endforeach
+endif
+
+add_project_arguments(common_flags, language: 'c')
+
+# Check that we meet the dependencies
+libgvc = subproject(
+ 'gvc',
+ default_options: 'static=true'
+)
+libgvc_dep = libgvc.get_variable('libgvc_dep')
+
+libgd = subproject(
+ 'libgd',
+ default_options: [
+ 'static=true',
+ 'with-view-common=true',
+ 'with-main-view=true'
+ ]
+)
+libgd_dep = libgd.get_variable('libgd_dep')
+
+goa_req_version = '>= 3.25.3'
+pulse_req_version = '>= 2.0'
+
+accounts_dep = dependency('accountsservice', version: '>= 0.6.39')
+clutter_gtk_dep = dependency('clutter-gtk-1.0', required: false)
+colord_dep = dependency('colord', version: '>= 0.1.34')
+gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.23.0')
+gio_dep = dependency('gio-2.0')
+glib_dep = dependency('glib-2.0', version: '>= 2.53.0')
+gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.1.0')
+gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 3.25.90')
+goa_dep = dependency('goa-1.0', version: goa_req_version)
+gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 3.21.4')
+libxml_dep = dependency('libxml-2.0')
+polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103')
+pulse_dep = dependency('libpulse', version: pulse_req_version)
+pulse_mainloop_dep = dependency('libpulse-mainloop-glib', version: pulse_req_version)
+upower_glib_dep = dependency('upower-glib', version: '>= 0.99.0')
+x11_dep = dependency('x11')
+xi_dep = dependency('xi', version: '>= 1.2')
+
+m_dep = cc.find_library('m')
+
+common_deps = [
+ gio_dep,
+ glib_dep,
+ gsettings_desktop_dep,
+ dependency('gio-unix-2.0'),
+ dependency('gthread-2.0'),
+ dependency('gtk+-3.0', version: '>= 3.22.0')
+]
+
+# x11 headers
+xf86misc_dep = dependency('Xxf86misc', required: false)
+if xf86misc_dep.found() and cc.has_function('XF86MiscQueryExtension', dependencies: xf86misc_dep)
+ has_header = cc.has_header('X11/extensions/xf86misc.h', dependencies: xf86misc_dep)
+ config_h.set('HAVE_X11_EXTENSIONS_XF86MISC_H', has_header)
+endif
+
+check_headers = [
+ ['HAVE_X11_EXTENSIONS_XKB_H', 'X11/extensions/XKB.h'],
+ ['HAVE_X11_XLIB_H', 'X11/Xlib.h']
+]
+
+foreach header: check_headers
+ config_h.set(header[0], cc.has_header(header[1], dependencies: x11_dep))
+endforeach
+
+# udev
+udev_dep = dependency('gudev-1.0', required: false)
+have_udep = udev_dep.found()
+
+config_h.set('HAVE_UDEV', have_udep,
+ description: ' System has udev')
+
+# network manager
+libnm_dep = dependency('libnm', version: '>= 1.2.0', required: false)
+libnma_dep = dependency('libnma', version: '>= 1.2.0', required: false)
+mm_glib_dep = dependency('mm-glib', version: '>= 0.7', required: false)
+have_network_manager = libnm_dep.found() and libnma_dep.found() and mm_glib_dep.found()
+
+if have_network_manager
+ network_manager_dep = dependency('NetworkManager')
+ nm_vpn_config_dir = join_paths(network_manager_dep.get_pkgconfig_variable('configdir'), 'VPN')
+ nm_vpn_module_dir = network_manager_dep.get_pkgconfig_variable('plugindir')
+else
+ error_str = '*** Network panel will not be built (NetworkManager or ModemManager not found) ***'
+ if host_is_linux
+ error(error_str)
+ endif
+ message(error_str)
+endif
+
+config_h.set('BUILD_NETWORK', have_network_manager,
+ description: 'Define to 1 to build the Network panel')
+config_h.set('HAVE_NETWORK_MANAGER', have_network_manager,
+ description: 'Define to 1 if NetworkManager is available')
+
+network_manager_deps = [
+ libnm_dep,
+ libnma_dep,
+ mm_glib_dep
+]
+
+# Check for gnome-bluetooth
+gnome_bluetooth_dep = dependency('gnome-bluetooth-1.0', version: '>= 3.18.2', required: false)
+have_bluetooth = gnome_bluetooth_dep.found()
+
+if not have_bluetooth
+ error_str = '*** Bluetooth panel will not be built'
+ if host_is_linux
+ if not host_is_s390
+ error(error_str + ' ***')
+ endif
+ message(error_str + ' (no USB support on this platform) ***')
+ else
+ message(error_str + ' ***')
+ endif
+endif
+
+config_h.set('BUILD_BLUETOOTH', have_bluetooth,
+ description: 'Define to 1 to build the Bluetooth panel')
+config_h.set('HAVE_BLUETOOTH', have_bluetooth,
+ description: 'Define to 1 if bluetooth support is available')
+
+# Check for CUPS 1.4 or newer
+cups_dep = dependency('cups', version : '>= 1.4', required: false)
+assert(cups_dep.found(), 'CUPS 1.4 or newer not found')
+
+# https://bugzilla.gnome.org/show_bug.cgi?id=696766
+cups_cflags = []
+# FIXME: This produces a lot of errors
+'''
+if cups_dep.version().version_compare('>= 1.6')
+ cups_cflags += '-D_PPD_DEPRECATED=""'
+endif
+'''
+
+# cups headers
+check_headers = [
+ ['HAVE_CUPS_CUPS_H', 'cups/cups.h'],
+ ['HAVE_CUPS_HTTP_H', 'cups/http.h'],
+ ['HAVE_CUPS_IPP_H', 'cups/ipp.h'],
+ ['HAVE_CUPS_PPD_H', 'cups/ppd.h']
+]
+
+foreach header: check_headers
+ has_header = cc.has_header(header[1], args: cups_cflags)
+ assert(has_header, 'CUPS headers not found: ' + header[1])
+ config_h.set(header[0], has_header)
+endforeach
+
+# Optional dependency for the user accounts panel
+have_cheese = false
+enable_cheese = get_option('enable-cheese')
+if enable_cheese != 'no'
+ cheese_gtk_dep = dependency('cheese-gtk', version: '>= 3.5.91', required: false)
+ cheese_dep = dependency('cheese', required: false)
+ have_cheese = cheese_gtk_dep.found() and cheese_dep.found() and clutter_gtk_dep.found()
+
+ if not have_cheese
+ error_str = 'Cheese configured but not found'
+ if enable_cheese == 'yes'
+ error(error_str)
+ endif
+ message(error_str)
+ endif
+
+ config_h.set('HAVE_CHEESE', have_cheese,
+ description: 'Define to 1 to enable cheese webcam support')
+
+ cheese_deps = [
+ cheese_gtk_dep,
+ cheese_dep,
+ clutter_gtk_dep
+ ]
+endif
+
+# Wacom
+clutter_dep = dependency('clutter-1.0', version: '>= 1.11.3', required: false)
+libwacom_dep = dependency('libwacom', version: '>= 0.7', required: false)
+have_wacom = clutter_dep.found() and clutter_gtk_dep.found() and libwacom_dep.found()
+
+if not have_wacom
+ error_str = '*** Wacom panel will not be built'
+ if host_is_linux
+ if not host_is_s390
+ error(error_str + ' ***')
+ endif
+ message(error_str + ' (no USB support on this platform) ***')
+ else
+ message(error_str + ' ***')
+ endif
+endif
+
+config_h.set('BUILD_WACOM', have_wacom,
+ description: 'Define to 1 to build the Wacom panel')
+config_h.set('HAVE_WACOM', have_wacom,
+ description: 'Define to 1 is Wacom is supportted')
+
+# Check for info panel
+gnome_session_libexecdir = get_option('with-gnome-session-libexecdir').strip()
+if gnome_session_libexecdir == ''
+ gnome_session_libexecdir = control_center_libexecdir
+endif
+
+# IBus support
+enable_ibus = get_option('enable-ibus')
+config_h.set('HAVE_IBUS', enable_ibus,
+ description: 'Defined if IBus support is enabled')
+
+configure_file(
+ output: 'config.h',
+ configuration: config_h
+)
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+
+desktop_conf = configuration_data()
+desktop_conf.set('VERSION', control_center_version)
+
+po_dir = join_paths(meson.source_root(), 'po')
+
+intltool_merge = find_program('intltool-merge')
+intltool_cache = join_paths(po_dir, '.intltool-merge-cache')
+intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+
+top_inc = include_directories('.')
+shell_inc = include_directories('shell')
+
+subdir('po')
+subdir('panels')
+subdir('shell')
+subdir('search-provider')
+
+if get_option('enable-documentation')
+ subdir('man')
+endif
+
+meson.add_install_script(
+ 'meson_post_install.py',
+ control_center_datadir
+)
+
+output = meson.project_name() + ' was configured with the following options:\n'
+
+if have_network_manager
+ output += '** NetworkManager (Network panel)\n'
+else
+ output += ' Network panel disabled\n'
+endif
+
+if have_bluetooth
+ output += '** gnome-bluetooth (Bluetooth panel)\n'
+else
+ output += ' Bluetooth panel disabled\n'
+endif
+
+if have_cheese
+ output += '** Cheese (Users panel webcam support)\n'
+else
+ output += ' Users panel webcam support disabled\n'
+endif
+
+if have_wacom
+ output += '** wacom (Wacom tablet panel)\n'
+else
+ output += ' Wacom panel disabled\n'
+endif
+
+if enable_ibus
+ output += '** IBus (Region panel IBus support)\n'
+else
+ output += ' Region panel IBus support disabled\n'
+endif
+
+output += '** gnome-session libexecdir: ' + gnome_session_libexecdir + '\n'
+output += 'End options'
+message(output)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..36a6870
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,5 @@
+option('enable-cheese', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'enable
cheese webcam support')
+option('enable-ibus', type: 'boolean', value: true, description: 'Disable IBus support')
+option('with-gnome-session-libexecdir', type: 'string', value: '', description: 'Directory for gnome-session
s libexecdir')
+option('enable-documentation', type: 'boolean', value: false, description: 'build documentation')
+option('enable-update-mimedb', type: 'boolean', value: true, description: 'update-mime-database after
install')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..3c0eb2f
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+import sys
+
+if not os.environ.get('DESTDIR'):
+ icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
+ print('Update icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
diff --git a/panels/background/meson.build b/panels/background/meson.build
new file mode 100644
index 0000000..ecb27e0
--- /dev/null
+++ b/panels/background/meson.build
@@ -0,0 +1,128 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+install_data(
+ 'slideshow-symbolic.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'categories')
+)
+
+install_data(
+ 'slideshow-emblem.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'emblems')
+)
+
+install_data(
+ 'noise-texture-light.png',
+ install_dir: join_paths(control_center_pkgdatadir, 'pixmaps')
+)
+
+common_sources = []
+
+gdesktop_prefix = gsettings_desktop_dep.get_pkgconfig_variable('prefix')
+
+enums = 'gdesktop-enums-types'
+enums_header = files(
+ gdesktop_prefix + '/include/gsettings-desktop-schemas/gdesktop-enums.h',
+ 'cc-background-item.h'
+)
+
+common_sources += gnome.mkenums(
+ enums + '.h',
+ sources: enums_header,
+ fhead: '#ifndef __GDESKTOP_ENUMS_TYPES_H__\n#define __GDESKTOP_ENUMS_TYPES_H__\n\n#include
<glib-object.h>\n\nG_BEGIN_DECLS\n',
+ fprod: '/* enumerations from "@filename@" */\n',
+ vhead: 'GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define G_DESKTOP_TYPE_@ENUMSHORT@
(@enum_name@_get_type())\n',
+ ftail: 'G_END_DECLS\n\n#endif /* __GDESKTOP_ENUMS_TYPES_H__ */'
+)
+
+common_sources += gnome.mkenums(
+ enums + '.c',
+ sources: enums_header,
+ fhead: '#include <gdesktop-enums.h>\n#include "gdesktop-enums-types.h"\n#include "cc-background-item.h"',
+ fprod: '\n/* enumerations from "@filename@" */',
+ vhead: 'GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static
const G@Type@Value values[] = {',
+ vprod: ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+ vtail: ' { 0, NULL, NULL }\n };\n etype = g_@type@_register_static ("@EnumName@", values);\n
}\n return etype;\n}\n'
+)
+
+resource_data = files('background.ui')
+
+common_sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+sources = common_sources + files(
+ 'bg-colors-source.c',
+ 'bg-pictures-source.c',
+ 'bg-source.c',
+ 'bg-wallpapers-source.c',
+ 'cc-background-chooser-dialog.c',
+ 'cc-background-grilo-miner.c',
+ 'cc-background-item.c',
+ 'cc-background-xml.c'
+)
+
+deps = common_deps + [
+ gdk_pixbuf_dep,
+ gnome_desktop_dep,
+ goa_dep,
+ libxml_dep,
+ dependency('cairo-gobject'),
+ dependency('grilo-0.3', version: '>= 0.3.0')
+]
+
+cflags = [
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir),
+ '-DDATADIR="@0@"'.format(control_center_datadir),
+ '-DGNOME_DESKTOP_USE_UNSTABLE_API'
+]
+
+libbackground_chooser = static_library(
+ cappletname + '-chooser',
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+sources = common_sources + files('cc-' + cappletname + '-panel.c')
+
+libbackground = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libbackground_chooser
+)
+
+test_name = 'test-chooser-dialog'
+
+executable(
+ test_name,
+ test_name + '.c',
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libbackground_chooser
+)
diff --git a/panels/bluetooth/meson.build b/panels/bluetooth/meson.build
new file mode 100644
index 0000000..f8a2e5e
--- /dev/null
+++ b/panels/bluetooth/meson.build
@@ -0,0 +1,42 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('bluetooth.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [gnome_bluetooth_dep]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libbluetooth = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/color/icons/meson.build b/panels/color/icons/meson.build
new file mode 100644
index 0000000..da2e7e2
--- /dev/null
+++ b/panels/color/icons/meson.build
@@ -0,0 +1,21 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '24x24',
+ '32x32',
+ '48x48',
+ '64x64',
+ '256x256'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'preferences-color.png'),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'scalable/preferences-color.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/color/meson.build b/panels/color/meson.build
new file mode 100644
index 0000000..05f15f0
--- /dev/null
+++ b/panels/color/meson.build
@@ -0,0 +1,63 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-color-calibrate.c',
+ 'cc-color-cell-renderer-text.c',
+ 'cc-color-common.c',
+ 'cc-color-device.c',
+ 'cc-color-profile.c'
+)
+
+resource_data = files(
+ 'color-calibrate.ui',
+ 'color.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ colord_dep,
+ gnome_desktop_dep,
+ m_dep,
+ dependency('colord-gtk', version: '>= 0.1.24'),
+ dependency('libsoup-2.4')
+]
+
+cflags = [
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir),
+ '-DBINDIR="@0@"'.format(control_center_bindir)
+]
+
+libcolor = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/common/meson.build b/panels/common/meson.build
new file mode 100644
index 0000000..0549701
--- /dev/null
+++ b/panels/common/meson.build
@@ -0,0 +1,106 @@
+common_inc = include_directories('.')
+
+common_sources = []
+
+enums = 'gsd-common-enums'
+enums_header = files('gsd-device-manager.h')
+
+common_sources += gnome.mkenums(
+ enums + '.h',
+ sources: enums_header,
+ fhead: '#ifndef GSD_COMMON_ENUMS_H\n#define GSD_COMMON_ENUMS_H\n\n#include
<glib-object.h>\n\nG_BEGIN_DECLS\n',
+ fprod: '/* enumerations from "@filename@" */\n',
+ vhead: 'GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GSD_TYPE_@ENUMSHORT@
(@enum_name@_get_type())\n',
+ ftail: 'G_END_DECLS\n\n#endif /* !GSD_COMMON_ENUMS_H */'
+)
+
+common_sources += gnome.mkenums(
+ enums + '.c',
+ sources: enums_header,
+ fhead: '#include "gsd-device-manager.h"\n#include "gsd-common-enums.h"\n',
+ fprod: '\n/* enumerations from "@filename@" */',
+ vhead: 'GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static
const G@Type@Value values[] = {',
+ vprod: ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+ vtail: ' { 0, NULL, NULL }\n };\n etype = g_@type@_register_static ("@EnumName@", values);\n
}\n return etype;\n}\n'
+)
+
+sources = common_sources + files(
+ 'cc-common-language.c',
+ 'cc-language-chooser.c',
+ 'cc-util.c'
+)
+
+resource_data = files('language-chooser.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ gnome_desktop_dep,
+ dependency('fontconfig')
+]
+
+liblanguage = static_library(
+ 'language',
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps
+)
+
+sources = common_sources + files(
+ 'gsd-device-manager.c',
+ 'gsd-device-manager-x11.c',
+ 'gsd-input-helper.c'
+)
+
+deps = common_deps
+
+if have_udep
+ sources += files('gsd-device-manager-udev.c')
+
+ deps += [
+ udev_dep,
+ dependency('gdk-wayland-3.0', required: false)
+ ]
+endif
+
+libdevice = static_library(
+ 'device',
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps
+)
+
+install_data(
+ 'gnome-control-center.rules',
+ install_dir: join_paths(control_center_datadir, 'polkit-1', 'rules.d')
+)
+
+# FIXME: updates gnome-settings-daemon code !?
+'''
+input_files = files(
+ 'gsd-device-manager-udev.c',
+ 'gsd-device-manager-udev.h',
+ 'gsd-device-manager-x11.c',
+ 'gsd-device-manager-x11.h',
+ 'gsd-device-manager.c',
+ 'gsd-device-manager.h',
+ 'gsd-input-helper.c',
+ 'gsd-input-helper.h'
+)
+
+install_data(
+ input_files,
+ install_dir: join_paths(meson.source_root(), '..', 'gnome-settings-daemon', 'plugins', 'common')
+)
+
+update-from-gsd:
+ FILES="$(INPUTFILES)" DIR="$(INPUTDIR)" $(top_srcdir)/update-from-gsd.sh && changed=true ; \
+ git commit -m "common: Update from gnome-settings-daemon" $(INPUTFILES)
+'''
diff --git a/panels/datetime/icons/meson.build b/panels/datetime/icons/meson.build
new file mode 100644
index 0000000..f8f0cf1
--- /dev/null
+++ b/panels/datetime/icons/meson.build
@@ -0,0 +1,19 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '32x32',
+ '48x48',
+ '256x256'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'preferences-system-time.png'),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'scalable/preferences-system-time.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/datetime/meson.build b/panels/datetime/meson.build
new file mode 100644
index 0000000..6b57d8b
--- /dev/null
+++ b/panels/datetime/meson.build
@@ -0,0 +1,217 @@
+subdir('po-timezones')
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+polkit = 'org.gnome.controlcenter.' + cappletname + '.policy'
+
+custom_target(
+ polkit,
+ input: polkit + '.in',
+ output: polkit,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions')
+)
+
+resource_data = files(
+ 'data/bg_dim.png',
+ 'data/bg.png',
+ 'data/cc.png',
+ 'data/pin.png',
+ 'data/timezone_0_dim.png',
+ 'data/timezone_0.png',
+ 'data/timezone_10.5_dim.png',
+ 'data/timezone_10.5.png',
+ 'data/timezone_-10_dim.png',
+ 'data/timezone_10_dim.png',
+ 'data/timezone_-10.png',
+ 'data/timezone_10.png',
+ 'data/timezone_11.5_dim.png',
+ 'data/timezone_11.5.png',
+ 'data/timezone_-11_dim.png',
+ 'data/timezone_11_dim.png',
+ 'data/timezone_-11.png',
+ 'data/timezone_11.png',
+ 'data/timezone_12.75_dim.png',
+ 'data/timezone_12.75.png',
+ 'data/timezone_12_dim.png',
+ 'data/timezone_12.png',
+ 'data/timezone_13_dim.png',
+ 'data/timezone_13.png',
+ 'data/timezone_14_dim.png',
+ 'data/timezone_14.png',
+ 'data/timezone_-1_dim.png',
+ 'data/timezone_1_dim.png',
+ 'data/timezone_-1.png',
+ 'data/timezone_1.png',
+ 'data/timezone_-2_dim.png',
+ 'data/timezone_2_dim.png',
+ 'data/timezone_-2.png',
+ 'data/timezone_2.png',
+ 'data/timezone_-3.5_dim.png',
+ 'data/timezone_3.5_dim.png',
+ 'data/timezone_-3.5.png',
+ 'data/timezone_3.5.png',
+ 'data/timezone_-3_dim.png',
+ 'data/timezone_3_dim.png',
+ 'data/timezone_-3.png',
+ 'data/timezone_3.png',
+ 'data/timezone_-4.5_dim.png',
+ 'data/timezone_4.5_dim.png',
+ 'data/timezone_-4.5.png',
+ 'data/timezone_4.5.png',
+ 'data/timezone_-4_dim.png',
+ 'data/timezone_4_dim.png',
+ 'data/timezone_-4.png',
+ 'data/timezone_4.png',
+ 'data/timezone_-5.5_dim.png',
+ 'data/timezone_5.5_dim.png',
+ 'data/timezone_-5.5.png',
+ 'data/timezone_5.5.png',
+ 'data/timezone_5.75_dim.png',
+ 'data/timezone_5.75.png',
+ 'data/timezone_-5_dim.png',
+ 'data/timezone_5_dim.png',
+ 'data/timezone_-5.png',
+ 'data/timezone_5.png',
+ 'data/timezone_6.5_dim.png',
+ 'data/timezone_6.5.png',
+ 'data/timezone_-6_dim.png',
+ 'data/timezone_6_dim.png',
+ 'data/timezone_-6.png',
+ 'data/timezone_6.png',
+ 'data/timezone_-7_dim.png',
+ 'data/timezone_7_dim.png',
+ 'data/timezone_-7.png',
+ 'data/timezone_7.png',
+ 'data/timezone_8.5_dim.png',
+ 'data/timezone_8.5.png',
+ 'data/timezone_8.75_dim.png',
+ 'data/timezone_8.75.png',
+ 'data/timezone_-8_dim.png',
+ 'data/timezone_8_dim.png',
+ 'data/timezone_-8.png',
+ 'data/timezone_8.png',
+ 'data/timezone_-9.5_dim.png',
+ 'data/timezone_9.5_dim.png',
+ 'data/timezone_-9.5.png',
+ 'data/timezone_9.5.png',
+ 'data/timezone_-9_dim.png',
+ 'data/timezone_9_dim.png',
+ 'data/timezone_-9.png',
+ 'data/timezone_9.png',
+ 'backward',
+ 'big.ui',
+ 'datetime.ui',
+ 'little.ui',
+ 'middle.ui',
+ 'ydm.ui'
+)
+
+resources = gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-timezone-map.c',
+ 'date-endian.c',
+ 'tz.c'
+)
+
+gdbus = 'timedated'
+gdbus_iface_xml = gdbus + '1-interface.xml'
+
+# This requires running d-bus session and accessible timedate1 daemon
+# FIXME: need to find a way how to filter out unnecessary d-bus stuff (introspectable, properties)
+#timedated1-interface.xml:
+# gdbus introspect \
+# --xml \
+# --system \
+# --dest org.freedesktop.timedate1 \
+# --object-path /org/freedesktop/timedate1 \
+# > timedated1-interface.xml
+'''
+gdbus_iface = custom_target(
+ gdbus_iface_xml,
+ output: gdbus_iface_xml,
+ capture: true,
+ command: [
+ find_program('gdbus'),
+ 'introspect',
+ '--xml',
+ '--system',
+ '--dest', 'org.freedesktop.timedate1',
+ '--object-path', '/org/freedesktop/timedate1'
+ ],
+)
+'''
+
+sources += gnome.gdbus_codegen(
+ gdbus,
+ gdbus_iface_xml,
+ interface_prefix: 'org.freedesktop.'
+)
+
+deps = common_deps + [
+ gdk_pixbuf_dep,
+ gnome_desktop_dep,
+ polkit_gobject_dep
+]
+
+cflags = [
+ '-DGNOMECC_DATA_DIR="@0@"'.format(control_center_pkgdatadir),
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libdatetime = static_library(
+ cappletname,
+ sources: sources + resources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+test_cflags = '-DSRCDIR="@0@"'.format(meson.current_source_dir())
+
+test_units = [
+ # test name, test name + '.c' + extra_sources, extra_deps, extra cflags
+ # FIXME: The test does not work due to missing timezones
+ #['test-timezone', ['cc-timezone-map.c', 'tz.c'] + resources, [m_dep], []],
+ ['test-timezone-gfx', ['tz.c'] + resources, [m_dep], [test_cflags]],
+ ['test-endianess', ['date-endian.c'], [], []]
+]
+
+foreach unit: test_units
+ exe = executable(
+ unit[0],
+ [unit[0] + '.c'] + unit[1],
+ include_directories: top_inc,
+ dependencies: deps + unit[2],
+ c_args: cflags + unit[3]
+ )
+
+ test(unit[0], exe)
+endforeach
diff --git a/panels/datetime/po-timezones/meson.build b/panels/datetime/po-timezones/meson.build
new file mode 100644
index 0000000..dca8638
--- /dev/null
+++ b/panels/datetime/po-timezones/meson.build
@@ -0,0 +1,73 @@
+linguas = [
+ 'am',
+ 'ar',
+ 'as',
+ 'ast',
+ 'bg',
+ 'bn',
+ 'bn_IN',
+ 'bs',
+ 'ca',
+ 'cs',
+ 'cy',
+ 'da',
+ 'de',
+ 'el',
+ 'en_GB',
+ 'es',
+ 'et',
+ 'fa',
+ 'fi',
+ 'fr',
+ 'gl',
+ 'gu',
+ 'he',
+ 'hi',
+ 'hr',
+ 'hu',
+ 'id',
+ 'ilo',
+ 'is',
+ 'it',
+ 'ja',
+ 'ka',
+ 'kn',
+ 'ko',
+ 'ku',
+ 'lo',
+ 'lt',
+ 'lv',
+ 'mai',
+ 'mk',
+ 'ml',
+ 'mr',
+ 'ms',
+ 'nb',
+ 'nds',
+ 'nl',
+ 'nn',
+ 'or',
+ 'pa',
+ 'pl',
+ 'pt',
+ 'pt_BR',
+ 'ro',
+ 'ru',
+ 'si',
+ 'sk',
+ 'sl',
+ 'sq',
+ 'sr',
+ 'sr@latin',
+ 'sv',
+ 'ta',
+ 'te',
+ 'tr',
+ 'uk',
+ 'ur',
+ 'vi',
+ 'zh_CN',
+ 'zh_TW'
+]
+
+i18n.gettext(control_center_api_name + '-timezones', languages: linguas, preset: 'glib')
diff --git a/panels/display/icons/meson.build b/panels/display/icons/meson.build
new file mode 100644
index 0000000..06289d7
--- /dev/null
+++ b/panels/display/icons/meson.build
@@ -0,0 +1,18 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '24x24',
+ '32x32',
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'preferences-desktop-display.png'),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'scalable/preferences-desktop-display.svg',
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'apps')
+)
diff --git a/panels/display/meson.build b/panels/display/meson.build
new file mode 100644
index 0000000..6d02d6e
--- /dev/null
+++ b/panels/display/meson.build
@@ -0,0 +1,68 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+# FIXME: what is going on here?
+# You will need a recent intltool or the patch from this bug
+# http://bugzilla.gnome.org/show_bug.cgi?id=462312
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-display-config.c',
+ 'cc-display-config-dbus.c',
+ 'cc-display-config-manager-dbus.c',
+ 'cc-display-config-manager.c',
+ 'cc-night-light-dialog.c',
+ 'cc-night-light-widget.c',
+ 'scrollarea.c',
+)
+
+resource_data = files(
+ 'display.ui',
+ 'icons/16x16/sunset.png',
+ 'icons/16x16/sunrise.png'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: ['.', 'icons'],
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ colord_dep,
+ gnome_desktop_dep,
+ m_dep,
+ upower_glib_dep
+]
+
+cflags = [
+ '-DDATADIR="@0@"'.format(control_center_datadir),
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libdisplay = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/info/meson.build b/panels/info/meson.build
new file mode 100644
index 0000000..67fbf3a
--- /dev/null
+++ b/panels/info/meson.build
@@ -0,0 +1,109 @@
+panel_names = [
+ cappletname,
+ 'default-apps',
+ 'info-overview',
+ 'removable-media'
+]
+
+panel_list += panel_names
+
+foreach name: panel_names
+ desktop = 'gnome-' + name + '-panel.desktop'
+
+ desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+ )
+
+ custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+ )
+endforeach
+
+common_cflags = [
+ '-DBINDIR="@0@"'.format(control_center_bindir),
+ '-DDATADIR="@0@"'.format(control_center_datadir),
+ '-DGNOME_SESSION_DIR="@0@"'.format(gnome_session_libexecdir),
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-info-default-apps-panel.c',
+ 'cc-info-overview-panel.c',
+ 'cc-info-removable-media-panel.c',
+ 'gsd-disk-space-helper.c',
+ 'info-cleanup.c'
+)
+
+resource_data = files(
+ 'GnomeLogoVerticalMedium.svg',
+ 'info-default-apps.ui',
+ 'info-overview.ui',
+ 'info-removable-media.ui',
+ 'info.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ polkit_gobject_dep,
+ dependency('libgtop-2.0')
+]
+
+libinfo = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: common_cflags
+)
+
+name = 'info-cleanup'
+
+sources = files(
+ name + '.c',
+ 'test-' + name + '.c'
+)
+
+cflags = common_cflags + ['-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir())]
+
+exe = executable(
+ 'test-' + name,
+ sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+test(name, exe)
+
+# FIXME: updates gnome-settings-daemon code !?
+'''
+space_files = files(
+ 'gsd-disk-space-helper.c',
+ 'gsd-disk-space-helper.h'
+)
+
+install_data(
+ space_files,
+ install_dir: join_paths(meson.source_root(), '..', 'gnome-settings-daemon', 'plugins', 'housekeeping')
+)
+
+update-from-gsd:
+ FILES="$(SPACEFILES)" DIR="$(SPACEDIR)" $(top_srcdir)/update-from-gsd.sh && changed=true ; \
+ git commit -m "info: Update from gnome-settings-daemon" $(SPACEFILES)
+'''
diff --git a/panels/keyboard/meson.build b/panels/keyboard/meson.build
new file mode 100644
index 0000000..225de49
--- /dev/null
+++ b/panels/keyboard/meson.build
@@ -0,0 +1,104 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+its_data = files(
+ 'gnome-keybindings.its',
+ 'gnome-keybindings.loc'
+)
+
+install_data(
+ its_data,
+ install_dir: join_paths(control_center_datadir, 'gettext', 'its')
+)
+
+pc_conf = configuration_data()
+pc_conf.set('prefix', control_center_prefix)
+pc_conf.set('datarootdir', control_center_datadir)
+pc_conf.set('datadir', control_center_datadir)
+pc_conf.set('PACKAGE', meson.project_name())
+pc_conf.set('VERSION', control_center_version)
+
+pc = 'gnome-keybindings.pc'
+
+configure_file(
+ input: pc + '.in',
+ output: pc,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'pkgconfig'),
+ configuration: pc_conf
+)
+
+xml_files = [
+ '00-multimedia.xml',
+ '01-input-sources.xml',
+ '01-launchers.xml',
+ '01-screenshot.xml',
+ '01-system.xml',
+ '50-accessibility.xml'
+]
+
+foreach file: xml_files
+ custom_target(
+ file,
+ input: file + '.in',
+ output: file,
+ command: [intltool_merge, '-x', '-u', '--no-translations', '@INPUT@', '@OUTPUT@'],
+ install: true,
+ install_dir: join_paths(control_center_pkgdatadir, 'keybindings')
+ )
+endforeach
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-keyboard-item.c',
+ 'cc-keyboard-manager.c',
+ 'cc-keyboard-option.c',
+ 'cc-keyboard-shortcut-editor.c',
+ 'wm-common.c',
+ 'keyboard-shortcuts.c'
+)
+
+resource_data = files(
+ 'enter-keyboard-shortcut.svg',
+ 'gnome-keyboard-panel.ui',
+ 'shortcut-editor.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ gnome_desktop_dep,
+ x11_dep
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libkeyboard = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/meson.build b/panels/meson.build
new file mode 100644
index 0000000..cb663d6
--- /dev/null
+++ b/panels/meson.build
@@ -0,0 +1,44 @@
+panel_list = []
+
+panels = [
+ 'common',
+ 'background',
+ 'power',
+ 'color',
+ 'display',
+ 'mouse',
+ 'notifications',
+ 'online-accounts',
+ 'region',
+ 'info',
+ 'sound',
+ 'keyboard',
+ 'universal-access',
+ 'user-accounts',
+ 'datetime',
+ 'search',
+ 'privacy',
+ 'sharing',
+ 'printers'
+]
+
+if have_wacom
+ panels += 'wacom'
+endif
+
+if have_network_manager
+ panels += 'network'
+endif
+
+if have_bluetooth
+ panels += 'bluetooth'
+endif
+
+foreach cappletname: panels
+ cflags = [
+ '-DG_LOG_DOMAIN="@0@-cc-panel"'.format(cappletname),
+ '-DPANEL_ID="@0@"'.format(cappletname)
+ ]
+
+ subdir(cappletname)
+endforeach
diff --git a/panels/mouse/meson.build b/panels/mouse/meson.build
new file mode 100644
index 0000000..d2c39ee
--- /dev/null
+++ b/panels/mouse/meson.build
@@ -0,0 +1,72 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+resource_data = files(
+ 'gnome-mouse-properties.ui',
+ 'gnome-mouse-test.ui',
+ 'scroll-test-gegl.svg',
+ 'scroll-test.svg'
+)
+
+common_sources = gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+sources = common_sources + files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-mouse-caps-helper.c',
+ 'gnome-mouse-properties.c',
+ 'gnome-mouse-test.c'
+)
+
+deps = common_deps + [
+ gnome_settings_dep,
+ x11_dep,
+ xi_dep
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libmouse_properties = static_library(
+ cappletname + '-properties',
+ sources: sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libdevice
+)
+
+name = 'gnome-mouse-test'
+
+sources = common_sources + files(
+ name + '.c',
+ 'test-' + name + '.c'
+)
+
+executable(
+ 'test-' + name,
+ sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/network/connection-editor/meson.build b/panels/network/connection-editor/meson.build
new file mode 100644
index 0000000..5acd21b
--- /dev/null
+++ b/panels/network/connection-editor/meson.build
@@ -0,0 +1,56 @@
+name = 'connection-editor'
+
+sources = files(
+ 'ce-page-8021x-security.c',
+ 'ce-page-details.c',
+ 'ce-page-ethernet.c',
+ 'ce-page-ip4.c',
+ 'ce-page-ip6.c',
+ 'ce-page-security.c',
+ 'ce-page-vpn.c',
+ 'ce-page-wifi.c',
+ 'ce-page.c',
+ 'net-connection-editor.c',
+ 'ui-helpers.c',
+ 'vpn-helpers.c'
+)
+
+resource_data = files(
+ '8021x-security-page.ui',
+ 'connection-editor.ui',
+ 'details-page.ui',
+ 'ethernet-page.ui',
+ 'ip4-page.ui',
+ 'ip6-page.ui',
+ 'security-page.ui',
+ 'vpn-page.ui',
+ 'wifi-page.ui'
+)
+
+c_name = 'net-' + name
+
+sources += gnome.compile_resources(
+ c_name + '-resources',
+ name + '.gresource.xml',
+ source_dir: '.',
+ c_name: c_name.underscorify(),
+ dependencies: resource_data,
+ export: true
+)
+
+cflags = [
+ '-DNM_VPN_CONFIG_DIR="@0@"'.format(nm_vpn_config_dir),
+ '-DNM_VPN_MODULE_DIR="@0@"'.format(nm_vpn_module_dir)
+]
+
+libconnection_editor = static_library(
+ name,
+ sources: sources,
+ include_directories: [
+ top_inc,
+ wireless_security_inc
+ ],
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libwireless_security
+)
diff --git a/panels/network/meson.build b/panels/network/meson.build
new file mode 100644
index 0000000..015f7aa
--- /dev/null
+++ b/panels/network/meson.build
@@ -0,0 +1,79 @@
+deps = common_deps + network_manager_deps + [
+ polkit_gobject_dep,
+ dependency('gmodule-2.0')
+]
+
+subdir('wireless-security')
+subdir('connection-editor')
+
+panel_names = [
+ cappletname,
+ 'wifi'
+]
+
+panel_list += panel_names
+
+foreach name: panel_names
+ desktop = 'gnome-' + name + '-panel.desktop'
+
+ desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+ )
+
+ custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+ )
+endforeach
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-wifi-panel.c',
+ 'net-device.c',
+ 'net-device-ethernet.c',
+ 'net-device-mobile.c',
+ 'net-device-simple.c',
+ 'net-device-wifi.c',
+ 'net-object.c',
+ 'net-proxy.c',
+ 'net-vpn.c',
+ 'network-dialogs.c',
+ 'panel-common.c'
+)
+
+resource_data = files(
+ 'network-ethernet.ui',
+ 'network-mobile.ui',
+ 'network-proxy.ui',
+ 'network-simple.ui',
+ 'network.ui',
+ 'network-vpn.ui',
+ 'network-wifi.ui',
+ 'wifi.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libnetwork = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libconnection_editor
+)
diff --git a/panels/network/wireless-security/meson.build b/panels/network/wireless-security/meson.build
new file mode 100644
index 0000000..f1fe453
--- /dev/null
+++ b/panels/network/wireless-security/meson.build
@@ -0,0 +1,71 @@
+name = 'wireless-security'
+
+wireless_security_inc = include_directories('.')
+
+nm_applet_sources = files(
+ 'eap-method-fast.c',
+ 'eap-method-leap.c',
+ 'eap-method-peap.c',
+ 'eap-method-simple.c',
+ 'eap-method-tls.c',
+ 'eap-method-ttls.c',
+ 'eap-method.c',
+ 'helpers.c',
+ 'wireless-security.c',
+ 'ws-leap.c',
+ 'ws-dynamic-wep.c',
+ 'ws-wep-key.c',
+ 'ws-wpa-eap.c',
+ 'ws-wpa-psk.c'
+)
+
+sources = nm_applet_sources + files('utils.c')
+
+resource_data = files(
+ 'eap-method-fast.ui',
+ 'eap-method-leap.ui',
+ 'eap-method-peap.ui',
+ 'eap-method-simple.ui',
+ 'eap-method-tls.ui',
+ 'eap-method-ttls.ui',
+ 'ws-dynamic-wep.ui',
+ 'ws-leap.ui',
+ 'ws-wep-key.ui',
+ 'ws-wpa-eap.ui',
+ 'ws-wpa-psk.ui'
+)
+
+sources += gnome.compile_resources(
+ name + '-resources',
+ name + '.gresource.xml',
+ source_dir: '.',
+ c_name: name.underscorify(),
+ dependencies: resource_data,
+ export: true
+)
+
+# FIXME: is this uidir from ./panels/sharing/Makefile.am?
+cflags = '-DUIDIR="@0@"'.format(control_center_pkgdatadir, 'ui', 'sharing')
+
+libwireless_security = static_library(
+ name,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+# FIXME: updates gnome-settings-daemon code !?
+'''
+wireless_security_dir = join_paths(meson.source_root(), '..', 'network-manager-applet', 'src',
'wireless-security')
+
+update-from-nma:
+ FILES="$(nm_applet_sources)" DIR="$(wireless_security_dir)" $(top_srcdir)/update-from-gsd.sh && \
+ patch -p4 < $(srcdir)/nm-connection-editor-to-network-panel.patch && \
+ git add $(nm_applet_sources) && \
+ git commit -m "network: Update wireless-security from network-manager-applet"
+ FILES="$(resource_data)" DIR="$(wireless_security_dir)" $(top_srcdir)/update-from-gsd.sh && \
+ patch -p4 < $(srcdir)/nm-connection-editor-ui-to-network-panel.patch && \
+ git add $(resource_data) && \
+ git commit -m "network: Update wireless-security UI from network-manager-applet"
+'''
diff --git a/panels/notifications/meson.build b/panels/notifications/meson.build
new file mode 100644
index 0000000..7db452c
--- /dev/null
+++ b/panels/notifications/meson.build
@@ -0,0 +1,46 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-edit-dialog.c'
+)
+
+resource_data = files(
+ 'edit-dialog.ui',
+ 'notifications.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libnotifications = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: common_deps,
+ c_args: cflags
+)
diff --git a/panels/online-accounts/icons/meson.build b/panels/online-accounts/icons/meson.build
new file mode 100644
index 0000000..93a340a
--- /dev/null
+++ b/panels/online-accounts/icons/meson.build
@@ -0,0 +1,15 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '24x24',
+ '32x32',
+ '48x48',
+ '256x256'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'goa-panel.png'),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
diff --git a/panels/online-accounts/meson.build b/panels/online-accounts/meson.build
new file mode 100644
index 0000000..3e3a531
--- /dev/null
+++ b/panels/online-accounts/meson.build
@@ -0,0 +1,48 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('online-accounts.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname.underscorify(),
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ goa_dep,
+ libgd_dep,
+ dependency('goa-backend-1.0', version: goa_req_version)
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libonline_accounts = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/power/icons/meson.build b/panels/power/icons/meson.build
new file mode 100644
index 0000000..4e36288
--- /dev/null
+++ b/panels/power/icons/meson.build
@@ -0,0 +1,15 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '24x24',
+ '32x32',
+ '48x48',
+ '256x256'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'gnome-power-manager.png'),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
diff --git a/panels/power/meson.build b/panels/power/meson.build
new file mode 100644
index 0000000..b540738
--- /dev/null
+++ b/panels/power/meson.build
@@ -0,0 +1,55 @@
+subdir('icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('power.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ gnome_settings_dep,
+ upower_glib_dep
+]
+
+if have_bluetooth
+ deps += gnome_bluetooth_dep
+endif
+
+if have_network_manager
+ deps += network_manager_deps
+endif
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libpower = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/printers/meson.build b/panels/printers/meson.build
new file mode 100644
index 0000000..c2fa17e
--- /dev/null
+++ b/panels/printers/meson.build
@@ -0,0 +1,99 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'pp-cups.c',
+ 'pp-details-dialog.c',
+ 'pp-host.c',
+ 'pp-ipp-option-widget.c',
+ 'pp-job.c',
+ 'pp-jobs-dialog.c',
+ 'pp-maintenance-command.c',
+ 'pp-new-printer-dialog.c',
+ 'pp-new-printer.c',
+ 'pp-options-dialog.c',
+ 'pp-ppd-option-widget.c',
+ 'pp-ppd-selection-dialog.c',
+ 'pp-print-device.c',
+ 'pp-printer-entry.c',
+ 'pp-printer.c',
+ 'pp-samba.c',
+ 'pp-utils.c'
+)
+
+resource_data = files(
+ 'authentication-dialog.ui',
+ 'details-dialog.ui',
+ 'jobs-dialog.ui',
+ 'new-printer-dialog.ui',
+ 'options-dialog.ui',
+ 'ppd-selection-dialog.ui',
+ 'printer-entry.ui',
+ 'printers.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ cups_dep,
+ m_dep,
+ polkit_gobject_dep,
+ dependency('smbclient')
+]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libprinters = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, common_inc, shell_inc],
+ dependencies: deps,
+ c_args: cflags
+)
+
+test_units = [
+ 'test-canonicalization',
+ 'test-shift'
+]
+
+sources = files(
+ 'pp-print-device.c',
+ 'pp-utils.c'
+)
+
+cflags = '-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir())
+
+foreach unit: test_units
+ exe = executable(
+ unit,
+ [unit + '.c'] + sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+ )
+
+ test(unit, exe)
+endforeach
diff --git a/panels/privacy/meson.build b/panels/privacy/meson.build
new file mode 100644
index 0000000..3b4ecff
--- /dev/null
+++ b/panels/privacy/meson.build
@@ -0,0 +1,40 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files('cc-' + cappletname + '-panel.c')
+
+resource_data = files('privacy.ui')
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libprivacy = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: common_deps,
+ c_args: cflags
+)
diff --git a/panels/region/meson.build b/panels/region/meson.build
new file mode 100644
index 0000000..e0e1958
--- /dev/null
+++ b/panels/region/meson.build
@@ -0,0 +1,60 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-format-chooser.c',
+ 'cc-ibus-utils.c',
+ 'cc-input-chooser.c',
+ 'cc-input-options.c'
+)
+
+resource_data = files(
+ 'format-chooser.ui',
+ 'input-chooser.ui',
+ 'input-options.ui',
+ 'region.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [
+ accounts_dep,
+ gnome_desktop_dep,
+ libgd_dep,
+ polkit_gobject_dep
+]
+
+if enable_ibus
+ deps += dependency('ibus-1.0', version: '>= 1.5.2')
+endif
+
+libregion = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: deps,
+ link_with: liblanguage
+)
diff --git a/panels/search/meson.build b/panels/search/meson.build
new file mode 100644
index 0000000..9c7b32d
--- /dev/null
+++ b/panels/search/meson.build
@@ -0,0 +1,49 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-search-locations-dialog.c'
+)
+
+resource_data = files(
+ 'search-locations-dialog.ui',
+ 'search.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+cflags = [
+ '-DDATADIR="@0@"'.format(control_center_datadir),
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libsearch = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: common_deps,
+ c_args: cflags
+)
diff --git a/panels/sharing/meson.build b/panels/sharing/meson.build
new file mode 100644
index 0000000..0864681
--- /dev/null
+++ b/panels/sharing/meson.build
@@ -0,0 +1,100 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+polkit_conf = configuration_data()
+polkit_conf.set('libexecdir', control_center_libexecdir)
+
+polkit = 'org.gnome.controlcenter.remote-login-helper.policy'
+
+polkit_in = configure_file(
+ input: polkit + '.in.in',
+ output: polkit + '.in',
+ configuration: polkit_conf
+)
+
+custom_target(
+ polkit,
+ input: polkit_in,
+ output: polkit,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions')
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-media-sharing.c',
+ 'cc-remote-login.c',
+ 'cc-sharing-networks.c',
+ 'cc-sharing-switch.c',
+ 'file-share-properties.c',
+ 'vino-preferences.c'
+)
+
+resource_data = files(
+ 'networks.ui',
+ 'sharing.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+settings_daemon = 'org.gnome.SettingsDaemon'
+gdbus = settings_daemon + '.Sharing'
+
+sources += gnome.gdbus_codegen(
+ gdbus,
+ gdbus + '.xml',
+ interface_prefix: settings_daemon + '.',
+ namespace: 'Gsd'
+)
+
+cflags = [
+ '-DLIBEXECDIR="@0@"'.format(control_center_libexecdir),
+ '-DSYSCONFDIR="@0@"'.format(control_center_sysconfdir)
+]
+
+libsharing = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: common_deps,
+ c_args: cflags
+)
+
+name = 'cc-remote-login-helper'
+
+deps = [
+ gio_dep,
+ glib_dep
+]
+
+executable(
+ name,
+ name + '.c',
+ include_directories: top_inc,
+ dependencies: deps,
+ install: true,
+ install_dir: control_center_libexecdir
+)
diff --git a/panels/sound/data/icons/meson.build b/panels/sound/data/icons/meson.build
new file mode 100644
index 0000000..4ddfefc
--- /dev/null
+++ b/panels/sound/data/icons/meson.build
@@ -0,0 +1,69 @@
+apps_files = [
+ 'multimedia-volume-control.png',
+ 'multimedia-volume-control.svg'
+]
+
+device_files = [
+ 'audio-headset.svg'
+]
+
+status_files = [
+ 'audio-input-microphone-high.png',
+ 'audio-input-microphone-low.png',
+ 'audio-input-microphone-medium.png',
+ 'audio-input-microphone-muted.png'
+]
+
+scalable_device_files = [
+ 'audio-speaker-center-back.svg',
+ 'audio-speaker-center-back-testing.svg',
+ 'audio-speaker-center.svg',
+ 'audio-speaker-center-testing.svg',
+ 'audio-speaker-left-back.svg',
+ 'audio-speaker-left-back-testing.svg',
+ 'audio-speaker-left-side.svg',
+ 'audio-speaker-left-side-testing.svg',
+ 'audio-speaker-left.svg',
+ 'audio-speaker-left-testing.svg',
+ 'audio-speaker-right-back.svg',
+ 'audio-speaker-right-back-testing.svg',
+ 'audio-speaker-right-side.svg',
+ 'audio-speaker-right-side-testing.svg',
+ 'audio-speaker-right.svg',
+ 'audio-speaker-right-testing.svg',
+ 'audio-speaker-testing.svg',
+ 'audio-subwoofer.svg',
+ 'audio-subwoofer-testing.svg'
+]
+
+icon_sizes = [
+ ['16x16', [apps_files, device_files, status_files]],
+ ['22x22', [apps_files, [], status_files]],
+ ['24x24', [['multimedia-volume-control.png'], device_files, status_files]],
+ ['32x32', [apps_files, device_files, status_files]],
+ ['48x48', [['multimedia-volume-control.png'], device_files, []]],
+ ['scalable', [['multimedia-volume-control.svg'], scalable_device_files, []]]
+]
+
+foreach icon_size: icon_sizes
+ foreach file: icon_size[1][0]
+ install_data(
+ join_paths(icon_size[0], 'apps', file),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', icon_size[0], 'apps')
+ )
+ endforeach
+
+ foreach file: icon_size[1][1]
+ install_data(
+ join_paths(icon_size[0], 'devices', file),
+ install_dir: join_paths(control_center_pkgdatadir, 'icons', 'hicolor', icon_size[0], 'devices')
+ )
+ endforeach
+
+ foreach file: icon_size[1][2]
+ install_data(
+ join_paths(icon_size[0], 'status', file),
+ install_dir: join_paths(control_center_pkgdatadir, 'icons', 'hicolor', icon_size[0], 'status')
+ )
+ endforeach
+endforeach
diff --git a/panels/sound/data/sounds/meson.build b/panels/sound/data/sounds/meson.build
new file mode 100644
index 0000000..2d9321a
--- /dev/null
+++ b/panels/sound/data/sounds/meson.build
@@ -0,0 +1,31 @@
+sound_data = files(
+ 'bark.ogg',
+ 'drip.ogg',
+ 'glass.ogg',
+ 'sonar.ogg'
+)
+
+install_data(
+ sound_data,
+ install_dir: join_paths(control_center_datadir, 'sounds', 'gnome', 'default', 'alerts')
+)
+
+metadata_conf = configuration_data()
+metadata_conf.set('datadir', control_center_datadir)
+
+metadata = 'gnome-sounds-default.xml'
+
+metadata_in = configure_file(
+ input: metadata + '.in.in',
+ output: metadata + '.in',
+ configuration: metadata_conf
+)
+
+custom_target(
+ metadata,
+ input: metadata_in,
+ output: metadata,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(control_center_pkgdatadir, 'sounds')
+)
diff --git a/panels/sound/data/symbolic-icons/meson.build b/panels/sound/data/symbolic-icons/meson.build
new file mode 100644
index 0000000..131fb09
--- /dev/null
+++ b/panels/sound/data/symbolic-icons/meson.build
@@ -0,0 +1,13 @@
+status_files = [
+ 'audio-input-microphone-high-symbolic.svg',
+ 'audio-input-microphone-low-symbolic.svg',
+ 'audio-input-microphone-medium-symbolic.svg',
+ 'audio-input-microphone-muted-symbolic.svg'
+]
+
+foreach file: status_files
+ install_data(
+ join_paths('scalable', 'status', file),
+ install_dir: join_paths(control_center_datadir, 'icons', 'hicolor', 'scalable', 'status')
+ )
+endforeach
diff --git a/panels/sound/meson.build b/panels/sound/meson.build
new file mode 100644
index 0000000..f70ba99
--- /dev/null
+++ b/panels/sound/meson.build
@@ -0,0 +1,67 @@
+subdir('data/icons')
+subdir('data/sounds')
+subdir('data/symbolic-icons')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: 'data/' + desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+deps = common_deps + [
+ libgvc_dep,
+ libxml_dep,
+ m_dep,
+ pulse_dep,
+ pulse_mainloop_dep,
+ dependency('libcanberra-gtk3', version: '>= 0.13')
+]
+
+cflags = [
+ '-DGLADEDIR="@0@"'.format(control_center_pkgdatadir),
+ '-DICON_DATA_DIR="@0@"'.format(join_paths(control_center_pkgdatadir, 'icons')),
+ '-DLIBEXECDIR="@0@"'.format(control_center_libexecdir),
+ '-DLOCALE_DIR="@0@"'.format(control_center_localedir),
+ '-DSOUND_DATA_DIR="@0@"'.format(join_paths(control_center_datadir, 'sounds')),
+ '-DSOUND_SET_DIR="@0@"'.format(join_paths(control_center_pkgdatadir, 'sounds'))
+]
+
+libgvcgtk = static_library(
+ 'gvcgtk',
+ sources: 'gvc-channel-bar.c',
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
+
+sources = files(
+ 'cc-' + cappletname + '-panel.c',
+ 'gvc-balance-bar.c',
+ 'gvc-combo-box.c',
+ 'gvc-level-bar.c',
+ 'gvc-mixer-dialog.c',
+ 'gvc-sound-theme-chooser.c',
+ 'gvc-speaker-test.c',
+ 'sound-theme-file-utils.c'
+)
+
+libsound = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: libgvcgtk
+)
diff --git a/panels/universal-access/meson.build b/panels/universal-access/meson.build
new file mode 100644
index 0000000..7956ac9
--- /dev/null
+++ b/panels/universal-access/meson.build
@@ -0,0 +1,53 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+sources = files(
+ 'cc-ua-panel.c',
+ 'zoom-options.c'
+)
+
+resource_data = files(
+ 'left_ptr_24px.png',
+ 'left_ptr_32px.png',
+ 'left_ptr_48px.png',
+ 'left_ptr_64px.png',
+ 'left_ptr_96px.png',
+ 'uap.ui',
+ 'zoom-options.ui'
+)
+
+sources += gnome.compile_resources(
+ 'cc-ua-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname.underscorify(),
+ dependencies: resource_data,
+ export: true
+)
+
+deps = common_deps + [m_dep]
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libuniversal_access = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/user-accounts/meson.build b/panels/user-accounts/meson.build
new file mode 100644
index 0000000..103b890
--- /dev/null
+++ b/panels/user-accounts/meson.build
@@ -0,0 +1,171 @@
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: 'data/' + desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+image_data = files(
+ 'data/faces/astronaut.jpg',
+ 'data/faces/baseball.png',
+ 'data/faces/butterfly.png',
+ 'data/faces/cat-eye.jpg',
+ 'data/faces/chess.jpg',
+ 'data/faces/coffee.jpg',
+ 'data/faces/dice.jpg',
+ 'data/faces/energy-arc.jpg',
+ 'data/faces/fish.jpg',
+ 'data/faces/flake.jpg',
+ 'data/faces/flower.jpg',
+ 'data/faces/grapes.jpg',
+ 'data/faces/guitar.jpg',
+ 'data/faces/launch.jpg',
+ 'data/faces/leaf.jpg',
+ 'data/faces/lightning.jpg',
+ 'data/faces/penguin.jpg',
+ 'data/faces/puppy.jpg',
+ 'data/faces/sky.jpg',
+ 'data/faces/soccerball.png',
+ 'data/faces/sunflower.jpg',
+ 'data/faces/sunset.jpg',
+ 'data/faces/tennis-ball.png',
+ 'data/faces/yellow-rose.jpg'
+)
+
+install_data(
+ image_data,
+ install_dir: join_paths(control_center_datadir, 'pixmaps', 'faces')
+)
+
+polkit = 'org.gnome.controlcenter.' + cappletname + '.policy'
+
+custom_target(
+ polkit,
+ input: polkit + '.in',
+ output: polkit,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'polkit-1', 'actions')
+)
+
+common_sources = files(
+ 'pw-utils.c',
+ 'um-account-dialog.c',
+ 'um-realm-manager.c',
+ 'um-utils.c'
+)
+
+resource_data = files(
+ 'data/icons/left-index-finger.png',
+ 'data/icons/left-little-finger.png',
+ 'data/icons/left-middle-finger.png',
+ 'data/icons/left-ring-finger.png',
+ 'data/icons/left-thumb.png',
+ 'data/icons/print_error.png',
+ 'data/icons/print_ok.png',
+ 'data/icons/right-index-finger.png',
+ 'data/icons/right-little-finger.png',
+ 'data/icons/right-middle-finger.png',
+ 'data/icons/right-ring-finger.png',
+ 'data/icons/right-thumb.png',
+ 'data/account-dialog.ui',
+ 'data/account-fingerprint.ui',
+ 'data/carousel.css',
+ 'data/carousel.ui',
+ 'data/history-dialog.ui',
+ 'data/join-dialog.ui',
+ 'data/password-dialog.ui',
+ 'data/user-accounts-dialog.css',
+ 'data/user-accounts-dialog.ui'
+)
+
+common_sources += gnome.compile_resources(
+ 'um-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'um',
+ dependencies: resource_data,
+ export: true
+)
+
+realmd_namespace = 'org.freedesktop.realmd'
+
+common_sources += gnome.gdbus_codegen(
+ 'um-realm-generated',
+ 'data/' + realmd_namespace + '.xml',
+ interface_prefix: realmd_namespace + '.',
+ namespace: 'UmRealm',
+ object_manager: true,
+ annotations: ['org.freedesktop.realmd.Realm', 'org.gtk.GDBus.C.Name', 'Common']
+)
+
+sources = common_sources + files(
+ 'cc-crop-area.c',
+ 'run-passwd.c',
+ 'um-account-type.c',
+ 'um-carousel.c',
+ 'um-cell-renderer-user-image.c',
+ 'um-fingerprint-dialog.c',
+ 'um-history-dialog.c',
+ 'um-password-dialog.c',
+ 'um-photo-dialog.c',
+ 'um-user-image.c',
+ 'um-user-panel.c'
+)
+
+# Kerberos kerberos support
+krb_dep = dependency('krb5', required: false)
+assert(krb_dep.found(), 'kerberos libraries not found in your path')
+
+deps = common_deps + [
+ accounts_dep,
+ gdk_pixbuf_dep,
+ gnome_desktop_dep,
+ libgd_dep,
+ krb_dep,
+ m_dep,
+ polkit_gobject_dep,
+ dependency('pwquality', version: '>= 1.2.2')
+]
+
+if have_cheese
+ deps += cheese_deps
+endif
+
+cflags = [
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir),
+ '-DHAVE_LIBPWQUALITY',
+ '-DUM_PIXMAP_DIR="@0@"'.format(join_paths(control_center_pkgdatadir, 'pixmaps'))
+]
+
+libuser_accounts = static_library(
+ cappletname,
+ sources: sources,
+ include_directories: [top_inc, common_inc, shell_inc],
+ dependencies: deps,
+ c_args: cflags,
+ link_with: liblanguage
+)
+
+name = 'frob-account-dialog'
+
+sources = common_sources + files(name + '.c')
+
+executable(
+ name,
+ sources,
+ include_directories: top_inc,
+ dependencies: deps,
+ c_args: cflags
+)
diff --git a/panels/user-accounts/um-realm-generated.c b/panels/user-accounts/um-realm-generated.c
new file mode 100644
index 0000000..82b8bf0
--- /dev/null
+++ b/panels/user-accounts/um-realm-generated.c
@@ -0,0 +1,8722 @@
+/*
+ * Generated by gdbus-codegen 2.53.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 "um-realm-generated.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.realmd.Provider
+ * ------------------------------------------------------------------------
+ */
+
+/**
+ * SECTION:UmRealmProvider
+ * @title: UmRealmProvider
+ * @short_description: Generated C code for the org.freedesktop.realmd.Provider D-Bus interface
+ *
+ * This section contains code for working with the <link
linkend="gdbus-interface-org-freedesktop-realmd-Provider.top_of_page">org.freedesktop.realmd.Provider</link>
D-Bus interface in C.
+ */
+
+/* ---- Introspection data for org.freedesktop.realmd.Provider ---- */
+
+static const _ExtendedGDBusArgInfo _um_realm_provider_method_info_discover_IN_ARG_string =
+{
+ {
+ -1,
+ (gchar *) "string",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_provider_method_info_discover_IN_ARG_options =
+{
+ {
+ -1,
+ (gchar *) "options",
+ (gchar *) "a{sv}",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _um_realm_provider_method_info_discover_IN_ARG_pointers[] =
+{
+ &_um_realm_provider_method_info_discover_IN_ARG_string,
+ &_um_realm_provider_method_info_discover_IN_ARG_options,
+ NULL
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_provider_method_info_discover_OUT_ARG_relevance =
+{
+ {
+ -1,
+ (gchar *) "relevance",
+ (gchar *) "i",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_provider_method_info_discover_OUT_ARG_realm =
+{
+ {
+ -1,
+ (gchar *) "realm",
+ (gchar *) "ao",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _um_realm_provider_method_info_discover_OUT_ARG_pointers[] =
+{
+ &_um_realm_provider_method_info_discover_OUT_ARG_relevance,
+ &_um_realm_provider_method_info_discover_OUT_ARG_realm,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _um_realm_provider_method_info_discover =
+{
+ {
+ -1,
+ (gchar *) "Discover",
+ (GDBusArgInfo **) &_um_realm_provider_method_info_discover_IN_ARG_pointers,
+ (GDBusArgInfo **) &_um_realm_provider_method_info_discover_OUT_ARG_pointers,
+ NULL
+ },
+ "handle-discover",
+ FALSE
+};
+
+static const _ExtendedGDBusMethodInfo * const _um_realm_provider_method_info_pointers[] =
+{
+ &_um_realm_provider_method_info_discover,
+ NULL
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_provider_property_info_name =
+{
+ {
+ -1,
+ (gchar *) "Name",
+ (gchar *) "s",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "name",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_provider_property_info_version =
+{
+ {
+ -1,
+ (gchar *) "Version",
+ (gchar *) "s",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "version",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_provider_property_info_realms =
+{
+ {
+ -1,
+ (gchar *) "Realms",
+ (gchar *) "ao",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "realms",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo * const _um_realm_provider_property_info_pointers[] =
+{
+ &_um_realm_provider_property_info_name,
+ &_um_realm_provider_property_info_version,
+ &_um_realm_provider_property_info_realms,
+ NULL
+};
+
+static const _ExtendedGDBusInterfaceInfo _um_realm_provider_interface_info =
+{
+ {
+ -1,
+ (gchar *) "org.freedesktop.realmd.Provider",
+ (GDBusMethodInfo **) &_um_realm_provider_method_info_pointers,
+ NULL,
+ (GDBusPropertyInfo **) &_um_realm_provider_property_info_pointers,
+ NULL
+ },
+ "provider",
+};
+
+
+/**
+ * um_realm_provider_interface_info:
+ *
+ * Gets a machine-readable description of the <link
linkend="gdbus-interface-org-freedesktop-realmd-Provider.top_of_page">org.freedesktop.realmd.Provider</link>
D-Bus interface.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
+ */
+GDBusInterfaceInfo *
+um_realm_provider_interface_info (void)
+{
+ return (GDBusInterfaceInfo *) &_um_realm_provider_interface_info.parent_struct;
+}
+
+/**
+ * um_realm_provider_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 #UmRealmProvider interface for a concrete class.
+ * The properties are overridden in the order they are defined.
+ *
+ * Returns: The last property id.
+ */
+guint
+um_realm_provider_override_properties (GObjectClass *klass, guint property_id_begin)
+{
+ g_object_class_override_property (klass, property_id_begin++, "name");
+ g_object_class_override_property (klass, property_id_begin++, "version");
+ g_object_class_override_property (klass, property_id_begin++, "realms");
+ return property_id_begin - 1;
+}
+
+
+
+/**
+ * UmRealmProvider:
+ *
+ * Abstract interface type for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Provider.top_of_page">org.freedesktop.realmd.Provider</link>.
+ */
+
+/**
+ * UmRealmProviderIface:
+ * @parent_iface: The parent interface.
+ * @handle_discover: Handler for the #UmRealmProvider::handle-discover signal.
+ * @get_name: Getter for the #UmRealmProvider:name property.
+ * @get_realms: Getter for the #UmRealmProvider:realms property.
+ * @get_version: Getter for the #UmRealmProvider:version property.
+ *
+ * Virtual table for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Provider.top_of_page">org.freedesktop.realmd.Provider</link>.
+ */
+
+typedef UmRealmProviderIface UmRealmProviderInterface;
+G_DEFINE_INTERFACE (UmRealmProvider, um_realm_provider, G_TYPE_OBJECT)
+
+static void
+um_realm_provider_default_init (UmRealmProviderIface *iface)
+{
+ /* GObject signals for incoming D-Bus method calls: */
+ /**
+ * UmRealmProvider::handle-discover:
+ * @object: A #UmRealmProvider.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_string: Argument passed by remote caller.
+ * @arg_options: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link
linkend="gdbus-method-org-freedesktop-realmd-Provider.Discover">Discover()</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 um_realm_provider_complete_discover() 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-discover",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (UmRealmProviderIface, handle_discover),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 3,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_VARIANT);
+
+ /* GObject properties for D-Bus properties: */
+ /**
+ * UmRealmProvider:name:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Provider.Name">"Name"</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 ("name", "Name", "Name", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmProvider:version:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Provider.Version">"Version"</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 ("version", "Version", "Version", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmProvider:realms:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Provider.Realms">"Realms"</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 ("realms", "Realms", "Realms", G_TYPE_STRV, G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+}
+
+/**
+ * um_realm_provider_get_name: (skip)
+ * @object: A #UmRealmProvider.
+ *
+ * Gets the value of the <link linkend="gdbus-property-org-freedesktop-realmd-Provider.Name">"Name"</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 um_realm_provider_dup_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 *
+um_realm_provider_get_name (UmRealmProvider *object)
+{
+ return UM_REALM_PROVIDER_GET_IFACE (object)->get_name (object);
+}
+
+/**
+ * um_realm_provider_dup_name: (skip)
+ * @object: A #UmRealmProvider.
+ *
+ * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-realmd-Provider.Name">"Name"</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 *
+um_realm_provider_dup_name (UmRealmProvider *object)
+{
+ gchar *value;
+ g_object_get (G_OBJECT (object), "name", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_provider_set_name: (skip)
+ * @object: A #UmRealmProvider.
+ * @value: The value to set.
+ *
+ * Sets the <link linkend="gdbus-property-org-freedesktop-realmd-Provider.Name">"Name"</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
+um_realm_provider_set_name (UmRealmProvider *object, const gchar *value)
+{
+ g_object_set (G_OBJECT (object), "name", value, NULL);
+}
+
+/**
+ * um_realm_provider_get_version: (skip)
+ * @object: A #UmRealmProvider.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-Provider.Version">"Version"</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 um_realm_provider_dup_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 *
+um_realm_provider_get_version (UmRealmProvider *object)
+{
+ return UM_REALM_PROVIDER_GET_IFACE (object)->get_version (object);
+}
+
+/**
+ * um_realm_provider_dup_version: (skip)
+ * @object: A #UmRealmProvider.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-Provider.Version">"Version"</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 *
+um_realm_provider_dup_version (UmRealmProvider *object)
+{
+ gchar *value;
+ g_object_get (G_OBJECT (object), "version", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_provider_set_version: (skip)
+ * @object: A #UmRealmProvider.
+ * @value: The value to set.
+ *
+ * Sets the <link linkend="gdbus-property-org-freedesktop-realmd-Provider.Version">"Version"</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
+um_realm_provider_set_version (UmRealmProvider *object, const gchar *value)
+{
+ g_object_set (G_OBJECT (object), "version", value, NULL);
+}
+
+/**
+ * um_realm_provider_get_realms: (skip)
+ * @object: A #UmRealmProvider.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-Provider.Realms">"Realms"</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 um_realm_provider_dup_realms() 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 *
+um_realm_provider_get_realms (UmRealmProvider *object)
+{
+ return UM_REALM_PROVIDER_GET_IFACE (object)->get_realms (object);
+}
+
+/**
+ * um_realm_provider_dup_realms: (skip)
+ * @object: A #UmRealmProvider.
+ *
+ * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-realmd-Provider.Realms">"Realms"</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 **
+um_realm_provider_dup_realms (UmRealmProvider *object)
+{
+ gchar **value;
+ g_object_get (G_OBJECT (object), "realms", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_provider_set_realms: (skip)
+ * @object: A #UmRealmProvider.
+ * @value: The value to set.
+ *
+ * Sets the <link linkend="gdbus-property-org-freedesktop-realmd-Provider.Realms">"Realms"</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
+um_realm_provider_set_realms (UmRealmProvider *object, const gchar *const *value)
+{
+ g_object_set (G_OBJECT (object), "realms", value, NULL);
+}
+
+/**
+ * um_realm_provider_call_discover:
+ * @proxy: A #UmRealmProviderProxy.
+ * @arg_string: Argument to pass with the method invocation.
+ * @arg_options: 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-realmd-Provider.Discover">Discover()</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 um_realm_provider_call_discover_finish() to get the result of the operation.
+ *
+ * See um_realm_provider_call_discover_sync() for the synchronous, blocking version of this method.
+ */
+void
+um_realm_provider_call_discover (
+ UmRealmProvider *proxy,
+ const gchar *arg_string,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Discover",
+ g_variant_new ("(s@a{sv})",
+ arg_string,
+ arg_options),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * um_realm_provider_call_discover_finish:
+ * @proxy: A #UmRealmProviderProxy.
+ * @out_relevance: (out): Return location for return parameter or %NULL to ignore.
+ * @out_realm: (out): Return location for return parameter or %NULL to ignore.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_provider_call_discover().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with um_realm_provider_call_discover().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_provider_call_discover_finish (
+ UmRealmProvider *proxy,
+ gint *out_relevance,
+ gchar ***out_realm,
+ 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,
+ "(i^ao)",
+ out_relevance,
+ out_realm);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * um_realm_provider_call_discover_sync:
+ * @proxy: A #UmRealmProviderProxy.
+ * @arg_string: Argument to pass with the method invocation.
+ * @arg_options: Argument to pass with the method invocation.
+ * @out_relevance: (out): Return location for return parameter or %NULL to ignore.
+ * @out_realm: (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-realmd-Provider.Discover">Discover()</link> D-Bus method on @proxy. The
calling thread is blocked until a reply is received.
+ *
+ * See um_realm_provider_call_discover() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_provider_call_discover_sync (
+ UmRealmProvider *proxy,
+ const gchar *arg_string,
+ GVariant *arg_options,
+ gint *out_relevance,
+ gchar ***out_realm,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Discover",
+ g_variant_new ("(s@a{sv})",
+ arg_string,
+ arg_options),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ error);
+ if (_ret == NULL)
+ goto _out;
+ g_variant_get (_ret,
+ "(i^ao)",
+ out_relevance,
+ out_realm);
+ g_variant_unref (_ret);
+_out:
+ return _ret != NULL;
+}
+
+/**
+ * um_realm_provider_complete_discover:
+ * @object: A #UmRealmProvider.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ * @relevance: Parameter to return.
+ * @realm: Parameter to return.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link
linkend="gdbus-method-org-freedesktop-realmd-Provider.Discover">Discover()</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
+um_realm_provider_complete_discover (
+ UmRealmProvider *object,
+ GDBusMethodInvocation *invocation,
+ gint relevance,
+ const gchar *const *realm)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(i^ao)",
+ relevance,
+ realm));
+}
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * UmRealmProviderProxy:
+ *
+ * The #UmRealmProviderProxy structure contains only private data and should only be accessed using the
provided API.
+ */
+
+/**
+ * UmRealmProviderProxyClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmProviderProxy.
+ */
+
+struct _UmRealmProviderProxyPrivate
+{
+ GData *qdata;
+};
+
+static void um_realm_provider_proxy_iface_init (UmRealmProviderIface *iface);
+
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (UmRealmProviderProxy, um_realm_provider_proxy, G_TYPE_DBUS_PROXY,
+ G_ADD_PRIVATE (UmRealmProviderProxy)
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_PROVIDER, um_realm_provider_proxy_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (UmRealmProviderProxy, um_realm_provider_proxy, G_TYPE_DBUS_PROXY,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_PROVIDER, um_realm_provider_proxy_iface_init))
+
+#endif
+static void
+um_realm_provider_proxy_finalize (GObject *object)
+{
+ UmRealmProviderProxy *proxy = UM_REALM_PROVIDER_PROXY (object);
+ g_datalist_clear (&proxy->priv->qdata);
+ G_OBJECT_CLASS (um_realm_provider_proxy_parent_class)->finalize (object);
+}
+
+static void
+um_realm_provider_proxy_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ const _ExtendedGDBusPropertyInfo *info;
+ GVariant *variant;
+ g_assert (prop_id != 0 && prop_id - 1 < 3);
+ info = _um_realm_provider_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
+um_realm_provider_proxy_set_property_cb (GDBusProxy *proxy,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ const _ExtendedGDBusPropertyInfo *info = user_data;
+ GError *error;
+ GVariant *_ret;
+ error = NULL;
+ _ret = g_dbus_proxy_call_finish (proxy, res, &error);
+ if (!_ret)
+ {
+ g_warning ("Error setting property '%s' on interface org.freedesktop.realmd.Provider: %s (%s, %d)",
+ info->parent_struct.name,
+ error->message, g_quark_to_string (error->domain), error->code);
+ g_error_free (error);
+ }
+ else
+ {
+ g_variant_unref (_ret);
+ }
+}
+
+static void
+um_realm_provider_proxy_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ const _ExtendedGDBusPropertyInfo *info;
+ GVariant *variant;
+ g_assert (prop_id != 0 && prop_id - 1 < 3);
+ info = _um_realm_provider_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.realmd.Provider", info->parent_struct.name, variant),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL, (GAsyncReadyCallback) um_realm_provider_proxy_set_property_cb, (GDBusPropertyInfo *)
&info->parent_struct);
+ g_variant_unref (variant);
+}
+
+static void
+um_realm_provider_proxy_g_signal (GDBusProxy *proxy,
+ const gchar *sender_name G_GNUC_UNUSED,
+ const gchar *signal_name,
+ GVariant *parameters)
+{
+ _ExtendedGDBusSignalInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ gsize n;
+ guint signal_id;
+ info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *)
&_um_realm_provider_interface_info.parent_struct, signal_name);
+ if (info == NULL)
+ return;
+ num_params = g_variant_n_children (parameters);
+ paramv = g_new0 (GValue, num_params + 1);
+ g_value_init (¶mv[0], UM_REALM_TYPE_PROVIDER);
+ 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, UM_REALM_TYPE_PROVIDER);
+ 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
+um_realm_provider_proxy_g_properties_changed (GDBusProxy *_proxy,
+ GVariant *changed_properties,
+ const gchar *const *invalidated_properties)
+{
+ UmRealmProviderProxy *proxy = UM_REALM_PROVIDER_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 *)
&_um_realm_provider_interface_info.parent_struct, key);
+ g_datalist_remove_data (&proxy->priv->qdata, key);
+ if (info != NULL)
+ g_object_notify (G_OBJECT (proxy), info->hyphen_name);
+ }
+ g_variant_iter_free (iter);
+ for (n = 0; invalidated_properties[n] != NULL; n++)
+ {
+ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *)
&_um_realm_provider_interface_info.parent_struct, invalidated_properties[n]);
+ g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
+ if (info != NULL)
+ g_object_notify (G_OBJECT (proxy), info->hyphen_name);
+ }
+}
+
+static const gchar *
+um_realm_provider_proxy_get_name (UmRealmProvider *object)
+{
+ UmRealmProviderProxy *proxy = UM_REALM_PROVIDER_PROXY (object);
+ GVariant *variant;
+ const gchar *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Name");
+ if (variant != NULL)
+ {
+ value = g_variant_get_string (variant, NULL);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static const gchar *
+um_realm_provider_proxy_get_version (UmRealmProvider *object)
+{
+ UmRealmProviderProxy *proxy = UM_REALM_PROVIDER_PROXY (object);
+ GVariant *variant;
+ const gchar *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Version");
+ if (variant != NULL)
+ {
+ value = g_variant_get_string (variant, NULL);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static const gchar *const *
+um_realm_provider_proxy_get_realms (UmRealmProvider *object)
+{
+ UmRealmProviderProxy *proxy = UM_REALM_PROVIDER_PROXY (object);
+ GVariant *variant;
+ const gchar *const *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Realms");
+ if (variant != NULL)
+ {
+ value = g_variant_get_objv (variant, NULL);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static void
+um_realm_provider_proxy_init (UmRealmProviderProxy *proxy)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ proxy->priv = um_realm_provider_proxy_get_instance_private (proxy);
+#else
+ proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, UM_REALM_TYPE_PROVIDER_PROXY,
UmRealmProviderProxyPrivate);
+#endif
+
+ g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), um_realm_provider_interface_info ());
+}
+
+static void
+um_realm_provider_proxy_class_init (UmRealmProviderProxyClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusProxyClass *proxy_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = um_realm_provider_proxy_finalize;
+ gobject_class->get_property = um_realm_provider_proxy_get_property;
+ gobject_class->set_property = um_realm_provider_proxy_set_property;
+
+ proxy_class = G_DBUS_PROXY_CLASS (klass);
+ proxy_class->g_signal = um_realm_provider_proxy_g_signal;
+ proxy_class->g_properties_changed = um_realm_provider_proxy_g_properties_changed;
+
+ um_realm_provider_override_properties (gobject_class, 1);
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (UmRealmProviderProxyPrivate));
+#endif
+}
+
+static void
+um_realm_provider_proxy_iface_init (UmRealmProviderIface *iface)
+{
+ iface->get_name = um_realm_provider_proxy_get_name;
+ iface->get_version = um_realm_provider_proxy_get_version;
+ iface->get_realms = um_realm_provider_proxy_get_realms;
+}
+
+/**
+ * um_realm_provider_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-realmd-Provider.top_of_page">org.freedesktop.realmd.Provider</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 um_realm_provider_proxy_new_finish() to get the result of the operation.
+ *
+ * See um_realm_provider_proxy_new_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+um_realm_provider_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 (UM_REALM_TYPE_PROVIDER_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.realmd.Provider", NULL);
+}
+
+/**
+ * um_realm_provider_proxy_new_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to um_realm_provider_proxy_new().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_provider_proxy_new().
+ *
+ * Returns: (transfer full) (type UmRealmProviderProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmProvider *
+um_realm_provider_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 UM_REALM_PROVIDER (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_provider_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-realmd-Provider.top_of_page">org.freedesktop.realmd.Provider</link>.
See g_dbus_proxy_new_sync() for more details.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_provider_proxy_new() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmProviderProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmProvider *
+um_realm_provider_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GInitable *ret;
+ ret = g_initable_new (UM_REALM_TYPE_PROVIDER_PROXY, cancellable, error, "g-flags", flags, "g-name", name,
"g-connection", connection, "g-object-path", object_path, "g-interface-name",
"org.freedesktop.realmd.Provider", NULL);
+ if (ret != NULL)
+ return UM_REALM_PROVIDER (ret);
+ else
+ return NULL;
+}
+
+
+/**
+ * um_realm_provider_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 um_realm_provider_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 um_realm_provider_proxy_new_for_bus_finish() to get the result of the operation.
+ *
+ * See um_realm_provider_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+um_realm_provider_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 (UM_REALM_TYPE_PROVIDER_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.realmd.Provider", NULL);
+}
+
+/**
+ * um_realm_provider_proxy_new_for_bus_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_provider_proxy_new_for_bus().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_provider_proxy_new_for_bus().
+ *
+ * Returns: (transfer full) (type UmRealmProviderProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmProvider *
+um_realm_provider_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 UM_REALM_PROVIDER (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_provider_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 um_realm_provider_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_provider_proxy_new_for_bus() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmProviderProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmProvider *
+um_realm_provider_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 (UM_REALM_TYPE_PROVIDER_PROXY, cancellable, error, "g-flags", flags, "g-name", name,
"g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.realmd.Provider",
NULL);
+ if (ret != NULL)
+ return UM_REALM_PROVIDER (ret);
+ else
+ return NULL;
+}
+
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * UmRealmProviderSkeleton:
+ *
+ * The #UmRealmProviderSkeleton structure contains only private data and should only be accessed using the
provided API.
+ */
+
+/**
+ * UmRealmProviderSkeletonClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmProviderSkeleton.
+ */
+
+struct _UmRealmProviderSkeletonPrivate
+{
+ GValue *properties;
+ GList *changed_properties;
+ GSource *changed_properties_idle_source;
+ GMainContext *context;
+ GMutex lock;
+};
+
+static void
+_um_realm_provider_skeleton_handle_method_call (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation,
+ gpointer user_data)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_SKELETON (user_data);
+ _ExtendedGDBusMethodInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ guint num_extra;
+ gsize n;
+ guint signal_id;
+ GValue return_value = G_VALUE_INIT;
+ info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
+ g_assert (info != NULL);
+ num_params = g_variant_n_children (parameters);
+ num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
+ n = 0;
+ g_value_init (¶mv[n], UM_REALM_TYPE_PROVIDER);
+ 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, UM_REALM_TYPE_PROVIDER);
+ 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 *
+_um_realm_provider_skeleton_handle_get_property (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name G_GNUC_UNUSED,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_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 *)
&_um_realm_provider_interface_info.parent_struct, property_name);
+ g_assert (info != NULL);
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
+ if (pspec == NULL)
+ {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s",
property_name);
+ }
+ else
+ {
+ g_value_init (&value, pspec->value_type);
+ g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
+ ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
+ g_value_unset (&value);
+ }
+ return ret;
+}
+
+static gboolean
+_um_realm_provider_skeleton_handle_set_property (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name G_GNUC_UNUSED,
+ const gchar *property_name,
+ GVariant *variant,
+ GError **error,
+ gpointer user_data)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_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 *)
&_um_realm_provider_interface_info.parent_struct, property_name);
+ g_assert (info != NULL);
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
+ if (pspec == NULL)
+ {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s",
property_name);
+ }
+ else
+ {
+ if (info->use_gvariant)
+ g_value_set_variant (&value, variant);
+ else
+ g_dbus_gvariant_to_gvalue (variant, &value);
+ g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
+ g_value_unset (&value);
+ ret = TRUE;
+ }
+ return ret;
+}
+
+static const GDBusInterfaceVTable _um_realm_provider_skeleton_vtable =
+{
+ _um_realm_provider_skeleton_handle_method_call,
+ _um_realm_provider_skeleton_handle_get_property,
+ _um_realm_provider_skeleton_handle_set_property,
+ {NULL}
+};
+
+static GDBusInterfaceInfo *
+um_realm_provider_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return um_realm_provider_interface_info ();
+}
+
+static GDBusInterfaceVTable *
+um_realm_provider_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return (GDBusInterfaceVTable *) &_um_realm_provider_skeleton_vtable;
+}
+
+static GVariant *
+um_realm_provider_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_SKELETON (_skeleton);
+
+ GVariantBuilder builder;
+ guint n;
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ if (_um_realm_provider_interface_info.parent_struct.properties == NULL)
+ goto out;
+ for (n = 0; _um_realm_provider_interface_info.parent_struct.properties[n] != NULL; n++)
+ {
+ GDBusPropertyInfo *info = _um_realm_provider_interface_info.parent_struct.properties[n];
+ if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
+ {
+ GVariant *value;
+ value = _um_realm_provider_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.realmd.Provider", 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 _um_realm_provider_emit_changed (gpointer user_data);
+
+static void
+um_realm_provider_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_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)
+ _um_realm_provider_emit_changed (skeleton);
+}
+
+static void um_realm_provider_skeleton_iface_init (UmRealmProviderIface *iface);
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (UmRealmProviderSkeleton, um_realm_provider_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_ADD_PRIVATE (UmRealmProviderSkeleton)
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_PROVIDER,
um_realm_provider_skeleton_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (UmRealmProviderSkeleton, um_realm_provider_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_PROVIDER,
um_realm_provider_skeleton_iface_init))
+
+#endif
+static void
+um_realm_provider_skeleton_finalize (GObject *object)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_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 (um_realm_provider_skeleton_parent_class)->finalize (object);
+}
+
+static void
+um_realm_provider_skeleton_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_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
+_um_realm_provider_emit_changed (gpointer user_data)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_SKELETON (user_data);
+ GList *l;
+ GVariantBuilder builder;
+ GVariantBuilder invalidated_builder;
+ guint num_changes;
+
+ g_mutex_lock (&skeleton->priv->lock);
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
+ for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
+ {
+ ChangedProperty *cp = l->data;
+ GVariant *variant;
+ const GValue *cur_value;
+
+ cur_value = &skeleton->priv->properties[cp->prop_id - 1];
+ if (!_g_value_equal (cur_value, &cp->orig_value))
+ {
+ variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE
(cp->info->parent_struct.signature));
+ g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
+ g_variant_unref (variant);
+ num_changes++;
+ }
+ }
+ if (num_changes > 0)
+ {
+ GList *connections, *ll;
+ GVariant *signal_variant;
+ signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.realmd.Provider",
+ &builder, &invalidated_builder));
+ connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
+ for (ll = connections; ll != NULL; ll = ll->next)
+ {
+ GDBusConnection *connection = ll->data;
+
+ g_dbus_connection_emit_signal (connection,
+ NULL, g_dbus_interface_skeleton_get_object_path
(G_DBUS_INTERFACE_SKELETON (skeleton)),
+ "org.freedesktop.DBus.Properties",
+ "PropertiesChanged",
+ signal_variant,
+ NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+ }
+ else
+ {
+ g_variant_builder_clear (&builder);
+ g_variant_builder_clear (&invalidated_builder);
+ }
+ g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
+ skeleton->priv->changed_properties = NULL;
+ skeleton->priv->changed_properties_idle_source = NULL;
+ g_mutex_unlock (&skeleton->priv->lock);
+ return FALSE;
+}
+
+static void
+_um_realm_provider_schedule_emit_changed (UmRealmProviderSkeleton *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
+um_realm_provider_skeleton_notify (GObject *object,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_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,
_um_realm_provider_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
+ g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated]
_um_realm_provider_emit_changed");
+ 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
+um_realm_provider_skeleton_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_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)
+ _um_realm_provider_schedule_emit_changed (skeleton,
_um_realm_provider_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
+um_realm_provider_skeleton_init (UmRealmProviderSkeleton *skeleton)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ skeleton->priv = um_realm_provider_skeleton_get_instance_private (skeleton);
+#else
+ skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, UM_REALM_TYPE_PROVIDER_SKELETON,
UmRealmProviderSkeletonPrivate);
+#endif
+
+ 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_STRING);
+ g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING);
+ g_value_init (&skeleton->priv->properties[2], G_TYPE_STRV);
+}
+
+static const gchar *
+um_realm_provider_skeleton_get_name (UmRealmProvider *object)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_SKELETON (object);
+ const gchar *value;
+ g_mutex_lock (&skeleton->priv->lock);
+ value = g_value_get_string (&(skeleton->priv->properties[0]));
+ g_mutex_unlock (&skeleton->priv->lock);
+ return value;
+}
+
+static const gchar *
+um_realm_provider_skeleton_get_version (UmRealmProvider *object)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_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 *const *
+um_realm_provider_skeleton_get_realms (UmRealmProvider *object)
+{
+ UmRealmProviderSkeleton *skeleton = UM_REALM_PROVIDER_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
+um_realm_provider_skeleton_class_init (UmRealmProviderSkeletonClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusInterfaceSkeletonClass *skeleton_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = um_realm_provider_skeleton_finalize;
+ gobject_class->get_property = um_realm_provider_skeleton_get_property;
+ gobject_class->set_property = um_realm_provider_skeleton_set_property;
+ gobject_class->notify = um_realm_provider_skeleton_notify;
+
+
+ um_realm_provider_override_properties (gobject_class, 1);
+
+ skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
+ skeleton_class->get_info = um_realm_provider_skeleton_dbus_interface_get_info;
+ skeleton_class->get_properties = um_realm_provider_skeleton_dbus_interface_get_properties;
+ skeleton_class->flush = um_realm_provider_skeleton_dbus_interface_flush;
+ skeleton_class->get_vtable = um_realm_provider_skeleton_dbus_interface_get_vtable;
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (UmRealmProviderSkeletonPrivate));
+#endif
+}
+
+static void
+um_realm_provider_skeleton_iface_init (UmRealmProviderIface *iface)
+{
+ iface->get_name = um_realm_provider_skeleton_get_name;
+ iface->get_version = um_realm_provider_skeleton_get_version;
+ iface->get_realms = um_realm_provider_skeleton_get_realms;
+}
+
+/**
+ * um_realm_provider_skeleton_new:
+ *
+ * Creates a skeleton object for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Provider.top_of_page">org.freedesktop.realmd.Provider</link>.
+ *
+ * Returns: (transfer full) (type UmRealmProviderSkeleton): The skeleton object.
+ */
+UmRealmProvider *
+um_realm_provider_skeleton_new (void)
+{
+ return UM_REALM_PROVIDER (g_object_new (UM_REALM_TYPE_PROVIDER_SKELETON, NULL));
+}
+
+/* ------------------------------------------------------------------------
+ * Code for interface org.freedesktop.realmd.Service
+ * ------------------------------------------------------------------------
+ */
+
+/**
+ * SECTION:UmRealmService
+ * @title: UmRealmService
+ * @short_description: Generated C code for the org.freedesktop.realmd.Service D-Bus interface
+ *
+ * This section contains code for working with the <link
linkend="gdbus-interface-org-freedesktop-realmd-Service.top_of_page">org.freedesktop.realmd.Service</link>
D-Bus interface in C.
+ */
+
+/* ---- Introspection data for org.freedesktop.realmd.Service ---- */
+
+static const _ExtendedGDBusArgInfo _um_realm_service_method_info_cancel_IN_ARG_operation =
+{
+ {
+ -1,
+ (gchar *) "operation",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _um_realm_service_method_info_cancel_IN_ARG_pointers[] =
+{
+ &_um_realm_service_method_info_cancel_IN_ARG_operation,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _um_realm_service_method_info_cancel =
+{
+ {
+ -1,
+ (gchar *) "Cancel",
+ (GDBusArgInfo **) &_um_realm_service_method_info_cancel_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-cancel",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_service_method_info_set_locale_IN_ARG_locale =
+{
+ {
+ -1,
+ (gchar *) "locale",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _um_realm_service_method_info_set_locale_IN_ARG_pointers[] =
+{
+ &_um_realm_service_method_info_set_locale_IN_ARG_locale,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _um_realm_service_method_info_set_locale =
+{
+ {
+ -1,
+ (gchar *) "SetLocale",
+ (GDBusArgInfo **) &_um_realm_service_method_info_set_locale_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-set-locale",
+ FALSE
+};
+
+static const _ExtendedGDBusMethodInfo _um_realm_service_method_info_release =
+{
+ {
+ -1,
+ (gchar *) "Release",
+ NULL,
+ NULL,
+ NULL
+ },
+ "handle-release",
+ FALSE
+};
+
+static const _ExtendedGDBusMethodInfo * const _um_realm_service_method_info_pointers[] =
+{
+ &_um_realm_service_method_info_cancel,
+ &_um_realm_service_method_info_set_locale,
+ &_um_realm_service_method_info_release,
+ NULL
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_service_signal_info_diagnostics_ARG_data =
+{
+ {
+ -1,
+ (gchar *) "data",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_service_signal_info_diagnostics_ARG_operation =
+{
+ {
+ -1,
+ (gchar *) "operation",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _um_realm_service_signal_info_diagnostics_ARG_pointers[] =
+{
+ &_um_realm_service_signal_info_diagnostics_ARG_data,
+ &_um_realm_service_signal_info_diagnostics_ARG_operation,
+ NULL
+};
+
+static const _ExtendedGDBusSignalInfo _um_realm_service_signal_info_diagnostics =
+{
+ {
+ -1,
+ (gchar *) "Diagnostics",
+ (GDBusArgInfo **) &_um_realm_service_signal_info_diagnostics_ARG_pointers,
+ NULL
+ },
+ "diagnostics"
+};
+
+static const _ExtendedGDBusSignalInfo * const _um_realm_service_signal_info_pointers[] =
+{
+ &_um_realm_service_signal_info_diagnostics,
+ NULL
+};
+
+static const _ExtendedGDBusInterfaceInfo _um_realm_service_interface_info =
+{
+ {
+ -1,
+ (gchar *) "org.freedesktop.realmd.Service",
+ (GDBusMethodInfo **) &_um_realm_service_method_info_pointers,
+ (GDBusSignalInfo **) &_um_realm_service_signal_info_pointers,
+ NULL,
+ NULL
+ },
+ "service",
+};
+
+
+/**
+ * um_realm_service_interface_info:
+ *
+ * Gets a machine-readable description of the <link
linkend="gdbus-interface-org-freedesktop-realmd-Service.top_of_page">org.freedesktop.realmd.Service</link>
D-Bus interface.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
+ */
+GDBusInterfaceInfo *
+um_realm_service_interface_info (void)
+{
+ return (GDBusInterfaceInfo *) &_um_realm_service_interface_info.parent_struct;
+}
+
+/**
+ * um_realm_service_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 #UmRealmService interface for a concrete class.
+ * The properties are overridden in the order they are defined.
+ *
+ * Returns: The last property id.
+ */
+guint
+um_realm_service_override_properties (GObjectClass *klass, guint property_id_begin)
+{
+ return property_id_begin - 1;
+}
+
+
+
+/**
+ * UmRealmService:
+ *
+ * Abstract interface type for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Service.top_of_page">org.freedesktop.realmd.Service</link>.
+ */
+
+/**
+ * UmRealmServiceIface:
+ * @parent_iface: The parent interface.
+ * @handle_cancel: Handler for the #UmRealmService::handle-cancel signal.
+ * @handle_release: Handler for the #UmRealmService::handle-release signal.
+ * @handle_set_locale: Handler for the #UmRealmService::handle-set-locale signal.
+ * @diagnostics: Handler for the #UmRealmService::diagnostics signal.
+ *
+ * Virtual table for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Service.top_of_page">org.freedesktop.realmd.Service</link>.
+ */
+
+typedef UmRealmServiceIface UmRealmServiceInterface;
+G_DEFINE_INTERFACE (UmRealmService, um_realm_service, G_TYPE_OBJECT)
+
+static void
+um_realm_service_default_init (UmRealmServiceIface *iface)
+{
+ /* GObject signals for incoming D-Bus method calls: */
+ /**
+ * UmRealmService::handle-cancel:
+ * @object: A #UmRealmService.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_operation: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link
linkend="gdbus-method-org-freedesktop-realmd-Service.Cancel">Cancel()</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 um_realm_service_complete_cancel() 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-cancel",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (UmRealmServiceIface, handle_cancel),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 2,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
+
+ /**
+ * UmRealmService::handle-set-locale:
+ * @object: A #UmRealmService.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_locale: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link
linkend="gdbus-method-org-freedesktop-realmd-Service.SetLocale">SetLocale()</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 um_realm_service_complete_set_locale() or e.g.
g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler
handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
+ *
+ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+ */
+ g_signal_new ("handle-set-locale",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (UmRealmServiceIface, handle_set_locale),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 2,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
+
+ /**
+ * UmRealmService::handle-release:
+ * @object: A #UmRealmService.
+ * @invocation: A #GDBusMethodInvocation.
+ *
+ * Signal emitted when a remote caller is invoking the <link
linkend="gdbus-method-org-freedesktop-realmd-Service.Release">Release()</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 um_realm_service_complete_release() or e.g.
g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler
handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
+ *
+ * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+ */
+ g_signal_new ("handle-release",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (UmRealmServiceIface, handle_release),
+ 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: */
+ /**
+ * UmRealmService::diagnostics:
+ * @object: A #UmRealmService.
+ * @arg_data: Argument.
+ * @arg_operation: Argument.
+ *
+ * On the client-side, this signal is emitted whenever the D-Bus signal <link
linkend="gdbus-signal-org-freedesktop-realmd-Service.Diagnostics">"Diagnostics"</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 ("diagnostics",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (UmRealmServiceIface, diagnostics),
+ NULL,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE,
+ 2, G_TYPE_STRING, G_TYPE_STRING);
+
+}
+
+/**
+ * um_realm_service_emit_diagnostics:
+ * @object: A #UmRealmService.
+ * @arg_data: Argument to pass with the signal.
+ * @arg_operation: Argument to pass with the signal.
+ *
+ * Emits the <link linkend="gdbus-signal-org-freedesktop-realmd-Service.Diagnostics">"Diagnostics"</link>
D-Bus signal.
+ */
+void
+um_realm_service_emit_diagnostics (
+ UmRealmService *object,
+ const gchar *arg_data,
+ const gchar *arg_operation)
+{
+ g_signal_emit_by_name (object, "diagnostics", arg_data, arg_operation);
+}
+
+/**
+ * um_realm_service_call_cancel:
+ * @proxy: A #UmRealmServiceProxy.
+ * @arg_operation: 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-realmd-Service.Cancel">Cancel()</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 um_realm_service_call_cancel_finish() to get the result of the operation.
+ *
+ * See um_realm_service_call_cancel_sync() for the synchronous, blocking version of this method.
+ */
+void
+um_realm_service_call_cancel (
+ UmRealmService *proxy,
+ const gchar *arg_operation,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Cancel",
+ g_variant_new ("(s)",
+ arg_operation),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * um_realm_service_call_cancel_finish:
+ * @proxy: A #UmRealmServiceProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to um_realm_service_call_cancel().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with um_realm_service_call_cancel().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_service_call_cancel_finish (
+ UmRealmService *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;
+}
+
+/**
+ * um_realm_service_call_cancel_sync:
+ * @proxy: A #UmRealmServiceProxy.
+ * @arg_operation: 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-realmd-Service.Cancel">Cancel()</link> D-Bus method on @proxy. The
calling thread is blocked until a reply is received.
+ *
+ * See um_realm_service_call_cancel() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_service_call_cancel_sync (
+ UmRealmService *proxy,
+ const gchar *arg_operation,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Cancel",
+ g_variant_new ("(s)",
+ arg_operation),
+ 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;
+}
+
+/**
+ * um_realm_service_call_set_locale:
+ * @proxy: A #UmRealmServiceProxy.
+ * @arg_locale: 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-realmd-Service.SetLocale">SetLocale()</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 um_realm_service_call_set_locale_finish() to get the result of the operation.
+ *
+ * See um_realm_service_call_set_locale_sync() for the synchronous, blocking version of this method.
+ */
+void
+um_realm_service_call_set_locale (
+ UmRealmService *proxy,
+ const gchar *arg_locale,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "SetLocale",
+ g_variant_new ("(s)",
+ arg_locale),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * um_realm_service_call_set_locale_finish:
+ * @proxy: A #UmRealmServiceProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_service_call_set_locale().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with um_realm_service_call_set_locale().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_service_call_set_locale_finish (
+ UmRealmService *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;
+}
+
+/**
+ * um_realm_service_call_set_locale_sync:
+ * @proxy: A #UmRealmServiceProxy.
+ * @arg_locale: 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-realmd-Service.SetLocale">SetLocale()</link> D-Bus method on @proxy.
The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_service_call_set_locale() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_service_call_set_locale_sync (
+ UmRealmService *proxy,
+ const gchar *arg_locale,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "SetLocale",
+ g_variant_new ("(s)",
+ arg_locale),
+ 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;
+}
+
+/**
+ * um_realm_service_call_release:
+ * @proxy: A #UmRealmServiceProxy.
+ * @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-realmd-Service.Release">Release()</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 um_realm_service_call_release_finish() to get the result of the operation.
+ *
+ * See um_realm_service_call_release_sync() for the synchronous, blocking version of this method.
+ */
+void
+um_realm_service_call_release (
+ UmRealmService *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Release",
+ g_variant_new ("()"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * um_realm_service_call_release_finish:
+ * @proxy: A #UmRealmServiceProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to um_realm_service_call_release().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with um_realm_service_call_release().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_service_call_release_finish (
+ UmRealmService *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;
+}
+
+/**
+ * um_realm_service_call_release_sync:
+ * @proxy: A #UmRealmServiceProxy.
+ * @cancellable: (allow-none): A #GCancellable or %NULL.
+ * @error: Return location for error or %NULL.
+ *
+ * Synchronously invokes the <link
linkend="gdbus-method-org-freedesktop-realmd-Service.Release">Release()</link> D-Bus method on @proxy. The
calling thread is blocked until a reply is received.
+ *
+ * See um_realm_service_call_release() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_service_call_release_sync (
+ UmRealmService *proxy,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Release",
+ 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;
+}
+
+/**
+ * um_realm_service_complete_cancel:
+ * @object: A #UmRealmService.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link
linkend="gdbus-method-org-freedesktop-realmd-Service.Cancel">Cancel()</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
+um_realm_service_complete_cancel (
+ UmRealmService *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * um_realm_service_complete_set_locale:
+ * @object: A #UmRealmService.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link
linkend="gdbus-method-org-freedesktop-realmd-Service.SetLocale">SetLocale()</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
+um_realm_service_complete_set_locale (
+ UmRealmService *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * um_realm_service_complete_release:
+ * @object: A #UmRealmService.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link
linkend="gdbus-method-org-freedesktop-realmd-Service.Release">Release()</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
+um_realm_service_complete_release (
+ UmRealmService *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * UmRealmServiceProxy:
+ *
+ * The #UmRealmServiceProxy structure contains only private data and should only be accessed using the
provided API.
+ */
+
+/**
+ * UmRealmServiceProxyClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmServiceProxy.
+ */
+
+struct _UmRealmServiceProxyPrivate
+{
+ GData *qdata;
+};
+
+static void um_realm_service_proxy_iface_init (UmRealmServiceIface *iface);
+
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (UmRealmServiceProxy, um_realm_service_proxy, G_TYPE_DBUS_PROXY,
+ G_ADD_PRIVATE (UmRealmServiceProxy)
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_SERVICE, um_realm_service_proxy_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (UmRealmServiceProxy, um_realm_service_proxy, G_TYPE_DBUS_PROXY,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_SERVICE, um_realm_service_proxy_iface_init))
+
+#endif
+static void
+um_realm_service_proxy_finalize (GObject *object)
+{
+ UmRealmServiceProxy *proxy = UM_REALM_SERVICE_PROXY (object);
+ g_datalist_clear (&proxy->priv->qdata);
+ G_OBJECT_CLASS (um_realm_service_proxy_parent_class)->finalize (object);
+}
+
+static void
+um_realm_service_proxy_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+}
+
+static void
+um_realm_service_proxy_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+}
+
+static void
+um_realm_service_proxy_g_signal (GDBusProxy *proxy,
+ const gchar *sender_name G_GNUC_UNUSED,
+ const gchar *signal_name,
+ GVariant *parameters)
+{
+ _ExtendedGDBusSignalInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ gsize n;
+ guint signal_id;
+ info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *)
&_um_realm_service_interface_info.parent_struct, signal_name);
+ if (info == NULL)
+ return;
+ num_params = g_variant_n_children (parameters);
+ paramv = g_new0 (GValue, num_params + 1);
+ g_value_init (¶mv[0], UM_REALM_TYPE_SERVICE);
+ 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, UM_REALM_TYPE_SERVICE);
+ 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
+um_realm_service_proxy_g_properties_changed (GDBusProxy *_proxy,
+ GVariant *changed_properties,
+ const gchar *const *invalidated_properties)
+{
+ UmRealmServiceProxy *proxy = UM_REALM_SERVICE_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 *)
&_um_realm_service_interface_info.parent_struct, key);
+ g_datalist_remove_data (&proxy->priv->qdata, key);
+ if (info != NULL)
+ g_object_notify (G_OBJECT (proxy), info->hyphen_name);
+ }
+ g_variant_iter_free (iter);
+ for (n = 0; invalidated_properties[n] != NULL; n++)
+ {
+ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *)
&_um_realm_service_interface_info.parent_struct, invalidated_properties[n]);
+ g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
+ if (info != NULL)
+ g_object_notify (G_OBJECT (proxy), info->hyphen_name);
+ }
+}
+
+static void
+um_realm_service_proxy_init (UmRealmServiceProxy *proxy)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ proxy->priv = um_realm_service_proxy_get_instance_private (proxy);
+#else
+ proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, UM_REALM_TYPE_SERVICE_PROXY, UmRealmServiceProxyPrivate);
+#endif
+
+ g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), um_realm_service_interface_info ());
+}
+
+static void
+um_realm_service_proxy_class_init (UmRealmServiceProxyClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusProxyClass *proxy_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = um_realm_service_proxy_finalize;
+ gobject_class->get_property = um_realm_service_proxy_get_property;
+ gobject_class->set_property = um_realm_service_proxy_set_property;
+
+ proxy_class = G_DBUS_PROXY_CLASS (klass);
+ proxy_class->g_signal = um_realm_service_proxy_g_signal;
+ proxy_class->g_properties_changed = um_realm_service_proxy_g_properties_changed;
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (UmRealmServiceProxyPrivate));
+#endif
+}
+
+static void
+um_realm_service_proxy_iface_init (UmRealmServiceIface *iface)
+{
+}
+
+/**
+ * um_realm_service_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-realmd-Service.top_of_page">org.freedesktop.realmd.Service</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 um_realm_service_proxy_new_finish() to get the result of the operation.
+ *
+ * See um_realm_service_proxy_new_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+um_realm_service_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 (UM_REALM_TYPE_SERVICE_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.realmd.Service", NULL);
+}
+
+/**
+ * um_realm_service_proxy_new_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to um_realm_service_proxy_new().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_service_proxy_new().
+ *
+ * Returns: (transfer full) (type UmRealmServiceProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmService *
+um_realm_service_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 UM_REALM_SERVICE (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_service_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-realmd-Service.top_of_page">org.freedesktop.realmd.Service</link>.
See g_dbus_proxy_new_sync() for more details.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_service_proxy_new() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmServiceProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmService *
+um_realm_service_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GInitable *ret;
+ ret = g_initable_new (UM_REALM_TYPE_SERVICE_PROXY, cancellable, error, "g-flags", flags, "g-name", name,
"g-connection", connection, "g-object-path", object_path, "g-interface-name",
"org.freedesktop.realmd.Service", NULL);
+ if (ret != NULL)
+ return UM_REALM_SERVICE (ret);
+ else
+ return NULL;
+}
+
+
+/**
+ * um_realm_service_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 um_realm_service_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 um_realm_service_proxy_new_for_bus_finish() to get the result of the operation.
+ *
+ * See um_realm_service_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+um_realm_service_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 (UM_REALM_TYPE_SERVICE_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.realmd.Service", NULL);
+}
+
+/**
+ * um_realm_service_proxy_new_for_bus_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_service_proxy_new_for_bus().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_service_proxy_new_for_bus().
+ *
+ * Returns: (transfer full) (type UmRealmServiceProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmService *
+um_realm_service_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 UM_REALM_SERVICE (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_service_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 um_realm_service_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_service_proxy_new_for_bus() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmServiceProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmService *
+um_realm_service_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 (UM_REALM_TYPE_SERVICE_PROXY, cancellable, error, "g-flags", flags, "g-name", name,
"g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.realmd.Service",
NULL);
+ if (ret != NULL)
+ return UM_REALM_SERVICE (ret);
+ else
+ return NULL;
+}
+
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * UmRealmServiceSkeleton:
+ *
+ * The #UmRealmServiceSkeleton structure contains only private data and should only be accessed using the
provided API.
+ */
+
+/**
+ * UmRealmServiceSkeletonClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmServiceSkeleton.
+ */
+
+struct _UmRealmServiceSkeletonPrivate
+{
+ GValue *properties;
+ GList *changed_properties;
+ GSource *changed_properties_idle_source;
+ GMainContext *context;
+ GMutex lock;
+};
+
+static void
+_um_realm_service_skeleton_handle_method_call (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation,
+ gpointer user_data)
+{
+ UmRealmServiceSkeleton *skeleton = UM_REALM_SERVICE_SKELETON (user_data);
+ _ExtendedGDBusMethodInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ guint num_extra;
+ gsize n;
+ guint signal_id;
+ GValue return_value = G_VALUE_INIT;
+ info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
+ g_assert (info != NULL);
+ num_params = g_variant_n_children (parameters);
+ num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
+ n = 0;
+ g_value_init (¶mv[n], UM_REALM_TYPE_SERVICE);
+ 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, UM_REALM_TYPE_SERVICE);
+ 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 *
+_um_realm_service_skeleton_handle_get_property (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name G_GNUC_UNUSED,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
+{
+ UmRealmServiceSkeleton *skeleton = UM_REALM_SERVICE_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 *)
&_um_realm_service_interface_info.parent_struct, property_name);
+ g_assert (info != NULL);
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
+ if (pspec == NULL)
+ {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s",
property_name);
+ }
+ else
+ {
+ g_value_init (&value, pspec->value_type);
+ g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
+ ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
+ g_value_unset (&value);
+ }
+ return ret;
+}
+
+static gboolean
+_um_realm_service_skeleton_handle_set_property (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name G_GNUC_UNUSED,
+ const gchar *property_name,
+ GVariant *variant,
+ GError **error,
+ gpointer user_data)
+{
+ UmRealmServiceSkeleton *skeleton = UM_REALM_SERVICE_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 *)
&_um_realm_service_interface_info.parent_struct, property_name);
+ g_assert (info != NULL);
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
+ if (pspec == NULL)
+ {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s",
property_name);
+ }
+ else
+ {
+ if (info->use_gvariant)
+ g_value_set_variant (&value, variant);
+ else
+ g_dbus_gvariant_to_gvalue (variant, &value);
+ g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
+ g_value_unset (&value);
+ ret = TRUE;
+ }
+ return ret;
+}
+
+static const GDBusInterfaceVTable _um_realm_service_skeleton_vtable =
+{
+ _um_realm_service_skeleton_handle_method_call,
+ _um_realm_service_skeleton_handle_get_property,
+ _um_realm_service_skeleton_handle_set_property,
+ {NULL}
+};
+
+static GDBusInterfaceInfo *
+um_realm_service_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return um_realm_service_interface_info ();
+}
+
+static GDBusInterfaceVTable *
+um_realm_service_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return (GDBusInterfaceVTable *) &_um_realm_service_skeleton_vtable;
+}
+
+static GVariant *
+um_realm_service_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
+{
+ UmRealmServiceSkeleton *skeleton = UM_REALM_SERVICE_SKELETON (_skeleton);
+
+ GVariantBuilder builder;
+ guint n;
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ if (_um_realm_service_interface_info.parent_struct.properties == NULL)
+ goto out;
+ for (n = 0; _um_realm_service_interface_info.parent_struct.properties[n] != NULL; n++)
+ {
+ GDBusPropertyInfo *info = _um_realm_service_interface_info.parent_struct.properties[n];
+ if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
+ {
+ GVariant *value;
+ value = _um_realm_service_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.realmd.Service", 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
+um_realm_service_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+{
+}
+
+static void
+_um_realm_service_on_signal_diagnostics (
+ UmRealmService *object,
+ const gchar *arg_data,
+ const gchar *arg_operation)
+{
+ UmRealmServiceSkeleton *skeleton = UM_REALM_SERVICE_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_data,
+ arg_operation));
+ 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.realmd.Service", "Diagnostics",
+ signal_variant, NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+}
+
+static void um_realm_service_skeleton_iface_init (UmRealmServiceIface *iface);
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (UmRealmServiceSkeleton, um_realm_service_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_ADD_PRIVATE (UmRealmServiceSkeleton)
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_SERVICE, um_realm_service_skeleton_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (UmRealmServiceSkeleton, um_realm_service_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_SERVICE, um_realm_service_skeleton_iface_init))
+
+#endif
+static void
+um_realm_service_skeleton_finalize (GObject *object)
+{
+ UmRealmServiceSkeleton *skeleton = UM_REALM_SERVICE_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 (um_realm_service_skeleton_parent_class)->finalize (object);
+}
+
+static void
+um_realm_service_skeleton_init (UmRealmServiceSkeleton *skeleton)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ skeleton->priv = um_realm_service_skeleton_get_instance_private (skeleton);
+#else
+ skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, UM_REALM_TYPE_SERVICE_SKELETON,
UmRealmServiceSkeletonPrivate);
+#endif
+
+ g_mutex_init (&skeleton->priv->lock);
+ skeleton->priv->context = g_main_context_ref_thread_default ();
+}
+
+static void
+um_realm_service_skeleton_class_init (UmRealmServiceSkeletonClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusInterfaceSkeletonClass *skeleton_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = um_realm_service_skeleton_finalize;
+
+ skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
+ skeleton_class->get_info = um_realm_service_skeleton_dbus_interface_get_info;
+ skeleton_class->get_properties = um_realm_service_skeleton_dbus_interface_get_properties;
+ skeleton_class->flush = um_realm_service_skeleton_dbus_interface_flush;
+ skeleton_class->get_vtable = um_realm_service_skeleton_dbus_interface_get_vtable;
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (UmRealmServiceSkeletonPrivate));
+#endif
+}
+
+static void
+um_realm_service_skeleton_iface_init (UmRealmServiceIface *iface)
+{
+ iface->diagnostics = _um_realm_service_on_signal_diagnostics;
+}
+
+/**
+ * um_realm_service_skeleton_new:
+ *
+ * Creates a skeleton object for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Service.top_of_page">org.freedesktop.realmd.Service</link>.
+ *
+ * Returns: (transfer full) (type UmRealmServiceSkeleton): The skeleton object.
+ */
+UmRealmService *
+um_realm_service_skeleton_new (void)
+{
+ return UM_REALM_SERVICE (g_object_new (UM_REALM_TYPE_SERVICE_SKELETON, NULL));
+}
+
+/* ------------------------------------------------------------------------
+ * Code for interface org.freedesktop.realmd.Realm
+ * ------------------------------------------------------------------------
+ */
+
+/**
+ * SECTION:UmRealmCommon
+ * @title: UmRealmCommon
+ * @short_description: Generated C code for the org.freedesktop.realmd.Realm D-Bus interface
+ *
+ * This section contains code for working with the <link
linkend="gdbus-interface-org-freedesktop-realmd-Realm.top_of_page">org.freedesktop.realmd.Realm</link> D-Bus
interface in C.
+ */
+
+/* ---- Introspection data for org.freedesktop.realmd.Realm ---- */
+
+static const _ExtendedGDBusArgInfo _um_realm_common_method_info_deconfigure_IN_ARG_options =
+{
+ {
+ -1,
+ (gchar *) "options",
+ (gchar *) "a{sv}",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _um_realm_common_method_info_deconfigure_IN_ARG_pointers[] =
+{
+ &_um_realm_common_method_info_deconfigure_IN_ARG_options,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _um_realm_common_method_info_deconfigure =
+{
+ {
+ -1,
+ (gchar *) "Deconfigure",
+ (GDBusArgInfo **) &_um_realm_common_method_info_deconfigure_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-deconfigure",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_common_method_info_change_login_policy_IN_ARG_login_policy =
+{
+ {
+ -1,
+ (gchar *) "login_policy",
+ (gchar *) "s",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_common_method_info_change_login_policy_IN_ARG_permitted_add =
+{
+ {
+ -1,
+ (gchar *) "permitted_add",
+ (gchar *) "as",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_common_method_info_change_login_policy_IN_ARG_permitted_remove =
+{
+ {
+ -1,
+ (gchar *) "permitted_remove",
+ (gchar *) "as",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_common_method_info_change_login_policy_IN_ARG_options =
+{
+ {
+ -1,
+ (gchar *) "options",
+ (gchar *) "a{sv}",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const
_um_realm_common_method_info_change_login_policy_IN_ARG_pointers[] =
+{
+ &_um_realm_common_method_info_change_login_policy_IN_ARG_login_policy,
+ &_um_realm_common_method_info_change_login_policy_IN_ARG_permitted_add,
+ &_um_realm_common_method_info_change_login_policy_IN_ARG_permitted_remove,
+ &_um_realm_common_method_info_change_login_policy_IN_ARG_options,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _um_realm_common_method_info_change_login_policy =
+{
+ {
+ -1,
+ (gchar *) "ChangeLoginPolicy",
+ (GDBusArgInfo **) &_um_realm_common_method_info_change_login_policy_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-change-login-policy",
+ FALSE
+};
+
+static const _ExtendedGDBusMethodInfo * const _um_realm_common_method_info_pointers[] =
+{
+ &_um_realm_common_method_info_deconfigure,
+ &_um_realm_common_method_info_change_login_policy,
+ NULL
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_common_property_info_name =
+{
+ {
+ -1,
+ (gchar *) "Name",
+ (gchar *) "s",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "name",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_common_property_info_configured =
+{
+ {
+ -1,
+ (gchar *) "Configured",
+ (gchar *) "s",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "configured",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_common_property_info_supported_interfaces =
+{
+ {
+ -1,
+ (gchar *) "SupportedInterfaces",
+ (gchar *) "as",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "supported-interfaces",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_common_property_info_details =
+{
+ {
+ -1,
+ (gchar *) "Details",
+ (gchar *) "a(ss)",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "details",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_common_property_info_login_formats =
+{
+ {
+ -1,
+ (gchar *) "LoginFormats",
+ (gchar *) "as",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "login-formats",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_common_property_info_login_policy =
+{
+ {
+ -1,
+ (gchar *) "LoginPolicy",
+ (gchar *) "s",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "login-policy",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_common_property_info_permitted_logins =
+{
+ {
+ -1,
+ (gchar *) "PermittedLogins",
+ (gchar *) "as",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "permitted-logins",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo * const _um_realm_common_property_info_pointers[] =
+{
+ &_um_realm_common_property_info_name,
+ &_um_realm_common_property_info_configured,
+ &_um_realm_common_property_info_supported_interfaces,
+ &_um_realm_common_property_info_details,
+ &_um_realm_common_property_info_login_formats,
+ &_um_realm_common_property_info_login_policy,
+ &_um_realm_common_property_info_permitted_logins,
+ NULL
+};
+
+static const _ExtendedGDBusInterfaceInfo _um_realm_common_interface_info =
+{
+ {
+ -1,
+ (gchar *) "org.freedesktop.realmd.Realm",
+ (GDBusMethodInfo **) &_um_realm_common_method_info_pointers,
+ NULL,
+ (GDBusPropertyInfo **) &_um_realm_common_property_info_pointers,
+ NULL
+ },
+ "common",
+};
+
+
+/**
+ * um_realm_common_interface_info:
+ *
+ * Gets a machine-readable description of the <link
linkend="gdbus-interface-org-freedesktop-realmd-Realm.top_of_page">org.freedesktop.realmd.Realm</link> D-Bus
interface.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
+ */
+GDBusInterfaceInfo *
+um_realm_common_interface_info (void)
+{
+ return (GDBusInterfaceInfo *) &_um_realm_common_interface_info.parent_struct;
+}
+
+/**
+ * um_realm_common_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 #UmRealmCommon interface for a concrete class.
+ * The properties are overridden in the order they are defined.
+ *
+ * Returns: The last property id.
+ */
+guint
+um_realm_common_override_properties (GObjectClass *klass, guint property_id_begin)
+{
+ g_object_class_override_property (klass, property_id_begin++, "name");
+ g_object_class_override_property (klass, property_id_begin++, "configured");
+ g_object_class_override_property (klass, property_id_begin++, "supported-interfaces");
+ g_object_class_override_property (klass, property_id_begin++, "details");
+ g_object_class_override_property (klass, property_id_begin++, "login-formats");
+ g_object_class_override_property (klass, property_id_begin++, "login-policy");
+ g_object_class_override_property (klass, property_id_begin++, "permitted-logins");
+ return property_id_begin - 1;
+}
+
+
+
+/**
+ * UmRealmCommon:
+ *
+ * Abstract interface type for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Realm.top_of_page">org.freedesktop.realmd.Realm</link>.
+ */
+
+/**
+ * UmRealmCommonIface:
+ * @parent_iface: The parent interface.
+ * @handle_change_login_policy: Handler for the #UmRealmCommon::handle-change-login-policy signal.
+ * @handle_deconfigure: Handler for the #UmRealmCommon::handle-deconfigure signal.
+ * @get_configured: Getter for the #UmRealmCommon:configured property.
+ * @get_details: Getter for the #UmRealmCommon:details property.
+ * @get_login_formats: Getter for the #UmRealmCommon:login-formats property.
+ * @get_login_policy: Getter for the #UmRealmCommon:login-policy property.
+ * @get_name: Getter for the #UmRealmCommon:name property.
+ * @get_permitted_logins: Getter for the #UmRealmCommon:permitted-logins property.
+ * @get_supported_interfaces: Getter for the #UmRealmCommon:supported-interfaces property.
+ *
+ * Virtual table for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Realm.top_of_page">org.freedesktop.realmd.Realm</link>.
+ */
+
+typedef UmRealmCommonIface UmRealmCommonInterface;
+G_DEFINE_INTERFACE (UmRealmCommon, um_realm_common, G_TYPE_OBJECT)
+
+static void
+um_realm_common_default_init (UmRealmCommonIface *iface)
+{
+ /* GObject signals for incoming D-Bus method calls: */
+ /**
+ * UmRealmCommon::handle-deconfigure:
+ * @object: A #UmRealmCommon.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_options: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link
linkend="gdbus-method-org-freedesktop-realmd-Realm.Deconfigure">Deconfigure()</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 um_realm_common_complete_deconfigure() 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-deconfigure",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (UmRealmCommonIface, handle_deconfigure),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 2,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
+
+ /**
+ * UmRealmCommon::handle-change-login-policy:
+ * @object: A #UmRealmCommon.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_login_policy: Argument passed by remote caller.
+ * @arg_permitted_add: Argument passed by remote caller.
+ * @arg_permitted_remove: Argument passed by remote caller.
+ * @arg_options: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link
linkend="gdbus-method-org-freedesktop-realmd-Realm.ChangeLoginPolicy">ChangeLoginPolicy()</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 um_realm_common_complete_change_login_policy() 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-change-login-policy",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (UmRealmCommonIface, handle_change_login_policy),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 5,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRV, G_TYPE_STRV, G_TYPE_VARIANT);
+
+ /* GObject properties for D-Bus properties: */
+ /**
+ * UmRealmCommon:name:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.Name">"Name"</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 ("name", "Name", "Name", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmCommon:configured:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.Configured">"Configured"</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 ("configured", "Configured", "Configured", NULL, G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmCommon:supported-interfaces:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.SupportedInterfaces">"SupportedInterfaces"</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 ("supported-interfaces", "SupportedInterfaces", "SupportedInterfaces", G_TYPE_STRV,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmCommon:details:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.Details">"Details"</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_variant ("details", "Details", "Details", G_VARIANT_TYPE ("a(ss)"), NULL, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmCommon:login-formats:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.LoginFormats">"LoginFormats"</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 ("login-formats", "LoginFormats", "LoginFormats", G_TYPE_STRV, G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmCommon:login-policy:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.LoginPolicy">"LoginPolicy"</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 ("login-policy", "LoginPolicy", "LoginPolicy", NULL, G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmCommon:permitted-logins:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.PermittedLogins">"PermittedLogins"</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 ("permitted-logins", "PermittedLogins", "PermittedLogins", G_TYPE_STRV,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+/**
+ * um_realm_common_get_name: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets the value of the <link linkend="gdbus-property-org-freedesktop-realmd-Realm.Name">"Name"</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 um_realm_common_dup_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 *
+um_realm_common_get_name (UmRealmCommon *object)
+{
+ return UM_REALM_COMMON_GET_IFACE (object)->get_name (object);
+}
+
+/**
+ * um_realm_common_dup_name: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-realmd-Realm.Name">"Name"</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 *
+um_realm_common_dup_name (UmRealmCommon *object)
+{
+ gchar *value;
+ g_object_get (G_OBJECT (object), "name", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_common_set_name: (skip)
+ * @object: A #UmRealmCommon.
+ * @value: The value to set.
+ *
+ * Sets the <link linkend="gdbus-property-org-freedesktop-realmd-Realm.Name">"Name"</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
+um_realm_common_set_name (UmRealmCommon *object, const gchar *value)
+{
+ g_object_set (G_OBJECT (object), "name", value, NULL);
+}
+
+/**
+ * um_realm_common_get_configured: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.Configured">"Configured"</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 um_realm_common_dup_configured()
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 *
+um_realm_common_get_configured (UmRealmCommon *object)
+{
+ return UM_REALM_COMMON_GET_IFACE (object)->get_configured (object);
+}
+
+/**
+ * um_realm_common_dup_configured: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.Configured">"Configured"</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 *
+um_realm_common_dup_configured (UmRealmCommon *object)
+{
+ gchar *value;
+ g_object_get (G_OBJECT (object), "configured", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_common_set_configured: (skip)
+ * @object: A #UmRealmCommon.
+ * @value: The value to set.
+ *
+ * Sets the <link linkend="gdbus-property-org-freedesktop-realmd-Realm.Configured">"Configured"</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
+um_realm_common_set_configured (UmRealmCommon *object, const gchar *value)
+{
+ g_object_set (G_OBJECT (object), "configured", value, NULL);
+}
+
+/**
+ * um_realm_common_get_supported_interfaces: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.SupportedInterfaces">"SupportedInterfaces"</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
um_realm_common_dup_supported_interfaces() 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 *
+um_realm_common_get_supported_interfaces (UmRealmCommon *object)
+{
+ return UM_REALM_COMMON_GET_IFACE (object)->get_supported_interfaces (object);
+}
+
+/**
+ * um_realm_common_dup_supported_interfaces: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.SupportedInterfaces">"SupportedInterfaces"</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 **
+um_realm_common_dup_supported_interfaces (UmRealmCommon *object)
+{
+ gchar **value;
+ g_object_get (G_OBJECT (object), "supported-interfaces", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_common_set_supported_interfaces: (skip)
+ * @object: A #UmRealmCommon.
+ * @value: The value to set.
+ *
+ * Sets the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.SupportedInterfaces">"SupportedInterfaces"</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
+um_realm_common_set_supported_interfaces (UmRealmCommon *object, const gchar *const *value)
+{
+ g_object_set (G_OBJECT (object), "supported-interfaces", value, NULL);
+}
+
+/**
+ * um_realm_common_get_details: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.Details">"Details"</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 um_realm_common_dup_details() 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.
+ */
+GVariant *
+um_realm_common_get_details (UmRealmCommon *object)
+{
+ return UM_REALM_COMMON_GET_IFACE (object)->get_details (object);
+}
+
+/**
+ * um_realm_common_dup_details: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-realmd-Realm.Details">"Details"</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_variant_unref().
+ */
+GVariant *
+um_realm_common_dup_details (UmRealmCommon *object)
+{
+ GVariant *value;
+ g_object_get (G_OBJECT (object), "details", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_common_set_details: (skip)
+ * @object: A #UmRealmCommon.
+ * @value: The value to set.
+ *
+ * Sets the <link linkend="gdbus-property-org-freedesktop-realmd-Realm.Details">"Details"</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
+um_realm_common_set_details (UmRealmCommon *object, GVariant *value)
+{
+ g_object_set (G_OBJECT (object), "details", value, NULL);
+}
+
+/**
+ * um_realm_common_get_login_formats: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.LoginFormats">"LoginFormats"</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
um_realm_common_dup_login_formats() 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 *
+um_realm_common_get_login_formats (UmRealmCommon *object)
+{
+ return UM_REALM_COMMON_GET_IFACE (object)->get_login_formats (object);
+}
+
+/**
+ * um_realm_common_dup_login_formats: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.LoginFormats">"LoginFormats"</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 **
+um_realm_common_dup_login_formats (UmRealmCommon *object)
+{
+ gchar **value;
+ g_object_get (G_OBJECT (object), "login-formats", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_common_set_login_formats: (skip)
+ * @object: A #UmRealmCommon.
+ * @value: The value to set.
+ *
+ * Sets the <link linkend="gdbus-property-org-freedesktop-realmd-Realm.LoginFormats">"LoginFormats"</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
+um_realm_common_set_login_formats (UmRealmCommon *object, const gchar *const *value)
+{
+ g_object_set (G_OBJECT (object), "login-formats", value, NULL);
+}
+
+/**
+ * um_realm_common_get_login_policy: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.LoginPolicy">"LoginPolicy"</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 um_realm_common_dup_login_policy()
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 *
+um_realm_common_get_login_policy (UmRealmCommon *object)
+{
+ return UM_REALM_COMMON_GET_IFACE (object)->get_login_policy (object);
+}
+
+/**
+ * um_realm_common_dup_login_policy: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.LoginPolicy">"LoginPolicy"</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 *
+um_realm_common_dup_login_policy (UmRealmCommon *object)
+{
+ gchar *value;
+ g_object_get (G_OBJECT (object), "login-policy", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_common_set_login_policy: (skip)
+ * @object: A #UmRealmCommon.
+ * @value: The value to set.
+ *
+ * Sets the <link linkend="gdbus-property-org-freedesktop-realmd-Realm.LoginPolicy">"LoginPolicy"</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
+um_realm_common_set_login_policy (UmRealmCommon *object, const gchar *value)
+{
+ g_object_set (G_OBJECT (object), "login-policy", value, NULL);
+}
+
+/**
+ * um_realm_common_get_permitted_logins: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.PermittedLogins">"PermittedLogins"</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
um_realm_common_dup_permitted_logins() 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 *
+um_realm_common_get_permitted_logins (UmRealmCommon *object)
+{
+ return UM_REALM_COMMON_GET_IFACE (object)->get_permitted_logins (object);
+}
+
+/**
+ * um_realm_common_dup_permitted_logins: (skip)
+ * @object: A #UmRealmCommon.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.PermittedLogins">"PermittedLogins"</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 **
+um_realm_common_dup_permitted_logins (UmRealmCommon *object)
+{
+ gchar **value;
+ g_object_get (G_OBJECT (object), "permitted-logins", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_common_set_permitted_logins: (skip)
+ * @object: A #UmRealmCommon.
+ * @value: The value to set.
+ *
+ * Sets the <link
linkend="gdbus-property-org-freedesktop-realmd-Realm.PermittedLogins">"PermittedLogins"</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
+um_realm_common_set_permitted_logins (UmRealmCommon *object, const gchar *const *value)
+{
+ g_object_set (G_OBJECT (object), "permitted-logins", value, NULL);
+}
+
+/**
+ * um_realm_common_call_deconfigure:
+ * @proxy: A #UmRealmCommonProxy.
+ * @arg_options: 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-realmd-Realm.Deconfigure">Deconfigure()</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 um_realm_common_call_deconfigure_finish() to get the result of the operation.
+ *
+ * See um_realm_common_call_deconfigure_sync() for the synchronous, blocking version of this method.
+ */
+void
+um_realm_common_call_deconfigure (
+ UmRealmCommon *proxy,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Deconfigure",
+ g_variant_new ("(@a{sv})",
+ arg_options),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * um_realm_common_call_deconfigure_finish:
+ * @proxy: A #UmRealmCommonProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_common_call_deconfigure().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with um_realm_common_call_deconfigure().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_common_call_deconfigure_finish (
+ UmRealmCommon *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;
+}
+
+/**
+ * um_realm_common_call_deconfigure_sync:
+ * @proxy: A #UmRealmCommonProxy.
+ * @arg_options: 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-realmd-Realm.Deconfigure">Deconfigure()</link> D-Bus method on @proxy.
The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_common_call_deconfigure() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_common_call_deconfigure_sync (
+ UmRealmCommon *proxy,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Deconfigure",
+ g_variant_new ("(@a{sv})",
+ arg_options),
+ 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;
+}
+
+/**
+ * um_realm_common_call_change_login_policy:
+ * @proxy: A #UmRealmCommonProxy.
+ * @arg_login_policy: Argument to pass with the method invocation.
+ * @arg_permitted_add: Argument to pass with the method invocation.
+ * @arg_permitted_remove: Argument to pass with the method invocation.
+ * @arg_options: 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-realmd-Realm.ChangeLoginPolicy">ChangeLoginPolicy()</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 um_realm_common_call_change_login_policy_finish() to get the result of the operation.
+ *
+ * See um_realm_common_call_change_login_policy_sync() for the synchronous, blocking version of this method.
+ */
+void
+um_realm_common_call_change_login_policy (
+ UmRealmCommon *proxy,
+ const gchar *arg_login_policy,
+ const gchar *const *arg_permitted_add,
+ const gchar *const *arg_permitted_remove,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "ChangeLoginPolicy",
+ g_variant_new ("(s^as^as@a{sv})",
+ arg_login_policy,
+ arg_permitted_add,
+ arg_permitted_remove,
+ arg_options),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * um_realm_common_call_change_login_policy_finish:
+ * @proxy: A #UmRealmCommonProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_common_call_change_login_policy().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with um_realm_common_call_change_login_policy().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_common_call_change_login_policy_finish (
+ UmRealmCommon *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;
+}
+
+/**
+ * um_realm_common_call_change_login_policy_sync:
+ * @proxy: A #UmRealmCommonProxy.
+ * @arg_login_policy: Argument to pass with the method invocation.
+ * @arg_permitted_add: Argument to pass with the method invocation.
+ * @arg_permitted_remove: Argument to pass with the method invocation.
+ * @arg_options: 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-realmd-Realm.ChangeLoginPolicy">ChangeLoginPolicy()</link> D-Bus method
on @proxy. The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_common_call_change_login_policy() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_common_call_change_login_policy_sync (
+ UmRealmCommon *proxy,
+ const gchar *arg_login_policy,
+ const gchar *const *arg_permitted_add,
+ const gchar *const *arg_permitted_remove,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "ChangeLoginPolicy",
+ g_variant_new ("(s^as^as@a{sv})",
+ arg_login_policy,
+ arg_permitted_add,
+ arg_permitted_remove,
+ arg_options),
+ 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;
+}
+
+/**
+ * um_realm_common_complete_deconfigure:
+ * @object: A #UmRealmCommon.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link
linkend="gdbus-method-org-freedesktop-realmd-Realm.Deconfigure">Deconfigure()</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
+um_realm_common_complete_deconfigure (
+ UmRealmCommon *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * um_realm_common_complete_change_login_policy:
+ * @object: A #UmRealmCommon.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link
linkend="gdbus-method-org-freedesktop-realmd-Realm.ChangeLoginPolicy">ChangeLoginPolicy()</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
+um_realm_common_complete_change_login_policy (
+ UmRealmCommon *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * UmRealmCommonProxy:
+ *
+ * The #UmRealmCommonProxy structure contains only private data and should only be accessed using the
provided API.
+ */
+
+/**
+ * UmRealmCommonProxyClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmCommonProxy.
+ */
+
+struct _UmRealmCommonProxyPrivate
+{
+ GData *qdata;
+};
+
+static void um_realm_common_proxy_iface_init (UmRealmCommonIface *iface);
+
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (UmRealmCommonProxy, um_realm_common_proxy, G_TYPE_DBUS_PROXY,
+ G_ADD_PRIVATE (UmRealmCommonProxy)
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_COMMON, um_realm_common_proxy_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (UmRealmCommonProxy, um_realm_common_proxy, G_TYPE_DBUS_PROXY,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_COMMON, um_realm_common_proxy_iface_init))
+
+#endif
+static void
+um_realm_common_proxy_finalize (GObject *object)
+{
+ UmRealmCommonProxy *proxy = UM_REALM_COMMON_PROXY (object);
+ g_datalist_clear (&proxy->priv->qdata);
+ G_OBJECT_CLASS (um_realm_common_proxy_parent_class)->finalize (object);
+}
+
+static void
+um_realm_common_proxy_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ const _ExtendedGDBusPropertyInfo *info;
+ GVariant *variant;
+ g_assert (prop_id != 0 && prop_id - 1 < 7);
+ info = _um_realm_common_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
+um_realm_common_proxy_set_property_cb (GDBusProxy *proxy,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ const _ExtendedGDBusPropertyInfo *info = user_data;
+ GError *error;
+ GVariant *_ret;
+ error = NULL;
+ _ret = g_dbus_proxy_call_finish (proxy, res, &error);
+ if (!_ret)
+ {
+ g_warning ("Error setting property '%s' on interface org.freedesktop.realmd.Realm: %s (%s, %d)",
+ info->parent_struct.name,
+ error->message, g_quark_to_string (error->domain), error->code);
+ g_error_free (error);
+ }
+ else
+ {
+ g_variant_unref (_ret);
+ }
+}
+
+static void
+um_realm_common_proxy_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ const _ExtendedGDBusPropertyInfo *info;
+ GVariant *variant;
+ g_assert (prop_id != 0 && prop_id - 1 < 7);
+ info = _um_realm_common_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.realmd.Realm", info->parent_struct.name, variant),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL, (GAsyncReadyCallback) um_realm_common_proxy_set_property_cb, (GDBusPropertyInfo *)
&info->parent_struct);
+ g_variant_unref (variant);
+}
+
+static void
+um_realm_common_proxy_g_signal (GDBusProxy *proxy,
+ const gchar *sender_name G_GNUC_UNUSED,
+ const gchar *signal_name,
+ GVariant *parameters)
+{
+ _ExtendedGDBusSignalInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ gsize n;
+ guint signal_id;
+ info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *)
&_um_realm_common_interface_info.parent_struct, signal_name);
+ if (info == NULL)
+ return;
+ num_params = g_variant_n_children (parameters);
+ paramv = g_new0 (GValue, num_params + 1);
+ g_value_init (¶mv[0], UM_REALM_TYPE_COMMON);
+ 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, UM_REALM_TYPE_COMMON);
+ 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
+um_realm_common_proxy_g_properties_changed (GDBusProxy *_proxy,
+ GVariant *changed_properties,
+ const gchar *const *invalidated_properties)
+{
+ UmRealmCommonProxy *proxy = UM_REALM_COMMON_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 *)
&_um_realm_common_interface_info.parent_struct, key);
+ g_datalist_remove_data (&proxy->priv->qdata, key);
+ if (info != NULL)
+ g_object_notify (G_OBJECT (proxy), info->hyphen_name);
+ }
+ g_variant_iter_free (iter);
+ for (n = 0; invalidated_properties[n] != NULL; n++)
+ {
+ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *)
&_um_realm_common_interface_info.parent_struct, invalidated_properties[n]);
+ g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
+ if (info != NULL)
+ g_object_notify (G_OBJECT (proxy), info->hyphen_name);
+ }
+}
+
+static const gchar *
+um_realm_common_proxy_get_name (UmRealmCommon *object)
+{
+ UmRealmCommonProxy *proxy = UM_REALM_COMMON_PROXY (object);
+ GVariant *variant;
+ const gchar *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Name");
+ if (variant != NULL)
+ {
+ value = g_variant_get_string (variant, NULL);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static const gchar *
+um_realm_common_proxy_get_configured (UmRealmCommon *object)
+{
+ UmRealmCommonProxy *proxy = UM_REALM_COMMON_PROXY (object);
+ GVariant *variant;
+ const gchar *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Configured");
+ if (variant != NULL)
+ {
+ value = g_variant_get_string (variant, NULL);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static const gchar *const *
+um_realm_common_proxy_get_supported_interfaces (UmRealmCommon *object)
+{
+ UmRealmCommonProxy *proxy = UM_REALM_COMMON_PROXY (object);
+ GVariant *variant;
+ const gchar *const *value = NULL;
+ value = g_datalist_get_data (&proxy->priv->qdata, "SupportedInterfaces");
+ if (value != NULL)
+ return value;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "SupportedInterfaces");
+ if (variant != NULL)
+ {
+ value = g_variant_get_strv (variant, NULL);
+ g_datalist_set_data_full (&proxy->priv->qdata, "SupportedInterfaces", (gpointer) value, g_free);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static GVariant *
+um_realm_common_proxy_get_details (UmRealmCommon *object)
+{
+ UmRealmCommonProxy *proxy = UM_REALM_COMMON_PROXY (object);
+ GVariant *variant;
+ GVariant *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Details");
+ value = variant;
+ if (variant != NULL)
+ g_variant_unref (variant);
+ return value;
+}
+
+static const gchar *const *
+um_realm_common_proxy_get_login_formats (UmRealmCommon *object)
+{
+ UmRealmCommonProxy *proxy = UM_REALM_COMMON_PROXY (object);
+ GVariant *variant;
+ const gchar *const *value = NULL;
+ value = g_datalist_get_data (&proxy->priv->qdata, "LoginFormats");
+ if (value != NULL)
+ return value;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LoginFormats");
+ if (variant != NULL)
+ {
+ value = g_variant_get_strv (variant, NULL);
+ g_datalist_set_data_full (&proxy->priv->qdata, "LoginFormats", (gpointer) value, g_free);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static const gchar *
+um_realm_common_proxy_get_login_policy (UmRealmCommon *object)
+{
+ UmRealmCommonProxy *proxy = UM_REALM_COMMON_PROXY (object);
+ GVariant *variant;
+ const gchar *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "LoginPolicy");
+ if (variant != NULL)
+ {
+ value = g_variant_get_string (variant, NULL);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static const gchar *const *
+um_realm_common_proxy_get_permitted_logins (UmRealmCommon *object)
+{
+ UmRealmCommonProxy *proxy = UM_REALM_COMMON_PROXY (object);
+ GVariant *variant;
+ const gchar *const *value = NULL;
+ value = g_datalist_get_data (&proxy->priv->qdata, "PermittedLogins");
+ if (value != NULL)
+ return value;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "PermittedLogins");
+ if (variant != NULL)
+ {
+ value = g_variant_get_strv (variant, NULL);
+ g_datalist_set_data_full (&proxy->priv->qdata, "PermittedLogins", (gpointer) value, g_free);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static void
+um_realm_common_proxy_init (UmRealmCommonProxy *proxy)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ proxy->priv = um_realm_common_proxy_get_instance_private (proxy);
+#else
+ proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, UM_REALM_TYPE_COMMON_PROXY, UmRealmCommonProxyPrivate);
+#endif
+
+ g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), um_realm_common_interface_info ());
+}
+
+static void
+um_realm_common_proxy_class_init (UmRealmCommonProxyClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusProxyClass *proxy_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = um_realm_common_proxy_finalize;
+ gobject_class->get_property = um_realm_common_proxy_get_property;
+ gobject_class->set_property = um_realm_common_proxy_set_property;
+
+ proxy_class = G_DBUS_PROXY_CLASS (klass);
+ proxy_class->g_signal = um_realm_common_proxy_g_signal;
+ proxy_class->g_properties_changed = um_realm_common_proxy_g_properties_changed;
+
+ um_realm_common_override_properties (gobject_class, 1);
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (UmRealmCommonProxyPrivate));
+#endif
+}
+
+static void
+um_realm_common_proxy_iface_init (UmRealmCommonIface *iface)
+{
+ iface->get_name = um_realm_common_proxy_get_name;
+ iface->get_configured = um_realm_common_proxy_get_configured;
+ iface->get_supported_interfaces = um_realm_common_proxy_get_supported_interfaces;
+ iface->get_details = um_realm_common_proxy_get_details;
+ iface->get_login_formats = um_realm_common_proxy_get_login_formats;
+ iface->get_login_policy = um_realm_common_proxy_get_login_policy;
+ iface->get_permitted_logins = um_realm_common_proxy_get_permitted_logins;
+}
+
+/**
+ * um_realm_common_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-realmd-Realm.top_of_page">org.freedesktop.realmd.Realm</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 um_realm_common_proxy_new_finish() to get the result of the operation.
+ *
+ * See um_realm_common_proxy_new_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+um_realm_common_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 (UM_REALM_TYPE_COMMON_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.realmd.Realm", NULL);
+}
+
+/**
+ * um_realm_common_proxy_new_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to um_realm_common_proxy_new().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_common_proxy_new().
+ *
+ * Returns: (transfer full) (type UmRealmCommonProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmCommon *
+um_realm_common_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 UM_REALM_COMMON (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_common_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-realmd-Realm.top_of_page">org.freedesktop.realmd.Realm</link>. See
g_dbus_proxy_new_sync() for more details.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_common_proxy_new() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmCommonProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmCommon *
+um_realm_common_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GInitable *ret;
+ ret = g_initable_new (UM_REALM_TYPE_COMMON_PROXY, cancellable, error, "g-flags", flags, "g-name", name,
"g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.realmd.Realm",
NULL);
+ if (ret != NULL)
+ return UM_REALM_COMMON (ret);
+ else
+ return NULL;
+}
+
+
+/**
+ * um_realm_common_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 um_realm_common_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 um_realm_common_proxy_new_for_bus_finish() to get the result of the operation.
+ *
+ * See um_realm_common_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+um_realm_common_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 (UM_REALM_TYPE_COMMON_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.realmd.Realm", NULL);
+}
+
+/**
+ * um_realm_common_proxy_new_for_bus_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_common_proxy_new_for_bus().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_common_proxy_new_for_bus().
+ *
+ * Returns: (transfer full) (type UmRealmCommonProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmCommon *
+um_realm_common_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 UM_REALM_COMMON (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_common_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 um_realm_common_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_common_proxy_new_for_bus() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmCommonProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmCommon *
+um_realm_common_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 (UM_REALM_TYPE_COMMON_PROXY, cancellable, error, "g-flags", flags, "g-name", name,
"g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.realmd.Realm",
NULL);
+ if (ret != NULL)
+ return UM_REALM_COMMON (ret);
+ else
+ return NULL;
+}
+
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * UmRealmCommonSkeleton:
+ *
+ * The #UmRealmCommonSkeleton structure contains only private data and should only be accessed using the
provided API.
+ */
+
+/**
+ * UmRealmCommonSkeletonClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmCommonSkeleton.
+ */
+
+struct _UmRealmCommonSkeletonPrivate
+{
+ GValue *properties;
+ GList *changed_properties;
+ GSource *changed_properties_idle_source;
+ GMainContext *context;
+ GMutex lock;
+};
+
+static void
+_um_realm_common_skeleton_handle_method_call (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation,
+ gpointer user_data)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_SKELETON (user_data);
+ _ExtendedGDBusMethodInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ guint num_extra;
+ gsize n;
+ guint signal_id;
+ GValue return_value = G_VALUE_INIT;
+ info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
+ g_assert (info != NULL);
+ num_params = g_variant_n_children (parameters);
+ num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
+ n = 0;
+ g_value_init (¶mv[n], UM_REALM_TYPE_COMMON);
+ 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, UM_REALM_TYPE_COMMON);
+ 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 *
+_um_realm_common_skeleton_handle_get_property (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name G_GNUC_UNUSED,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_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 *)
&_um_realm_common_interface_info.parent_struct, property_name);
+ g_assert (info != NULL);
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
+ if (pspec == NULL)
+ {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s",
property_name);
+ }
+ else
+ {
+ g_value_init (&value, pspec->value_type);
+ g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
+ ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
+ g_value_unset (&value);
+ }
+ return ret;
+}
+
+static gboolean
+_um_realm_common_skeleton_handle_set_property (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name G_GNUC_UNUSED,
+ const gchar *property_name,
+ GVariant *variant,
+ GError **error,
+ gpointer user_data)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_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 *)
&_um_realm_common_interface_info.parent_struct, property_name);
+ g_assert (info != NULL);
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
+ if (pspec == NULL)
+ {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s",
property_name);
+ }
+ else
+ {
+ if (info->use_gvariant)
+ g_value_set_variant (&value, variant);
+ else
+ g_dbus_gvariant_to_gvalue (variant, &value);
+ g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
+ g_value_unset (&value);
+ ret = TRUE;
+ }
+ return ret;
+}
+
+static const GDBusInterfaceVTable _um_realm_common_skeleton_vtable =
+{
+ _um_realm_common_skeleton_handle_method_call,
+ _um_realm_common_skeleton_handle_get_property,
+ _um_realm_common_skeleton_handle_set_property,
+ {NULL}
+};
+
+static GDBusInterfaceInfo *
+um_realm_common_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return um_realm_common_interface_info ();
+}
+
+static GDBusInterfaceVTable *
+um_realm_common_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return (GDBusInterfaceVTable *) &_um_realm_common_skeleton_vtable;
+}
+
+static GVariant *
+um_realm_common_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_SKELETON (_skeleton);
+
+ GVariantBuilder builder;
+ guint n;
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ if (_um_realm_common_interface_info.parent_struct.properties == NULL)
+ goto out;
+ for (n = 0; _um_realm_common_interface_info.parent_struct.properties[n] != NULL; n++)
+ {
+ GDBusPropertyInfo *info = _um_realm_common_interface_info.parent_struct.properties[n];
+ if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
+ {
+ GVariant *value;
+ value = _um_realm_common_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.realmd.Realm", 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 _um_realm_common_emit_changed (gpointer user_data);
+
+static void
+um_realm_common_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_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)
+ _um_realm_common_emit_changed (skeleton);
+}
+
+static void um_realm_common_skeleton_iface_init (UmRealmCommonIface *iface);
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (UmRealmCommonSkeleton, um_realm_common_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_ADD_PRIVATE (UmRealmCommonSkeleton)
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_COMMON, um_realm_common_skeleton_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (UmRealmCommonSkeleton, um_realm_common_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_COMMON, um_realm_common_skeleton_iface_init))
+
+#endif
+static void
+um_realm_common_skeleton_finalize (GObject *object)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_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 (um_realm_common_skeleton_parent_class)->finalize (object);
+}
+
+static void
+um_realm_common_skeleton_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_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
+_um_realm_common_emit_changed (gpointer user_data)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_SKELETON (user_data);
+ GList *l;
+ GVariantBuilder builder;
+ GVariantBuilder invalidated_builder;
+ guint num_changes;
+
+ g_mutex_lock (&skeleton->priv->lock);
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
+ for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
+ {
+ ChangedProperty *cp = l->data;
+ GVariant *variant;
+ const GValue *cur_value;
+
+ cur_value = &skeleton->priv->properties[cp->prop_id - 1];
+ if (!_g_value_equal (cur_value, &cp->orig_value))
+ {
+ variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE
(cp->info->parent_struct.signature));
+ g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
+ g_variant_unref (variant);
+ num_changes++;
+ }
+ }
+ if (num_changes > 0)
+ {
+ GList *connections, *ll;
+ GVariant *signal_variant;
+ signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.realmd.Realm",
+ &builder, &invalidated_builder));
+ connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
+ for (ll = connections; ll != NULL; ll = ll->next)
+ {
+ GDBusConnection *connection = ll->data;
+
+ g_dbus_connection_emit_signal (connection,
+ NULL, g_dbus_interface_skeleton_get_object_path
(G_DBUS_INTERFACE_SKELETON (skeleton)),
+ "org.freedesktop.DBus.Properties",
+ "PropertiesChanged",
+ signal_variant,
+ NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+ }
+ else
+ {
+ g_variant_builder_clear (&builder);
+ g_variant_builder_clear (&invalidated_builder);
+ }
+ g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
+ skeleton->priv->changed_properties = NULL;
+ skeleton->priv->changed_properties_idle_source = NULL;
+ g_mutex_unlock (&skeleton->priv->lock);
+ return FALSE;
+}
+
+static void
+_um_realm_common_schedule_emit_changed (UmRealmCommonSkeleton *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
+um_realm_common_skeleton_notify (GObject *object,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_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, _um_realm_common_emit_changed,
g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
+ g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated]
_um_realm_common_emit_changed");
+ 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
+um_realm_common_skeleton_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_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)
+ _um_realm_common_schedule_emit_changed (skeleton, _um_realm_common_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
+um_realm_common_skeleton_init (UmRealmCommonSkeleton *skeleton)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ skeleton->priv = um_realm_common_skeleton_get_instance_private (skeleton);
+#else
+ skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, UM_REALM_TYPE_COMMON_SKELETON,
UmRealmCommonSkeletonPrivate);
+#endif
+
+ g_mutex_init (&skeleton->priv->lock);
+ skeleton->priv->context = g_main_context_ref_thread_default ();
+ skeleton->priv->properties = g_new0 (GValue, 7);
+ g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING);
+ g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING);
+ g_value_init (&skeleton->priv->properties[2], G_TYPE_STRV);
+ g_value_init (&skeleton->priv->properties[3], G_TYPE_VARIANT);
+ g_value_init (&skeleton->priv->properties[4], G_TYPE_STRV);
+ g_value_init (&skeleton->priv->properties[5], G_TYPE_STRING);
+ g_value_init (&skeleton->priv->properties[6], G_TYPE_STRV);
+}
+
+static const gchar *
+um_realm_common_skeleton_get_name (UmRealmCommon *object)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_SKELETON (object);
+ const gchar *value;
+ g_mutex_lock (&skeleton->priv->lock);
+ value = g_value_get_string (&(skeleton->priv->properties[0]));
+ g_mutex_unlock (&skeleton->priv->lock);
+ return value;
+}
+
+static const gchar *
+um_realm_common_skeleton_get_configured (UmRealmCommon *object)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_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 *const *
+um_realm_common_skeleton_get_supported_interfaces (UmRealmCommon *object)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_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 GVariant *
+um_realm_common_skeleton_get_details (UmRealmCommon *object)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_SKELETON (object);
+ GVariant *value;
+ g_mutex_lock (&skeleton->priv->lock);
+ value = g_value_get_variant (&(skeleton->priv->properties[3]));
+ g_mutex_unlock (&skeleton->priv->lock);
+ return value;
+}
+
+static const gchar *const *
+um_realm_common_skeleton_get_login_formats (UmRealmCommon *object)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_SKELETON (object);
+ const gchar *const *value;
+ g_mutex_lock (&skeleton->priv->lock);
+ value = g_value_get_boxed (&(skeleton->priv->properties[4]));
+ g_mutex_unlock (&skeleton->priv->lock);
+ return value;
+}
+
+static const gchar *
+um_realm_common_skeleton_get_login_policy (UmRealmCommon *object)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_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 *const *
+um_realm_common_skeleton_get_permitted_logins (UmRealmCommon *object)
+{
+ UmRealmCommonSkeleton *skeleton = UM_REALM_COMMON_SKELETON (object);
+ const gchar *const *value;
+ g_mutex_lock (&skeleton->priv->lock);
+ value = g_value_get_boxed (&(skeleton->priv->properties[6]));
+ g_mutex_unlock (&skeleton->priv->lock);
+ return value;
+}
+
+static void
+um_realm_common_skeleton_class_init (UmRealmCommonSkeletonClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusInterfaceSkeletonClass *skeleton_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = um_realm_common_skeleton_finalize;
+ gobject_class->get_property = um_realm_common_skeleton_get_property;
+ gobject_class->set_property = um_realm_common_skeleton_set_property;
+ gobject_class->notify = um_realm_common_skeleton_notify;
+
+
+ um_realm_common_override_properties (gobject_class, 1);
+
+ skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
+ skeleton_class->get_info = um_realm_common_skeleton_dbus_interface_get_info;
+ skeleton_class->get_properties = um_realm_common_skeleton_dbus_interface_get_properties;
+ skeleton_class->flush = um_realm_common_skeleton_dbus_interface_flush;
+ skeleton_class->get_vtable = um_realm_common_skeleton_dbus_interface_get_vtable;
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (UmRealmCommonSkeletonPrivate));
+#endif
+}
+
+static void
+um_realm_common_skeleton_iface_init (UmRealmCommonIface *iface)
+{
+ iface->get_name = um_realm_common_skeleton_get_name;
+ iface->get_configured = um_realm_common_skeleton_get_configured;
+ iface->get_supported_interfaces = um_realm_common_skeleton_get_supported_interfaces;
+ iface->get_details = um_realm_common_skeleton_get_details;
+ iface->get_login_formats = um_realm_common_skeleton_get_login_formats;
+ iface->get_login_policy = um_realm_common_skeleton_get_login_policy;
+ iface->get_permitted_logins = um_realm_common_skeleton_get_permitted_logins;
+}
+
+/**
+ * um_realm_common_skeleton_new:
+ *
+ * Creates a skeleton object for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Realm.top_of_page">org.freedesktop.realmd.Realm</link>.
+ *
+ * Returns: (transfer full) (type UmRealmCommonSkeleton): The skeleton object.
+ */
+UmRealmCommon *
+um_realm_common_skeleton_new (void)
+{
+ return UM_REALM_COMMON (g_object_new (UM_REALM_TYPE_COMMON_SKELETON, NULL));
+}
+
+/* ------------------------------------------------------------------------
+ * Code for interface org.freedesktop.realmd.Kerberos
+ * ------------------------------------------------------------------------
+ */
+
+/**
+ * SECTION:UmRealmKerberos
+ * @title: UmRealmKerberos
+ * @short_description: Generated C code for the org.freedesktop.realmd.Kerberos D-Bus interface
+ *
+ * This section contains code for working with the <link
linkend="gdbus-interface-org-freedesktop-realmd-Kerberos.top_of_page">org.freedesktop.realmd.Kerberos</link>
D-Bus interface in C.
+ */
+
+/* ---- Introspection data for org.freedesktop.realmd.Kerberos ---- */
+
+static const _ExtendedGDBusPropertyInfo _um_realm_kerberos_property_info_realm_name =
+{
+ {
+ -1,
+ (gchar *) "RealmName",
+ (gchar *) "s",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "realm-name",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_kerberos_property_info_domain_name =
+{
+ {
+ -1,
+ (gchar *) "DomainName",
+ (gchar *) "s",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "domain-name",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo * const _um_realm_kerberos_property_info_pointers[] =
+{
+ &_um_realm_kerberos_property_info_realm_name,
+ &_um_realm_kerberos_property_info_domain_name,
+ NULL
+};
+
+static const _ExtendedGDBusInterfaceInfo _um_realm_kerberos_interface_info =
+{
+ {
+ -1,
+ (gchar *) "org.freedesktop.realmd.Kerberos",
+ NULL,
+ NULL,
+ (GDBusPropertyInfo **) &_um_realm_kerberos_property_info_pointers,
+ NULL
+ },
+ "kerberos",
+};
+
+
+/**
+ * um_realm_kerberos_interface_info:
+ *
+ * Gets a machine-readable description of the <link
linkend="gdbus-interface-org-freedesktop-realmd-Kerberos.top_of_page">org.freedesktop.realmd.Kerberos</link>
D-Bus interface.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
+ */
+GDBusInterfaceInfo *
+um_realm_kerberos_interface_info (void)
+{
+ return (GDBusInterfaceInfo *) &_um_realm_kerberos_interface_info.parent_struct;
+}
+
+/**
+ * um_realm_kerberos_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 #UmRealmKerberos interface for a concrete class.
+ * The properties are overridden in the order they are defined.
+ *
+ * Returns: The last property id.
+ */
+guint
+um_realm_kerberos_override_properties (GObjectClass *klass, guint property_id_begin)
+{
+ g_object_class_override_property (klass, property_id_begin++, "realm-name");
+ g_object_class_override_property (klass, property_id_begin++, "domain-name");
+ return property_id_begin - 1;
+}
+
+
+
+/**
+ * UmRealmKerberos:
+ *
+ * Abstract interface type for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Kerberos.top_of_page">org.freedesktop.realmd.Kerberos</link>.
+ */
+
+/**
+ * UmRealmKerberosIface:
+ * @parent_iface: The parent interface.
+ * @get_domain_name: Getter for the #UmRealmKerberos:domain-name property.
+ * @get_realm_name: Getter for the #UmRealmKerberos:realm-name property.
+ *
+ * Virtual table for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Kerberos.top_of_page">org.freedesktop.realmd.Kerberos</link>.
+ */
+
+typedef UmRealmKerberosIface UmRealmKerberosInterface;
+G_DEFINE_INTERFACE (UmRealmKerberos, um_realm_kerberos, G_TYPE_OBJECT)
+
+static void
+um_realm_kerberos_default_init (UmRealmKerberosIface *iface)
+{
+ /* GObject properties for D-Bus properties: */
+ /**
+ * UmRealmKerberos:realm-name:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Kerberos.RealmName">"RealmName"</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 ("realm-name", "RealmName", "RealmName", NULL, G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmKerberos:domain-name:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-Kerberos.DomainName">"DomainName"</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 ("domain-name", "DomainName", "DomainName", NULL, G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
+}
+
+/**
+ * um_realm_kerberos_get_realm_name: (skip)
+ * @object: A #UmRealmKerberos.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-Kerberos.RealmName">"RealmName"</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 um_realm_kerberos_dup_realm_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 *
+um_realm_kerberos_get_realm_name (UmRealmKerberos *object)
+{
+ return UM_REALM_KERBEROS_GET_IFACE (object)->get_realm_name (object);
+}
+
+/**
+ * um_realm_kerberos_dup_realm_name: (skip)
+ * @object: A #UmRealmKerberos.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-Kerberos.RealmName">"RealmName"</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 *
+um_realm_kerberos_dup_realm_name (UmRealmKerberos *object)
+{
+ gchar *value;
+ g_object_get (G_OBJECT (object), "realm-name", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_kerberos_set_realm_name: (skip)
+ * @object: A #UmRealmKerberos.
+ * @value: The value to set.
+ *
+ * Sets the <link linkend="gdbus-property-org-freedesktop-realmd-Kerberos.RealmName">"RealmName"</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
+um_realm_kerberos_set_realm_name (UmRealmKerberos *object, const gchar *value)
+{
+ g_object_set (G_OBJECT (object), "realm-name", value, NULL);
+}
+
+/**
+ * um_realm_kerberos_get_domain_name: (skip)
+ * @object: A #UmRealmKerberos.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-Kerberos.DomainName">"DomainName"</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
um_realm_kerberos_dup_domain_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 *
+um_realm_kerberos_get_domain_name (UmRealmKerberos *object)
+{
+ return UM_REALM_KERBEROS_GET_IFACE (object)->get_domain_name (object);
+}
+
+/**
+ * um_realm_kerberos_dup_domain_name: (skip)
+ * @object: A #UmRealmKerberos.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-Kerberos.DomainName">"DomainName"</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 *
+um_realm_kerberos_dup_domain_name (UmRealmKerberos *object)
+{
+ gchar *value;
+ g_object_get (G_OBJECT (object), "domain-name", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_kerberos_set_domain_name: (skip)
+ * @object: A #UmRealmKerberos.
+ * @value: The value to set.
+ *
+ * Sets the <link linkend="gdbus-property-org-freedesktop-realmd-Kerberos.DomainName">"DomainName"</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
+um_realm_kerberos_set_domain_name (UmRealmKerberos *object, const gchar *value)
+{
+ g_object_set (G_OBJECT (object), "domain-name", value, NULL);
+}
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * UmRealmKerberosProxy:
+ *
+ * The #UmRealmKerberosProxy structure contains only private data and should only be accessed using the
provided API.
+ */
+
+/**
+ * UmRealmKerberosProxyClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmKerberosProxy.
+ */
+
+struct _UmRealmKerberosProxyPrivate
+{
+ GData *qdata;
+};
+
+static void um_realm_kerberos_proxy_iface_init (UmRealmKerberosIface *iface);
+
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (UmRealmKerberosProxy, um_realm_kerberos_proxy, G_TYPE_DBUS_PROXY,
+ G_ADD_PRIVATE (UmRealmKerberosProxy)
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_KERBEROS, um_realm_kerberos_proxy_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (UmRealmKerberosProxy, um_realm_kerberos_proxy, G_TYPE_DBUS_PROXY,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_KERBEROS, um_realm_kerberos_proxy_iface_init))
+
+#endif
+static void
+um_realm_kerberos_proxy_finalize (GObject *object)
+{
+ UmRealmKerberosProxy *proxy = UM_REALM_KERBEROS_PROXY (object);
+ g_datalist_clear (&proxy->priv->qdata);
+ G_OBJECT_CLASS (um_realm_kerberos_proxy_parent_class)->finalize (object);
+}
+
+static void
+um_realm_kerberos_proxy_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ const _ExtendedGDBusPropertyInfo *info;
+ GVariant *variant;
+ g_assert (prop_id != 0 && prop_id - 1 < 2);
+ info = _um_realm_kerberos_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
+um_realm_kerberos_proxy_set_property_cb (GDBusProxy *proxy,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ const _ExtendedGDBusPropertyInfo *info = user_data;
+ GError *error;
+ GVariant *_ret;
+ error = NULL;
+ _ret = g_dbus_proxy_call_finish (proxy, res, &error);
+ if (!_ret)
+ {
+ g_warning ("Error setting property '%s' on interface org.freedesktop.realmd.Kerberos: %s (%s, %d)",
+ info->parent_struct.name,
+ error->message, g_quark_to_string (error->domain), error->code);
+ g_error_free (error);
+ }
+ else
+ {
+ g_variant_unref (_ret);
+ }
+}
+
+static void
+um_realm_kerberos_proxy_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ const _ExtendedGDBusPropertyInfo *info;
+ GVariant *variant;
+ g_assert (prop_id != 0 && prop_id - 1 < 2);
+ info = _um_realm_kerberos_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.realmd.Kerberos", info->parent_struct.name, variant),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL, (GAsyncReadyCallback) um_realm_kerberos_proxy_set_property_cb, (GDBusPropertyInfo *)
&info->parent_struct);
+ g_variant_unref (variant);
+}
+
+static void
+um_realm_kerberos_proxy_g_signal (GDBusProxy *proxy,
+ const gchar *sender_name G_GNUC_UNUSED,
+ const gchar *signal_name,
+ GVariant *parameters)
+{
+ _ExtendedGDBusSignalInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ gsize n;
+ guint signal_id;
+ info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *)
&_um_realm_kerberos_interface_info.parent_struct, signal_name);
+ if (info == NULL)
+ return;
+ num_params = g_variant_n_children (parameters);
+ paramv = g_new0 (GValue, num_params + 1);
+ g_value_init (¶mv[0], UM_REALM_TYPE_KERBEROS);
+ 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, UM_REALM_TYPE_KERBEROS);
+ 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
+um_realm_kerberos_proxy_g_properties_changed (GDBusProxy *_proxy,
+ GVariant *changed_properties,
+ const gchar *const *invalidated_properties)
+{
+ UmRealmKerberosProxy *proxy = UM_REALM_KERBEROS_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 *)
&_um_realm_kerberos_interface_info.parent_struct, key);
+ g_datalist_remove_data (&proxy->priv->qdata, key);
+ if (info != NULL)
+ g_object_notify (G_OBJECT (proxy), info->hyphen_name);
+ }
+ g_variant_iter_free (iter);
+ for (n = 0; invalidated_properties[n] != NULL; n++)
+ {
+ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *)
&_um_realm_kerberos_interface_info.parent_struct, invalidated_properties[n]);
+ g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
+ if (info != NULL)
+ g_object_notify (G_OBJECT (proxy), info->hyphen_name);
+ }
+}
+
+static const gchar *
+um_realm_kerberos_proxy_get_realm_name (UmRealmKerberos *object)
+{
+ UmRealmKerberosProxy *proxy = UM_REALM_KERBEROS_PROXY (object);
+ GVariant *variant;
+ const gchar *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "RealmName");
+ if (variant != NULL)
+ {
+ value = g_variant_get_string (variant, NULL);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static const gchar *
+um_realm_kerberos_proxy_get_domain_name (UmRealmKerberos *object)
+{
+ UmRealmKerberosProxy *proxy = UM_REALM_KERBEROS_PROXY (object);
+ GVariant *variant;
+ const gchar *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "DomainName");
+ if (variant != NULL)
+ {
+ value = g_variant_get_string (variant, NULL);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static void
+um_realm_kerberos_proxy_init (UmRealmKerberosProxy *proxy)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ proxy->priv = um_realm_kerberos_proxy_get_instance_private (proxy);
+#else
+ proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, UM_REALM_TYPE_KERBEROS_PROXY,
UmRealmKerberosProxyPrivate);
+#endif
+
+ g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), um_realm_kerberos_interface_info ());
+}
+
+static void
+um_realm_kerberos_proxy_class_init (UmRealmKerberosProxyClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusProxyClass *proxy_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = um_realm_kerberos_proxy_finalize;
+ gobject_class->get_property = um_realm_kerberos_proxy_get_property;
+ gobject_class->set_property = um_realm_kerberos_proxy_set_property;
+
+ proxy_class = G_DBUS_PROXY_CLASS (klass);
+ proxy_class->g_signal = um_realm_kerberos_proxy_g_signal;
+ proxy_class->g_properties_changed = um_realm_kerberos_proxy_g_properties_changed;
+
+ um_realm_kerberos_override_properties (gobject_class, 1);
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (UmRealmKerberosProxyPrivate));
+#endif
+}
+
+static void
+um_realm_kerberos_proxy_iface_init (UmRealmKerberosIface *iface)
+{
+ iface->get_realm_name = um_realm_kerberos_proxy_get_realm_name;
+ iface->get_domain_name = um_realm_kerberos_proxy_get_domain_name;
+}
+
+/**
+ * um_realm_kerberos_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-realmd-Kerberos.top_of_page">org.freedesktop.realmd.Kerberos</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 um_realm_kerberos_proxy_new_finish() to get the result of the operation.
+ *
+ * See um_realm_kerberos_proxy_new_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+um_realm_kerberos_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 (UM_REALM_TYPE_KERBEROS_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.realmd.Kerberos", NULL);
+}
+
+/**
+ * um_realm_kerberos_proxy_new_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to um_realm_kerberos_proxy_new().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_kerberos_proxy_new().
+ *
+ * Returns: (transfer full) (type UmRealmKerberosProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmKerberos *
+um_realm_kerberos_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 UM_REALM_KERBEROS (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_kerberos_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-realmd-Kerberos.top_of_page">org.freedesktop.realmd.Kerberos</link>.
See g_dbus_proxy_new_sync() for more details.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_kerberos_proxy_new() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmKerberosProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmKerberos *
+um_realm_kerberos_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GInitable *ret;
+ ret = g_initable_new (UM_REALM_TYPE_KERBEROS_PROXY, cancellable, error, "g-flags", flags, "g-name", name,
"g-connection", connection, "g-object-path", object_path, "g-interface-name",
"org.freedesktop.realmd.Kerberos", NULL);
+ if (ret != NULL)
+ return UM_REALM_KERBEROS (ret);
+ else
+ return NULL;
+}
+
+
+/**
+ * um_realm_kerberos_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 um_realm_kerberos_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 um_realm_kerberos_proxy_new_for_bus_finish() to get the result of the operation.
+ *
+ * See um_realm_kerberos_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+um_realm_kerberos_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 (UM_REALM_TYPE_KERBEROS_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.realmd.Kerberos", NULL);
+}
+
+/**
+ * um_realm_kerberos_proxy_new_for_bus_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_kerberos_proxy_new_for_bus().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_kerberos_proxy_new_for_bus().
+ *
+ * Returns: (transfer full) (type UmRealmKerberosProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmKerberos *
+um_realm_kerberos_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 UM_REALM_KERBEROS (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_kerberos_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 um_realm_kerberos_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_kerberos_proxy_new_for_bus() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmKerberosProxy): The constructed proxy object or %NULL if @error is
set.
+ */
+UmRealmKerberos *
+um_realm_kerberos_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 (UM_REALM_TYPE_KERBEROS_PROXY, cancellable, error, "g-flags", flags, "g-name", name,
"g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.realmd.Kerberos",
NULL);
+ if (ret != NULL)
+ return UM_REALM_KERBEROS (ret);
+ else
+ return NULL;
+}
+
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * UmRealmKerberosSkeleton:
+ *
+ * The #UmRealmKerberosSkeleton structure contains only private data and should only be accessed using the
provided API.
+ */
+
+/**
+ * UmRealmKerberosSkeletonClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmKerberosSkeleton.
+ */
+
+struct _UmRealmKerberosSkeletonPrivate
+{
+ GValue *properties;
+ GList *changed_properties;
+ GSource *changed_properties_idle_source;
+ GMainContext *context;
+ GMutex lock;
+};
+
+static void
+_um_realm_kerberos_skeleton_handle_method_call (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation,
+ gpointer user_data)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_SKELETON (user_data);
+ _ExtendedGDBusMethodInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ guint num_extra;
+ gsize n;
+ guint signal_id;
+ GValue return_value = G_VALUE_INIT;
+ info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
+ g_assert (info != NULL);
+ num_params = g_variant_n_children (parameters);
+ num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
+ n = 0;
+ g_value_init (¶mv[n], UM_REALM_TYPE_KERBEROS);
+ 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, UM_REALM_TYPE_KERBEROS);
+ 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 *
+_um_realm_kerberos_skeleton_handle_get_property (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name G_GNUC_UNUSED,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_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 *)
&_um_realm_kerberos_interface_info.parent_struct, property_name);
+ g_assert (info != NULL);
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
+ if (pspec == NULL)
+ {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s",
property_name);
+ }
+ else
+ {
+ g_value_init (&value, pspec->value_type);
+ g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
+ ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
+ g_value_unset (&value);
+ }
+ return ret;
+}
+
+static gboolean
+_um_realm_kerberos_skeleton_handle_set_property (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name G_GNUC_UNUSED,
+ const gchar *property_name,
+ GVariant *variant,
+ GError **error,
+ gpointer user_data)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_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 *)
&_um_realm_kerberos_interface_info.parent_struct, property_name);
+ g_assert (info != NULL);
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
+ if (pspec == NULL)
+ {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s",
property_name);
+ }
+ else
+ {
+ if (info->use_gvariant)
+ g_value_set_variant (&value, variant);
+ else
+ g_dbus_gvariant_to_gvalue (variant, &value);
+ g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
+ g_value_unset (&value);
+ ret = TRUE;
+ }
+ return ret;
+}
+
+static const GDBusInterfaceVTable _um_realm_kerberos_skeleton_vtable =
+{
+ _um_realm_kerberos_skeleton_handle_method_call,
+ _um_realm_kerberos_skeleton_handle_get_property,
+ _um_realm_kerberos_skeleton_handle_set_property,
+ {NULL}
+};
+
+static GDBusInterfaceInfo *
+um_realm_kerberos_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return um_realm_kerberos_interface_info ();
+}
+
+static GDBusInterfaceVTable *
+um_realm_kerberos_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
+{
+ return (GDBusInterfaceVTable *) &_um_realm_kerberos_skeleton_vtable;
+}
+
+static GVariant *
+um_realm_kerberos_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_SKELETON (_skeleton);
+
+ GVariantBuilder builder;
+ guint n;
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ if (_um_realm_kerberos_interface_info.parent_struct.properties == NULL)
+ goto out;
+ for (n = 0; _um_realm_kerberos_interface_info.parent_struct.properties[n] != NULL; n++)
+ {
+ GDBusPropertyInfo *info = _um_realm_kerberos_interface_info.parent_struct.properties[n];
+ if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
+ {
+ GVariant *value;
+ value = _um_realm_kerberos_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.realmd.Kerberos", 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 _um_realm_kerberos_emit_changed (gpointer user_data);
+
+static void
+um_realm_kerberos_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_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)
+ _um_realm_kerberos_emit_changed (skeleton);
+}
+
+static void um_realm_kerberos_skeleton_iface_init (UmRealmKerberosIface *iface);
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (UmRealmKerberosSkeleton, um_realm_kerberos_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_ADD_PRIVATE (UmRealmKerberosSkeleton)
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_KERBEROS,
um_realm_kerberos_skeleton_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (UmRealmKerberosSkeleton, um_realm_kerberos_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_KERBEROS,
um_realm_kerberos_skeleton_iface_init))
+
+#endif
+static void
+um_realm_kerberos_skeleton_finalize (GObject *object)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_SKELETON (object);
+ guint n;
+ for (n = 0; n < 2; 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 (um_realm_kerberos_skeleton_parent_class)->finalize (object);
+}
+
+static void
+um_realm_kerberos_skeleton_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_SKELETON (object);
+ g_assert (prop_id != 0 && prop_id - 1 < 2);
+ g_mutex_lock (&skeleton->priv->lock);
+ g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
+ g_mutex_unlock (&skeleton->priv->lock);
+}
+
+static gboolean
+_um_realm_kerberos_emit_changed (gpointer user_data)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_SKELETON (user_data);
+ GList *l;
+ GVariantBuilder builder;
+ GVariantBuilder invalidated_builder;
+ guint num_changes;
+
+ g_mutex_lock (&skeleton->priv->lock);
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
+ for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
+ {
+ ChangedProperty *cp = l->data;
+ GVariant *variant;
+ const GValue *cur_value;
+
+ cur_value = &skeleton->priv->properties[cp->prop_id - 1];
+ if (!_g_value_equal (cur_value, &cp->orig_value))
+ {
+ variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE
(cp->info->parent_struct.signature));
+ g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
+ g_variant_unref (variant);
+ num_changes++;
+ }
+ }
+ if (num_changes > 0)
+ {
+ GList *connections, *ll;
+ GVariant *signal_variant;
+ signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.realmd.Kerberos",
+ &builder, &invalidated_builder));
+ connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
+ for (ll = connections; ll != NULL; ll = ll->next)
+ {
+ GDBusConnection *connection = ll->data;
+
+ g_dbus_connection_emit_signal (connection,
+ NULL, g_dbus_interface_skeleton_get_object_path
(G_DBUS_INTERFACE_SKELETON (skeleton)),
+ "org.freedesktop.DBus.Properties",
+ "PropertiesChanged",
+ signal_variant,
+ NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+ }
+ else
+ {
+ g_variant_builder_clear (&builder);
+ g_variant_builder_clear (&invalidated_builder);
+ }
+ g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
+ skeleton->priv->changed_properties = NULL;
+ skeleton->priv->changed_properties_idle_source = NULL;
+ g_mutex_unlock (&skeleton->priv->lock);
+ return FALSE;
+}
+
+static void
+_um_realm_kerberos_schedule_emit_changed (UmRealmKerberosSkeleton *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
+um_realm_kerberos_skeleton_notify (GObject *object,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_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,
_um_realm_kerberos_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
+ g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated]
_um_realm_kerberos_emit_changed");
+ 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
+um_realm_kerberos_skeleton_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_SKELETON (object);
+ g_assert (prop_id != 0 && prop_id - 1 < 2);
+ 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)
+ _um_realm_kerberos_schedule_emit_changed (skeleton,
_um_realm_kerberos_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
+um_realm_kerberos_skeleton_init (UmRealmKerberosSkeleton *skeleton)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ skeleton->priv = um_realm_kerberos_skeleton_get_instance_private (skeleton);
+#else
+ skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, UM_REALM_TYPE_KERBEROS_SKELETON,
UmRealmKerberosSkeletonPrivate);
+#endif
+
+ g_mutex_init (&skeleton->priv->lock);
+ skeleton->priv->context = g_main_context_ref_thread_default ();
+ skeleton->priv->properties = g_new0 (GValue, 2);
+ g_value_init (&skeleton->priv->properties[0], G_TYPE_STRING);
+ g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING);
+}
+
+static const gchar *
+um_realm_kerberos_skeleton_get_realm_name (UmRealmKerberos *object)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_SKELETON (object);
+ const gchar *value;
+ g_mutex_lock (&skeleton->priv->lock);
+ value = g_value_get_string (&(skeleton->priv->properties[0]));
+ g_mutex_unlock (&skeleton->priv->lock);
+ return value;
+}
+
+static const gchar *
+um_realm_kerberos_skeleton_get_domain_name (UmRealmKerberos *object)
+{
+ UmRealmKerberosSkeleton *skeleton = UM_REALM_KERBEROS_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 void
+um_realm_kerberos_skeleton_class_init (UmRealmKerberosSkeletonClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusInterfaceSkeletonClass *skeleton_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = um_realm_kerberos_skeleton_finalize;
+ gobject_class->get_property = um_realm_kerberos_skeleton_get_property;
+ gobject_class->set_property = um_realm_kerberos_skeleton_set_property;
+ gobject_class->notify = um_realm_kerberos_skeleton_notify;
+
+
+ um_realm_kerberos_override_properties (gobject_class, 1);
+
+ skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
+ skeleton_class->get_info = um_realm_kerberos_skeleton_dbus_interface_get_info;
+ skeleton_class->get_properties = um_realm_kerberos_skeleton_dbus_interface_get_properties;
+ skeleton_class->flush = um_realm_kerberos_skeleton_dbus_interface_flush;
+ skeleton_class->get_vtable = um_realm_kerberos_skeleton_dbus_interface_get_vtable;
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (UmRealmKerberosSkeletonPrivate));
+#endif
+}
+
+static void
+um_realm_kerberos_skeleton_iface_init (UmRealmKerberosIface *iface)
+{
+ iface->get_realm_name = um_realm_kerberos_skeleton_get_realm_name;
+ iface->get_domain_name = um_realm_kerberos_skeleton_get_domain_name;
+}
+
+/**
+ * um_realm_kerberos_skeleton_new:
+ *
+ * Creates a skeleton object for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Kerberos.top_of_page">org.freedesktop.realmd.Kerberos</link>.
+ *
+ * Returns: (transfer full) (type UmRealmKerberosSkeleton): The skeleton object.
+ */
+UmRealmKerberos *
+um_realm_kerberos_skeleton_new (void)
+{
+ return UM_REALM_KERBEROS (g_object_new (UM_REALM_TYPE_KERBEROS_SKELETON, NULL));
+}
+
+/* ------------------------------------------------------------------------
+ * Code for interface org.freedesktop.realmd.KerberosMembership
+ * ------------------------------------------------------------------------
+ */
+
+/**
+ * SECTION:UmRealmKerberosMembership
+ * @title: UmRealmKerberosMembership
+ * @short_description: Generated C code for the org.freedesktop.realmd.KerberosMembership D-Bus interface
+ *
+ * This section contains code for working with the <link
linkend="gdbus-interface-org-freedesktop-realmd-KerberosMembership.top_of_page">org.freedesktop.realmd.KerberosMembership</link>
D-Bus interface in C.
+ */
+
+/* ---- Introspection data for org.freedesktop.realmd.KerberosMembership ---- */
+
+static const _ExtendedGDBusArgInfo _um_realm_kerberos_membership_method_info_join_IN_ARG_credentials =
+{
+ {
+ -1,
+ (gchar *) "credentials",
+ (gchar *) "(ssv)",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_kerberos_membership_method_info_join_IN_ARG_options =
+{
+ {
+ -1,
+ (gchar *) "options",
+ (gchar *) "a{sv}",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _um_realm_kerberos_membership_method_info_join_IN_ARG_pointers[] =
+{
+ &_um_realm_kerberos_membership_method_info_join_IN_ARG_credentials,
+ &_um_realm_kerberos_membership_method_info_join_IN_ARG_options,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _um_realm_kerberos_membership_method_info_join =
+{
+ {
+ -1,
+ (gchar *) "Join",
+ (GDBusArgInfo **) &_um_realm_kerberos_membership_method_info_join_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-join",
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_kerberos_membership_method_info_leave_IN_ARG_credentials =
+{
+ {
+ -1,
+ (gchar *) "credentials",
+ (gchar *) "(ssv)",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo _um_realm_kerberos_membership_method_info_leave_IN_ARG_options =
+{
+ {
+ -1,
+ (gchar *) "options",
+ (gchar *) "a{sv}",
+ NULL
+ },
+ FALSE
+};
+
+static const _ExtendedGDBusArgInfo * const _um_realm_kerberos_membership_method_info_leave_IN_ARG_pointers[]
=
+{
+ &_um_realm_kerberos_membership_method_info_leave_IN_ARG_credentials,
+ &_um_realm_kerberos_membership_method_info_leave_IN_ARG_options,
+ NULL
+};
+
+static const _ExtendedGDBusMethodInfo _um_realm_kerberos_membership_method_info_leave =
+{
+ {
+ -1,
+ (gchar *) "Leave",
+ (GDBusArgInfo **) &_um_realm_kerberos_membership_method_info_leave_IN_ARG_pointers,
+ NULL,
+ NULL
+ },
+ "handle-leave",
+ FALSE
+};
+
+static const _ExtendedGDBusMethodInfo * const _um_realm_kerberos_membership_method_info_pointers[] =
+{
+ &_um_realm_kerberos_membership_method_info_join,
+ &_um_realm_kerberos_membership_method_info_leave,
+ NULL
+};
+
+static const _ExtendedGDBusPropertyInfo _um_realm_kerberos_membership_property_info_suggested_administrator =
+{
+ {
+ -1,
+ (gchar *) "SuggestedAdministrator",
+ (gchar *) "s",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "suggested-administrator",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo
_um_realm_kerberos_membership_property_info_supported_join_credentials =
+{
+ {
+ -1,
+ (gchar *) "SupportedJoinCredentials",
+ (gchar *) "a(ss)",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "supported-join-credentials",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo
_um_realm_kerberos_membership_property_info_supported_leave_credentials =
+{
+ {
+ -1,
+ (gchar *) "SupportedLeaveCredentials",
+ (gchar *) "a(ss)",
+ G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
+ NULL
+ },
+ "supported-leave-credentials",
+ FALSE
+};
+
+static const _ExtendedGDBusPropertyInfo * const _um_realm_kerberos_membership_property_info_pointers[] =
+{
+ &_um_realm_kerberos_membership_property_info_suggested_administrator,
+ &_um_realm_kerberos_membership_property_info_supported_join_credentials,
+ &_um_realm_kerberos_membership_property_info_supported_leave_credentials,
+ NULL
+};
+
+static const _ExtendedGDBusInterfaceInfo _um_realm_kerberos_membership_interface_info =
+{
+ {
+ -1,
+ (gchar *) "org.freedesktop.realmd.KerberosMembership",
+ (GDBusMethodInfo **) &_um_realm_kerberos_membership_method_info_pointers,
+ NULL,
+ (GDBusPropertyInfo **) &_um_realm_kerberos_membership_property_info_pointers,
+ NULL
+ },
+ "kerberos-membership",
+};
+
+
+/**
+ * um_realm_kerberos_membership_interface_info:
+ *
+ * Gets a machine-readable description of the <link
linkend="gdbus-interface-org-freedesktop-realmd-KerberosMembership.top_of_page">org.freedesktop.realmd.KerberosMembership</link>
D-Bus interface.
+ *
+ * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
+ */
+GDBusInterfaceInfo *
+um_realm_kerberos_membership_interface_info (void)
+{
+ return (GDBusInterfaceInfo *) &_um_realm_kerberos_membership_interface_info.parent_struct;
+}
+
+/**
+ * um_realm_kerberos_membership_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 #UmRealmKerberosMembership interface for a concrete class.
+ * The properties are overridden in the order they are defined.
+ *
+ * Returns: The last property id.
+ */
+guint
+um_realm_kerberos_membership_override_properties (GObjectClass *klass, guint property_id_begin)
+{
+ g_object_class_override_property (klass, property_id_begin++, "suggested-administrator");
+ g_object_class_override_property (klass, property_id_begin++, "supported-join-credentials");
+ g_object_class_override_property (klass, property_id_begin++, "supported-leave-credentials");
+ return property_id_begin - 1;
+}
+
+
+
+/**
+ * UmRealmKerberosMembership:
+ *
+ * Abstract interface type for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-KerberosMembership.top_of_page">org.freedesktop.realmd.KerberosMembership</link>.
+ */
+
+/**
+ * UmRealmKerberosMembershipIface:
+ * @parent_iface: The parent interface.
+ * @handle_join: Handler for the #UmRealmKerberosMembership::handle-join signal.
+ * @handle_leave: Handler for the #UmRealmKerberosMembership::handle-leave signal.
+ * @get_suggested_administrator: Getter for the #UmRealmKerberosMembership:suggested-administrator property.
+ * @get_supported_join_credentials: Getter for the #UmRealmKerberosMembership:supported-join-credentials
property.
+ * @get_supported_leave_credentials: Getter for the #UmRealmKerberosMembership:supported-leave-credentials
property.
+ *
+ * Virtual table for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-KerberosMembership.top_of_page">org.freedesktop.realmd.KerberosMembership</link>.
+ */
+
+typedef UmRealmKerberosMembershipIface UmRealmKerberosMembershipInterface;
+G_DEFINE_INTERFACE (UmRealmKerberosMembership, um_realm_kerberos_membership, G_TYPE_OBJECT)
+
+static void
+um_realm_kerberos_membership_default_init (UmRealmKerberosMembershipIface *iface)
+{
+ /* GObject signals for incoming D-Bus method calls: */
+ /**
+ * UmRealmKerberosMembership::handle-join:
+ * @object: A #UmRealmKerberosMembership.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_credentials: Argument passed by remote caller.
+ * @arg_options: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link
linkend="gdbus-method-org-freedesktop-realmd-KerberosMembership.Join">Join()</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 um_realm_kerberos_membership_complete_join() 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-join",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (UmRealmKerberosMembershipIface, handle_join),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 3,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT);
+
+ /**
+ * UmRealmKerberosMembership::handle-leave:
+ * @object: A #UmRealmKerberosMembership.
+ * @invocation: A #GDBusMethodInvocation.
+ * @arg_credentials: Argument passed by remote caller.
+ * @arg_options: Argument passed by remote caller.
+ *
+ * Signal emitted when a remote caller is invoking the <link
linkend="gdbus-method-org-freedesktop-realmd-KerberosMembership.Leave">Leave()</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 um_realm_kerberos_membership_complete_leave() 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-leave",
+ G_TYPE_FROM_INTERFACE (iface),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (UmRealmKerberosMembershipIface, handle_leave),
+ g_signal_accumulator_true_handled,
+ NULL,
+ g_cclosure_marshal_generic,
+ G_TYPE_BOOLEAN,
+ 3,
+ G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT, G_TYPE_VARIANT);
+
+ /* GObject properties for D-Bus properties: */
+ /**
+ * UmRealmKerberosMembership:suggested-administrator:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SuggestedAdministrator">"SuggestedAdministrator"</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 ("suggested-administrator", "SuggestedAdministrator", "SuggestedAdministrator",
NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmKerberosMembership:supported-join-credentials:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SupportedJoinCredentials">"SupportedJoinCredentials"</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_variant ("supported-join-credentials", "SupportedJoinCredentials",
"SupportedJoinCredentials", G_VARIANT_TYPE ("a(ss)"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * UmRealmKerberosMembership:supported-leave-credentials:
+ *
+ * Represents the D-Bus property <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SupportedLeaveCredentials">"SupportedLeaveCredentials"</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_variant ("supported-leave-credentials", "SupportedLeaveCredentials",
"SupportedLeaveCredentials", G_VARIANT_TYPE ("a(ss)"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+}
+
+/**
+ * um_realm_kerberos_membership_get_suggested_administrator: (skip)
+ * @object: A #UmRealmKerberosMembership.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SuggestedAdministrator">"SuggestedAdministrator"</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
um_realm_kerberos_membership_dup_suggested_administrator() 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 *
+um_realm_kerberos_membership_get_suggested_administrator (UmRealmKerberosMembership *object)
+{
+ return UM_REALM_KERBEROS_MEMBERSHIP_GET_IFACE (object)->get_suggested_administrator (object);
+}
+
+/**
+ * um_realm_kerberos_membership_dup_suggested_administrator: (skip)
+ * @object: A #UmRealmKerberosMembership.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SuggestedAdministrator">"SuggestedAdministrator"</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 *
+um_realm_kerberos_membership_dup_suggested_administrator (UmRealmKerberosMembership *object)
+{
+ gchar *value;
+ g_object_get (G_OBJECT (object), "suggested-administrator", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_kerberos_membership_set_suggested_administrator: (skip)
+ * @object: A #UmRealmKerberosMembership.
+ * @value: The value to set.
+ *
+ * Sets the <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SuggestedAdministrator">"SuggestedAdministrator"</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
+um_realm_kerberos_membership_set_suggested_administrator (UmRealmKerberosMembership *object, const gchar
*value)
+{
+ g_object_set (G_OBJECT (object), "suggested-administrator", value, NULL);
+}
+
+/**
+ * um_realm_kerberos_membership_get_supported_join_credentials: (skip)
+ * @object: A #UmRealmKerberosMembership.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SupportedJoinCredentials">"SupportedJoinCredentials"</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
um_realm_kerberos_membership_dup_supported_join_credentials() 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.
+ */
+GVariant *
+um_realm_kerberos_membership_get_supported_join_credentials (UmRealmKerberosMembership *object)
+{
+ return UM_REALM_KERBEROS_MEMBERSHIP_GET_IFACE (object)->get_supported_join_credentials (object);
+}
+
+/**
+ * um_realm_kerberos_membership_dup_supported_join_credentials: (skip)
+ * @object: A #UmRealmKerberosMembership.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SupportedJoinCredentials">"SupportedJoinCredentials"</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_variant_unref().
+ */
+GVariant *
+um_realm_kerberos_membership_dup_supported_join_credentials (UmRealmKerberosMembership *object)
+{
+ GVariant *value;
+ g_object_get (G_OBJECT (object), "supported-join-credentials", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_kerberos_membership_set_supported_join_credentials: (skip)
+ * @object: A #UmRealmKerberosMembership.
+ * @value: The value to set.
+ *
+ * Sets the <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SupportedJoinCredentials">"SupportedJoinCredentials"</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
+um_realm_kerberos_membership_set_supported_join_credentials (UmRealmKerberosMembership *object, GVariant
*value)
+{
+ g_object_set (G_OBJECT (object), "supported-join-credentials", value, NULL);
+}
+
+/**
+ * um_realm_kerberos_membership_get_supported_leave_credentials: (skip)
+ * @object: A #UmRealmKerberosMembership.
+ *
+ * Gets the value of the <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SupportedLeaveCredentials">"SupportedLeaveCredentials"</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
um_realm_kerberos_membership_dup_supported_leave_credentials() 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.
+ */
+GVariant *
+um_realm_kerberos_membership_get_supported_leave_credentials (UmRealmKerberosMembership *object)
+{
+ return UM_REALM_KERBEROS_MEMBERSHIP_GET_IFACE (object)->get_supported_leave_credentials (object);
+}
+
+/**
+ * um_realm_kerberos_membership_dup_supported_leave_credentials: (skip)
+ * @object: A #UmRealmKerberosMembership.
+ *
+ * Gets a copy of the <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SupportedLeaveCredentials">"SupportedLeaveCredentials"</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_variant_unref().
+ */
+GVariant *
+um_realm_kerberos_membership_dup_supported_leave_credentials (UmRealmKerberosMembership *object)
+{
+ GVariant *value;
+ g_object_get (G_OBJECT (object), "supported-leave-credentials", &value, NULL);
+ return value;
+}
+
+/**
+ * um_realm_kerberos_membership_set_supported_leave_credentials: (skip)
+ * @object: A #UmRealmKerberosMembership.
+ * @value: The value to set.
+ *
+ * Sets the <link
linkend="gdbus-property-org-freedesktop-realmd-KerberosMembership.SupportedLeaveCredentials">"SupportedLeaveCredentials"</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
+um_realm_kerberos_membership_set_supported_leave_credentials (UmRealmKerberosMembership *object, GVariant
*value)
+{
+ g_object_set (G_OBJECT (object), "supported-leave-credentials", value, NULL);
+}
+
+/**
+ * um_realm_kerberos_membership_call_join:
+ * @proxy: A #UmRealmKerberosMembershipProxy.
+ * @arg_credentials: Argument to pass with the method invocation.
+ * @arg_options: 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-realmd-KerberosMembership.Join">Join()</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 um_realm_kerberos_membership_call_join_finish() to get the result of the operation.
+ *
+ * See um_realm_kerberos_membership_call_join_sync() for the synchronous, blocking version of this method.
+ */
+void
+um_realm_kerberos_membership_call_join (
+ UmRealmKerberosMembership *proxy,
+ GVariant *arg_credentials,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Join",
+ g_variant_new ("(@(ssv)@a{sv})",
+ arg_credentials,
+ arg_options),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * um_realm_kerberos_membership_call_join_finish:
+ * @proxy: A #UmRealmKerberosMembershipProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_kerberos_membership_call_join().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with um_realm_kerberos_membership_call_join().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_kerberos_membership_call_join_finish (
+ UmRealmKerberosMembership *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;
+}
+
+/**
+ * um_realm_kerberos_membership_call_join_sync:
+ * @proxy: A #UmRealmKerberosMembershipProxy.
+ * @arg_credentials: Argument to pass with the method invocation.
+ * @arg_options: 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-realmd-KerberosMembership.Join">Join()</link> D-Bus method on @proxy.
The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_kerberos_membership_call_join() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_kerberos_membership_call_join_sync (
+ UmRealmKerberosMembership *proxy,
+ GVariant *arg_credentials,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Join",
+ g_variant_new ("(@(ssv)@a{sv})",
+ arg_credentials,
+ arg_options),
+ 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;
+}
+
+/**
+ * um_realm_kerberos_membership_call_leave:
+ * @proxy: A #UmRealmKerberosMembershipProxy.
+ * @arg_credentials: Argument to pass with the method invocation.
+ * @arg_options: 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-realmd-KerberosMembership.Leave">Leave()</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 um_realm_kerberos_membership_call_leave_finish() to get the result of the operation.
+ *
+ * See um_realm_kerberos_membership_call_leave_sync() for the synchronous, blocking version of this method.
+ */
+void
+um_realm_kerberos_membership_call_leave (
+ UmRealmKerberosMembership *proxy,
+ GVariant *arg_credentials,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_dbus_proxy_call (G_DBUS_PROXY (proxy),
+ "Leave",
+ g_variant_new ("(@(ssv)@a{sv})",
+ arg_credentials,
+ arg_options),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ cancellable,
+ callback,
+ user_data);
+}
+
+/**
+ * um_realm_kerberos_membership_call_leave_finish:
+ * @proxy: A #UmRealmKerberosMembershipProxy.
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_kerberos_membership_call_leave().
+ * @error: Return location for error or %NULL.
+ *
+ * Finishes an operation started with um_realm_kerberos_membership_call_leave().
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_kerberos_membership_call_leave_finish (
+ UmRealmKerberosMembership *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;
+}
+
+/**
+ * um_realm_kerberos_membership_call_leave_sync:
+ * @proxy: A #UmRealmKerberosMembershipProxy.
+ * @arg_credentials: Argument to pass with the method invocation.
+ * @arg_options: 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-realmd-KerberosMembership.Leave">Leave()</link> D-Bus method on @proxy.
The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_kerberos_membership_call_leave() for the asynchronous version of this method.
+ *
+ * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
+ */
+gboolean
+um_realm_kerberos_membership_call_leave_sync (
+ UmRealmKerberosMembership *proxy,
+ GVariant *arg_credentials,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GVariant *_ret;
+ _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
+ "Leave",
+ g_variant_new ("(@(ssv)@a{sv})",
+ arg_credentials,
+ arg_options),
+ 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;
+}
+
+/**
+ * um_realm_kerberos_membership_complete_join:
+ * @object: A #UmRealmKerberosMembership.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link
linkend="gdbus-method-org-freedesktop-realmd-KerberosMembership.Join">Join()</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
+um_realm_kerberos_membership_complete_join (
+ UmRealmKerberosMembership *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/**
+ * um_realm_kerberos_membership_complete_leave:
+ * @object: A #UmRealmKerberosMembership.
+ * @invocation: (transfer full): A #GDBusMethodInvocation.
+ *
+ * Helper function used in service implementations to finish handling invocations of the <link
linkend="gdbus-method-org-freedesktop-realmd-KerberosMembership.Leave">Leave()</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
+um_realm_kerberos_membership_complete_leave (
+ UmRealmKerberosMembership *object,
+ GDBusMethodInvocation *invocation)
+{
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("()"));
+}
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * UmRealmKerberosMembershipProxy:
+ *
+ * The #UmRealmKerberosMembershipProxy structure contains only private data and should only be accessed
using the provided API.
+ */
+
+/**
+ * UmRealmKerberosMembershipProxyClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmKerberosMembershipProxy.
+ */
+
+struct _UmRealmKerberosMembershipProxyPrivate
+{
+ GData *qdata;
+};
+
+static void um_realm_kerberos_membership_proxy_iface_init (UmRealmKerberosMembershipIface *iface);
+
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (UmRealmKerberosMembershipProxy, um_realm_kerberos_membership_proxy,
G_TYPE_DBUS_PROXY,
+ G_ADD_PRIVATE (UmRealmKerberosMembershipProxy)
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_KERBEROS_MEMBERSHIP,
um_realm_kerberos_membership_proxy_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (UmRealmKerberosMembershipProxy, um_realm_kerberos_membership_proxy,
G_TYPE_DBUS_PROXY,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_KERBEROS_MEMBERSHIP,
um_realm_kerberos_membership_proxy_iface_init))
+
+#endif
+static void
+um_realm_kerberos_membership_proxy_finalize (GObject *object)
+{
+ UmRealmKerberosMembershipProxy *proxy = UM_REALM_KERBEROS_MEMBERSHIP_PROXY (object);
+ g_datalist_clear (&proxy->priv->qdata);
+ G_OBJECT_CLASS (um_realm_kerberos_membership_proxy_parent_class)->finalize (object);
+}
+
+static void
+um_realm_kerberos_membership_proxy_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ const _ExtendedGDBusPropertyInfo *info;
+ GVariant *variant;
+ g_assert (prop_id != 0 && prop_id - 1 < 3);
+ info = _um_realm_kerberos_membership_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
+um_realm_kerberos_membership_proxy_set_property_cb (GDBusProxy *proxy,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ const _ExtendedGDBusPropertyInfo *info = user_data;
+ GError *error;
+ GVariant *_ret;
+ error = NULL;
+ _ret = g_dbus_proxy_call_finish (proxy, res, &error);
+ if (!_ret)
+ {
+ g_warning ("Error setting property '%s' on interface org.freedesktop.realmd.KerberosMembership: %s
(%s, %d)",
+ info->parent_struct.name,
+ error->message, g_quark_to_string (error->domain), error->code);
+ g_error_free (error);
+ }
+ else
+ {
+ g_variant_unref (_ret);
+ }
+}
+
+static void
+um_realm_kerberos_membership_proxy_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ const _ExtendedGDBusPropertyInfo *info;
+ GVariant *variant;
+ g_assert (prop_id != 0 && prop_id - 1 < 3);
+ info = _um_realm_kerberos_membership_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.realmd.KerberosMembership", info->parent_struct.name, variant),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL, (GAsyncReadyCallback) um_realm_kerberos_membership_proxy_set_property_cb, (GDBusPropertyInfo *)
&info->parent_struct);
+ g_variant_unref (variant);
+}
+
+static void
+um_realm_kerberos_membership_proxy_g_signal (GDBusProxy *proxy,
+ const gchar *sender_name G_GNUC_UNUSED,
+ const gchar *signal_name,
+ GVariant *parameters)
+{
+ _ExtendedGDBusSignalInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ gsize n;
+ guint signal_id;
+ info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *)
&_um_realm_kerberos_membership_interface_info.parent_struct, signal_name);
+ if (info == NULL)
+ return;
+ num_params = g_variant_n_children (parameters);
+ paramv = g_new0 (GValue, num_params + 1);
+ g_value_init (¶mv[0], UM_REALM_TYPE_KERBEROS_MEMBERSHIP);
+ 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, UM_REALM_TYPE_KERBEROS_MEMBERSHIP);
+ 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
+um_realm_kerberos_membership_proxy_g_properties_changed (GDBusProxy *_proxy,
+ GVariant *changed_properties,
+ const gchar *const *invalidated_properties)
+{
+ UmRealmKerberosMembershipProxy *proxy = UM_REALM_KERBEROS_MEMBERSHIP_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 *)
&_um_realm_kerberos_membership_interface_info.parent_struct, key);
+ g_datalist_remove_data (&proxy->priv->qdata, key);
+ if (info != NULL)
+ g_object_notify (G_OBJECT (proxy), info->hyphen_name);
+ }
+ g_variant_iter_free (iter);
+ for (n = 0; invalidated_properties[n] != NULL; n++)
+ {
+ info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *)
&_um_realm_kerberos_membership_interface_info.parent_struct, invalidated_properties[n]);
+ g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
+ if (info != NULL)
+ g_object_notify (G_OBJECT (proxy), info->hyphen_name);
+ }
+}
+
+static const gchar *
+um_realm_kerberos_membership_proxy_get_suggested_administrator (UmRealmKerberosMembership *object)
+{
+ UmRealmKerberosMembershipProxy *proxy = UM_REALM_KERBEROS_MEMBERSHIP_PROXY (object);
+ GVariant *variant;
+ const gchar *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "SuggestedAdministrator");
+ if (variant != NULL)
+ {
+ value = g_variant_get_string (variant, NULL);
+ g_variant_unref (variant);
+ }
+ return value;
+}
+
+static GVariant *
+um_realm_kerberos_membership_proxy_get_supported_join_credentials (UmRealmKerberosMembership *object)
+{
+ UmRealmKerberosMembershipProxy *proxy = UM_REALM_KERBEROS_MEMBERSHIP_PROXY (object);
+ GVariant *variant;
+ GVariant *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "SupportedJoinCredentials");
+ value = variant;
+ if (variant != NULL)
+ g_variant_unref (variant);
+ return value;
+}
+
+static GVariant *
+um_realm_kerberos_membership_proxy_get_supported_leave_credentials (UmRealmKerberosMembership *object)
+{
+ UmRealmKerberosMembershipProxy *proxy = UM_REALM_KERBEROS_MEMBERSHIP_PROXY (object);
+ GVariant *variant;
+ GVariant *value = NULL;
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "SupportedLeaveCredentials");
+ value = variant;
+ if (variant != NULL)
+ g_variant_unref (variant);
+ return value;
+}
+
+static void
+um_realm_kerberos_membership_proxy_init (UmRealmKerberosMembershipProxy *proxy)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ proxy->priv = um_realm_kerberos_membership_proxy_get_instance_private (proxy);
+#else
+ proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, UM_REALM_TYPE_KERBEROS_MEMBERSHIP_PROXY,
UmRealmKerberosMembershipProxyPrivate);
+#endif
+
+ g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), um_realm_kerberos_membership_interface_info ());
+}
+
+static void
+um_realm_kerberos_membership_proxy_class_init (UmRealmKerberosMembershipProxyClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusProxyClass *proxy_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = um_realm_kerberos_membership_proxy_finalize;
+ gobject_class->get_property = um_realm_kerberos_membership_proxy_get_property;
+ gobject_class->set_property = um_realm_kerberos_membership_proxy_set_property;
+
+ proxy_class = G_DBUS_PROXY_CLASS (klass);
+ proxy_class->g_signal = um_realm_kerberos_membership_proxy_g_signal;
+ proxy_class->g_properties_changed = um_realm_kerberos_membership_proxy_g_properties_changed;
+
+ um_realm_kerberos_membership_override_properties (gobject_class, 1);
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (UmRealmKerberosMembershipProxyPrivate));
+#endif
+}
+
+static void
+um_realm_kerberos_membership_proxy_iface_init (UmRealmKerberosMembershipIface *iface)
+{
+ iface->get_suggested_administrator = um_realm_kerberos_membership_proxy_get_suggested_administrator;
+ iface->get_supported_join_credentials = um_realm_kerberos_membership_proxy_get_supported_join_credentials;
+ iface->get_supported_leave_credentials =
um_realm_kerberos_membership_proxy_get_supported_leave_credentials;
+}
+
+/**
+ * um_realm_kerberos_membership_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-realmd-KerberosMembership.top_of_page">org.freedesktop.realmd.KerberosMembership</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 um_realm_kerberos_membership_proxy_new_finish() to get the result of the operation.
+ *
+ * See um_realm_kerberos_membership_proxy_new_sync() for the synchronous, blocking version of this
constructor.
+ */
+void
+um_realm_kerberos_membership_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 (UM_REALM_TYPE_KERBEROS_MEMBERSHIP_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.realmd.KerberosMembership", NULL);
+}
+
+/**
+ * um_realm_kerberos_membership_proxy_new_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_kerberos_membership_proxy_new().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_kerberos_membership_proxy_new().
+ *
+ * Returns: (transfer full) (type UmRealmKerberosMembershipProxy): The constructed proxy object or %NULL if
@error is set.
+ */
+UmRealmKerberosMembership *
+um_realm_kerberos_membership_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 UM_REALM_KERBEROS_MEMBERSHIP (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_kerberos_membership_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-realmd-KerberosMembership.top_of_page">org.freedesktop.realmd.KerberosMembership</link>.
See g_dbus_proxy_new_sync() for more details.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_kerberos_membership_proxy_new() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmKerberosMembershipProxy): The constructed proxy object or %NULL if
@error is set.
+ */
+UmRealmKerberosMembership *
+um_realm_kerberos_membership_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GInitable *ret;
+ ret = g_initable_new (UM_REALM_TYPE_KERBEROS_MEMBERSHIP_PROXY, cancellable, error, "g-flags", flags,
"g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name",
"org.freedesktop.realmd.KerberosMembership", NULL);
+ if (ret != NULL)
+ return UM_REALM_KERBEROS_MEMBERSHIP (ret);
+ else
+ return NULL;
+}
+
+
+/**
+ * um_realm_kerberos_membership_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 um_realm_kerberos_membership_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 um_realm_kerberos_membership_proxy_new_for_bus_finish() to get the result of the
operation.
+ *
+ * See um_realm_kerberos_membership_proxy_new_for_bus_sync() for the synchronous, blocking version of this
constructor.
+ */
+void
+um_realm_kerberos_membership_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 (UM_REALM_TYPE_KERBEROS_MEMBERSHIP_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.realmd.KerberosMembership", NULL);
+}
+
+/**
+ * um_realm_kerberos_membership_proxy_new_for_bus_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_kerberos_membership_proxy_new_for_bus().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_kerberos_membership_proxy_new_for_bus().
+ *
+ * Returns: (transfer full) (type UmRealmKerberosMembershipProxy): The constructed proxy object or %NULL if
@error is set.
+ */
+UmRealmKerberosMembership *
+um_realm_kerberos_membership_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 UM_REALM_KERBEROS_MEMBERSHIP (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_kerberos_membership_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 um_realm_kerberos_membership_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_kerberos_membership_proxy_new_for_bus() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmKerberosMembershipProxy): The constructed proxy object or %NULL if
@error is set.
+ */
+UmRealmKerberosMembership *
+um_realm_kerberos_membership_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 (UM_REALM_TYPE_KERBEROS_MEMBERSHIP_PROXY, cancellable, error, "g-flags", flags,
"g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name",
"org.freedesktop.realmd.KerberosMembership", NULL);
+ if (ret != NULL)
+ return UM_REALM_KERBEROS_MEMBERSHIP (ret);
+ else
+ return NULL;
+}
+
+
+/* ------------------------------------------------------------------------ */
+
+/**
+ * UmRealmKerberosMembershipSkeleton:
+ *
+ * The #UmRealmKerberosMembershipSkeleton structure contains only private data and should only be accessed
using the provided API.
+ */
+
+/**
+ * UmRealmKerberosMembershipSkeletonClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmKerberosMembershipSkeleton.
+ */
+
+struct _UmRealmKerberosMembershipSkeletonPrivate
+{
+ GValue *properties;
+ GList *changed_properties;
+ GSource *changed_properties_idle_source;
+ GMainContext *context;
+ GMutex lock;
+};
+
+static void
+_um_realm_kerberos_membership_skeleton_handle_method_call (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name,
+ const gchar *method_name,
+ GVariant *parameters,
+ GDBusMethodInvocation *invocation,
+ gpointer user_data)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_SKELETON (user_data);
+ _ExtendedGDBusMethodInfo *info;
+ GVariantIter iter;
+ GVariant *child;
+ GValue *paramv;
+ gsize num_params;
+ guint num_extra;
+ gsize n;
+ guint signal_id;
+ GValue return_value = G_VALUE_INIT;
+ info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
+ g_assert (info != NULL);
+ num_params = g_variant_n_children (parameters);
+ num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
+ n = 0;
+ g_value_init (¶mv[n], UM_REALM_TYPE_KERBEROS_MEMBERSHIP);
+ 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, UM_REALM_TYPE_KERBEROS_MEMBERSHIP);
+ 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 *
+_um_realm_kerberos_membership_skeleton_handle_get_property (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name G_GNUC_UNUSED,
+ const gchar *property_name,
+ GError **error,
+ gpointer user_data)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_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 *)
&_um_realm_kerberos_membership_interface_info.parent_struct, property_name);
+ g_assert (info != NULL);
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
+ if (pspec == NULL)
+ {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s",
property_name);
+ }
+ else
+ {
+ g_value_init (&value, pspec->value_type);
+ g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
+ ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
+ g_value_unset (&value);
+ }
+ return ret;
+}
+
+static gboolean
+_um_realm_kerberos_membership_skeleton_handle_set_property (
+ GDBusConnection *connection G_GNUC_UNUSED,
+ const gchar *sender G_GNUC_UNUSED,
+ const gchar *object_path G_GNUC_UNUSED,
+ const gchar *interface_name G_GNUC_UNUSED,
+ const gchar *property_name,
+ GVariant *variant,
+ GError **error,
+ gpointer user_data)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_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 *)
&_um_realm_kerberos_membership_interface_info.parent_struct, property_name);
+ g_assert (info != NULL);
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
+ if (pspec == NULL)
+ {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s",
property_name);
+ }
+ else
+ {
+ if (info->use_gvariant)
+ g_value_set_variant (&value, variant);
+ else
+ g_dbus_gvariant_to_gvalue (variant, &value);
+ g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
+ g_value_unset (&value);
+ ret = TRUE;
+ }
+ return ret;
+}
+
+static const GDBusInterfaceVTable _um_realm_kerberos_membership_skeleton_vtable =
+{
+ _um_realm_kerberos_membership_skeleton_handle_method_call,
+ _um_realm_kerberos_membership_skeleton_handle_get_property,
+ _um_realm_kerberos_membership_skeleton_handle_set_property,
+ {NULL}
+};
+
+static GDBusInterfaceInfo *
+um_realm_kerberos_membership_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton
G_GNUC_UNUSED)
+{
+ return um_realm_kerberos_membership_interface_info ();
+}
+
+static GDBusInterfaceVTable *
+um_realm_kerberos_membership_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton
G_GNUC_UNUSED)
+{
+ return (GDBusInterfaceVTable *) &_um_realm_kerberos_membership_skeleton_vtable;
+}
+
+static GVariant *
+um_realm_kerberos_membership_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_SKELETON (_skeleton);
+
+ GVariantBuilder builder;
+ guint n;
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ if (_um_realm_kerberos_membership_interface_info.parent_struct.properties == NULL)
+ goto out;
+ for (n = 0; _um_realm_kerberos_membership_interface_info.parent_struct.properties[n] != NULL; n++)
+ {
+ GDBusPropertyInfo *info = _um_realm_kerberos_membership_interface_info.parent_struct.properties[n];
+ if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
+ {
+ GVariant *value;
+ value = _um_realm_kerberos_membership_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.realmd.KerberosMembership", 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 _um_realm_kerberos_membership_emit_changed (gpointer user_data);
+
+static void
+um_realm_kerberos_membership_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_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)
+ _um_realm_kerberos_membership_emit_changed (skeleton);
+}
+
+static void um_realm_kerberos_membership_skeleton_iface_init (UmRealmKerberosMembershipIface *iface);
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+G_DEFINE_TYPE_WITH_CODE (UmRealmKerberosMembershipSkeleton, um_realm_kerberos_membership_skeleton,
G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_ADD_PRIVATE (UmRealmKerberosMembershipSkeleton)
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_KERBEROS_MEMBERSHIP,
um_realm_kerberos_membership_skeleton_iface_init))
+
+#else
+G_DEFINE_TYPE_WITH_CODE (UmRealmKerberosMembershipSkeleton, um_realm_kerberos_membership_skeleton,
G_TYPE_DBUS_INTERFACE_SKELETON,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_KERBEROS_MEMBERSHIP,
um_realm_kerberos_membership_skeleton_iface_init))
+
+#endif
+static void
+um_realm_kerberos_membership_skeleton_finalize (GObject *object)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_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 (um_realm_kerberos_membership_skeleton_parent_class)->finalize (object);
+}
+
+static void
+um_realm_kerberos_membership_skeleton_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_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
+_um_realm_kerberos_membership_emit_changed (gpointer user_data)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_SKELETON (user_data);
+ GList *l;
+ GVariantBuilder builder;
+ GVariantBuilder invalidated_builder;
+ guint num_changes;
+
+ g_mutex_lock (&skeleton->priv->lock);
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
+ g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
+ for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
+ {
+ ChangedProperty *cp = l->data;
+ GVariant *variant;
+ const GValue *cur_value;
+
+ cur_value = &skeleton->priv->properties[cp->prop_id - 1];
+ if (!_g_value_equal (cur_value, &cp->orig_value))
+ {
+ variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE
(cp->info->parent_struct.signature));
+ g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
+ g_variant_unref (variant);
+ num_changes++;
+ }
+ }
+ if (num_changes > 0)
+ {
+ GList *connections, *ll;
+ GVariant *signal_variant;
+ signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)",
"org.freedesktop.realmd.KerberosMembership",
+ &builder, &invalidated_builder));
+ connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
+ for (ll = connections; ll != NULL; ll = ll->next)
+ {
+ GDBusConnection *connection = ll->data;
+
+ g_dbus_connection_emit_signal (connection,
+ NULL, g_dbus_interface_skeleton_get_object_path
(G_DBUS_INTERFACE_SKELETON (skeleton)),
+ "org.freedesktop.DBus.Properties",
+ "PropertiesChanged",
+ signal_variant,
+ NULL);
+ }
+ g_variant_unref (signal_variant);
+ g_list_free_full (connections, g_object_unref);
+ }
+ else
+ {
+ g_variant_builder_clear (&builder);
+ g_variant_builder_clear (&invalidated_builder);
+ }
+ g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
+ skeleton->priv->changed_properties = NULL;
+ skeleton->priv->changed_properties_idle_source = NULL;
+ g_mutex_unlock (&skeleton->priv->lock);
+ return FALSE;
+}
+
+static void
+_um_realm_kerberos_membership_schedule_emit_changed (UmRealmKerberosMembershipSkeleton *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
+um_realm_kerberos_membership_skeleton_notify (GObject *object,
+ GParamSpec *pspec G_GNUC_UNUSED)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_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,
_um_realm_kerberos_membership_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
+ g_source_set_name (skeleton->priv->changed_properties_idle_source, "[generated]
_um_realm_kerberos_membership_emit_changed");
+ 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
+um_realm_kerberos_membership_skeleton_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_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)
+ _um_realm_kerberos_membership_schedule_emit_changed (skeleton,
_um_realm_kerberos_membership_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
+um_realm_kerberos_membership_skeleton_init (UmRealmKerberosMembershipSkeleton *skeleton)
+{
+#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
+ skeleton->priv = um_realm_kerberos_membership_skeleton_get_instance_private (skeleton);
+#else
+ skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, UM_REALM_TYPE_KERBEROS_MEMBERSHIP_SKELETON,
UmRealmKerberosMembershipSkeletonPrivate);
+#endif
+
+ 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_STRING);
+ g_value_init (&skeleton->priv->properties[1], G_TYPE_VARIANT);
+ g_value_init (&skeleton->priv->properties[2], G_TYPE_VARIANT);
+}
+
+static const gchar *
+um_realm_kerberos_membership_skeleton_get_suggested_administrator (UmRealmKerberosMembership *object)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_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 GVariant *
+um_realm_kerberos_membership_skeleton_get_supported_join_credentials (UmRealmKerberosMembership *object)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_SKELETON (object);
+ GVariant *value;
+ g_mutex_lock (&skeleton->priv->lock);
+ value = g_value_get_variant (&(skeleton->priv->properties[1]));
+ g_mutex_unlock (&skeleton->priv->lock);
+ return value;
+}
+
+static GVariant *
+um_realm_kerberos_membership_skeleton_get_supported_leave_credentials (UmRealmKerberosMembership *object)
+{
+ UmRealmKerberosMembershipSkeleton *skeleton = UM_REALM_KERBEROS_MEMBERSHIP_SKELETON (object);
+ GVariant *value;
+ g_mutex_lock (&skeleton->priv->lock);
+ value = g_value_get_variant (&(skeleton->priv->properties[2]));
+ g_mutex_unlock (&skeleton->priv->lock);
+ return value;
+}
+
+static void
+um_realm_kerberos_membership_skeleton_class_init (UmRealmKerberosMembershipSkeletonClass *klass)
+{
+ GObjectClass *gobject_class;
+ GDBusInterfaceSkeletonClass *skeleton_class;
+
+ gobject_class = G_OBJECT_CLASS (klass);
+ gobject_class->finalize = um_realm_kerberos_membership_skeleton_finalize;
+ gobject_class->get_property = um_realm_kerberos_membership_skeleton_get_property;
+ gobject_class->set_property = um_realm_kerberos_membership_skeleton_set_property;
+ gobject_class->notify = um_realm_kerberos_membership_skeleton_notify;
+
+
+ um_realm_kerberos_membership_override_properties (gobject_class, 1);
+
+ skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
+ skeleton_class->get_info = um_realm_kerberos_membership_skeleton_dbus_interface_get_info;
+ skeleton_class->get_properties = um_realm_kerberos_membership_skeleton_dbus_interface_get_properties;
+ skeleton_class->flush = um_realm_kerberos_membership_skeleton_dbus_interface_flush;
+ skeleton_class->get_vtable = um_realm_kerberos_membership_skeleton_dbus_interface_get_vtable;
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
+ g_type_class_add_private (klass, sizeof (UmRealmKerberosMembershipSkeletonPrivate));
+#endif
+}
+
+static void
+um_realm_kerberos_membership_skeleton_iface_init (UmRealmKerberosMembershipIface *iface)
+{
+ iface->get_suggested_administrator = um_realm_kerberos_membership_skeleton_get_suggested_administrator;
+ iface->get_supported_join_credentials =
um_realm_kerberos_membership_skeleton_get_supported_join_credentials;
+ iface->get_supported_leave_credentials =
um_realm_kerberos_membership_skeleton_get_supported_leave_credentials;
+}
+
+/**
+ * um_realm_kerberos_membership_skeleton_new:
+ *
+ * Creates a skeleton object for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-KerberosMembership.top_of_page">org.freedesktop.realmd.KerberosMembership</link>.
+ *
+ * Returns: (transfer full) (type UmRealmKerberosMembershipSkeleton): The skeleton object.
+ */
+UmRealmKerberosMembership *
+um_realm_kerberos_membership_skeleton_new (void)
+{
+ return UM_REALM_KERBEROS_MEMBERSHIP (g_object_new (UM_REALM_TYPE_KERBEROS_MEMBERSHIP_SKELETON, NULL));
+}
+
+/* ------------------------------------------------------------------------
+ * Code for Object, ObjectProxy and ObjectSkeleton
+ * ------------------------------------------------------------------------
+ */
+
+/**
+ * SECTION:UmRealmObject
+ * @title: UmRealmObject
+ * @short_description: Specialized GDBusObject types
+ *
+ * This section contains the #UmRealmObject, #UmRealmObjectProxy, and #UmRealmObjectSkeleton types which
make it easier to work with objects implementing generated types for D-Bus interfaces.
+ */
+
+/**
+ * UmRealmObject:
+ *
+ * The #UmRealmObject type is a specialized container of interfaces.
+ */
+
+/**
+ * UmRealmObjectIface:
+ * @parent_iface: The parent interface.
+ *
+ * Virtual table for the #UmRealmObject interface.
+ */
+
+typedef UmRealmObjectIface UmRealmObjectInterface;
+G_DEFINE_INTERFACE_WITH_CODE (UmRealmObject, um_realm_object, G_TYPE_OBJECT,
g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_DBUS_OBJECT);)
+
+static void
+um_realm_object_default_init (UmRealmObjectIface *iface)
+{
+ /**
+ * UmRealmObject:provider:
+ *
+ * The #UmRealmProvider instance corresponding to the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Provider.top_of_page">org.freedesktop.realmd.Provider</link>,
if any.
+ *
+ * Connect to the #GObject::notify signal to get informed of property changes.
+ */
+ g_object_interface_install_property (iface, g_param_spec_object ("provider", "provider", "provider",
UM_REALM_TYPE_PROVIDER, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+
+ /**
+ * UmRealmObject:service:
+ *
+ * The #UmRealmService instance corresponding to the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Service.top_of_page">org.freedesktop.realmd.Service</link>,
if any.
+ *
+ * Connect to the #GObject::notify signal to get informed of property changes.
+ */
+ g_object_interface_install_property (iface, g_param_spec_object ("service", "service", "service",
UM_REALM_TYPE_SERVICE, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+
+ /**
+ * UmRealmObject:common:
+ *
+ * The #UmRealmCommon instance corresponding to the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Realm.top_of_page">org.freedesktop.realmd.Realm</link>, if
any.
+ *
+ * Connect to the #GObject::notify signal to get informed of property changes.
+ */
+ g_object_interface_install_property (iface, g_param_spec_object ("common", "common", "common",
UM_REALM_TYPE_COMMON, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+
+ /**
+ * UmRealmObject:kerberos:
+ *
+ * The #UmRealmKerberos instance corresponding to the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Kerberos.top_of_page">org.freedesktop.realmd.Kerberos</link>,
if any.
+ *
+ * Connect to the #GObject::notify signal to get informed of property changes.
+ */
+ g_object_interface_install_property (iface, g_param_spec_object ("kerberos", "kerberos", "kerberos",
UM_REALM_TYPE_KERBEROS, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+
+ /**
+ * UmRealmObject:kerberos-membership:
+ *
+ * The #UmRealmKerberosMembership instance corresponding to the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-KerberosMembership.top_of_page">org.freedesktop.realmd.KerberosMembership</link>,
if any.
+ *
+ * Connect to the #GObject::notify signal to get informed of property changes.
+ */
+ g_object_interface_install_property (iface, g_param_spec_object ("kerberos-membership",
"kerberos-membership", "kerberos-membership", UM_REALM_TYPE_KERBEROS_MEMBERSHIP,
G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
+
+}
+
+/**
+ * um_realm_object_get_provider:
+ * @object: A #UmRealmObject.
+ *
+ * Gets the #UmRealmProvider instance for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Provider.top_of_page">org.freedesktop.realmd.Provider</link>
on @object, if any.
+ *
+ * Returns: (transfer full): A #UmRealmProvider that must be freed with g_object_unref() or %NULL if @object
does not implement the interface.
+ */
+UmRealmProvider *um_realm_object_get_provider (UmRealmObject *object)
+{
+ GDBusInterface *ret;
+ ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Provider");
+ if (ret == NULL)
+ return NULL;
+ return UM_REALM_PROVIDER (ret);
+}
+
+/**
+ * um_realm_object_get_service:
+ * @object: A #UmRealmObject.
+ *
+ * Gets the #UmRealmService instance for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Service.top_of_page">org.freedesktop.realmd.Service</link> on
@object, if any.
+ *
+ * Returns: (transfer full): A #UmRealmService that must be freed with g_object_unref() or %NULL if @object
does not implement the interface.
+ */
+UmRealmService *um_realm_object_get_service (UmRealmObject *object)
+{
+ GDBusInterface *ret;
+ ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Service");
+ if (ret == NULL)
+ return NULL;
+ return UM_REALM_SERVICE (ret);
+}
+
+/**
+ * um_realm_object_get_common:
+ * @object: A #UmRealmObject.
+ *
+ * Gets the #UmRealmCommon instance for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Realm.top_of_page">org.freedesktop.realmd.Realm</link> on
@object, if any.
+ *
+ * Returns: (transfer full): A #UmRealmCommon that must be freed with g_object_unref() or %NULL if @object
does not implement the interface.
+ */
+UmRealmCommon *um_realm_object_get_common (UmRealmObject *object)
+{
+ GDBusInterface *ret;
+ ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Realm");
+ if (ret == NULL)
+ return NULL;
+ return UM_REALM_COMMON (ret);
+}
+
+/**
+ * um_realm_object_get_kerberos:
+ * @object: A #UmRealmObject.
+ *
+ * Gets the #UmRealmKerberos instance for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Kerberos.top_of_page">org.freedesktop.realmd.Kerberos</link>
on @object, if any.
+ *
+ * Returns: (transfer full): A #UmRealmKerberos that must be freed with g_object_unref() or %NULL if @object
does not implement the interface.
+ */
+UmRealmKerberos *um_realm_object_get_kerberos (UmRealmObject *object)
+{
+ GDBusInterface *ret;
+ ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Kerberos");
+ if (ret == NULL)
+ return NULL;
+ return UM_REALM_KERBEROS (ret);
+}
+
+/**
+ * um_realm_object_get_kerberos_membership:
+ * @object: A #UmRealmObject.
+ *
+ * Gets the #UmRealmKerberosMembership instance for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-KerberosMembership.top_of_page">org.freedesktop.realmd.KerberosMembership</link>
on @object, if any.
+ *
+ * Returns: (transfer full): A #UmRealmKerberosMembership that must be freed with g_object_unref() or %NULL
if @object does not implement the interface.
+ */
+UmRealmKerberosMembership *um_realm_object_get_kerberos_membership (UmRealmObject *object)
+{
+ GDBusInterface *ret;
+ ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.KerberosMembership");
+ if (ret == NULL)
+ return NULL;
+ return UM_REALM_KERBEROS_MEMBERSHIP (ret);
+}
+
+
+/**
+ * um_realm_object_peek_provider: (skip)
+ * @object: A #UmRealmObject.
+ *
+ * Like um_realm_object_get_provider() but doesn't increase the reference count on the returned object.
+ *
+ * <warning>It is not safe to use the returned object if you are on another thread than the one where the
#GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ *
+ * Returns: (transfer none): A #UmRealmProvider or %NULL if @object does not implement the interface. Do not
free the returned object, it is owned by @object.
+ */
+UmRealmProvider *um_realm_object_peek_provider (UmRealmObject *object)
+{
+ GDBusInterface *ret;
+ ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Provider");
+ if (ret == NULL)
+ return NULL;
+ g_object_unref (ret);
+ return UM_REALM_PROVIDER (ret);
+}
+
+/**
+ * um_realm_object_peek_service: (skip)
+ * @object: A #UmRealmObject.
+ *
+ * Like um_realm_object_get_service() but doesn't increase the reference count on the returned object.
+ *
+ * <warning>It is not safe to use the returned object if you are on another thread than the one where the
#GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ *
+ * Returns: (transfer none): A #UmRealmService or %NULL if @object does not implement the interface. Do not
free the returned object, it is owned by @object.
+ */
+UmRealmService *um_realm_object_peek_service (UmRealmObject *object)
+{
+ GDBusInterface *ret;
+ ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Service");
+ if (ret == NULL)
+ return NULL;
+ g_object_unref (ret);
+ return UM_REALM_SERVICE (ret);
+}
+
+/**
+ * um_realm_object_peek_common: (skip)
+ * @object: A #UmRealmObject.
+ *
+ * Like um_realm_object_get_common() but doesn't increase the reference count on the returned object.
+ *
+ * <warning>It is not safe to use the returned object if you are on another thread than the one where the
#GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ *
+ * Returns: (transfer none): A #UmRealmCommon or %NULL if @object does not implement the interface. Do not
free the returned object, it is owned by @object.
+ */
+UmRealmCommon *um_realm_object_peek_common (UmRealmObject *object)
+{
+ GDBusInterface *ret;
+ ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Realm");
+ if (ret == NULL)
+ return NULL;
+ g_object_unref (ret);
+ return UM_REALM_COMMON (ret);
+}
+
+/**
+ * um_realm_object_peek_kerberos: (skip)
+ * @object: A #UmRealmObject.
+ *
+ * Like um_realm_object_get_kerberos() but doesn't increase the reference count on the returned object.
+ *
+ * <warning>It is not safe to use the returned object if you are on another thread than the one where the
#GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ *
+ * Returns: (transfer none): A #UmRealmKerberos or %NULL if @object does not implement the interface. Do not
free the returned object, it is owned by @object.
+ */
+UmRealmKerberos *um_realm_object_peek_kerberos (UmRealmObject *object)
+{
+ GDBusInterface *ret;
+ ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Kerberos");
+ if (ret == NULL)
+ return NULL;
+ g_object_unref (ret);
+ return UM_REALM_KERBEROS (ret);
+}
+
+/**
+ * um_realm_object_peek_kerberos_membership: (skip)
+ * @object: A #UmRealmObject.
+ *
+ * Like um_realm_object_get_kerberos_membership() but doesn't increase the reference count on the returned
object.
+ *
+ * <warning>It is not safe to use the returned object if you are on another thread than the one where the
#GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
+ *
+ * Returns: (transfer none): A #UmRealmKerberosMembership or %NULL if @object does not implement the
interface. Do not free the returned object, it is owned by @object.
+ */
+UmRealmKerberosMembership *um_realm_object_peek_kerberos_membership (UmRealmObject *object)
+{
+ GDBusInterface *ret;
+ ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.KerberosMembership");
+ if (ret == NULL)
+ return NULL;
+ g_object_unref (ret);
+ return UM_REALM_KERBEROS_MEMBERSHIP (ret);
+}
+
+
+static void
+um_realm_object_notify (GDBusObject *object, GDBusInterface *interface)
+{
+ _ExtendedGDBusInterfaceInfo *info = (_ExtendedGDBusInterfaceInfo *) g_dbus_interface_get_info (interface);
+ /* info can be NULL if the other end is using a D-Bus interface we don't know
+ * anything about, for example old generated code in this process talking to
+ * newer generated code in the other process. */
+ if (info != NULL)
+ g_object_notify (G_OBJECT (object), info->hyphen_name);
+}
+
+/**
+ * UmRealmObjectProxy:
+ *
+ * The #UmRealmObjectProxy structure contains only private data and should only be accessed using the
provided API.
+ */
+
+/**
+ * UmRealmObjectProxyClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmObjectProxy.
+ */
+
+static void
+um_realm_object_proxy__um_realm_object_iface_init (UmRealmObjectIface *iface G_GNUC_UNUSED)
+{
+}
+
+static void
+um_realm_object_proxy__g_dbus_object_iface_init (GDBusObjectIface *iface)
+{
+ iface->interface_added = um_realm_object_notify;
+ iface->interface_removed = um_realm_object_notify;
+}
+
+
+G_DEFINE_TYPE_WITH_CODE (UmRealmObjectProxy, um_realm_object_proxy, G_TYPE_DBUS_OBJECT_PROXY,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_OBJECT,
um_realm_object_proxy__um_realm_object_iface_init)
+ G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT,
um_realm_object_proxy__g_dbus_object_iface_init))
+
+static void
+um_realm_object_proxy_init (UmRealmObjectProxy *object G_GNUC_UNUSED)
+{
+}
+
+static void
+um_realm_object_proxy_set_property (GObject *gobject,
+ guint prop_id,
+ const GValue *value G_GNUC_UNUSED,
+ GParamSpec *pspec)
+{
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
+}
+
+static void
+um_realm_object_proxy_get_property (GObject *gobject,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ UmRealmObjectProxy *object = UM_REALM_OBJECT_PROXY (gobject);
+ GDBusInterface *interface;
+
+ switch (prop_id)
+ {
+ case 1:
+ interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Provider");
+ g_value_take_object (value, interface);
+ break;
+
+ case 2:
+ interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Service");
+ g_value_take_object (value, interface);
+ break;
+
+ case 3:
+ interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Realm");
+ g_value_take_object (value, interface);
+ break;
+
+ case 4:
+ interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Kerberos");
+ g_value_take_object (value, interface);
+ break;
+
+ case 5:
+ interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object),
"org.freedesktop.realmd.KerberosMembership");
+ g_value_take_object (value, interface);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+um_realm_object_proxy_class_init (UmRealmObjectProxyClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->set_property = um_realm_object_proxy_set_property;
+ gobject_class->get_property = um_realm_object_proxy_get_property;
+
+ g_object_class_override_property (gobject_class, 1, "provider");
+ g_object_class_override_property (gobject_class, 2, "service");
+ g_object_class_override_property (gobject_class, 3, "common");
+ g_object_class_override_property (gobject_class, 4, "kerberos");
+ g_object_class_override_property (gobject_class, 5, "kerberos-membership");
+}
+
+/**
+ * um_realm_object_proxy_new:
+ * @connection: A #GDBusConnection.
+ * @object_path: An object path.
+ *
+ * Creates a new proxy object.
+ *
+ * Returns: (transfer full): The proxy object.
+ */
+UmRealmObjectProxy *
+um_realm_object_proxy_new (GDBusConnection *connection,
+ const gchar *object_path)
+{
+ g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL);
+ g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
+ return UM_REALM_OBJECT_PROXY (g_object_new (UM_REALM_TYPE_OBJECT_PROXY, "g-connection", connection,
"g-object-path", object_path, NULL));
+}
+
+/**
+ * UmRealmObjectSkeleton:
+ *
+ * The #UmRealmObjectSkeleton structure contains only private data and should only be accessed using the
provided API.
+ */
+
+/**
+ * UmRealmObjectSkeletonClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmObjectSkeleton.
+ */
+
+static void
+um_realm_object_skeleton__um_realm_object_iface_init (UmRealmObjectIface *iface G_GNUC_UNUSED)
+{
+}
+
+
+static void
+um_realm_object_skeleton__g_dbus_object_iface_init (GDBusObjectIface *iface)
+{
+ iface->interface_added = um_realm_object_notify;
+ iface->interface_removed = um_realm_object_notify;
+}
+
+G_DEFINE_TYPE_WITH_CODE (UmRealmObjectSkeleton, um_realm_object_skeleton, G_TYPE_DBUS_OBJECT_SKELETON,
+ G_IMPLEMENT_INTERFACE (UM_REALM_TYPE_OBJECT,
um_realm_object_skeleton__um_realm_object_iface_init)
+ G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT,
um_realm_object_skeleton__g_dbus_object_iface_init))
+
+static void
+um_realm_object_skeleton_init (UmRealmObjectSkeleton *object G_GNUC_UNUSED)
+{
+}
+
+static void
+um_realm_object_skeleton_set_property (GObject *gobject,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ UmRealmObjectSkeleton *object = UM_REALM_OBJECT_SKELETON (gobject);
+ GDBusInterfaceSkeleton *interface;
+
+ switch (prop_id)
+ {
+ case 1:
+ interface = g_value_get_object (value);
+ if (interface != NULL)
+ {
+ g_warn_if_fail (UM_REALM_IS_PROVIDER (interface));
+ g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
+ }
+ else
+ {
+ g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object),
"org.freedesktop.realmd.Provider");
+ }
+ break;
+
+ case 2:
+ interface = g_value_get_object (value);
+ if (interface != NULL)
+ {
+ g_warn_if_fail (UM_REALM_IS_SERVICE (interface));
+ g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
+ }
+ else
+ {
+ g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object),
"org.freedesktop.realmd.Service");
+ }
+ break;
+
+ case 3:
+ interface = g_value_get_object (value);
+ if (interface != NULL)
+ {
+ g_warn_if_fail (UM_REALM_IS_COMMON (interface));
+ g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
+ }
+ else
+ {
+ g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object),
"org.freedesktop.realmd.Realm");
+ }
+ break;
+
+ case 4:
+ interface = g_value_get_object (value);
+ if (interface != NULL)
+ {
+ g_warn_if_fail (UM_REALM_IS_KERBEROS (interface));
+ g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
+ }
+ else
+ {
+ g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object),
"org.freedesktop.realmd.Kerberos");
+ }
+ break;
+
+ case 5:
+ interface = g_value_get_object (value);
+ if (interface != NULL)
+ {
+ g_warn_if_fail (UM_REALM_IS_KERBEROS_MEMBERSHIP (interface));
+ g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
+ }
+ else
+ {
+ g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object),
"org.freedesktop.realmd.KerberosMembership");
+ }
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+um_realm_object_skeleton_get_property (GObject *gobject,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ UmRealmObjectSkeleton *object = UM_REALM_OBJECT_SKELETON (gobject);
+ GDBusInterface *interface;
+
+ switch (prop_id)
+ {
+ case 1:
+ interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Provider");
+ g_value_take_object (value, interface);
+ break;
+
+ case 2:
+ interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Service");
+ g_value_take_object (value, interface);
+ break;
+
+ case 3:
+ interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Realm");
+ g_value_take_object (value, interface);
+ break;
+
+ case 4:
+ interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.realmd.Kerberos");
+ g_value_take_object (value, interface);
+ break;
+
+ case 5:
+ interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object),
"org.freedesktop.realmd.KerberosMembership");
+ g_value_take_object (value, interface);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+um_realm_object_skeleton_class_init (UmRealmObjectSkeletonClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->set_property = um_realm_object_skeleton_set_property;
+ gobject_class->get_property = um_realm_object_skeleton_get_property;
+
+ g_object_class_override_property (gobject_class, 1, "provider");
+ g_object_class_override_property (gobject_class, 2, "service");
+ g_object_class_override_property (gobject_class, 3, "common");
+ g_object_class_override_property (gobject_class, 4, "kerberos");
+ g_object_class_override_property (gobject_class, 5, "kerberos-membership");
+}
+
+/**
+ * um_realm_object_skeleton_new:
+ * @object_path: An object path.
+ *
+ * Creates a new skeleton object.
+ *
+ * Returns: (transfer full): The skeleton object.
+ */
+UmRealmObjectSkeleton *
+um_realm_object_skeleton_new (const gchar *object_path)
+{
+ g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
+ return UM_REALM_OBJECT_SKELETON (g_object_new (UM_REALM_TYPE_OBJECT_SKELETON, "g-object-path",
object_path, NULL));
+}
+
+/**
+ * um_realm_object_skeleton_set_provider:
+ * @object: A #UmRealmObjectSkeleton.
+ * @interface_: (allow-none): A #UmRealmProvider or %NULL to clear the interface.
+ *
+ * Sets the #UmRealmProvider instance for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Provider.top_of_page">org.freedesktop.realmd.Provider</link>
on @object.
+ */
+void um_realm_object_skeleton_set_provider (UmRealmObjectSkeleton *object, UmRealmProvider *interface_)
+{
+ g_object_set (G_OBJECT (object), "provider", interface_, NULL);
+}
+
+/**
+ * um_realm_object_skeleton_set_service:
+ * @object: A #UmRealmObjectSkeleton.
+ * @interface_: (allow-none): A #UmRealmService or %NULL to clear the interface.
+ *
+ * Sets the #UmRealmService instance for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Service.top_of_page">org.freedesktop.realmd.Service</link> on
@object.
+ */
+void um_realm_object_skeleton_set_service (UmRealmObjectSkeleton *object, UmRealmService *interface_)
+{
+ g_object_set (G_OBJECT (object), "service", interface_, NULL);
+}
+
+/**
+ * um_realm_object_skeleton_set_common:
+ * @object: A #UmRealmObjectSkeleton.
+ * @interface_: (allow-none): A #UmRealmCommon or %NULL to clear the interface.
+ *
+ * Sets the #UmRealmCommon instance for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Realm.top_of_page">org.freedesktop.realmd.Realm</link> on
@object.
+ */
+void um_realm_object_skeleton_set_common (UmRealmObjectSkeleton *object, UmRealmCommon *interface_)
+{
+ g_object_set (G_OBJECT (object), "common", interface_, NULL);
+}
+
+/**
+ * um_realm_object_skeleton_set_kerberos:
+ * @object: A #UmRealmObjectSkeleton.
+ * @interface_: (allow-none): A #UmRealmKerberos or %NULL to clear the interface.
+ *
+ * Sets the #UmRealmKerberos instance for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-Kerberos.top_of_page">org.freedesktop.realmd.Kerberos</link>
on @object.
+ */
+void um_realm_object_skeleton_set_kerberos (UmRealmObjectSkeleton *object, UmRealmKerberos *interface_)
+{
+ g_object_set (G_OBJECT (object), "kerberos", interface_, NULL);
+}
+
+/**
+ * um_realm_object_skeleton_set_kerberos_membership:
+ * @object: A #UmRealmObjectSkeleton.
+ * @interface_: (allow-none): A #UmRealmKerberosMembership or %NULL to clear the interface.
+ *
+ * Sets the #UmRealmKerberosMembership instance for the D-Bus interface <link
linkend="gdbus-interface-org-freedesktop-realmd-KerberosMembership.top_of_page">org.freedesktop.realmd.KerberosMembership</link>
on @object.
+ */
+void um_realm_object_skeleton_set_kerberos_membership (UmRealmObjectSkeleton *object,
UmRealmKerberosMembership *interface_)
+{
+ g_object_set (G_OBJECT (object), "kerberos-membership", interface_, NULL);
+}
+
+
+/* ------------------------------------------------------------------------
+ * Code for ObjectManager client
+ * ------------------------------------------------------------------------
+ */
+
+/**
+ * SECTION:UmRealmObjectManagerClient
+ * @title: UmRealmObjectManagerClient
+ * @short_description: Generated GDBusObjectManagerClient type
+ *
+ * This section contains a #GDBusObjectManagerClient that uses
um_realm_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc.
+ */
+
+/**
+ * UmRealmObjectManagerClient:
+ *
+ * The #UmRealmObjectManagerClient structure contains only private data and should only be accessed using
the provided API.
+ */
+
+/**
+ * UmRealmObjectManagerClientClass:
+ * @parent_class: The parent class.
+ *
+ * Class structure for #UmRealmObjectManagerClient.
+ */
+
+G_DEFINE_TYPE (UmRealmObjectManagerClient, um_realm_object_manager_client, G_TYPE_DBUS_OBJECT_MANAGER_CLIENT)
+
+static void
+um_realm_object_manager_client_init (UmRealmObjectManagerClient *manager G_GNUC_UNUSED)
+{
+}
+
+static void
+um_realm_object_manager_client_class_init (UmRealmObjectManagerClientClass *klass G_GNUC_UNUSED)
+{
+}
+
+/**
+ * um_realm_object_manager_client_get_proxy_type:
+ * @manager: A #GDBusObjectManagerClient.
+ * @object_path: The object path of the remote object (unused).
+ * @interface_name: (allow-none): Interface name of the remote object or %NULL to get the object proxy
#GType.
+ * @user_data: User data (unused).
+ *
+ * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy<!-- -->- and
#GDBusProxy<!-- -->-derived types.
+ *
+ * Returns: A #GDBusProxy<!-- -->-derived #GType if @interface_name is not %NULL, otherwise the #GType for
#UmRealmObjectProxy.
+ */
+GType
+um_realm_object_manager_client_get_proxy_type (GDBusObjectManagerClient *manager G_GNUC_UNUSED, const gchar
*object_path G_GNUC_UNUSED, const gchar *interface_name, gpointer user_data G_GNUC_UNUSED)
+{
+ static gsize once_init_value = 0;
+ static GHashTable *lookup_hash;
+ GType ret;
+
+ if (interface_name == NULL)
+ return UM_REALM_TYPE_OBJECT_PROXY;
+ if (g_once_init_enter (&once_init_value))
+ {
+ lookup_hash = g_hash_table_new (g_str_hash, g_str_equal);
+ g_hash_table_insert (lookup_hash, (gpointer) "org.freedesktop.realmd.Provider", GSIZE_TO_POINTER
(UM_REALM_TYPE_PROVIDER_PROXY));
+ g_hash_table_insert (lookup_hash, (gpointer) "org.freedesktop.realmd.Service", GSIZE_TO_POINTER
(UM_REALM_TYPE_SERVICE_PROXY));
+ g_hash_table_insert (lookup_hash, (gpointer) "org.freedesktop.realmd.Realm", GSIZE_TO_POINTER
(UM_REALM_TYPE_COMMON_PROXY));
+ g_hash_table_insert (lookup_hash, (gpointer) "org.freedesktop.realmd.Kerberos", GSIZE_TO_POINTER
(UM_REALM_TYPE_KERBEROS_PROXY));
+ g_hash_table_insert (lookup_hash, (gpointer) "org.freedesktop.realmd.KerberosMembership",
GSIZE_TO_POINTER (UM_REALM_TYPE_KERBEROS_MEMBERSHIP_PROXY));
+ g_once_init_leave (&once_init_value, 1);
+ }
+ ret = (GType) GPOINTER_TO_SIZE (g_hash_table_lookup (lookup_hash, interface_name));
+ if (ret == (GType) 0)
+ ret = G_TYPE_DBUS_PROXY;
+ return ret;
+}
+
+/**
+ * um_realm_object_manager_client_new:
+ * @connection: A #GDBusConnection.
+ * @flags: Flags from the #GDBusObjectManagerClientFlags 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 #GDBusObjectManagerClient using um_realm_object_manager_client_get_proxy_type() as
the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_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 um_realm_object_manager_client_new_finish() to get the result of the operation.
+ *
+ * See um_realm_object_manager_client_new_sync() for the synchronous, blocking version of this constructor.
+ */
+void
+um_realm_object_manager_client_new (
+ GDBusConnection *connection,
+ GDBusObjectManagerClientFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_async_initable_new_async (UM_REALM_TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable,
callback, user_data, "flags", flags, "name", name, "connection", connection, "object-path", object_path,
"get-proxy-type-func", um_realm_object_manager_client_get_proxy_type, NULL);
+}
+
+/**
+ * um_realm_object_manager_client_new_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_object_manager_client_new().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_object_manager_client_new().
+ *
+ * Returns: (transfer full) (type UmRealmObjectManagerClient): The constructed object manager client or
%NULL if @error is set.
+ */
+GDBusObjectManager *
+um_realm_object_manager_client_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 G_DBUS_OBJECT_MANAGER (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_object_manager_client_new_sync:
+ * @connection: A #GDBusConnection.
+ * @flags: Flags from the #GDBusObjectManagerClientFlags 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 #GDBusObjectManagerClient using um_realm_object_manager_client_get_proxy_type() as
the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new_sync() for more details.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_object_manager_client_new() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmObjectManagerClient): The constructed object manager client or
%NULL if @error is set.
+ */
+GDBusObjectManager *
+um_realm_object_manager_client_new_sync (
+ GDBusConnection *connection,
+ GDBusObjectManagerClientFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GInitable *ret;
+ ret = g_initable_new (UM_REALM_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name",
name, "connection", connection, "object-path", object_path, "get-proxy-type-func",
um_realm_object_manager_client_get_proxy_type, NULL);
+ if (ret != NULL)
+ return G_DBUS_OBJECT_MANAGER (ret);
+ else
+ return NULL;
+}
+
+
+/**
+ * um_realm_object_manager_client_new_for_bus:
+ * @bus_type: A #GBusType.
+ * @flags: Flags from the #GDBusObjectManagerClientFlags 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 um_realm_object_manager_client_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 um_realm_object_manager_client_new_for_bus_finish() to get the result of the operation.
+ *
+ * See um_realm_object_manager_client_new_for_bus_sync() for the synchronous, blocking version of this
constructor.
+ */
+void
+um_realm_object_manager_client_new_for_bus (
+ GBusType bus_type,
+ GDBusObjectManagerClientFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ g_async_initable_new_async (UM_REALM_TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable,
callback, user_data, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path,
"get-proxy-type-func", um_realm_object_manager_client_get_proxy_type, NULL);
+}
+
+/**
+ * um_realm_object_manager_client_new_for_bus_finish:
+ * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to
um_realm_object_manager_client_new_for_bus().
+ * @error: Return location for error or %NULL
+ *
+ * Finishes an operation started with um_realm_object_manager_client_new_for_bus().
+ *
+ * Returns: (transfer full) (type UmRealmObjectManagerClient): The constructed object manager client or
%NULL if @error is set.
+ */
+GDBusObjectManager *
+um_realm_object_manager_client_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 G_DBUS_OBJECT_MANAGER (ret);
+ else
+ return NULL;
+}
+
+/**
+ * um_realm_object_manager_client_new_for_bus_sync:
+ * @bus_type: A #GBusType.
+ * @flags: Flags from the #GDBusObjectManagerClientFlags 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 um_realm_object_manager_client_new_sync() but takes a #GBusType instead of a #GDBusConnection.
+ *
+ * The calling thread is blocked until a reply is received.
+ *
+ * See um_realm_object_manager_client_new_for_bus() for the asynchronous version of this constructor.
+ *
+ * Returns: (transfer full) (type UmRealmObjectManagerClient): The constructed object manager client or
%NULL if @error is set.
+ */
+GDBusObjectManager *
+um_realm_object_manager_client_new_for_bus_sync (
+ GBusType bus_type,
+ GDBusObjectManagerClientFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error)
+{
+ GInitable *ret;
+ ret = g_initable_new (UM_REALM_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name",
name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func",
um_realm_object_manager_client_get_proxy_type, NULL);
+ if (ret != NULL)
+ return G_DBUS_OBJECT_MANAGER (ret);
+ else
+ return NULL;
+}
+
+
diff --git a/panels/user-accounts/um-realm-generated.h b/panels/user-accounts/um-realm-generated.h
new file mode 100644
index 0000000..6069157
--- /dev/null
+++ b/panels/user-accounts/um-realm-generated.h
@@ -0,0 +1,1201 @@
+/*
+ * Generated by gdbus-codegen 2.53.3. DO NOT EDIT.
+ *
+ * The license of this code is the same as for the source it was derived from.
+ */
+
+#ifndef __UM_REALM_GENERATED_H__
+#define __UM_REALM_GENERATED_H__
+
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+
+/* ------------------------------------------------------------------------ */
+/* Declarations for org.freedesktop.realmd.Provider */
+
+#define UM_REALM_TYPE_PROVIDER (um_realm_provider_get_type ())
+#define UM_REALM_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_PROVIDER, UmRealmProvider))
+#define UM_REALM_IS_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_PROVIDER))
+#define UM_REALM_PROVIDER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), UM_REALM_TYPE_PROVIDER,
UmRealmProviderIface))
+
+struct _UmRealmProvider;
+typedef struct _UmRealmProvider UmRealmProvider;
+typedef struct _UmRealmProviderIface UmRealmProviderIface;
+
+struct _UmRealmProviderIface
+{
+ GTypeInterface parent_iface;
+
+
+ gboolean (*handle_discover) (
+ UmRealmProvider *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *arg_string,
+ GVariant *arg_options);
+
+ const gchar * (*get_name) (UmRealmProvider *object);
+
+ const gchar *const * (*get_realms) (UmRealmProvider *object);
+
+ const gchar * (*get_version) (UmRealmProvider *object);
+
+};
+
+GType um_realm_provider_get_type (void) G_GNUC_CONST;
+
+GDBusInterfaceInfo *um_realm_provider_interface_info (void);
+guint um_realm_provider_override_properties (GObjectClass *klass, guint property_id_begin);
+
+
+/* D-Bus method call completion functions: */
+void um_realm_provider_complete_discover (
+ UmRealmProvider *object,
+ GDBusMethodInvocation *invocation,
+ gint relevance,
+ const gchar *const *realm);
+
+
+
+/* D-Bus method calls: */
+void um_realm_provider_call_discover (
+ UmRealmProvider *proxy,
+ const gchar *arg_string,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean um_realm_provider_call_discover_finish (
+ UmRealmProvider *proxy,
+ gint *out_relevance,
+ gchar ***out_realm,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean um_realm_provider_call_discover_sync (
+ UmRealmProvider *proxy,
+ const gchar *arg_string,
+ GVariant *arg_options,
+ gint *out_relevance,
+ gchar ***out_realm,
+ GCancellable *cancellable,
+ GError **error);
+
+
+
+/* D-Bus property accessors: */
+const gchar *um_realm_provider_get_name (UmRealmProvider *object);
+gchar *um_realm_provider_dup_name (UmRealmProvider *object);
+void um_realm_provider_set_name (UmRealmProvider *object, const gchar *value);
+
+const gchar *um_realm_provider_get_version (UmRealmProvider *object);
+gchar *um_realm_provider_dup_version (UmRealmProvider *object);
+void um_realm_provider_set_version (UmRealmProvider *object, const gchar *value);
+
+const gchar *const *um_realm_provider_get_realms (UmRealmProvider *object);
+gchar **um_realm_provider_dup_realms (UmRealmProvider *object);
+void um_realm_provider_set_realms (UmRealmProvider *object, const gchar *const *value);
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_PROVIDER_PROXY (um_realm_provider_proxy_get_type ())
+#define UM_REALM_PROVIDER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_PROVIDER_PROXY,
UmRealmProviderProxy))
+#define UM_REALM_PROVIDER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UM_REALM_TYPE_PROVIDER_PROXY,
UmRealmProviderProxyClass))
+#define UM_REALM_PROVIDER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), UM_REALM_TYPE_PROVIDER_PROXY,
UmRealmProviderProxyClass))
+#define UM_REALM_IS_PROVIDER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_PROVIDER_PROXY))
+#define UM_REALM_IS_PROVIDER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UM_REALM_TYPE_PROVIDER_PROXY))
+
+typedef struct _UmRealmProviderProxy UmRealmProviderProxy;
+typedef struct _UmRealmProviderProxyClass UmRealmProviderProxyClass;
+typedef struct _UmRealmProviderProxyPrivate UmRealmProviderProxyPrivate;
+
+struct _UmRealmProviderProxy
+{
+ /*< private >*/
+ GDBusProxy parent_instance;
+ UmRealmProviderProxyPrivate *priv;
+};
+
+struct _UmRealmProviderProxyClass
+{
+ GDBusProxyClass parent_class;
+};
+
+GType um_realm_provider_proxy_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmProviderProxy, g_object_unref)
+#endif
+
+void um_realm_provider_proxy_new (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+UmRealmProvider *um_realm_provider_proxy_new_finish (
+ GAsyncResult *res,
+ GError **error);
+UmRealmProvider *um_realm_provider_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+void um_realm_provider_proxy_new_for_bus (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+UmRealmProvider *um_realm_provider_proxy_new_for_bus_finish (
+ GAsyncResult *res,
+ GError **error);
+UmRealmProvider *um_realm_provider_proxy_new_for_bus_sync (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_PROVIDER_SKELETON (um_realm_provider_skeleton_get_type ())
+#define UM_REALM_PROVIDER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_PROVIDER_SKELETON,
UmRealmProviderSkeleton))
+#define UM_REALM_PROVIDER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UM_REALM_TYPE_PROVIDER_SKELETON,
UmRealmProviderSkeletonClass))
+#define UM_REALM_PROVIDER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o),
UM_REALM_TYPE_PROVIDER_SKELETON, UmRealmProviderSkeletonClass))
+#define UM_REALM_IS_PROVIDER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_PROVIDER_SKELETON))
+#define UM_REALM_IS_PROVIDER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k),
UM_REALM_TYPE_PROVIDER_SKELETON))
+
+typedef struct _UmRealmProviderSkeleton UmRealmProviderSkeleton;
+typedef struct _UmRealmProviderSkeletonClass UmRealmProviderSkeletonClass;
+typedef struct _UmRealmProviderSkeletonPrivate UmRealmProviderSkeletonPrivate;
+
+struct _UmRealmProviderSkeleton
+{
+ /*< private >*/
+ GDBusInterfaceSkeleton parent_instance;
+ UmRealmProviderSkeletonPrivate *priv;
+};
+
+struct _UmRealmProviderSkeletonClass
+{
+ GDBusInterfaceSkeletonClass parent_class;
+};
+
+GType um_realm_provider_skeleton_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmProviderSkeleton, g_object_unref)
+#endif
+
+UmRealmProvider *um_realm_provider_skeleton_new (void);
+
+
+/* ------------------------------------------------------------------------ */
+/* Declarations for org.freedesktop.realmd.Service */
+
+#define UM_REALM_TYPE_SERVICE (um_realm_service_get_type ())
+#define UM_REALM_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_SERVICE, UmRealmService))
+#define UM_REALM_IS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_SERVICE))
+#define UM_REALM_SERVICE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), UM_REALM_TYPE_SERVICE,
UmRealmServiceIface))
+
+struct _UmRealmService;
+typedef struct _UmRealmService UmRealmService;
+typedef struct _UmRealmServiceIface UmRealmServiceIface;
+
+struct _UmRealmServiceIface
+{
+ GTypeInterface parent_iface;
+
+
+ gboolean (*handle_cancel) (
+ UmRealmService *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *arg_operation);
+
+ gboolean (*handle_release) (
+ UmRealmService *object,
+ GDBusMethodInvocation *invocation);
+
+ gboolean (*handle_set_locale) (
+ UmRealmService *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *arg_locale);
+
+ void (*diagnostics) (
+ UmRealmService *object,
+ const gchar *arg_data,
+ const gchar *arg_operation);
+
+};
+
+GType um_realm_service_get_type (void) G_GNUC_CONST;
+
+GDBusInterfaceInfo *um_realm_service_interface_info (void);
+guint um_realm_service_override_properties (GObjectClass *klass, guint property_id_begin);
+
+
+/* D-Bus method call completion functions: */
+void um_realm_service_complete_cancel (
+ UmRealmService *object,
+ GDBusMethodInvocation *invocation);
+
+void um_realm_service_complete_set_locale (
+ UmRealmService *object,
+ GDBusMethodInvocation *invocation);
+
+void um_realm_service_complete_release (
+ UmRealmService *object,
+ GDBusMethodInvocation *invocation);
+
+
+
+/* D-Bus signal emissions functions: */
+void um_realm_service_emit_diagnostics (
+ UmRealmService *object,
+ const gchar *arg_data,
+ const gchar *arg_operation);
+
+
+
+/* D-Bus method calls: */
+void um_realm_service_call_cancel (
+ UmRealmService *proxy,
+ const gchar *arg_operation,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean um_realm_service_call_cancel_finish (
+ UmRealmService *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean um_realm_service_call_cancel_sync (
+ UmRealmService *proxy,
+ const gchar *arg_operation,
+ GCancellable *cancellable,
+ GError **error);
+
+void um_realm_service_call_set_locale (
+ UmRealmService *proxy,
+ const gchar *arg_locale,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean um_realm_service_call_set_locale_finish (
+ UmRealmService *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean um_realm_service_call_set_locale_sync (
+ UmRealmService *proxy,
+ const gchar *arg_locale,
+ GCancellable *cancellable,
+ GError **error);
+
+void um_realm_service_call_release (
+ UmRealmService *proxy,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean um_realm_service_call_release_finish (
+ UmRealmService *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean um_realm_service_call_release_sync (
+ UmRealmService *proxy,
+ GCancellable *cancellable,
+ GError **error);
+
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_SERVICE_PROXY (um_realm_service_proxy_get_type ())
+#define UM_REALM_SERVICE_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_SERVICE_PROXY,
UmRealmServiceProxy))
+#define UM_REALM_SERVICE_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UM_REALM_TYPE_SERVICE_PROXY,
UmRealmServiceProxyClass))
+#define UM_REALM_SERVICE_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), UM_REALM_TYPE_SERVICE_PROXY,
UmRealmServiceProxyClass))
+#define UM_REALM_IS_SERVICE_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_SERVICE_PROXY))
+#define UM_REALM_IS_SERVICE_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UM_REALM_TYPE_SERVICE_PROXY))
+
+typedef struct _UmRealmServiceProxy UmRealmServiceProxy;
+typedef struct _UmRealmServiceProxyClass UmRealmServiceProxyClass;
+typedef struct _UmRealmServiceProxyPrivate UmRealmServiceProxyPrivate;
+
+struct _UmRealmServiceProxy
+{
+ /*< private >*/
+ GDBusProxy parent_instance;
+ UmRealmServiceProxyPrivate *priv;
+};
+
+struct _UmRealmServiceProxyClass
+{
+ GDBusProxyClass parent_class;
+};
+
+GType um_realm_service_proxy_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmServiceProxy, g_object_unref)
+#endif
+
+void um_realm_service_proxy_new (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+UmRealmService *um_realm_service_proxy_new_finish (
+ GAsyncResult *res,
+ GError **error);
+UmRealmService *um_realm_service_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+void um_realm_service_proxy_new_for_bus (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+UmRealmService *um_realm_service_proxy_new_for_bus_finish (
+ GAsyncResult *res,
+ GError **error);
+UmRealmService *um_realm_service_proxy_new_for_bus_sync (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_SERVICE_SKELETON (um_realm_service_skeleton_get_type ())
+#define UM_REALM_SERVICE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_SERVICE_SKELETON,
UmRealmServiceSkeleton))
+#define UM_REALM_SERVICE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UM_REALM_TYPE_SERVICE_SKELETON,
UmRealmServiceSkeletonClass))
+#define UM_REALM_SERVICE_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o),
UM_REALM_TYPE_SERVICE_SKELETON, UmRealmServiceSkeletonClass))
+#define UM_REALM_IS_SERVICE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_SERVICE_SKELETON))
+#define UM_REALM_IS_SERVICE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UM_REALM_TYPE_SERVICE_SKELETON))
+
+typedef struct _UmRealmServiceSkeleton UmRealmServiceSkeleton;
+typedef struct _UmRealmServiceSkeletonClass UmRealmServiceSkeletonClass;
+typedef struct _UmRealmServiceSkeletonPrivate UmRealmServiceSkeletonPrivate;
+
+struct _UmRealmServiceSkeleton
+{
+ /*< private >*/
+ GDBusInterfaceSkeleton parent_instance;
+ UmRealmServiceSkeletonPrivate *priv;
+};
+
+struct _UmRealmServiceSkeletonClass
+{
+ GDBusInterfaceSkeletonClass parent_class;
+};
+
+GType um_realm_service_skeleton_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmServiceSkeleton, g_object_unref)
+#endif
+
+UmRealmService *um_realm_service_skeleton_new (void);
+
+
+/* ------------------------------------------------------------------------ */
+/* Declarations for org.freedesktop.realmd.Realm */
+
+#define UM_REALM_TYPE_COMMON (um_realm_common_get_type ())
+#define UM_REALM_COMMON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_COMMON, UmRealmCommon))
+#define UM_REALM_IS_COMMON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_COMMON))
+#define UM_REALM_COMMON_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), UM_REALM_TYPE_COMMON,
UmRealmCommonIface))
+
+struct _UmRealmCommon;
+typedef struct _UmRealmCommon UmRealmCommon;
+typedef struct _UmRealmCommonIface UmRealmCommonIface;
+
+struct _UmRealmCommonIface
+{
+ GTypeInterface parent_iface;
+
+
+ gboolean (*handle_change_login_policy) (
+ UmRealmCommon *object,
+ GDBusMethodInvocation *invocation,
+ const gchar *arg_login_policy,
+ const gchar *const *arg_permitted_add,
+ const gchar *const *arg_permitted_remove,
+ GVariant *arg_options);
+
+ gboolean (*handle_deconfigure) (
+ UmRealmCommon *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *arg_options);
+
+ const gchar * (*get_configured) (UmRealmCommon *object);
+
+ GVariant * (*get_details) (UmRealmCommon *object);
+
+ const gchar *const * (*get_login_formats) (UmRealmCommon *object);
+
+ const gchar * (*get_login_policy) (UmRealmCommon *object);
+
+ const gchar * (*get_name) (UmRealmCommon *object);
+
+ const gchar *const * (*get_permitted_logins) (UmRealmCommon *object);
+
+ const gchar *const * (*get_supported_interfaces) (UmRealmCommon *object);
+
+};
+
+GType um_realm_common_get_type (void) G_GNUC_CONST;
+
+GDBusInterfaceInfo *um_realm_common_interface_info (void);
+guint um_realm_common_override_properties (GObjectClass *klass, guint property_id_begin);
+
+
+/* D-Bus method call completion functions: */
+void um_realm_common_complete_deconfigure (
+ UmRealmCommon *object,
+ GDBusMethodInvocation *invocation);
+
+void um_realm_common_complete_change_login_policy (
+ UmRealmCommon *object,
+ GDBusMethodInvocation *invocation);
+
+
+
+/* D-Bus method calls: */
+void um_realm_common_call_deconfigure (
+ UmRealmCommon *proxy,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean um_realm_common_call_deconfigure_finish (
+ UmRealmCommon *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean um_realm_common_call_deconfigure_sync (
+ UmRealmCommon *proxy,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GError **error);
+
+void um_realm_common_call_change_login_policy (
+ UmRealmCommon *proxy,
+ const gchar *arg_login_policy,
+ const gchar *const *arg_permitted_add,
+ const gchar *const *arg_permitted_remove,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean um_realm_common_call_change_login_policy_finish (
+ UmRealmCommon *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean um_realm_common_call_change_login_policy_sync (
+ UmRealmCommon *proxy,
+ const gchar *arg_login_policy,
+ const gchar *const *arg_permitted_add,
+ const gchar *const *arg_permitted_remove,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GError **error);
+
+
+
+/* D-Bus property accessors: */
+const gchar *um_realm_common_get_name (UmRealmCommon *object);
+gchar *um_realm_common_dup_name (UmRealmCommon *object);
+void um_realm_common_set_name (UmRealmCommon *object, const gchar *value);
+
+const gchar *um_realm_common_get_configured (UmRealmCommon *object);
+gchar *um_realm_common_dup_configured (UmRealmCommon *object);
+void um_realm_common_set_configured (UmRealmCommon *object, const gchar *value);
+
+const gchar *const *um_realm_common_get_supported_interfaces (UmRealmCommon *object);
+gchar **um_realm_common_dup_supported_interfaces (UmRealmCommon *object);
+void um_realm_common_set_supported_interfaces (UmRealmCommon *object, const gchar *const *value);
+
+GVariant *um_realm_common_get_details (UmRealmCommon *object);
+GVariant *um_realm_common_dup_details (UmRealmCommon *object);
+void um_realm_common_set_details (UmRealmCommon *object, GVariant *value);
+
+const gchar *const *um_realm_common_get_login_formats (UmRealmCommon *object);
+gchar **um_realm_common_dup_login_formats (UmRealmCommon *object);
+void um_realm_common_set_login_formats (UmRealmCommon *object, const gchar *const *value);
+
+const gchar *um_realm_common_get_login_policy (UmRealmCommon *object);
+gchar *um_realm_common_dup_login_policy (UmRealmCommon *object);
+void um_realm_common_set_login_policy (UmRealmCommon *object, const gchar *value);
+
+const gchar *const *um_realm_common_get_permitted_logins (UmRealmCommon *object);
+gchar **um_realm_common_dup_permitted_logins (UmRealmCommon *object);
+void um_realm_common_set_permitted_logins (UmRealmCommon *object, const gchar *const *value);
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_COMMON_PROXY (um_realm_common_proxy_get_type ())
+#define UM_REALM_COMMON_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_COMMON_PROXY,
UmRealmCommonProxy))
+#define UM_REALM_COMMON_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UM_REALM_TYPE_COMMON_PROXY,
UmRealmCommonProxyClass))
+#define UM_REALM_COMMON_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), UM_REALM_TYPE_COMMON_PROXY,
UmRealmCommonProxyClass))
+#define UM_REALM_IS_COMMON_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_COMMON_PROXY))
+#define UM_REALM_IS_COMMON_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UM_REALM_TYPE_COMMON_PROXY))
+
+typedef struct _UmRealmCommonProxy UmRealmCommonProxy;
+typedef struct _UmRealmCommonProxyClass UmRealmCommonProxyClass;
+typedef struct _UmRealmCommonProxyPrivate UmRealmCommonProxyPrivate;
+
+struct _UmRealmCommonProxy
+{
+ /*< private >*/
+ GDBusProxy parent_instance;
+ UmRealmCommonProxyPrivate *priv;
+};
+
+struct _UmRealmCommonProxyClass
+{
+ GDBusProxyClass parent_class;
+};
+
+GType um_realm_common_proxy_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmCommonProxy, g_object_unref)
+#endif
+
+void um_realm_common_proxy_new (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+UmRealmCommon *um_realm_common_proxy_new_finish (
+ GAsyncResult *res,
+ GError **error);
+UmRealmCommon *um_realm_common_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+void um_realm_common_proxy_new_for_bus (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+UmRealmCommon *um_realm_common_proxy_new_for_bus_finish (
+ GAsyncResult *res,
+ GError **error);
+UmRealmCommon *um_realm_common_proxy_new_for_bus_sync (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_COMMON_SKELETON (um_realm_common_skeleton_get_type ())
+#define UM_REALM_COMMON_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_COMMON_SKELETON,
UmRealmCommonSkeleton))
+#define UM_REALM_COMMON_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UM_REALM_TYPE_COMMON_SKELETON,
UmRealmCommonSkeletonClass))
+#define UM_REALM_COMMON_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o),
UM_REALM_TYPE_COMMON_SKELETON, UmRealmCommonSkeletonClass))
+#define UM_REALM_IS_COMMON_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_COMMON_SKELETON))
+#define UM_REALM_IS_COMMON_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UM_REALM_TYPE_COMMON_SKELETON))
+
+typedef struct _UmRealmCommonSkeleton UmRealmCommonSkeleton;
+typedef struct _UmRealmCommonSkeletonClass UmRealmCommonSkeletonClass;
+typedef struct _UmRealmCommonSkeletonPrivate UmRealmCommonSkeletonPrivate;
+
+struct _UmRealmCommonSkeleton
+{
+ /*< private >*/
+ GDBusInterfaceSkeleton parent_instance;
+ UmRealmCommonSkeletonPrivate *priv;
+};
+
+struct _UmRealmCommonSkeletonClass
+{
+ GDBusInterfaceSkeletonClass parent_class;
+};
+
+GType um_realm_common_skeleton_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmCommonSkeleton, g_object_unref)
+#endif
+
+UmRealmCommon *um_realm_common_skeleton_new (void);
+
+
+/* ------------------------------------------------------------------------ */
+/* Declarations for org.freedesktop.realmd.Kerberos */
+
+#define UM_REALM_TYPE_KERBEROS (um_realm_kerberos_get_type ())
+#define UM_REALM_KERBEROS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_KERBEROS, UmRealmKerberos))
+#define UM_REALM_IS_KERBEROS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_KERBEROS))
+#define UM_REALM_KERBEROS_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), UM_REALM_TYPE_KERBEROS,
UmRealmKerberosIface))
+
+struct _UmRealmKerberos;
+typedef struct _UmRealmKerberos UmRealmKerberos;
+typedef struct _UmRealmKerberosIface UmRealmKerberosIface;
+
+struct _UmRealmKerberosIface
+{
+ GTypeInterface parent_iface;
+
+ const gchar * (*get_domain_name) (UmRealmKerberos *object);
+
+ const gchar * (*get_realm_name) (UmRealmKerberos *object);
+
+};
+
+GType um_realm_kerberos_get_type (void) G_GNUC_CONST;
+
+GDBusInterfaceInfo *um_realm_kerberos_interface_info (void);
+guint um_realm_kerberos_override_properties (GObjectClass *klass, guint property_id_begin);
+
+
+/* D-Bus property accessors: */
+const gchar *um_realm_kerberos_get_realm_name (UmRealmKerberos *object);
+gchar *um_realm_kerberos_dup_realm_name (UmRealmKerberos *object);
+void um_realm_kerberos_set_realm_name (UmRealmKerberos *object, const gchar *value);
+
+const gchar *um_realm_kerberos_get_domain_name (UmRealmKerberos *object);
+gchar *um_realm_kerberos_dup_domain_name (UmRealmKerberos *object);
+void um_realm_kerberos_set_domain_name (UmRealmKerberos *object, const gchar *value);
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_KERBEROS_PROXY (um_realm_kerberos_proxy_get_type ())
+#define UM_REALM_KERBEROS_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_KERBEROS_PROXY,
UmRealmKerberosProxy))
+#define UM_REALM_KERBEROS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UM_REALM_TYPE_KERBEROS_PROXY,
UmRealmKerberosProxyClass))
+#define UM_REALM_KERBEROS_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), UM_REALM_TYPE_KERBEROS_PROXY,
UmRealmKerberosProxyClass))
+#define UM_REALM_IS_KERBEROS_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_KERBEROS_PROXY))
+#define UM_REALM_IS_KERBEROS_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UM_REALM_TYPE_KERBEROS_PROXY))
+
+typedef struct _UmRealmKerberosProxy UmRealmKerberosProxy;
+typedef struct _UmRealmKerberosProxyClass UmRealmKerberosProxyClass;
+typedef struct _UmRealmKerberosProxyPrivate UmRealmKerberosProxyPrivate;
+
+struct _UmRealmKerberosProxy
+{
+ /*< private >*/
+ GDBusProxy parent_instance;
+ UmRealmKerberosProxyPrivate *priv;
+};
+
+struct _UmRealmKerberosProxyClass
+{
+ GDBusProxyClass parent_class;
+};
+
+GType um_realm_kerberos_proxy_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmKerberosProxy, g_object_unref)
+#endif
+
+void um_realm_kerberos_proxy_new (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+UmRealmKerberos *um_realm_kerberos_proxy_new_finish (
+ GAsyncResult *res,
+ GError **error);
+UmRealmKerberos *um_realm_kerberos_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+void um_realm_kerberos_proxy_new_for_bus (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+UmRealmKerberos *um_realm_kerberos_proxy_new_for_bus_finish (
+ GAsyncResult *res,
+ GError **error);
+UmRealmKerberos *um_realm_kerberos_proxy_new_for_bus_sync (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_KERBEROS_SKELETON (um_realm_kerberos_skeleton_get_type ())
+#define UM_REALM_KERBEROS_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_KERBEROS_SKELETON,
UmRealmKerberosSkeleton))
+#define UM_REALM_KERBEROS_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UM_REALM_TYPE_KERBEROS_SKELETON,
UmRealmKerberosSkeletonClass))
+#define UM_REALM_KERBEROS_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o),
UM_REALM_TYPE_KERBEROS_SKELETON, UmRealmKerberosSkeletonClass))
+#define UM_REALM_IS_KERBEROS_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_KERBEROS_SKELETON))
+#define UM_REALM_IS_KERBEROS_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k),
UM_REALM_TYPE_KERBEROS_SKELETON))
+
+typedef struct _UmRealmKerberosSkeleton UmRealmKerberosSkeleton;
+typedef struct _UmRealmKerberosSkeletonClass UmRealmKerberosSkeletonClass;
+typedef struct _UmRealmKerberosSkeletonPrivate UmRealmKerberosSkeletonPrivate;
+
+struct _UmRealmKerberosSkeleton
+{
+ /*< private >*/
+ GDBusInterfaceSkeleton parent_instance;
+ UmRealmKerberosSkeletonPrivate *priv;
+};
+
+struct _UmRealmKerberosSkeletonClass
+{
+ GDBusInterfaceSkeletonClass parent_class;
+};
+
+GType um_realm_kerberos_skeleton_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmKerberosSkeleton, g_object_unref)
+#endif
+
+UmRealmKerberos *um_realm_kerberos_skeleton_new (void);
+
+
+/* ------------------------------------------------------------------------ */
+/* Declarations for org.freedesktop.realmd.KerberosMembership */
+
+#define UM_REALM_TYPE_KERBEROS_MEMBERSHIP (um_realm_kerberos_membership_get_type ())
+#define UM_REALM_KERBEROS_MEMBERSHIP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_KERBEROS_MEMBERSHIP,
UmRealmKerberosMembership))
+#define UM_REALM_IS_KERBEROS_MEMBERSHIP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP))
+#define UM_REALM_KERBEROS_MEMBERSHIP_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP, UmRealmKerberosMembershipIface))
+
+struct _UmRealmKerberosMembership;
+typedef struct _UmRealmKerberosMembership UmRealmKerberosMembership;
+typedef struct _UmRealmKerberosMembershipIface UmRealmKerberosMembershipIface;
+
+struct _UmRealmKerberosMembershipIface
+{
+ GTypeInterface parent_iface;
+
+
+ gboolean (*handle_join) (
+ UmRealmKerberosMembership *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *arg_credentials,
+ GVariant *arg_options);
+
+ gboolean (*handle_leave) (
+ UmRealmKerberosMembership *object,
+ GDBusMethodInvocation *invocation,
+ GVariant *arg_credentials,
+ GVariant *arg_options);
+
+ const gchar * (*get_suggested_administrator) (UmRealmKerberosMembership *object);
+
+ GVariant * (*get_supported_join_credentials) (UmRealmKerberosMembership *object);
+
+ GVariant * (*get_supported_leave_credentials) (UmRealmKerberosMembership *object);
+
+};
+
+GType um_realm_kerberos_membership_get_type (void) G_GNUC_CONST;
+
+GDBusInterfaceInfo *um_realm_kerberos_membership_interface_info (void);
+guint um_realm_kerberos_membership_override_properties (GObjectClass *klass, guint property_id_begin);
+
+
+/* D-Bus method call completion functions: */
+void um_realm_kerberos_membership_complete_join (
+ UmRealmKerberosMembership *object,
+ GDBusMethodInvocation *invocation);
+
+void um_realm_kerberos_membership_complete_leave (
+ UmRealmKerberosMembership *object,
+ GDBusMethodInvocation *invocation);
+
+
+
+/* D-Bus method calls: */
+void um_realm_kerberos_membership_call_join (
+ UmRealmKerberosMembership *proxy,
+ GVariant *arg_credentials,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean um_realm_kerberos_membership_call_join_finish (
+ UmRealmKerberosMembership *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean um_realm_kerberos_membership_call_join_sync (
+ UmRealmKerberosMembership *proxy,
+ GVariant *arg_credentials,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GError **error);
+
+void um_realm_kerberos_membership_call_leave (
+ UmRealmKerberosMembership *proxy,
+ GVariant *arg_credentials,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean um_realm_kerberos_membership_call_leave_finish (
+ UmRealmKerberosMembership *proxy,
+ GAsyncResult *res,
+ GError **error);
+
+gboolean um_realm_kerberos_membership_call_leave_sync (
+ UmRealmKerberosMembership *proxy,
+ GVariant *arg_credentials,
+ GVariant *arg_options,
+ GCancellable *cancellable,
+ GError **error);
+
+
+
+/* D-Bus property accessors: */
+const gchar *um_realm_kerberos_membership_get_suggested_administrator (UmRealmKerberosMembership *object);
+gchar *um_realm_kerberos_membership_dup_suggested_administrator (UmRealmKerberosMembership *object);
+void um_realm_kerberos_membership_set_suggested_administrator (UmRealmKerberosMembership *object, const
gchar *value);
+
+GVariant *um_realm_kerberos_membership_get_supported_join_credentials (UmRealmKerberosMembership *object);
+GVariant *um_realm_kerberos_membership_dup_supported_join_credentials (UmRealmKerberosMembership *object);
+void um_realm_kerberos_membership_set_supported_join_credentials (UmRealmKerberosMembership *object,
GVariant *value);
+
+GVariant *um_realm_kerberos_membership_get_supported_leave_credentials (UmRealmKerberosMembership *object);
+GVariant *um_realm_kerberos_membership_dup_supported_leave_credentials (UmRealmKerberosMembership *object);
+void um_realm_kerberos_membership_set_supported_leave_credentials (UmRealmKerberosMembership *object,
GVariant *value);
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_KERBEROS_MEMBERSHIP_PROXY (um_realm_kerberos_membership_proxy_get_type ())
+#define UM_REALM_KERBEROS_MEMBERSHIP_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP_PROXY, UmRealmKerberosMembershipProxy))
+#define UM_REALM_KERBEROS_MEMBERSHIP_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP_PROXY, UmRealmKerberosMembershipProxyClass))
+#define UM_REALM_KERBEROS_MEMBERSHIP_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP_PROXY, UmRealmKerberosMembershipProxyClass))
+#define UM_REALM_IS_KERBEROS_MEMBERSHIP_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP_PROXY))
+#define UM_REALM_IS_KERBEROS_MEMBERSHIP_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP_PROXY))
+
+typedef struct _UmRealmKerberosMembershipProxy UmRealmKerberosMembershipProxy;
+typedef struct _UmRealmKerberosMembershipProxyClass UmRealmKerberosMembershipProxyClass;
+typedef struct _UmRealmKerberosMembershipProxyPrivate UmRealmKerberosMembershipProxyPrivate;
+
+struct _UmRealmKerberosMembershipProxy
+{
+ /*< private >*/
+ GDBusProxy parent_instance;
+ UmRealmKerberosMembershipProxyPrivate *priv;
+};
+
+struct _UmRealmKerberosMembershipProxyClass
+{
+ GDBusProxyClass parent_class;
+};
+
+GType um_realm_kerberos_membership_proxy_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmKerberosMembershipProxy, g_object_unref)
+#endif
+
+void um_realm_kerberos_membership_proxy_new (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+UmRealmKerberosMembership *um_realm_kerberos_membership_proxy_new_finish (
+ GAsyncResult *res,
+ GError **error);
+UmRealmKerberosMembership *um_realm_kerberos_membership_proxy_new_sync (
+ GDBusConnection *connection,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+void um_realm_kerberos_membership_proxy_new_for_bus (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+UmRealmKerberosMembership *um_realm_kerberos_membership_proxy_new_for_bus_finish (
+ GAsyncResult *res,
+ GError **error);
+UmRealmKerberosMembership *um_realm_kerberos_membership_proxy_new_for_bus_sync (
+ GBusType bus_type,
+ GDBusProxyFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_KERBEROS_MEMBERSHIP_SKELETON (um_realm_kerberos_membership_skeleton_get_type ())
+#define UM_REALM_KERBEROS_MEMBERSHIP_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP_SKELETON, UmRealmKerberosMembershipSkeleton))
+#define UM_REALM_KERBEROS_MEMBERSHIP_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP_SKELETON, UmRealmKerberosMembershipSkeletonClass))
+#define UM_REALM_KERBEROS_MEMBERSHIP_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP_SKELETON, UmRealmKerberosMembershipSkeletonClass))
+#define UM_REALM_IS_KERBEROS_MEMBERSHIP_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP_SKELETON))
+#define UM_REALM_IS_KERBEROS_MEMBERSHIP_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k),
UM_REALM_TYPE_KERBEROS_MEMBERSHIP_SKELETON))
+
+typedef struct _UmRealmKerberosMembershipSkeleton UmRealmKerberosMembershipSkeleton;
+typedef struct _UmRealmKerberosMembershipSkeletonClass UmRealmKerberosMembershipSkeletonClass;
+typedef struct _UmRealmKerberosMembershipSkeletonPrivate UmRealmKerberosMembershipSkeletonPrivate;
+
+struct _UmRealmKerberosMembershipSkeleton
+{
+ /*< private >*/
+ GDBusInterfaceSkeleton parent_instance;
+ UmRealmKerberosMembershipSkeletonPrivate *priv;
+};
+
+struct _UmRealmKerberosMembershipSkeletonClass
+{
+ GDBusInterfaceSkeletonClass parent_class;
+};
+
+GType um_realm_kerberos_membership_skeleton_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmKerberosMembershipSkeleton, g_object_unref)
+#endif
+
+UmRealmKerberosMembership *um_realm_kerberos_membership_skeleton_new (void);
+
+
+/* ---- */
+
+#define UM_REALM_TYPE_OBJECT (um_realm_object_get_type ())
+#define UM_REALM_OBJECT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_OBJECT, UmRealmObject))
+#define UM_REALM_IS_OBJECT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_OBJECT))
+#define UM_REALM_OBJECT_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), UM_REALM_TYPE_OBJECT,
UmRealmObject))
+
+struct _UmRealmObject;
+typedef struct _UmRealmObject UmRealmObject;
+typedef struct _UmRealmObjectIface UmRealmObjectIface;
+
+struct _UmRealmObjectIface
+{
+ GTypeInterface parent_iface;
+};
+
+GType um_realm_object_get_type (void) G_GNUC_CONST;
+
+UmRealmProvider *um_realm_object_get_provider (UmRealmObject *object);
+UmRealmService *um_realm_object_get_service (UmRealmObject *object);
+UmRealmCommon *um_realm_object_get_common (UmRealmObject *object);
+UmRealmKerberos *um_realm_object_get_kerberos (UmRealmObject *object);
+UmRealmKerberosMembership *um_realm_object_get_kerberos_membership (UmRealmObject *object);
+UmRealmProvider *um_realm_object_peek_provider (UmRealmObject *object);
+UmRealmService *um_realm_object_peek_service (UmRealmObject *object);
+UmRealmCommon *um_realm_object_peek_common (UmRealmObject *object);
+UmRealmKerberos *um_realm_object_peek_kerberos (UmRealmObject *object);
+UmRealmKerberosMembership *um_realm_object_peek_kerberos_membership (UmRealmObject *object);
+
+#define UM_REALM_TYPE_OBJECT_PROXY (um_realm_object_proxy_get_type ())
+#define UM_REALM_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_OBJECT_PROXY,
UmRealmObjectProxy))
+#define UM_REALM_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UM_REALM_TYPE_OBJECT_PROXY,
UmRealmObjectProxyClass))
+#define UM_REALM_OBJECT_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), UM_REALM_TYPE_OBJECT_PROXY,
UmRealmObjectProxyClass))
+#define UM_REALM_IS_OBJECT_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_OBJECT_PROXY))
+#define UM_REALM_IS_OBJECT_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UM_REALM_TYPE_OBJECT_PROXY))
+
+typedef struct _UmRealmObjectProxy UmRealmObjectProxy;
+typedef struct _UmRealmObjectProxyClass UmRealmObjectProxyClass;
+typedef struct _UmRealmObjectProxyPrivate UmRealmObjectProxyPrivate;
+
+struct _UmRealmObjectProxy
+{
+ /*< private >*/
+ GDBusObjectProxy parent_instance;
+ UmRealmObjectProxyPrivate *priv;
+};
+
+struct _UmRealmObjectProxyClass
+{
+ GDBusObjectProxyClass parent_class;
+};
+
+GType um_realm_object_proxy_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmObjectProxy, g_object_unref)
+#endif
+
+UmRealmObjectProxy *um_realm_object_proxy_new (GDBusConnection *connection, const gchar *object_path);
+
+#define UM_REALM_TYPE_OBJECT_SKELETON (um_realm_object_skeleton_get_type ())
+#define UM_REALM_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), UM_REALM_TYPE_OBJECT_SKELETON,
UmRealmObjectSkeleton))
+#define UM_REALM_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), UM_REALM_TYPE_OBJECT_SKELETON,
UmRealmObjectSkeletonClass))
+#define UM_REALM_OBJECT_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o),
UM_REALM_TYPE_OBJECT_SKELETON, UmRealmObjectSkeletonClass))
+#define UM_REALM_IS_OBJECT_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), UM_REALM_TYPE_OBJECT_SKELETON))
+#define UM_REALM_IS_OBJECT_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), UM_REALM_TYPE_OBJECT_SKELETON))
+
+typedef struct _UmRealmObjectSkeleton UmRealmObjectSkeleton;
+typedef struct _UmRealmObjectSkeletonClass UmRealmObjectSkeletonClass;
+typedef struct _UmRealmObjectSkeletonPrivate UmRealmObjectSkeletonPrivate;
+
+struct _UmRealmObjectSkeleton
+{
+ /*< private >*/
+ GDBusObjectSkeleton parent_instance;
+ UmRealmObjectSkeletonPrivate *priv;
+};
+
+struct _UmRealmObjectSkeletonClass
+{
+ GDBusObjectSkeletonClass parent_class;
+};
+
+GType um_realm_object_skeleton_get_type (void) G_GNUC_CONST;
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmObjectSkeleton, g_object_unref)
+#endif
+
+UmRealmObjectSkeleton *um_realm_object_skeleton_new (const gchar *object_path);
+void um_realm_object_skeleton_set_provider (UmRealmObjectSkeleton *object, UmRealmProvider *interface_);
+void um_realm_object_skeleton_set_service (UmRealmObjectSkeleton *object, UmRealmService *interface_);
+void um_realm_object_skeleton_set_common (UmRealmObjectSkeleton *object, UmRealmCommon *interface_);
+void um_realm_object_skeleton_set_kerberos (UmRealmObjectSkeleton *object, UmRealmKerberos *interface_);
+void um_realm_object_skeleton_set_kerberos_membership (UmRealmObjectSkeleton *object,
UmRealmKerberosMembership *interface_);
+
+/* ---- */
+
+#define UM_REALM_TYPE_OBJECT_MANAGER_CLIENT (um_realm_object_manager_client_get_type ())
+#define UM_REALM_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o),
UM_REALM_TYPE_OBJECT_MANAGER_CLIENT, UmRealmObjectManagerClient))
+#define UM_REALM_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k),
UM_REALM_TYPE_OBJECT_MANAGER_CLIENT, UmRealmObjectManagerClientClass))
+#define UM_REALM_OBJECT_MANAGER_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o),
UM_REALM_TYPE_OBJECT_MANAGER_CLIENT, UmRealmObjectManagerClientClass))
+#define UM_REALM_IS_OBJECT_MANAGER_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o),
UM_REALM_TYPE_OBJECT_MANAGER_CLIENT))
+#define UM_REALM_IS_OBJECT_MANAGER_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k),
UM_REALM_TYPE_OBJECT_MANAGER_CLIENT))
+
+typedef struct _UmRealmObjectManagerClient UmRealmObjectManagerClient;
+typedef struct _UmRealmObjectManagerClientClass UmRealmObjectManagerClientClass;
+typedef struct _UmRealmObjectManagerClientPrivate UmRealmObjectManagerClientPrivate;
+
+struct _UmRealmObjectManagerClient
+{
+ /*< private >*/
+ GDBusObjectManagerClient parent_instance;
+ UmRealmObjectManagerClientPrivate *priv;
+};
+
+struct _UmRealmObjectManagerClientClass
+{
+ GDBusObjectManagerClientClass parent_class;
+};
+
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (UmRealmObjectManagerClient, g_object_unref)
+#endif
+
+GType um_realm_object_manager_client_get_type (void) G_GNUC_CONST;
+
+GType um_realm_object_manager_client_get_proxy_type (GDBusObjectManagerClient *manager, const gchar
*object_path, const gchar *interface_name, gpointer user_data);
+
+void um_realm_object_manager_client_new (
+ GDBusConnection *connection,
+ GDBusObjectManagerClientFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+GDBusObjectManager *um_realm_object_manager_client_new_finish (
+ GAsyncResult *res,
+ GError **error);
+GDBusObjectManager *um_realm_object_manager_client_new_sync (
+ GDBusConnection *connection,
+ GDBusObjectManagerClientFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+void um_realm_object_manager_client_new_for_bus (
+ GBusType bus_type,
+ GDBusObjectManagerClientFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+GDBusObjectManager *um_realm_object_manager_client_new_for_bus_finish (
+ GAsyncResult *res,
+ GError **error);
+GDBusObjectManager *um_realm_object_manager_client_new_for_bus_sync (
+ GBusType bus_type,
+ GDBusObjectManagerClientFlags flags,
+ const gchar *name,
+ const gchar *object_path,
+ GCancellable *cancellable,
+ GError **error);
+
+
+G_END_DECLS
+
+#endif /* __UM_REALM_GENERATED_H__ */
diff --git a/panels/wacom/calibrator/meson.build b/panels/wacom/calibrator/meson.build
new file mode 100644
index 0000000..2877904
--- /dev/null
+++ b/panels/wacom/calibrator/meson.build
@@ -0,0 +1,36 @@
+calibrator_inc = include_directories('.')
+
+common_sources = files(
+ 'calibrator.c',
+ 'calibrator-gui.c',
+ 'cc-clock-actor.c',
+ 'cc-target-actor.c'
+)
+
+calibrator_deps = deps + [m_dep]
+
+libwacom_calibrator = static_library(
+ cappletname + '-calibrator',
+ sources: common_sources,
+ include_directories: top_inc,
+ dependencies: calibrator_deps,
+ c_args: cflags
+)
+
+libwacom_calibrator_test = static_library(
+ cappletname + '-calibrator-test',
+ sources: common_sources,
+ include_directories: top_inc,
+ dependencies: calibrator_deps,
+ c_args: test_cflags
+)
+
+sources = common_sources + files('main.c')
+
+executable(
+ 'test-calibrator',
+ sources,
+ include_directories: top_inc,
+ dependencies: calibrator_deps,
+ c_args: cflags
+)
diff --git a/panels/wacom/meson.build b/panels/wacom/meson.build
new file mode 100644
index 0000000..677e96a
--- /dev/null
+++ b/panels/wacom/meson.build
@@ -0,0 +1,108 @@
+deps = common_deps + [
+ clutter_dep,
+ clutter_gtk_dep,
+ gnome_desktop_dep,
+ gnome_settings_dep,
+ libwacom_dep,
+ x11_dep,
+ xi_dep
+]
+
+cflags = ['-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)]
+
+test_cflags = cflags + ['-DFAKE_AREA']
+
+subdir('calibrator')
+
+panel_list += cappletname
+desktop = 'gnome-' + cappletname + '-panel.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+common_sources = files(
+ 'cc-tablet-tool-map.c',
+ 'cc-wacom-button-row.c',
+ 'cc-wacom-device.c',
+ 'cc-wacom-mapping-panel.c',
+ 'cc-wacom-nav-button.c',
+ 'cc-wacom-page.c',
+ 'cc-wacom-stylus-page.c',
+ 'cc-wacom-tool.c',
+ 'gsd-wacom-key-shortcut-button.c'
+)
+
+resource_data = files(
+ 'button-mapping.ui',
+ 'gnome-wacom-properties.ui',
+ 'wacom-stylus-airbrush.svg',
+ 'wacom-stylus-art-pen.svg',
+ 'wacom-stylus-classic.svg',
+ 'wacom-stylus-inking.svg',
+ 'wacom-stylus-no-eraser.svg',
+ 'wacom-stylus-page.ui',
+ 'wacom-stylus.svg',
+ 'wacom-tablet-cintiq.svg',
+ 'wacom-tablet-pc.svg',
+ 'wacom-tablet.svg'
+)
+
+common_sources += gnome.compile_resources(
+ 'cc-' + cappletname + '-resources',
+ cappletname + '.gresource.xml',
+ source_dir: '.',
+ c_name: 'cc_' + cappletname,
+ dependencies: resource_data,
+ export: true
+)
+
+sources = common_sources + files(
+ 'cc-' + cappletname + '-panel.c',
+ 'cc-drawing-area.c'
+)
+
+incs = [
+ top_inc,
+ common_inc,
+ calibrator_inc
+]
+
+libwacom_properties = static_library(
+ cappletname + '-properties',
+ sources: sources,
+ include_directories: incs,
+ dependencies: deps,
+ c_args: cflags,
+ link_with: [
+ libdevice,
+ libwacom_calibrator
+ ]
+)
+
+name = 'test-wacom'
+
+sources = common_sources + files(name + '.c')
+
+executable(
+ name,
+ sources,
+ include_directories: incs,
+ dependencies: deps,
+ c_args: test_cflags,
+ link_with: [
+ libdevice,
+ libwacom_calibrator_test
+ ]
+)
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..ac7bc95
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(control_center_api_name, preset: 'glib')
diff --git a/search-provider/meson.build b/search-provider/meson.build
new file mode 100644
index 0000000..0fd8699
--- /dev/null
+++ b/search-provider/meson.build
@@ -0,0 +1,50 @@
+service_conf = configuration_data()
+service_conf.set('libexecdir', control_center_libexecdir)
+
+service = 'org.gnome.ControlCenter.SearchProvider.service'
+
+configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'dbus-1', 'services'),
+ configuration: service_conf
+)
+
+install_data(
+ 'gnome-control-center-search-provider.ini',
+ install_dir: join_paths(control_center_datadir, 'gnome-shell', 'search-providers')
+)
+
+sources = files(
+ 'cc-search-provider.c',
+ 'control-center-search-provider.c'
+)
+
+# The upstream for the DBus interface definition is
+# at http://git.gnome.org/browse/gnome-shell/plain/data/org.gnome.ShellSearchProvider2.xml
+sources += gnome.gdbus_codegen(
+ 'cc-shell-search-provider-generated',
+ 'org.gnome.ShellSearchProvider2.xml',
+ interface_prefix: 'org.gnome.',
+ namespace: 'Cc'
+)
+
+cflags = '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+
+libs = [
+ liblanguage,
+ libpanel_loader,
+ libshell
+]
+
+executable(
+ meson.project_name() + '-search-provider',
+ sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: shell_deps,
+ c_args: cflags,
+ link_with: libs,
+ install: true,
+ install_dir: control_center_libexecdir
+)
diff --git a/shell/alt/meson.build b/shell/alt/meson.build
new file mode 100644
index 0000000..36e4063
--- /dev/null
+++ b/shell/alt/meson.build
@@ -0,0 +1,14 @@
+sources = files('cc-window.c')
+
+cflags = [
+ '-DCC_ENABLE_ALT_CATEGORIES',
+ '-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
+]
+
+libshell_alt = static_library(
+ 'shell_alt',
+ sources: sources,
+ include_directories: [top_inc, common_inc, shell_inc],
+ dependencies: libgd_dep,
+ c_args: cflags
+)
diff --git a/shell/appdata/meson.build b/shell/appdata/meson.build
new file mode 100644
index 0000000..7a0a334
--- /dev/null
+++ b/shell/appdata/meson.build
@@ -0,0 +1,10 @@
+info = meson.project_name() + '.metainfo.xml'
+
+custom_target(
+ info,
+ input: meson.project_name() + '.appdata.xml.in',
+ output: info,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'metainfo')
+)
diff --git a/shell/completions/meson.build b/shell/completions/meson.build
new file mode 100644
index 0000000..beeacea
--- /dev/null
+++ b/shell/completions/meson.build
@@ -0,0 +1,14 @@
+# FIXME: not useful anymore
+#panels = run_command(list_panel, meson.source_root()).stdout().strip()
+
+completion_conf = configuration_data()
+#completion_conf.set('PANELS', panels)
+completion_conf.set('PANELS', ' '.join(panel_list))
+
+desktop_in = configure_file(
+ input: meson.project_name() + '.in',
+ output: meson.project_name(),
+ configuration: completion_conf,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'bash-completion', 'completions')
+)
diff --git a/shell/meson.build b/shell/meson.build
new file mode 100644
index 0000000..b636e93
--- /dev/null
+++ b/shell/meson.build
@@ -0,0 +1,180 @@
+subdir('appdata')
+subdir('alt')
+
+# FIXME: not useful anymore
+#list_panel = find_program('list-panel.sh')
+
+subdir('completions')
+
+service_conf = configuration_data()
+service_conf.set('bindir', control_center_bindir)
+
+service = 'org.gnome.ControlCenter.service'
+
+configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: join_paths(control_center_datadir, 'dbus-1', 'services'),
+ configuration: service_conf
+)
+
+desktop = meson.project_name() + '.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.in.in',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: control_center_desktopdir
+)
+
+cflags = ['-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)]
+
+libshell = static_library(
+ 'shell',
+ sources: 'cc-shell-model.c',
+ include_directories: [top_inc, common_inc],
+ dependencies: common_deps,
+ c_args: cflags
+)
+
+common_sources = files(
+ 'cc-application.c',
+ 'cc-editable-entry.c',
+ 'cc-hostname-entry.c',
+ 'cc-panel-loader.c',
+ 'cc-panel.c',
+ 'cc-shell-category-view.c',
+ 'cc-shell-item-view.c',
+ 'cc-shell-log.c',
+ 'cc-shell.c',
+ 'hostname-helper.c',
+ 'list-box-helper.c',
+ 'main.c'
+)
+
+resource_data = files(
+ 'help-overlay.ui',
+ 'panel-list.ui',
+ 'window.ui'
+)
+
+common_sources += gnome.compile_resources(
+ 'resources',
+ meson.project_name() + '.gresource.xml',
+ source_dir: '.',
+ dependencies: resource_data,
+ export: true
+)
+
+sources = common_sources + files(
+ 'cc-panel-list.c',
+ 'cc-window.c'
+)
+
+shell_deps = common_deps + [
+ libgd_dep,
+ polkit_gobject_dep,
+ x11_dep
+]
+
+if have_cheese
+ shell_deps += cheese_deps
+endif
+
+libs = [
+ liblanguage,
+ libdevice,
+ libbackground,
+ libpower,
+ libcolor,
+ libdisplay,
+ libmouse_properties,
+ libnotifications,
+ libonline_accounts,
+ libregion,
+ libinfo,
+ libsound,
+ libkeyboard,
+ libuniversal_access,
+ libuser_accounts,
+ libdatetime,
+ libsearch,
+ libprivacy,
+ libsharing,
+ libprinters,
+ libshell
+]
+
+if have_wacom
+ libs += libwacom_properties
+endif
+
+if have_network_manager
+ libs += libnetwork
+endif
+
+if have_bluetooth
+ libs += libbluetooth
+endif
+
+executable(
+ meson.project_name(),
+ sources,
+ include_directories: [top_inc, common_inc],
+ dependencies: shell_deps,
+ c_args: cflags,
+ link_with: libs,
+ install: true,
+ install_dir: control_center_bindir
+)
+
+executable(
+ meson.project_name() + '-alt',
+ common_sources,
+ include_directories: top_inc,
+ dependencies: shell_deps,
+ c_args: cflags + ['-DCC_ENABLE_ALT_CATEGORIES'],
+ link_with: libs + [libshell_alt]
+)
+
+# Because it is confusing and somewhat problematic to directly add and compile
+# cc-panel-loader.o by another directory (i.e. the shell search provider), we
+# have to create a library and link it there, just like libshell.la.
+libpanel_loader = static_library(
+ 'panel_loader',
+ sources: 'cc-panel-loader.c',
+ include_directories: top_inc,
+ dependencies: common_deps,
+ c_args: cflags + ['-DCC_PANEL_LOADER_NO_GTYPES']
+)
+
+test_unit = 'test-hostname'
+
+sources = files(
+ test_unit + '.c',
+ 'hostname-helper.c'
+)
+
+cflags = cflags + [
+ '-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
+ '-DTEST_TOPSRCDIR="@0@"'.format(meson.source_root())
+]
+
+exe = executable(
+ test_unit,
+ sources,
+ include_directories: top_inc,
+ dependencies: common_deps,
+ c_args: cflags
+)
+
+test(test_unit, exe)
diff --git a/subprojects/gvc b/subprojects/gvc
index ce8e488..3093bdb 160000
--- a/subprojects/gvc
+++ b/subprojects/gvc
@@ -1 +1 @@
-Subproject commit ce8e4880ce31e275c40825c4ed756c791107f810
+Subproject commit 3093bdb0777db1b1431bede19373ae5eac98accd
diff --git a/subprojects/libgd b/subprojects/libgd
index 752f65e..cc90107 160000
--- a/subprojects/libgd
+++ b/subprojects/libgd
@@ -1 +1 @@
-Subproject commit 752f65e91ea0d9a2ee8a2d21343bbd97bd0d038a
+Subproject commit cc90107531640bcba6c3c58e5cf6aec94d498763
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]